From 6047f6f8c86fa7a4b68cf681e6cfc587015d390d Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 12:41:51 +0000 Subject: [PATCH 1/2] SDK regeneration --- reference.md | 240 +- .../auth0/client/mgmt/AsyncEventsClient.java | 59 + .../auth0/client/mgmt/AsyncManagementApi.java | 7 + .../client/mgmt/AsyncRawEventsClient.java | 171 ++ .../client/mgmt/AsyncRawGroupsClient.java | 4 + .../mgmt/AsyncRawRefreshTokensClient.java | 106 + .../client/mgmt/AsyncRefreshTokensClient.java | 29 + .../com/auth0/client/mgmt/EventsClient.java | 56 + .../com/auth0/client/mgmt/ManagementApi.java | 7 + .../auth0/client/mgmt/RawEventsClient.java | 139 ++ .../auth0/client/mgmt/RawGroupsClient.java | 4 + .../client/mgmt/RawRefreshTokensClient.java | 85 + .../client/mgmt/RefreshTokensClient.java | 29 + ...ActionModuleVersionsRequestParameters.java | 16 +- ...ctionTriggerBindingsRequestParameters.java | 16 +- ...tActionModuleActionsRequestParameters.java | 16 +- .../GetActionModulesRequestParameters.java | 16 +- .../ListActionVersionsRequestParameters.java | 16 +- ...ntGrantOrganizationsRequestParameters.java | 5 +- .../clients/types/ConnectionsGetRequest.java | 5 +- ...ectionEnabledClientsRequestParameters.java | 13 +- ...rectoryProvisioningsRequestParameters.java | 5 +- ...stScimConfigurationsRequestParameters.java | 5 +- ...stSynchronizedGroupsRequestParameters.java | 5 +- .../auth0/client/mgmt/errors/GoneError.java | 32 + ...ventStreamDeliveriesRequestParameters.java | 5 +- .../ListFlowExecutionsRequestParameters.java | 5 +- ...lowsVaultConnectionsRequestParameters.java | 23 +- .../GetGroupMembersRequestParameters.java | 5 +- .../mgmt/jobs/types/ErrorsGetResponse.java | 12 +- .../ListEncryptionKeysRequestParameters.java | 23 +- ...anizationMemberRolesRequestParameters.java | 23 +- ...zationAllConnectionsRequestParameters.java | 27 +- ...nizationClientGrantsRequestParameters.java | 15 +- ...anizationConnectionsRequestParameters.java | 23 +- ...tionDiscoveryDomainsRequestParameters.java | 5 +- ...anizationInvitationsRequestParameters.java | 35 +- ...tOrganizationMembersRequestParameters.java | 5 +- .../types/ListAculsRequestParameters.java | 15 +- .../ListRolePermissionsRequestParameters.java | 23 +- .../types/ListRoleUsersRequestParameters.java | 5 +- .../AsyncCustomTextClient.java | 8 +- .../AsyncRawCustomTextClient.java | 8 +- .../AsyncRawSsoTicketClient.java | 12 +- .../AsyncSsoTicketClient.java | 12 +- .../selfserviceprofiles/CustomTextClient.java | 8 +- .../RawCustomTextClient.java | 8 +- .../RawSsoTicketClient.java | 12 +- .../selfserviceprofiles/SsoTicketClient.java | 12 +- ...ServiceProfileSsoTicketRequestContent.java | 4 +- .../mgmt/types/ActionBindingRefTypeEnum.java | 12 +- .../mgmt/types/ActionBindingTypeEnum.java | 14 +- .../mgmt/types/ActionExecutionStatusEnum.java | 12 +- .../mgmt/types/ActionTriggerTypeEnum.java | 80 +- .../client/mgmt/types/AculClientFilter.java | 17 +- .../client/mgmt/types/AculContextEnum.java | 66 +- .../client/mgmt/types/AculDomainFilter.java | 17 +- .../mgmt/types/AculOrganizationFilter.java | 17 +- .../AttackProtectionCaptchaProviderId.java | 14 +- .../types/AuthenticationMethodTypeEnum.java | 40 +- .../mgmt/types/BrandingIdentifiers.java | 161 ++ .../mgmt/types/BrandingLoginDisplayEnum.java | 84 + .../mgmt/types/BrandingPhoneDisplay.java | 130 ++ .../types/BrandingPhoneFormattingEnum.java | 86 + .../mgmt/types/BrandingPhoneMaskingEnum.java | 96 + ...dingThemeColorsCaptchaWidgetThemeEnum.java | 14 +- ...tectionAdminNotificationFrequencyEnum.java | 14 +- .../client/mgmt/types/ClientAppTypeEnum.java | 78 +- .../mgmt/types/ClientComplianceLevelEnum.java | 14 +- .../types/ClientCredentialAlgorithmEnum.java | 12 +- ...ionConfigurationAllowedStrategiesEnum.java | 14 +- ...ntOidcBackchannelLogoutInitiatorsEnum.java | 74 +- ...lientSessionTransferDeviceBindingEnum.java | 14 +- .../ClientThirdPartySecurityModeEnum.java | 14 +- .../ConnectionConnectionSettingsPkceEnum.java | 14 +- .../types/ConnectionDpopSigningAlgEnum.java | 12 +- ...onnectionIdTokenSignedResponseAlgEnum.java | 40 +- .../types/ConnectionIdentityProviderEnum.java | 426 ++-- .../types/ConnectionMappingModeEnumOidc.java | 14 +- .../ConnectionOptionsProtocolEnumTwitter.java | 14 +- ...ganizationAssignMembershipOnLoginEnum.java | 14 +- ...onProfileOrganizationShowAsButtonEnum.java | 14 +- .../types/ConnectionPropertiesOptions.java | 216 +- .../mgmt/types/ConnectionResponseCommon.java | 164 +- .../types/ConnectionResponseContentAd.java | 84 +- .../types/ConnectionResponseContentAdfs.java | 84 +- .../ConnectionResponseContentAmazon.java | 84 +- .../types/ConnectionResponseContentApple.java | 84 +- .../types/ConnectionResponseContentAuth0.java | 84 +- .../ConnectionResponseContentAuth0Oidc.java | 84 +- .../ConnectionResponseContentAzureAd.java | 84 +- .../types/ConnectionResponseContentBaidu.java | 84 +- .../ConnectionResponseContentBitbucket.java | 84 +- .../types/ConnectionResponseContentBitly.java | 84 +- .../types/ConnectionResponseContentBox.java | 84 +- .../ConnectionResponseContentCustom.java | 84 +- .../ConnectionResponseContentDaccount.java | 84 +- .../ConnectionResponseContentDropbox.java | 84 +- .../ConnectionResponseContentDwolla.java | 84 +- .../types/ConnectionResponseContentEmail.java | 84 +- .../ConnectionResponseContentEvernote.java | 84 +- ...nectionResponseContentEvernoteSandbox.java | 84 +- .../types/ConnectionResponseContentExact.java | 84 +- .../ConnectionResponseContentFacebook.java | 84 +- .../ConnectionResponseContentFitbit.java | 84 +- .../ConnectionResponseContentGitHub.java | 84 +- .../ConnectionResponseContentGoogleApps.java | 84 +- ...ConnectionResponseContentGoogleOAuth2.java | 84 +- .../ConnectionResponseContentInstagram.java | 84 +- .../types/ConnectionResponseContentIp.java | 84 +- .../types/ConnectionResponseContentLine.java | 84 +- .../ConnectionResponseContentLinkedin.java | 84 +- .../ConnectionResponseContentOAuth1.java | 84 +- .../ConnectionResponseContentOAuth2.java | 84 +- .../ConnectionResponseContentOffice365.java | 84 +- .../types/ConnectionResponseContentOidc.java | 84 +- .../types/ConnectionResponseContentOkta.java | 84 +- .../ConnectionResponseContentPaypal.java | 84 +- ...onnectionResponseContentPaypalSandbox.java | 84 +- ...ConnectionResponseContentPingFederate.java | 84 +- ...nnectionResponseContentPlanningCenter.java | 84 +- .../ConnectionResponseContentSalesforce.java | 84 +- ...ionResponseContentSalesforceCommunity.java | 84 +- ...ctionResponseContentSalesforceSandbox.java | 84 +- .../types/ConnectionResponseContentSaml.java | 84 +- .../ConnectionResponseContentSharepoint.java | 84 +- .../types/ConnectionResponseContentShop.java | 84 +- .../ConnectionResponseContentShopify.java | 84 +- .../types/ConnectionResponseContentSms.java | 84 +- .../ConnectionResponseContentSoundcloud.java | 84 +- ...tionResponseContentThirtySevenSignals.java | 84 +- .../ConnectionResponseContentTwitter.java | 84 +- .../ConnectionResponseContentUntappd.java | 84 +- .../ConnectionResponseContentVkontakte.java | 84 +- .../types/ConnectionResponseContentWeibo.java | 84 +- .../ConnectionResponseContentWindowsLive.java | 84 +- .../ConnectionResponseContentWordpress.java | 84 +- .../types/ConnectionResponseContentYahoo.java | 84 +- .../ConnectionResponseContentYandex.java | 84 +- ...houldTrustEmailVerifiedConnectionEnum.java | 16 +- .../mgmt/types/ConnectionStrategyEnum.java | 390 ++-- ...ectionTokenEndpointAuthSigningAlgEnum.java | 40 +- ...onTokenEndpointJwtcaAudFormatEnumOidc.java | 14 +- .../types/ConnectionUpstreamAliasEnum.java | 40 +- .../mgmt/types/CreateConnectionCommon.java | 126 +- .../CreateConnectionRequestContentAd.java | 46 +- .../CreateConnectionRequestContentAdfs.java | 46 +- .../CreateConnectionRequestContentAmazon.java | 46 +- .../CreateConnectionRequestContentApple.java | 46 +- .../CreateConnectionRequestContentAuth0.java | 46 +- ...eateConnectionRequestContentAuth0Oidc.java | 46 +- ...CreateConnectionRequestContentAzureAd.java | 46 +- .../CreateConnectionRequestContentBaidu.java | 46 +- ...eateConnectionRequestContentBitbucket.java | 46 +- .../CreateConnectionRequestContentBitly.java | 46 +- .../CreateConnectionRequestContentBox.java | 46 +- .../CreateConnectionRequestContentCustom.java | 46 +- ...reateConnectionRequestContentDaccount.java | 46 +- ...CreateConnectionRequestContentDropbox.java | 46 +- .../CreateConnectionRequestContentDwolla.java | 46 +- .../CreateConnectionRequestContentEmail.java | 46 +- ...reateConnectionRequestContentEvernote.java | 46 +- ...nnectionRequestContentEvernoteSandbox.java | 46 +- .../CreateConnectionRequestContentExact.java | 46 +- ...reateConnectionRequestContentFacebook.java | 46 +- .../CreateConnectionRequestContentFitbit.java | 46 +- .../CreateConnectionRequestContentGitHub.java | 46 +- ...ateConnectionRequestContentGoogleApps.java | 46 +- ...eConnectionRequestContentGoogleOAuth2.java | 46 +- ...eateConnectionRequestContentInstagram.java | 46 +- .../CreateConnectionRequestContentIp.java | 46 +- .../CreateConnectionRequestContentLine.java | 46 +- ...reateConnectionRequestContentLinkedin.java | 46 +- .../CreateConnectionRequestContentOAuth1.java | 46 +- .../CreateConnectionRequestContentOAuth2.java | 46 +- ...eateConnectionRequestContentOffice365.java | 46 +- .../CreateConnectionRequestContentOidc.java | 46 +- .../CreateConnectionRequestContentOkta.java | 46 +- .../CreateConnectionRequestContentPaypal.java | 46 +- ...ConnectionRequestContentPaypalSandbox.java | 46 +- ...eConnectionRequestContentPingFederate.java | 46 +- ...onnectionRequestContentPlanningCenter.java | 46 +- ...ateConnectionRequestContentSalesforce.java | 46 +- ...tionRequestContentSalesforceCommunity.java | 46 +- ...ectionRequestContentSalesforceSandbox.java | 46 +- .../CreateConnectionRequestContentSaml.java | 46 +- ...ateConnectionRequestContentSharepoint.java | 46 +- .../CreateConnectionRequestContentShop.java | 46 +- ...CreateConnectionRequestContentShopify.java | 46 +- .../CreateConnectionRequestContentSms.java | 46 +- ...ateConnectionRequestContentSoundcloud.java | 46 +- ...ctionRequestContentThirtySevenSignals.java | 46 +- ...CreateConnectionRequestContentTwitter.java | 46 +- ...CreateConnectionRequestContentUntappd.java | 46 +- ...eateConnectionRequestContentVkontakte.java | 46 +- .../CreateConnectionRequestContentWeibo.java | 46 +- ...teConnectionRequestContentWindowsLive.java | 46 +- ...eateConnectionRequestContentWordpress.java | 46 +- .../CreateConnectionRequestContentYahoo.java | 46 +- .../CreateConnectionRequestContentYandex.java | 46 +- .../mgmt/types/CreateEncryptionKeyType.java | 14 +- ...ateFlowsVaultConnectionActivecampaign.java | 26 +- .../CreateFlowsVaultConnectionAirtable.java | 26 +- .../CreateFlowsVaultConnectionAuth0.java | 25 +- .../CreateFlowsVaultConnectionBigquery.java | 25 +- .../CreateFlowsVaultConnectionClearbit.java | 26 +- .../CreateFlowsVaultConnectionDocusign.java | 26 +- ...reateFlowsVaultConnectionGoogleSheets.java | 26 +- .../types/CreateFlowsVaultConnectionHttp.java | 62 +- .../CreateFlowsVaultConnectionHubspot.java | 38 +- .../types/CreateFlowsVaultConnectionJwt.java | 24 +- .../CreateFlowsVaultConnectionMailchimp.java | 39 +- .../CreateFlowsVaultConnectionMailjet.java | 25 +- .../CreateFlowsVaultConnectionPipedrive.java | 39 +- .../CreateFlowsVaultConnectionSalesforce.java | 26 +- .../CreateFlowsVaultConnectionSendgrid.java | 26 +- .../CreateFlowsVaultConnectionSlack.java | 38 +- .../CreateFlowsVaultConnectionStripe.java | 38 +- .../CreateFlowsVaultConnectionTelegram.java | 25 +- .../CreateFlowsVaultConnectionTwilio.java | 25 +- .../CreateFlowsVaultConnectionWhatsapp.java | 25 +- .../CreateFlowsVaultConnectionZapier.java | 25 +- .../types/CreateLogStreamRequestContent.java | 82 +- .../CreateResourceServerRequestContent.java | 76 +- .../CreateResourceServerResponseContent.java | 58 + ...reateSelfServiceProfileRequestContent.java | 16 +- ...eateSelfServiceProfileResponseContent.java | 8 +- .../CreatedAuthenticationMethodTypeEnum.java | 14 +- ...eatedUserAuthenticationMethodTypeEnum.java | 14 +- .../CustomDomainCustomClientIpHeaderEnum.java | 14 +- .../types/CustomDomainStatusFilterEnum.java | 12 +- .../types/CustomSigningKeyAlgorithmEnum.java | 44 +- .../mgmt/types/CustomSigningKeyCurveEnum.java | 12 +- .../mgmt/types/DeviceCredentialTypeEnum.java | 14 +- .../types/EmailProviderCredentialsSchema.java | 9 +- .../mgmt/types/EmailProviderNameEnum.java | 12 +- .../mgmt/types/EmailTemplateNameEnum.java | 40 +- .../client/mgmt/types/EncryptionKeyType.java | 26 +- .../EventStreamCloudEventA0PurposeEnum.java | 75 + .../types/EventStreamCloudEventContext.java | 212 ++ .../EventStreamCloudEventContextClient.java | 207 ++ ...ventStreamCloudEventContextConnection.java | 197 ++ .../EventStreamCloudEventContextRequest.java | 308 +++ ...ventStreamCloudEventContextRequestGeo.java | 373 +++ .../EventStreamCloudEventContextTenant.java | 130 ++ .../EventStreamCloudEventErrorCodeEnum.java | 130 ++ .../EventStreamCloudEventErrorDetail.java | 198 ++ .../EventStreamCloudEventErrorMessage.java | 119 + ...tStreamCloudEventErrorMessageTypeEnum.java | 75 + .../EventStreamCloudEventGroupCreated.java | 154 ++ ...treamCloudEventGroupCreatedCloudEvent.java | 407 ++++ ...udEventGroupCreatedCloudEventTypeEnum.java | 75 + ...EventStreamCloudEventGroupCreatedData.java | 152 ++ ...entStreamCloudEventGroupCreatedObject.java | 133 ++ ...ntStreamCloudEventGroupCreatedObject0.java | 309 +++ ...CloudEventGroupCreatedObject0TypeEnum.java | 75 + ...ntStreamCloudEventGroupCreatedObject1.java | 309 +++ ...CloudEventGroupCreatedObject1TypeEnum.java | 75 + ...ntStreamCloudEventGroupCreatedObject2.java | 273 +++ ...CloudEventGroupCreatedObject2TypeEnum.java | 75 + ...tStreamCloudEventGroupCreatedTypeEnum.java | 75 + .../EventStreamCloudEventGroupDeleted.java | 154 ++ ...treamCloudEventGroupDeletedCloudEvent.java | 407 ++++ ...udEventGroupDeletedCloudEventTypeEnum.java | 75 + ...EventStreamCloudEventGroupDeletedData.java | 152 ++ ...entStreamCloudEventGroupDeletedObject.java | 136 ++ ...ntStreamCloudEventGroupDeletedObject0.java | 345 +++ ...CloudEventGroupDeletedObject0TypeEnum.java | 75 + ...ntStreamCloudEventGroupDeletedObject1.java | 345 +++ ...CloudEventGroupDeletedObject1TypeEnum.java | 75 + ...ntStreamCloudEventGroupDeletedObject2.java | 309 +++ ...CloudEventGroupDeletedObject2TypeEnum.java | 75 + ...tStreamCloudEventGroupDeletedTypeEnum.java | 75 + ...EventStreamCloudEventGroupMemberAdded.java | 155 ++ ...mCloudEventGroupMemberAddedCloudEvent.java | 407 ++++ ...entGroupMemberAddedCloudEventTypeEnum.java | 76 + ...tStreamCloudEventGroupMemberAddedData.java | 152 ++ ...treamCloudEventGroupMemberAddedObject.java | 144 ++ ...CloudEventGroupMemberAddedObjectGroup.java | 130 ++ ...loudEventGroupMemberAddedObjectGroup0.java | 237 ++ ...tGroupMemberAddedObjectGroup0TypeEnum.java | 76 + ...loudEventGroupMemberAddedObjectGroup1.java | 237 ++ ...tGroupMemberAddedObjectGroup1TypeEnum.java | 76 + ...loudEventGroupMemberAddedObjectGroup2.java | 199 ++ ...tGroupMemberAddedObjectGroup2TypeEnum.java | 76 + ...loudEventGroupMemberAddedObjectMember.java | 112 + ...oudEventGroupMemberAddedObjectMember0.java | 156 ++ ...emberAddedObjectMember0MemberTypeEnum.java | 76 + ...oudEventGroupMemberAddedObjectMember1.java | 228 ++ ...emberAddedObjectMember1MemberTypeEnum.java | 76 + ...eamCloudEventGroupMemberAddedTypeEnum.java | 75 + ...entStreamCloudEventGroupMemberDeleted.java | 155 ++ ...loudEventGroupMemberDeletedCloudEvent.java | 407 ++++ ...tGroupMemberDeletedCloudEventTypeEnum.java | 77 + ...treamCloudEventGroupMemberDeletedData.java | 152 ++ ...eamCloudEventGroupMemberDeletedObject.java | 144 ++ ...oudEventGroupMemberDeletedObjectGroup.java | 130 ++ ...udEventGroupMemberDeletedObjectGroup0.java | 237 ++ ...roupMemberDeletedObjectGroup0TypeEnum.java | 76 + ...udEventGroupMemberDeletedObjectGroup1.java | 237 ++ ...roupMemberDeletedObjectGroup1TypeEnum.java | 76 + ...udEventGroupMemberDeletedObjectGroup2.java | 199 ++ ...roupMemberDeletedObjectGroup2TypeEnum.java | 76 + ...udEventGroupMemberDeletedObjectMember.java | 112 + ...dEventGroupMemberDeletedObjectMember0.java | 156 ++ ...berDeletedObjectMember0MemberTypeEnum.java | 76 + ...dEventGroupMemberDeletedObjectMember1.java | 228 ++ ...berDeletedObjectMember1MemberTypeEnum.java | 76 + ...mCloudEventGroupMemberDeletedTypeEnum.java | 75 + ...ventStreamCloudEventGroupRoleAssigned.java | 155 ++ ...CloudEventGroupRoleAssignedCloudEvent.java | 407 ++++ ...ntGroupRoleAssignedCloudEventTypeEnum.java | 77 + ...StreamCloudEventGroupRoleAssignedData.java | 152 ++ ...reamCloudEventGroupRoleAssignedObject.java | 179 ++ ...loudEventGroupRoleAssignedObjectGroup.java | 130 ++ ...oudEventGroupRoleAssignedObjectGroup0.java | 237 ++ ...GroupRoleAssignedObjectGroup0TypeEnum.java | 76 + ...oudEventGroupRoleAssignedObjectGroup1.java | 237 ++ ...GroupRoleAssignedObjectGroup1TypeEnum.java | 76 + ...oudEventGroupRoleAssignedObjectGroup2.java | 199 ++ ...GroupRoleAssignedObjectGroup2TypeEnum.java | 76 + ...CloudEventGroupRoleAssignedObjectRole.java | 164 ++ ...amCloudEventGroupRoleAssignedTypeEnum.java | 75 + ...EventStreamCloudEventGroupRoleDeleted.java | 155 ++ ...mCloudEventGroupRoleDeletedCloudEvent.java | 407 ++++ ...entGroupRoleDeletedCloudEventTypeEnum.java | 76 + ...tStreamCloudEventGroupRoleDeletedData.java | 152 ++ ...treamCloudEventGroupRoleDeletedObject.java | 179 ++ ...CloudEventGroupRoleDeletedObjectGroup.java | 130 ++ ...loudEventGroupRoleDeletedObjectGroup0.java | 237 ++ ...tGroupRoleDeletedObjectGroup0TypeEnum.java | 76 + ...loudEventGroupRoleDeletedObjectGroup1.java | 237 ++ ...tGroupRoleDeletedObjectGroup1TypeEnum.java | 76 + ...loudEventGroupRoleDeletedObjectGroup2.java | 199 ++ ...tGroupRoleDeletedObjectGroup2TypeEnum.java | 76 + ...mCloudEventGroupRoleDeletedObjectRole.java | 130 ++ ...eamCloudEventGroupRoleDeletedTypeEnum.java | 75 + .../EventStreamCloudEventGroupUpdated.java | 154 ++ ...treamCloudEventGroupUpdatedCloudEvent.java | 407 ++++ ...udEventGroupUpdatedCloudEventTypeEnum.java | 75 + ...EventStreamCloudEventGroupUpdatedData.java | 152 ++ ...entStreamCloudEventGroupUpdatedObject.java | 136 ++ ...ntStreamCloudEventGroupUpdatedObject0.java | 345 +++ ...CloudEventGroupUpdatedObject0TypeEnum.java | 75 + ...ntStreamCloudEventGroupUpdatedObject1.java | 345 +++ ...CloudEventGroupUpdatedObject1TypeEnum.java | 75 + ...ntStreamCloudEventGroupUpdatedObject2.java | 309 +++ ...CloudEventGroupUpdatedObject2TypeEnum.java | 75 + ...tStreamCloudEventGroupUpdatedTypeEnum.java | 75 + ...ventStreamCloudEventOffsetOnlyMessage.java | 130 ++ ...amCloudEventOffsetOnlyMessageTypeEnum.java | 75 + ...entStreamCloudEventOrgConnectionAdded.java | 155 ++ ...loudEventOrgConnectionAddedCloudEvent.java | 407 ++++ ...tOrgConnectionAddedCloudEventTypeEnum.java | 77 + ...treamCloudEventOrgConnectionAddedData.java | 152 ++ ...eamCloudEventOrgConnectionAddedObject.java | 304 +++ ...entOrgConnectionAddedObjectConnection.java | 131 ++ ...tOrgConnectionAddedObjectOrganization.java | 174 ++ ...mCloudEventOrgConnectionAddedTypeEnum.java | 76 + ...tStreamCloudEventOrgConnectionRemoved.java | 155 ++ ...udEventOrgConnectionRemovedCloudEvent.java | 407 ++++ ...rgConnectionRemovedCloudEventTypeEnum.java | 77 + ...eamCloudEventOrgConnectionRemovedData.java | 152 ++ ...mCloudEventOrgConnectionRemovedObject.java | 145 ++ ...tOrgConnectionRemovedObjectConnection.java | 131 ++ ...rgConnectionRemovedObjectOrganization.java | 174 ++ ...loudEventOrgConnectionRemovedTypeEnum.java | 76 + ...tStreamCloudEventOrgConnectionUpdated.java | 155 ++ ...udEventOrgConnectionUpdatedCloudEvent.java | 407 ++++ ...rgConnectionUpdatedCloudEventTypeEnum.java | 77 + ...eamCloudEventOrgConnectionUpdatedData.java | 152 ++ ...mCloudEventOrgConnectionUpdatedObject.java | 304 +++ ...tOrgConnectionUpdatedObjectConnection.java | 131 ++ ...rgConnectionUpdatedObjectOrganization.java | 174 ++ ...loudEventOrgConnectionUpdatedTypeEnum.java | 76 + .../EventStreamCloudEventOrgCreated.java | 152 ++ ...tStreamCloudEventOrgCreatedCloudEvent.java | 407 ++++ ...loudEventOrgCreatedCloudEventTypeEnum.java | 75 + .../EventStreamCloudEventOrgCreatedData.java | 152 ++ ...EventStreamCloudEventOrgCreatedObject.java | 281 +++ ...eamCloudEventOrgCreatedObjectBranding.java | 137 ++ ...udEventOrgCreatedObjectBrandingColors.java | 142 ++ ...entStreamCloudEventOrgCreatedTypeEnum.java | 75 + .../EventStreamCloudEventOrgDeleted.java | 152 ++ ...tStreamCloudEventOrgDeletedCloudEvent.java | 407 ++++ ...loudEventOrgDeletedCloudEventTypeEnum.java | 75 + .../EventStreamCloudEventOrgDeletedData.java | 152 ++ ...EventStreamCloudEventOrgDeletedObject.java | 250 ++ ...entStreamCloudEventOrgDeletedTypeEnum.java | 75 + ...tStreamCloudEventOrgGroupRoleAssigned.java | 155 ++ ...udEventOrgGroupRoleAssignedCloudEvent.java | 407 ++++ ...rgGroupRoleAssignedCloudEventTypeEnum.java | 77 + ...eamCloudEventOrgGroupRoleAssignedData.java | 152 ++ ...mCloudEventOrgGroupRoleAssignedObject.java | 207 ++ ...dEventOrgGroupRoleAssignedObjectGroup.java | 130 ++ ...EventOrgGroupRoleAssignedObjectGroup0.java | 237 ++ ...GroupRoleAssignedObjectGroup0TypeEnum.java | 76 + ...EventOrgGroupRoleAssignedObjectGroup1.java | 237 ++ ...GroupRoleAssignedObjectGroup1TypeEnum.java | 76 + ...EventOrgGroupRoleAssignedObjectGroup2.java | 200 ++ ...GroupRoleAssignedObjectGroup2TypeEnum.java | 76 + ...rgGroupRoleAssignedObjectOrganization.java | 131 ++ ...udEventOrgGroupRoleAssignedObjectRole.java | 164 ++ ...loudEventOrgGroupRoleAssignedTypeEnum.java | 76 + ...ntStreamCloudEventOrgGroupRoleDeleted.java | 155 ++ ...oudEventOrgGroupRoleDeletedCloudEvent.java | 407 ++++ ...OrgGroupRoleDeletedCloudEventTypeEnum.java | 77 + ...reamCloudEventOrgGroupRoleDeletedData.java | 152 ++ ...amCloudEventOrgGroupRoleDeletedObject.java | 207 ++ ...udEventOrgGroupRoleDeletedObjectGroup.java | 130 ++ ...dEventOrgGroupRoleDeletedObjectGroup0.java | 237 ++ ...gGroupRoleDeletedObjectGroup0TypeEnum.java | 76 + ...dEventOrgGroupRoleDeletedObjectGroup1.java | 237 ++ ...gGroupRoleDeletedObjectGroup1TypeEnum.java | 76 + ...dEventOrgGroupRoleDeletedObjectGroup2.java | 199 ++ ...gGroupRoleDeletedObjectGroup2TypeEnum.java | 76 + ...OrgGroupRoleDeletedObjectOrganization.java | 131 ++ ...oudEventOrgGroupRoleDeletedObjectRole.java | 130 ++ ...CloudEventOrgGroupRoleDeletedTypeEnum.java | 76 + .../EventStreamCloudEventOrgMemberAdded.java | 155 ++ ...eamCloudEventOrgMemberAddedCloudEvent.java | 407 ++++ ...EventOrgMemberAddedCloudEventTypeEnum.java | 76 + ...entStreamCloudEventOrgMemberAddedData.java | 152 ++ ...tStreamCloudEventOrgMemberAddedObject.java | 144 ++ ...EventOrgMemberAddedObjectOrganization.java | 174 ++ ...eamCloudEventOrgMemberAddedObjectUser.java | 130 ++ ...treamCloudEventOrgMemberAddedTypeEnum.java | 76 + ...EventStreamCloudEventOrgMemberDeleted.java | 155 ++ ...mCloudEventOrgMemberDeletedCloudEvent.java | 407 ++++ ...entOrgMemberDeletedCloudEventTypeEnum.java | 77 + ...tStreamCloudEventOrgMemberDeletedData.java | 152 ++ ...treamCloudEventOrgMemberDeletedObject.java | 144 ++ ...entOrgMemberDeletedObjectOrganization.java | 174 ++ ...mCloudEventOrgMemberDeletedObjectUser.java | 130 ++ ...eamCloudEventOrgMemberDeletedTypeEnum.java | 76 + ...StreamCloudEventOrgMemberRoleAssigned.java | 155 ++ ...dEventOrgMemberRoleAssignedCloudEvent.java | 407 ++++ ...gMemberRoleAssignedCloudEventTypeEnum.java | 77 + ...amCloudEventOrgMemberRoleAssignedData.java | 152 ++ ...CloudEventOrgMemberRoleAssignedObject.java | 168 ++ ...gMemberRoleAssignedObjectOrganization.java | 131 ++ ...dEventOrgMemberRoleAssignedObjectRole.java | 164 ++ ...dEventOrgMemberRoleAssignedObjectUser.java | 131 ++ ...oudEventOrgMemberRoleAssignedTypeEnum.java | 76 + ...tStreamCloudEventOrgMemberRoleDeleted.java | 155 ++ ...udEventOrgMemberRoleDeletedCloudEvent.java | 407 ++++ ...rgMemberRoleDeletedCloudEventTypeEnum.java | 77 + ...eamCloudEventOrgMemberRoleDeletedData.java | 152 ++ ...mCloudEventOrgMemberRoleDeletedObject.java | 168 ++ ...rgMemberRoleDeletedObjectOrganization.java | 131 ++ ...udEventOrgMemberRoleDeletedObjectRole.java | 164 ++ ...udEventOrgMemberRoleDeletedObjectUser.java | 131 ++ ...loudEventOrgMemberRoleDeletedTypeEnum.java | 76 + .../EventStreamCloudEventOrgUpdated.java | 152 ++ ...tStreamCloudEventOrgUpdatedCloudEvent.java | 407 ++++ ...loudEventOrgUpdatedCloudEventTypeEnum.java | 75 + .../EventStreamCloudEventOrgUpdatedData.java | 152 ++ ...EventStreamCloudEventOrgUpdatedObject.java | 281 +++ ...eamCloudEventOrgUpdatedObjectBranding.java | 137 ++ ...udEventOrgUpdatedObjectBrandingColors.java | 142 ++ ...entStreamCloudEventOrgUpdatedTypeEnum.java | 75 + .../EventStreamCloudEventUserCreated.java | 152 ++ ...StreamCloudEventUserCreatedCloudEvent.java | 407 ++++ ...oudEventUserCreatedCloudEventTypeEnum.java | 75 + .../EventStreamCloudEventUserCreatedData.java | 152 ++ ...ventStreamCloudEventUserCreatedObject.java | 1015 ++++++++ ...dEventUserCreatedObjectIdentitiesItem.java | 174 ++ ...UserCreatedObjectIdentitiesItemCustom.java | 244 ++ ...ObjectIdentitiesItemCustomProfileData.java | 341 +++ ...bjectIdentitiesItemCustomProviderEnum.java | 77 + ...eatedObjectIdentitiesItemCustomUserId.java | 97 + ...erCreatedObjectIdentitiesItemDatabase.java | 245 ++ ...jectIdentitiesItemDatabaseProfileData.java | 341 +++ ...ectIdentitiesItemDatabaseProviderEnum.java | 78 + ...tedObjectIdentitiesItemDatabaseUserId.java | 97 + ...CreatedObjectIdentitiesItemEnterprise.java | 245 ++ ...ctIdentitiesItemEnterpriseProfileData.java | 341 +++ ...tIdentitiesItemEnterpriseProviderEnum.java | 192 ++ ...dObjectIdentitiesItemEnterpriseUserId.java | 97 + ...eatedObjectIdentitiesItemPasswordless.java | 246 ++ ...IdentitiesItemPasswordlessProfileData.java | 341 +++ ...dentitiesItemPasswordlessProviderEnum.java | 89 + ...bjectIdentitiesItemPasswordlessUserId.java | 97 + ...UserCreatedObjectIdentitiesItemSocial.java | 244 ++ ...ObjectIdentitiesItemSocialProfileData.java | 341 +++ ...bjectIdentitiesItemSocialProviderEnum.java | 503 ++++ ...eatedObjectIdentitiesItemSocialUserId.java | 97 + ...ntStreamCloudEventUserCreatedTypeEnum.java | 75 + .../EventStreamCloudEventUserDeleted.java | 152 ++ ...StreamCloudEventUserDeletedCloudEvent.java | 407 ++++ ...oudEventUserDeletedCloudEventTypeEnum.java | 75 + .../EventStreamCloudEventUserDeletedData.java | 152 ++ ...ventStreamCloudEventUserDeletedObject.java | 1053 +++++++++ ...dEventUserDeletedObjectIdentitiesItem.java | 174 ++ ...UserDeletedObjectIdentitiesItemCustom.java | 244 ++ ...ObjectIdentitiesItemCustomProfileData.java | 341 +++ ...bjectIdentitiesItemCustomProviderEnum.java | 77 + ...letedObjectIdentitiesItemCustomUserId.java | 97 + ...erDeletedObjectIdentitiesItemDatabase.java | 245 ++ ...jectIdentitiesItemDatabaseProfileData.java | 341 +++ ...ectIdentitiesItemDatabaseProviderEnum.java | 78 + ...tedObjectIdentitiesItemDatabaseUserId.java | 97 + ...DeletedObjectIdentitiesItemEnterprise.java | 245 ++ ...ctIdentitiesItemEnterpriseProfileData.java | 341 +++ ...tIdentitiesItemEnterpriseProviderEnum.java | 192 ++ ...dObjectIdentitiesItemEnterpriseUserId.java | 97 + ...letedObjectIdentitiesItemPasswordless.java | 246 ++ ...IdentitiesItemPasswordlessProfileData.java | 341 +++ ...dentitiesItemPasswordlessProviderEnum.java | 89 + ...bjectIdentitiesItemPasswordlessUserId.java | 97 + ...UserDeletedObjectIdentitiesItemSocial.java | 244 ++ ...ObjectIdentitiesItemSocialProfileData.java | 341 +++ ...bjectIdentitiesItemSocialProviderEnum.java | 503 ++++ ...letedObjectIdentitiesItemSocialUserId.java | 97 + ...ntStreamCloudEventUserDeletedTypeEnum.java | 75 + .../EventStreamCloudEventUserUpdated.java | 152 ++ ...StreamCloudEventUserUpdatedCloudEvent.java | 407 ++++ ...oudEventUserUpdatedCloudEventTypeEnum.java | 75 + .../EventStreamCloudEventUserUpdatedData.java | 152 ++ ...ventStreamCloudEventUserUpdatedObject.java | 1015 ++++++++ ...dEventUserUpdatedObjectIdentitiesItem.java | 174 ++ ...UserUpdatedObjectIdentitiesItemCustom.java | 244 ++ ...ObjectIdentitiesItemCustomProfileData.java | 341 +++ ...bjectIdentitiesItemCustomProviderEnum.java | 77 + ...datedObjectIdentitiesItemCustomUserId.java | 97 + ...erUpdatedObjectIdentitiesItemDatabase.java | 245 ++ ...jectIdentitiesItemDatabaseProfileData.java | 341 +++ ...ectIdentitiesItemDatabaseProviderEnum.java | 78 + ...tedObjectIdentitiesItemDatabaseUserId.java | 97 + ...UpdatedObjectIdentitiesItemEnterprise.java | 245 ++ ...ctIdentitiesItemEnterpriseProfileData.java | 341 +++ ...tIdentitiesItemEnterpriseProviderEnum.java | 192 ++ ...dObjectIdentitiesItemEnterpriseUserId.java | 97 + ...datedObjectIdentitiesItemPasswordless.java | 246 ++ ...IdentitiesItemPasswordlessProfileData.java | 341 +++ ...dentitiesItemPasswordlessProviderEnum.java | 89 + ...bjectIdentitiesItemPasswordlessUserId.java | 97 + ...UserUpdatedObjectIdentitiesItemSocial.java | 244 ++ ...ObjectIdentitiesItemSocialProfileData.java | 341 +++ ...bjectIdentitiesItemSocialProviderEnum.java | 503 ++++ ...datedObjectIdentitiesItemSocialUserId.java | 97 + ...ntStreamCloudEventUserUpdatedTypeEnum.java | 75 + .../EventStreamDeliveryEventTypeEnum.java | 86 +- .../types/EventStreamDestinationPatch.java | 21 +- .../EventStreamEventBridgeAwsRegionEnum.java | 220 +- .../mgmt/types/EventStreamEventTypeEnum.java | 80 +- ...entStreamSubscribeEventsEventTypeEnum.java | 314 +++ ...ntStreamSubscribeEventsEventTypeParam.java | 100 + ...tStreamSubscribeEventsResponseContent.java | 1522 ++++++++++++ .../types/EventStreamTestEventTypeEnum.java | 82 +- ...entStreamWebhookAuthorizationResponse.java | 29 +- .../mgmt/types/EventStreamsCreateRequest.java | 29 +- .../auth0/client/mgmt/types/FlowAction.java | 133 +- .../mgmt/types/FlowActionActivecampaign.java | 27 +- .../client/mgmt/types/FlowActionAirtable.java | 37 +- .../client/mgmt/types/FlowActionAuth0.java | 85 +- ...lowActionAuth0SendRequestParamsMethod.java | 28 +- .../client/mgmt/types/FlowActionClearbit.java | 25 +- .../client/mgmt/types/FlowActionFlow.java | 84 +- .../FlowActionFlowDelayFlowParamsUnits.java | 14 +- .../FlowActionFlowMapValueParamsFallback.java | 6 +- .../FlowActionFlowMapValueParamsInput.java | 6 +- ...ctionHttpSendRequestParamsContentType.java | 14 +- ...FlowActionHttpSendRequestParamsMethod.java | 28 +- .../client/mgmt/types/FlowActionHubspot.java | 37 +- ...nHubspotEnrollContactParamsWorkflowId.java | 6 +- .../client/mgmt/types/FlowActionJson.java | 37 +- .../client/mgmt/types/FlowActionJwt.java | 37 +- .../FlowActionMailjetSendEmailParams.java | 20 +- .../client/mgmt/types/FlowActionOtp.java | 25 +- .../mgmt/types/FlowActionPipedrive.java | 37 +- ...nPipedriveAddDealParamsOrganizationId.java | 6 +- ...wActionPipedriveAddDealParamsPersonId.java | 6 +- ...owActionPipedriveAddDealParamsStageId.java | 6 +- ...lowActionPipedriveAddDealParamsUserId.java | 6 +- ...PipedriveAddOrganizationParamsOwnerId.java | 6 +- ...ipedriveAddPersonParamsOrganizationId.java | 6 +- ...ActionPipedriveAddPersonParamsOwnerId.java | 6 +- .../mgmt/types/FlowActionSalesforce.java | 49 +- ...SlackPostMessageParamsAttachmentColor.java | 14 +- .../client/mgmt/types/FlowActionStripe.java | 85 +- .../client/mgmt/types/FlowActionTwilio.java | 25 +- ...owActionWhatsappSendMessageParamsType.java | 28 +- .../client/mgmt/types/FlowActionXml.java | 25 +- ...wsVaultConnectioSetupJwtAlgorithmEnum.java | 64 +- ...sVaultConnectionHttpApiKeySetupInEnum.java | 14 +- .../auth0/client/mgmt/types/FormBlock.java | 93 +- .../auth0/client/mgmt/types/FormField.java | 182 +- .../types/FormFieldBooleanConfigOptions.java | 44 +- .../FormFieldPasswordConfigHashEnum.java | 22 +- .../types/FormFieldPaymentConfigCharge.java | 23 +- ...PaymentConfigChargeOneOffCurrencyEnum.java | 40 +- ...PaymentConfigChargeOneOffOneOffAmount.java | 6 +- .../com/auth0/client/mgmt/types/FormNode.java | 32 +- .../auth0/client/mgmt/types/FormWidget.java | 38 +- .../types/GetBrandingResponseContent.java | 28 +- .../GetDefaultDomainResponseContent.java | 25 +- .../GetRefreshTokensRequestParameters.java | 7 +- .../GetResourceServerResponseContent.java | 58 + .../GetSelfServiceProfileResponseContent.java | 8 +- .../types/GuardianEnrollmentFactorEnum.java | 26 +- .../mgmt/types/GuardianFactorNameEnum.java | 46 +- ...uardianFactorsProviderSmsProviderEnum.java | 14 +- .../client/mgmt/types/HookTriggerIdEnum.java | 26 +- .../mgmt/types/IConnectionResponseCommon.java | 2 +- .../mgmt/types/ICreateConnectionCommon.java | 2 +- .../mgmt/types/IdentityProviderEnum.java | 382 +-- .../types/IntegrationFeatureTypeEnum.java | 14 +- .../types/ListActionsRequestParameters.java | 10 +- .../ListClientGrantsRequestParameters.java | 9 +- .../types/ListClientsRequestParameters.java | 15 +- ...istConnectionProfileRequestParameters.java | 5 +- .../types/ListConnectionsQueryParameters.java | 5 +- ...istDeviceCredentialsRequestParameters.java | 43 +- .../ListEventStreamsRequestParameters.java | 5 +- .../types/ListFlowsRequestParameters.java | 15 +- .../types/ListFormsRequestParameters.java | 15 +- .../types/ListGroupsRequestParameters.java | 69 +- .../types/ListHooksRequestParameters.java | 35 +- .../mgmt/types/ListLogsRequestParameters.java | 39 +- .../ListNetworkAclsRequestParameters.java | 23 +- .../ListOrganizationsRequestParameters.java | 5 +- .../ListResourceServerRequestParameters.java | 15 +- .../types/ListRolesRequestParameters.java | 27 +- .../types/ListRulesRequestParameters.java | 35 +- ...tSelfServiceProfilesRequestParameters.java | 23 +- ...UserAttributeProfileRequestParameters.java | 5 +- .../ListUserGrantsRequestParameters.java | 35 +- .../types/ListUsersRequestParameters.java | 52 +- .../LogStreamEventBridgeSinkRegionEnum.java | 220 +- .../types/LogStreamEventGridRegionEnum.java | 134 +- .../types/LogStreamFilterGroupNameEnum.java | 78 +- .../client/mgmt/types/LogStreamSinkPatch.java | 50 +- .../mgmt/types/LogStreamStatusEnum.java | 12 +- .../auth0/client/mgmt/types/OauthScope.java | 2072 +++++++++-------- .../client/mgmt/types/PartialGroupsEnum.java | 22 +- .../mgmt/types/PasswordCharacterTypeEnum.java | 12 +- .../types/PhoneProviderConfiguration.java | 19 +- .../mgmt/types/PhoneProviderCredentials.java | 9 +- .../PhoneTemplateNotificationTypeEnum.java | 14 +- .../mgmt/types/PostConnectionKeysAlgEnum.java | 34 +- .../mgmt/types/PromptGroupNameEnum.java | 152 +- .../client/mgmt/types/PromptLanguageEnum.java | 572 ++--- .../PublicKeyCredentialAlgorithmEnum.java | 14 +- .../client/mgmt/types/ResourceServer.java | 58 + .../ResourceServerAuthorizationPolicy.java | 129 + ...esourceServerTokenDialectResponseEnum.java | 14 +- .../ResourceServerTokenDialectSchemaEnum.java | 14 +- ...rceServerTokenEncryptionAlgorithmEnum.java | 14 +- .../RevokeRefreshTokensRequestContent.java | 172 ++ .../RotateConnectionKeysSigningAlgEnum.java | 40 +- .../mgmt/types/ScreenGroupNameEnum.java | 892 +++---- .../mgmt/types/SearchEngineVersionsEnum.java | 12 +- .../client/mgmt/types/SelfServiceProfile.java | 8 +- ...SelfServiceProfileAllowedStrategyEnum.java | 28 +- ...rviceProfileSsoTicketConnectionConfig.java | 8 +- ...ceProfileSsoTicketDomainAliasesConfig.java | 8 +- ...rofileSsoTicketDomainVerificationEnum.java | 14 +- ...oTicketIdpInitiatedClientProtocolEnum.java | 14 +- ...ProfileSsoTicketProvisioningScopeEnum.java | 28 +- .../client/mgmt/types/SignupStatusEnum.java | 12 +- .../SubscribeEventsRequestParameters.java | 245 ++ .../client/mgmt/types/SupportedLocales.java | 572 ++--- .../mgmt/types/SynchronizeGroupsEnum.java | 12 +- ...DynamicClientRegistrationSecurityMode.java | 14 +- .../TenantSettingsSupportedLocalesEnum.java | 622 ++--- .../TokenExchangeProfilesListRequest.java | 5 +- .../types/UniversalLoginExperienceEnum.java | 12 +- .../mgmt/types/UpdateBrandingIdentifiers.java | 194 ++ .../types/UpdateBrandingLoginDisplayEnum.java | 86 + .../types/UpdateBrandingPhoneDisplay.java | 143 ++ .../UpdateBrandingPhoneFormattingEnum.java | 86 + .../types/UpdateBrandingPhoneMaskingEnum.java | 97 + .../types/UpdateBrandingRequestContent.java | 59 +- .../types/UpdateBrandingResponseContent.java | 29 +- .../mgmt/types/UpdateConnectionOptions.java | 216 +- .../UpdateDefaultDomainResponseContent.java | 26 +- .../UpdateFlowsVaultConnectionSetup.java | 160 +- .../UpdateResourceServerRequestContent.java | 62 +- .../UpdateResourceServerResponseContent.java | 58 + ...pdateSelfServiceProfileRequestContent.java | 4 +- ...dateSelfServiceProfileResponseContent.java | 8 +- ...eUniversalLoginTemplateRequestContent.java | 11 +- ...erAuthenticationMethodResponseContent.java | 45 + .../types/UserEnrollmentAuthMethodEnum.java | 14 +- .../com/auth0/client/mgmt/types/UserId.java | 6 +- .../mgmt/types/UserIdentityProviderEnum.java | 394 ++-- ...serConnectedAccountsRequestParameters.java | 5 +- .../types/GetUserGroupsRequestParameters.java | 5 +- .../ListRefreshTokensRequestParameters.java | 5 +- ...uthenticationMethodsRequestParameters.java | 23 +- .../types/ListUserLogsRequestParameters.java | 27 +- ...istUserOrganizationsRequestParameters.java | 23 +- .../ListUserPermissionsRequestParameters.java | 23 +- .../types/ListUserRolesRequestParameters.java | 23 +- .../ListUserSessionsRequestParameters.java | 5 +- ...eCredentialTemplatesRequestParameters.java | 5 +- .../mgmt/ActionsExecutionsWireTest.java | 4 +- .../mgmt/ActionsModulesVersionsWireTest.java | 4 +- .../client/mgmt/ActionsModulesWireTest.java | 4 +- .../mgmt/ActionsTriggersBindingsWireTest.java | 4 +- .../client/mgmt/ActionsTriggersWireTest.java | 4 +- .../client/mgmt/ActionsVersionsWireTest.java | 4 +- .../auth0/client/mgmt/ActionsWireTest.java | 4 +- .../client/mgmt/AnomalyBlocksWireTest.java | 4 +- .../AttackProtectionBotDetectionWireTest.java | 4 +- ...tionBreachedPasswordDetectionWireTest.java | 4 +- ...rotectionBruteForceProtectionWireTest.java | 4 +- .../mgmt/AttackProtectionCaptchaWireTest.java | 4 +- ...tectionSuspiciousIpThrottlingWireTest.java | 4 +- .../mgmt/BrandingPhoneProvidersWireTest.java | 4 +- .../mgmt/BrandingPhoneTemplatesWireTest.java | 4 +- .../mgmt/BrandingTemplatesWireTest.java | 4 +- .../client/mgmt/BrandingThemesWireTest.java | 4 +- .../auth0/client/mgmt/BrandingWireTest.java | 24 +- .../ClientGrantsOrganizationsWireTest.java | 4 +- .../client/mgmt/ClientGrantsWireTest.java | 4 +- .../mgmt/ClientsConnectionsWireTest.java | 8 +- .../mgmt/ClientsCredentialsWireTest.java | 4 +- .../auth0/client/mgmt/ClientsWireTest.java | 4 +- .../mgmt/ConnectionProfilesWireTest.java | 4 +- .../mgmt/ConnectionsClientsWireTest.java | 4 +- ...yProvisioningSynchronizationsWireTest.java | 4 +- ...nectionsDirectoryProvisioningWireTest.java | 4 +- .../client/mgmt/ConnectionsKeysWireTest.java | 4 +- ...ctionsScimConfigurationTokensWireTest.java | 4 +- .../ConnectionsScimConfigurationWireTest.java | 4 +- .../client/mgmt/ConnectionsUsersWireTest.java | 4 +- .../client/mgmt/ConnectionsWireTest.java | 8 +- .../client/mgmt/CustomDomainsWireTest.java | 4 +- .../mgmt/DeviceCredentialsWireTest.java | 4 +- .../client/mgmt/EmailTemplatesWireTest.java | 4 +- .../client/mgmt/EmailsProviderWireTest.java | 4 +- .../mgmt/EventStreamsDeliveriesWireTest.java | 4 +- .../EventStreamsRedeliveriesWireTest.java | 4 +- .../client/mgmt/EventStreamsWireTest.java | 4 +- .../com/auth0/client/mgmt/EventsWireTest.java | 92 + .../client/mgmt/FlowsExecutionsWireTest.java | 11 +- .../mgmt/FlowsVaultConnectionsWireTest.java | 4 +- .../com/auth0/client/mgmt/FlowsWireTest.java | 17 +- .../com/auth0/client/mgmt/FormsWireTest.java | 16 +- .../client/mgmt/GroupsMembersWireTest.java | 4 +- .../com/auth0/client/mgmt/GroupsWireTest.java | 5 +- .../mgmt/GuardianEnrollmentsWireTest.java | 4 +- .../GuardianFactorsDuoSettingsWireTest.java | 4 +- .../mgmt/GuardianFactorsPhoneWireTest.java | 4 +- ...ardianFactorsPushNotificationWireTest.java | 4 +- .../mgmt/GuardianFactorsSmsWireTest.java | 4 +- .../client/mgmt/GuardianFactorsWireTest.java | 4 +- .../client/mgmt/GuardianPoliciesWireTest.java | 4 +- .../client/mgmt/HooksSecretsWireTest.java | 4 +- .../com/auth0/client/mgmt/HooksWireTest.java | 4 +- .../auth0/client/mgmt/JobsErrorsWireTest.java | 4 +- .../client/mgmt/JobsUsersExportsWireTest.java | 4 +- .../mgmt/JobsVerificationEmailWireTest.java | 4 +- .../com/auth0/client/mgmt/JobsWireTest.java | 4 +- .../mgmt/KeysCustomSigningWireTest.java | 4 +- .../client/mgmt/KeysEncryptionWireTest.java | 4 +- .../client/mgmt/KeysSigningWireTest.java | 4 +- .../auth0/client/mgmt/LogStreamsWireTest.java | 4 +- .../com/auth0/client/mgmt/LogsWireTest.java | 4 +- .../client/mgmt/NetworkAclsWireTest.java | 4 +- .../OrganizationsClientGrantsWireTest.java | 7 +- .../OrganizationsConnectionsWireTest.java | 4 +- ...OrganizationsDiscoveryDomainsWireTest.java | 4 +- ...ganizationsEnabledConnectionsWireTest.java | 4 +- .../OrganizationsInvitationsWireTest.java | 4 +- .../OrganizationsMembersRolesWireTest.java | 4 +- .../mgmt/OrganizationsMembersWireTest.java | 4 +- .../client/mgmt/OrganizationsWireTest.java | 4 +- .../mgmt/PromptsCustomTextWireTest.java | 4 +- .../client/mgmt/PromptsPartialsWireTest.java | 4 +- .../client/mgmt/PromptsRenderingWireTest.java | 4 +- .../auth0/client/mgmt/PromptsWireTest.java | 4 +- .../client/mgmt/RefreshTokensWireTest.java | 44 +- .../client/mgmt/ResourceServersWireTest.java | 192 +- ...kAssessmentsSettingsNewDeviceWireTest.java | 4 +- .../mgmt/RiskAssessmentsSettingsWireTest.java | 4 +- .../client/mgmt/RolesPermissionsWireTest.java | 4 +- .../auth0/client/mgmt/RolesUsersWireTest.java | 4 +- .../com/auth0/client/mgmt/RolesWireTest.java | 4 +- .../client/mgmt/RulesConfigsWireTest.java | 4 +- .../com/auth0/client/mgmt/RulesWireTest.java | 4 +- ...SelfServiceProfilesCustomTextWireTest.java | 4 +- .../SelfServiceProfilesSsoTicketWireTest.java | 4 +- .../mgmt/SelfServiceProfilesWireTest.java | 4 +- .../auth0/client/mgmt/SessionsWireTest.java | 4 +- .../com/auth0/client/mgmt/StatsWireTest.java | 4 +- .../mgmt/SupplementalSignalsWireTest.java | 4 +- .../client/mgmt/TenantsSettingsWireTest.java | 4 +- .../auth0/client/mgmt/TicketsWireTest.java | 4 +- .../mgmt/TokenExchangeProfilesWireTest.java | 4 +- .../client/mgmt/UndiscriminatedUnionTest.java | 154 ++ .../mgmt/UserAttributeProfilesWireTest.java | 4 +- .../auth0/client/mgmt/UserBlocksWireTest.java | 4 +- .../auth0/client/mgmt/UserGrantsWireTest.java | 4 +- .../UsersAuthenticationMethodsWireTest.java | 7 +- .../mgmt/UsersAuthenticatorsWireTest.java | 4 +- .../mgmt/UsersConnectedAccountsWireTest.java | 4 +- .../client/mgmt/UsersEnrollmentsWireTest.java | 4 +- ...FederatedConnectionsTokensetsWireTest.java | 4 +- .../client/mgmt/UsersGroupsWireTest.java | 4 +- .../client/mgmt/UsersIdentitiesWireTest.java | 4 +- .../auth0/client/mgmt/UsersLogsWireTest.java | 4 +- .../client/mgmt/UsersMultifactorWireTest.java | 4 +- .../mgmt/UsersOrganizationsWireTest.java | 4 +- .../client/mgmt/UsersPermissionsWireTest.java | 4 +- .../mgmt/UsersRefreshTokenWireTest.java | 4 +- .../mgmt/UsersRiskAssessmentsWireTest.java | 4 +- .../auth0/client/mgmt/UsersRolesWireTest.java | 4 +- .../client/mgmt/UsersSessionsWireTest.java | 4 +- .../com/auth0/client/mgmt/UsersWireTest.java | 4 +- ...dentialsVerificationTemplatesWireTest.java | 4 +- ...ceServersWireTest_testCreate_response.json | 53 + ...ourceServersWireTest_testGet_response.json | 53 + ...ceServersWireTest_testUpdate_response.json | 53 + 816 files changed, 74023 insertions(+), 9167 deletions(-) create mode 100644 src/main/java/com/auth0/client/mgmt/AsyncEventsClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/AsyncRawEventsClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/EventsClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/RawEventsClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/errors/GoneError.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/BrandingIdentifiers.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/BrandingLoginDisplayEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/BrandingPhoneDisplay.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/BrandingPhoneFormattingEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/BrandingPhoneMaskingEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventA0PurposeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContext.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextConnection.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextRequest.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextRequestGeo.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTenant.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorCodeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorDetail.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorMessage.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorMessageTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreated.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject0.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject0TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject1.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject1TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject2.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject2TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeleted.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject0.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject0TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject1.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject1TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject2.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject2TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAdded.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup0.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup1.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup2.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember0.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember1.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeleted.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup0.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup1.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup2.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember0.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember1.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssigned.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup0.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup1.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup2.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectRole.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeleted.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup0.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup1.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup2.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectRole.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdated.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject0.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject0TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject1.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject1TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject2.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject2TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOffsetOnlyMessage.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOffsetOnlyMessageTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAdded.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectConnection.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganization.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemoved.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectConnection.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectOrganization.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdated.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectConnection.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganization.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreated.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObjectBranding.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObjectBrandingColors.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeleted.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssigned.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectRole.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeleted.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectRole.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAdded.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectOrganization.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectUser.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeleted.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectOrganization.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectUser.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssigned.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectRole.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectUser.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeleted.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectRole.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectUser.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdated.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObjectBranding.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObjectBrandingColors.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreated.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItem.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeleted.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItem.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdated.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedCloudEvent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedCloudEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObject.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItem.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeParam.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsResponseContent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ResourceServerAuthorizationPolicy.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/RevokeRefreshTokensRequestContent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/SubscribeEventsRequestParameters.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/UpdateBrandingIdentifiers.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/UpdateBrandingLoginDisplayEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneDisplay.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneFormattingEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneMaskingEnum.java create mode 100644 src/test/java/com/auth0/client/mgmt/EventsWireTest.java create mode 100644 src/test/java/com/auth0/client/mgmt/UndiscriminatedUnionTest.java create mode 100644 src/test/resources/wire-tests/ResourceServersWireTest_testCreate_response.json create mode 100644 src/test/resources/wire-tests/ResourceServersWireTest_testGet_response.json create mode 100644 src/test/resources/wire-tests/ResourceServersWireTest_testUpdate_response.json diff --git a/reference.md b/reference.md index d42d09caa..eaa0149e1 100644 --- a/reference.md +++ b/reference.md @@ -714,6 +714,14 @@ client.branding().update(
+**identifiers:** `Optional` + +
+
+ +
+
+ **font:** `Optional`
@@ -842,7 +850,7 @@ client.clientGrants().list(
-**defaultFor:** `Optional` — Applies this client grant as the default for all clients in the specified group. The only accepted value is `third_party_clients`, which applies the grant to all third-party clients. Per-client grants for the same audience take precedence. Mutually exclusive with `client_id`. +**defaultFor:** `Optional` — Applies this client grant as the default for all clients in the specified group. The only accepted value is `third_party_clients`, which applies the grant to all third-party clients. Per-client grants for the same audience take precedence. Mutually exclusive with `client_id`.
@@ -3257,6 +3265,9 @@ client.connections().list( .includeFields( OptionalNullable.of(true) ) + .strategy( + Arrays.asList(Optional.of(ConnectionStrategyEnum.AD)) + ) .build() ); ``` @@ -5513,6 +5524,92 @@ client.eventStreams().test(
+ + + + +## Events +
client.events.subscribe() -> Iterable&lt;EventStreamSubscribeEventsResponseContent&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Subscribe to events via Server-Sent Events (SSE) +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.events().subscribe( + SubscribeEventsRequestParameters + .builder() + .from( + OptionalNullable.of("from") + ) + .fromTimestamp( + OptionalNullable.of("from_timestamp") + ) + .eventType( + OptionalNullable.of( + EventStreamSubscribeEventsEventTypeParam.of(EventStreamSubscribeEventsEventTypeEnum.GROUP_CREATED) + ) + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**from:** `Optional` — Opaque token representing position in the stream. If not provided, stream will start from the latest events. + +
+
+ +
+
+ +**fromTimestamp:** `Optional` — RFC-3339 timestamp indicating where to start streaming events from. This should only be used on the initial query when a cursor may not be available. Subsequent requests should use the cursor (from) as it will be more accurate. + +
+
+ +
+
+ +**eventType:** `Optional` — Event type(s) to listen for. Specify multiple times for multiple types (e.g., ?event_type=user.created&event_type=user.updated). If not provided, all event types will be streamed. + +
+
+
+
+ +
@@ -5546,6 +5643,9 @@ client.flows().list( .synchronous( OptionalNullable.of(true) ) + .hydrate( + Arrays.asList(Optional.of(ListFlowsRequestParametersHydrateEnum.FORM_COUNT)) + ) .build() ); ``` @@ -5676,6 +5776,9 @@ client.flows().get( "id", GetFlowRequestParameters .builder() + .hydrate( + Arrays.asList(Optional.of(GetFlowRequestParametersHydrateEnum.FORM_COUNT)) + ) .build() ); ``` @@ -5839,6 +5942,9 @@ client.forms().list( .includeTotals( OptionalNullable.of(true) ) + .hydrate( + Arrays.asList(Optional.of(FormsRequestParametersHydrateEnum.FLOW_COUNT)) + ) .build() ); ``` @@ -6009,6 +6115,9 @@ client.forms().get( "id", GetFormRequestParameters .builder() + .hydrate( + Arrays.asList(Optional.of(FormsRequestParametersHydrateEnum.FLOW_COUNT)) + ) .build() ); ``` @@ -6464,6 +6573,9 @@ client.groups().list( .externalId( OptionalNullable.of("external_id") ) + .search( + OptionalNullable.of("search") + ) .fields( OptionalNullable.of("fields") ) @@ -6516,6 +6628,14 @@ client.groups().list(
+**search:** `Optional` — Search for groups by name or external ID. + +
+
+ +
+
+ **fields:** `Optional` — A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields
@@ -9337,6 +9457,80 @@ client.refreshTokens().list(
+ + + + +
client.refreshTokens.revoke(request) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Revoke refresh tokens in bulk by ID list, user, user+client, or client. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.refreshTokens().revoke( + RevokeRefreshTokensRequestContent + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `Optional>` — Array of refresh token IDs to revoke. Limited to 100 at a time. + +
+
+ +
+
+ +**userId:** `Optional` — Revoke all refresh tokens for this user. + +
+
+ +
+
+ +**clientId:** `Optional` — Revoke all refresh tokens for this client. + +
+
+
+
+ +
@@ -9559,6 +9753,9 @@ client.resourceServers().list( .includeFields( OptionalNullable.of(true) ) + .identifiers( + Arrays.asList(Optional.of("identifiers")) + ) .build() ); ``` @@ -9788,6 +9985,14 @@ client.resourceServers().create( **subjectTypeAuthorization:** `Optional` + + + +
+
+ +**authorizationPolicy:** `Optional` +
@@ -10091,6 +10296,14 @@ client.resourceServers().update( **subjectTypeAuthorization:** `Optional` + + + +
+
+ +**authorizationPolicy:** `Optional` +
@@ -11198,7 +11411,7 @@ client.selfServiceProfiles().create(
-**allowedStrategies:** `Optional>` — List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `auth0-samlp`, `okta-samlp`, `keycloak-samlp`, `pingfederate`] +**allowedStrategies:** `Optional>` — List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `auth0-samlp`, `okta-samlp`, `keycloak-samlp`, `pingfederate`]
@@ -11206,7 +11419,7 @@ client.selfServiceProfiles().create(
-**userAttributes:** `Optional>` — List of attributes to be mapped that will be shown to the user during the SS-SSO flow. +**userAttributes:** `Optional>` — List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow.
@@ -11413,7 +11626,7 @@ client.selfServiceProfiles().update(
-**allowedStrategies:** `Optional>` — List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `auth0-samlp`, `okta-samlp`, `keycloak-samlp`, `pingfederate`] +**allowedStrategies:** `Optional>` — List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `auth0-samlp`, `okta-samlp`, `keycloak-samlp`, `pingfederate`]
@@ -18151,6 +18364,9 @@ client.clients().connections().get( .includeFields( OptionalNullable.of(true) ) + .strategy( + Arrays.asList(Optional.of(ConnectionStrategyEnum.AD)) + ) .build() ); ``` @@ -20518,6 +20734,9 @@ client.flows().executions().get( "execution_id", GetFlowExecutionRequestParameters .builder() + .hydrate( + Arrays.asList(Optional.of(GetFlowExecutionRequestParametersHydrateEnum.DEBUG)) + ) .build() ); ``` @@ -24377,6 +24596,9 @@ client.organizations().clientGrants().list( .includeTotals( OptionalNullable.of(true) ) + .grantIds( + Arrays.asList(Optional.of("grant_ids")) + ) .build() ); ``` @@ -27975,7 +28197,7 @@ client.roles().users().assign(
-Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. +Retrieves text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page.
@@ -28045,7 +28267,7 @@ client.selfServiceProfiles().customText().list("id", SelfServiceProfileCustomTex
-Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. +Updates text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page.
@@ -28131,7 +28353,7 @@ client.selfServiceProfiles().customText().set(
-Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. +Creates an access ticket to initiate the Self-Service Enterprise Configuration flow using a self-service profile.
@@ -28174,7 +28396,7 @@ client.selfServiceProfiles().ssoTicket().create(
-**connectionId:** `Optional` — If provided, this will allow editing of the provided connection during the SSO Flow +**connectionId:** `Optional` — If provided, this will allow editing of the provided connection during the Self-Service Enterprise Configuration flow
@@ -28262,7 +28484,7 @@ client.selfServiceProfiles().ssoTicket().create(
-Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a `202 Accepted` response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a `202 Accepted` response is also returned, signaling that no further action is required. +Revokes a Self-Service Enterprise Configuration access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service Enterprise Configuration session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a `202 Accepted` response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a `202 Accepted` response is also returned, signaling that no further action is required. Clients should treat these `202` responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found.
diff --git a/src/main/java/com/auth0/client/mgmt/AsyncEventsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncEventsClient.java new file mode 100644 index 000000000..c3a0b4634 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/AsyncEventsClient.java @@ -0,0 +1,59 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.types.EventStreamSubscribeEventsResponseContent; +import com.auth0.client.mgmt.types.SubscribeEventsRequestParameters; +import java.util.concurrent.CompletableFuture; + +public class AsyncEventsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawEventsClient rawClient; + + public AsyncEventsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawEventsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawEventsClient withRawResponse() { + return this.rawClient; + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public CompletableFuture> subscribe() { + return this.rawClient.subscribe().thenApply(response -> response.body()); + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public CompletableFuture> subscribe( + RequestOptions requestOptions) { + return this.rawClient.subscribe(requestOptions).thenApply(response -> response.body()); + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public CompletableFuture> subscribe( + SubscribeEventsRequestParameters request) { + return this.rawClient.subscribe(request).thenApply(response -> response.body()); + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public CompletableFuture> subscribe( + SubscribeEventsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.subscribe(request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java b/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java index eb0f4e9e9..57bb605ae 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java @@ -38,6 +38,8 @@ public class AsyncManagementApi { protected final Supplier eventStreamsClient; + protected final Supplier eventsClient; + protected final Supplier flowsClient; protected final Supplier formsClient; @@ -116,6 +118,7 @@ public AsyncManagementApi(ClientOptions clientOptions) { this.deviceCredentialsClient = Suppliers.memoize(() -> new AsyncDeviceCredentialsClient(clientOptions)); this.emailTemplatesClient = Suppliers.memoize(() -> new AsyncEmailTemplatesClient(clientOptions)); this.eventStreamsClient = Suppliers.memoize(() -> new AsyncEventStreamsClient(clientOptions)); + this.eventsClient = Suppliers.memoize(() -> new AsyncEventsClient(clientOptions)); this.flowsClient = Suppliers.memoize(() -> new AsyncFlowsClient(clientOptions)); this.formsClient = Suppliers.memoize(() -> new AsyncFormsClient(clientOptions)); this.userGrantsClient = Suppliers.memoize(() -> new AsyncUserGrantsClient(clientOptions)); @@ -191,6 +194,10 @@ public AsyncEventStreamsClient eventStreams() { return this.eventStreamsClient.get(); } + public AsyncEventsClient events() { + return this.eventsClient.get(); + } + public AsyncFlowsClient flows() { return this.flowsClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawEventsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawEventsClient.java new file mode 100644 index 000000000..72355b02d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawEventsClient.java @@ -0,0 +1,171 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.ResponseBodyReader; +import com.auth0.client.mgmt.core.Stream; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.GoneError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.types.EventStreamSubscribeEventsResponseContent; +import com.auth0.client.mgmt.types.SubscribeEventsRequestParameters; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeUnit; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawEventsClient { + protected final ClientOptions clientOptions; + + public AsyncRawEventsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public CompletableFuture>> + subscribe() { + return subscribe(SubscribeEventsRequestParameters.builder().build()); + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public CompletableFuture>> subscribe( + RequestOptions requestOptions) { + return subscribe(SubscribeEventsRequestParameters.builder().build(), requestOptions); + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public CompletableFuture>> subscribe( + SubscribeEventsRequestParameters request) { + return subscribe(request, null); + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public CompletableFuture>> subscribe( + SubscribeEventsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("events"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + if (!request.getFromTimestamp().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from_timestamp", request.getFromTimestamp().orElse(null), false); + } + if (!request.getEventType().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "event_type", request.getEventType().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + client = client.newBuilder().callTimeout(0, TimeUnit.SECONDS).build(); + CompletableFuture>> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + Stream.fromSse( + EventStreamSubscribeEventsResponseContent.class, + new ResponseBodyReader(response)), + response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 410: + future.completeExceptionally(new GoneError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } +} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawGroupsClient.java index b9614f969..ae7a84603 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawGroupsClient.java @@ -85,6 +85,10 @@ public CompletableFuture>> l QueryStringMapper.addQueryParameter( httpUrl, "external_id", request.getExternalId().orElse(null), false); } + if (!request.getSearch().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "search", request.getSearch().orElse(null), false); + } if (!request.getFields().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "fields", request.getFields().orElse(null), false); diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawRefreshTokensClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawRefreshTokensClient.java index df2ccb09e..db4915293 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawRefreshTokensClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawRefreshTokensClient.java @@ -21,6 +21,7 @@ import com.auth0.client.mgmt.types.GetRefreshTokensPaginatedResponseContent; import com.auth0.client.mgmt.types.GetRefreshTokensRequestParameters; import com.auth0.client.mgmt.types.RefreshTokenResponseContent; +import com.auth0.client.mgmt.types.RevokeRefreshTokensRequestContent; import com.auth0.client.mgmt.types.UpdateRefreshTokenRequestContent; import com.auth0.client.mgmt.types.UpdateRefreshTokenResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; @@ -176,6 +177,111 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public CompletableFuture> revoke() { + return revoke(RevokeRefreshTokensRequestContent.builder().build()); + } + + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public CompletableFuture> revoke(RequestOptions requestOptions) { + return revoke(RevokeRefreshTokensRequestContent.builder().build(), requestOptions); + } + + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public CompletableFuture> revoke(RevokeRefreshTokensRequestContent request) { + return revoke(request, null); + } + + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public CompletableFuture> revoke( + RevokeRefreshTokensRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("refresh-tokens/revoke"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Retrieve refresh token information. */ diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRefreshTokensClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRefreshTokensClient.java index 631db7f3a..85d9082d3 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRefreshTokensClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRefreshTokensClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.types.GetRefreshTokenResponseContent; import com.auth0.client.mgmt.types.GetRefreshTokensRequestParameters; import com.auth0.client.mgmt.types.RefreshTokenResponseContent; +import com.auth0.client.mgmt.types.RevokeRefreshTokensRequestContent; import com.auth0.client.mgmt.types.UpdateRefreshTokenRequestContent; import com.auth0.client.mgmt.types.UpdateRefreshTokenResponseContent; import java.util.concurrent.CompletableFuture; @@ -46,6 +47,34 @@ public CompletableFuture> list( return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); } + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public CompletableFuture revoke() { + return this.rawClient.revoke().thenApply(response -> response.body()); + } + + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public CompletableFuture revoke(RequestOptions requestOptions) { + return this.rawClient.revoke(requestOptions).thenApply(response -> response.body()); + } + + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public CompletableFuture revoke(RevokeRefreshTokensRequestContent request) { + return this.rawClient.revoke(request).thenApply(response -> response.body()); + } + + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public CompletableFuture revoke(RevokeRefreshTokensRequestContent request, RequestOptions requestOptions) { + return this.rawClient.revoke(request, requestOptions).thenApply(response -> response.body()); + } + /** * Retrieve refresh token information. */ diff --git a/src/main/java/com/auth0/client/mgmt/EventsClient.java b/src/main/java/com/auth0/client/mgmt/EventsClient.java new file mode 100644 index 000000000..5e57a5b85 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/EventsClient.java @@ -0,0 +1,56 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.types.EventStreamSubscribeEventsResponseContent; +import com.auth0.client.mgmt.types.SubscribeEventsRequestParameters; + +public class EventsClient { + protected final ClientOptions clientOptions; + + private final RawEventsClient rawClient; + + public EventsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawEventsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawEventsClient withRawResponse() { + return this.rawClient; + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public Iterable subscribe() { + return this.rawClient.subscribe().body(); + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public Iterable subscribe(RequestOptions requestOptions) { + return this.rawClient.subscribe(requestOptions).body(); + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public Iterable subscribe(SubscribeEventsRequestParameters request) { + return this.rawClient.subscribe(request).body(); + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public Iterable subscribe( + SubscribeEventsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.subscribe(request, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/ManagementApi.java b/src/main/java/com/auth0/client/mgmt/ManagementApi.java index f327c483e..febfb2b8c 100644 --- a/src/main/java/com/auth0/client/mgmt/ManagementApi.java +++ b/src/main/java/com/auth0/client/mgmt/ManagementApi.java @@ -38,6 +38,8 @@ public class ManagementApi { protected final Supplier eventStreamsClient; + protected final Supplier eventsClient; + protected final Supplier flowsClient; protected final Supplier formsClient; @@ -116,6 +118,7 @@ public ManagementApi(ClientOptions clientOptions) { this.deviceCredentialsClient = Suppliers.memoize(() -> new DeviceCredentialsClient(clientOptions)); this.emailTemplatesClient = Suppliers.memoize(() -> new EmailTemplatesClient(clientOptions)); this.eventStreamsClient = Suppliers.memoize(() -> new EventStreamsClient(clientOptions)); + this.eventsClient = Suppliers.memoize(() -> new EventsClient(clientOptions)); this.flowsClient = Suppliers.memoize(() -> new FlowsClient(clientOptions)); this.formsClient = Suppliers.memoize(() -> new FormsClient(clientOptions)); this.userGrantsClient = Suppliers.memoize(() -> new UserGrantsClient(clientOptions)); @@ -191,6 +194,10 @@ public EventStreamsClient eventStreams() { return this.eventStreamsClient.get(); } + public EventsClient events() { + return this.eventsClient.get(); + } + public FlowsClient flows() { return this.flowsClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/RawEventsClient.java b/src/main/java/com/auth0/client/mgmt/RawEventsClient.java new file mode 100644 index 000000000..ddfee8cfe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/RawEventsClient.java @@ -0,0 +1,139 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.ResponseBodyReader; +import com.auth0.client.mgmt.core.Stream; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.GoneError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.types.EventStreamSubscribeEventsResponseContent; +import com.auth0.client.mgmt.types.SubscribeEventsRequestParameters; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawEventsClient { + protected final ClientOptions clientOptions; + + public RawEventsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public ManagementApiHttpResponse> subscribe() { + return subscribe(SubscribeEventsRequestParameters.builder().build()); + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public ManagementApiHttpResponse> subscribe( + RequestOptions requestOptions) { + return subscribe(SubscribeEventsRequestParameters.builder().build(), requestOptions); + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public ManagementApiHttpResponse> subscribe( + SubscribeEventsRequestParameters request) { + return subscribe(request, null); + } + + /** + * Subscribe to events via Server-Sent Events (SSE) + */ + public ManagementApiHttpResponse> subscribe( + SubscribeEventsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("events"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + if (!request.getFromTimestamp().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from_timestamp", request.getFromTimestamp().orElse(null), false); + } + if (!request.getEventType().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "event_type", request.getEventType().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + client = client.newBuilder().callTimeout(0, TimeUnit.SECONDS).build(); + try { + Response response = client.newCall(okhttpRequest).execute(); + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + Stream.fromSse( + EventStreamSubscribeEventsResponseContent.class, new ResponseBodyReader(response)), + response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 410: + throw new GoneError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/RawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/RawGroupsClient.java index 2d15d2cdc..ecaac54a7 100644 --- a/src/main/java/com/auth0/client/mgmt/RawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawGroupsClient.java @@ -79,6 +79,10 @@ public ManagementApiHttpResponse> list( QueryStringMapper.addQueryParameter( httpUrl, "external_id", request.getExternalId().orElse(null), false); } + if (!request.getSearch().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "search", request.getSearch().orElse(null), false); + } if (!request.getFields().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "fields", request.getFields().orElse(null), false); diff --git a/src/main/java/com/auth0/client/mgmt/RawRefreshTokensClient.java b/src/main/java/com/auth0/client/mgmt/RawRefreshTokensClient.java index c4e48741c..690282371 100644 --- a/src/main/java/com/auth0/client/mgmt/RawRefreshTokensClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawRefreshTokensClient.java @@ -21,6 +21,7 @@ import com.auth0.client.mgmt.types.GetRefreshTokensPaginatedResponseContent; import com.auth0.client.mgmt.types.GetRefreshTokensRequestParameters; import com.auth0.client.mgmt.types.RefreshTokenResponseContent; +import com.auth0.client.mgmt.types.RevokeRefreshTokensRequestContent; import com.auth0.client.mgmt.types.UpdateRefreshTokenRequestContent; import com.auth0.client.mgmt.types.UpdateRefreshTokenResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; @@ -141,6 +142,90 @@ public ManagementApiHttpResponse } } + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public ManagementApiHttpResponse revoke() { + return revoke(RevokeRefreshTokensRequestContent.builder().build()); + } + + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public ManagementApiHttpResponse revoke(RequestOptions requestOptions) { + return revoke(RevokeRefreshTokensRequestContent.builder().build(), requestOptions); + } + + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public ManagementApiHttpResponse revoke(RevokeRefreshTokensRequestContent request) { + return revoke(request, null); + } + + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public ManagementApiHttpResponse revoke( + RevokeRefreshTokensRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("refresh-tokens/revoke"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + /** * Retrieve refresh token information. */ diff --git a/src/main/java/com/auth0/client/mgmt/RefreshTokensClient.java b/src/main/java/com/auth0/client/mgmt/RefreshTokensClient.java index 18fe75675..933703f02 100644 --- a/src/main/java/com/auth0/client/mgmt/RefreshTokensClient.java +++ b/src/main/java/com/auth0/client/mgmt/RefreshTokensClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.types.GetRefreshTokenResponseContent; import com.auth0.client.mgmt.types.GetRefreshTokensRequestParameters; import com.auth0.client.mgmt.types.RefreshTokenResponseContent; +import com.auth0.client.mgmt.types.RevokeRefreshTokensRequestContent; import com.auth0.client.mgmt.types.UpdateRefreshTokenRequestContent; import com.auth0.client.mgmt.types.UpdateRefreshTokenResponseContent; @@ -44,6 +45,34 @@ public SyncPagingIterable list( return this.rawClient.list(request, requestOptions).body(); } + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public void revoke() { + this.rawClient.revoke().body(); + } + + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public void revoke(RequestOptions requestOptions) { + this.rawClient.revoke(requestOptions).body(); + } + + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public void revoke(RevokeRefreshTokensRequestContent request) { + this.rawClient.revoke(request).body(); + } + + /** + * Revoke refresh tokens in bulk by ID list, user, user+client, or client. + */ + public void revoke(RevokeRefreshTokensRequestContent request, RequestOptions requestOptions) { + this.rawClient.revoke(request, requestOptions).body(); + } + /** * Retrieve refresh token information. */ diff --git a/src/main/java/com/auth0/client/mgmt/actions/modules/types/GetActionModuleVersionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/actions/modules/types/GetActionModuleVersionsRequestParameters.java index 27a295fd3..4faeaf1be 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/modules/types/GetActionModuleVersionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/actions/modules/types/GetActionModuleVersionsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.actions.modules.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GetActionModuleVersionsRequestParameters.Builder.class) @@ -42,6 +42,9 @@ private GetActionModuleVersionsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -50,6 +53,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -104,7 +110,7 @@ public Builder from(GetActionModuleVersionsRequestParameters other) { *

Use this field to request a specific page of the list results.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -123,7 +129,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -138,7 +144,7 @@ public Builder page(Nullable page) { *

The maximum number of results to be returned by the server in a single response. 20 by default.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -157,7 +163,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/actions/triggers/types/ListActionTriggerBindingsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/actions/triggers/types/ListActionTriggerBindingsRequestParameters.java index c4e0199dd..acd2c1d25 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/triggers/types/ListActionTriggerBindingsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/actions/triggers/types/ListActionTriggerBindingsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.actions.triggers.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListActionTriggerBindingsRequestParameters.Builder.class) @@ -42,6 +42,9 @@ private ListActionTriggerBindingsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -50,6 +53,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -104,7 +110,7 @@ public Builder from(ListActionTriggerBindingsRequestParameters other) { *

Use this field to request a specific page of the list results.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -123,7 +129,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -138,7 +144,7 @@ public Builder page(Nullable page) { *

The maximum number of results to be returned in a single request. 20 by default

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -157,7 +163,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModuleActionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModuleActionsRequestParameters.java index 7806abdf9..d827711cd 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModuleActionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModuleActionsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.actions.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GetActionModuleActionsRequestParameters.Builder.class) @@ -42,6 +42,9 @@ private GetActionModuleActionsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -50,6 +53,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -104,7 +110,7 @@ public Builder from(GetActionModuleActionsRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -123,7 +129,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -138,7 +144,7 @@ public Builder page(Nullable page) { *

Number of results per page.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -157,7 +163,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModulesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModulesRequestParameters.java index dcf2a6e1c..c82de9ca6 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModulesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModulesRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.actions.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GetActionModulesRequestParameters.Builder.class) @@ -42,6 +42,9 @@ private GetActionModulesRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -50,6 +53,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -103,7 +109,7 @@ public Builder from(GetActionModulesRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -122,7 +128,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -137,7 +143,7 @@ public Builder page(Nullable page) { *

Number of results per page. Paging is disabled if parameter not sent.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -156,7 +162,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/actions/types/ListActionVersionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/actions/types/ListActionVersionsRequestParameters.java index 687824a72..cf233fb51 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/types/ListActionVersionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/actions/types/ListActionVersionsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.actions.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListActionVersionsRequestParameters.Builder.class) @@ -42,6 +42,9 @@ private ListActionVersionsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -50,6 +53,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -104,7 +110,7 @@ public Builder from(ListActionVersionsRequestParameters other) { *

Use this field to request a specific page of the list results.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -123,7 +129,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -138,7 +144,7 @@ public Builder page(Nullable page) { *

This field specify the maximum number of results to be returned by the server. 20 by default

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -157,7 +163,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/clientgrants/types/ListClientGrantOrganizationsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/clientgrants/types/ListClientGrantOrganizationsRequestParameters.java index 27af098f2..62f321ec8 100644 --- a/src/main/java/com/auth0/client/mgmt/clientgrants/types/ListClientGrantOrganizationsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/clientgrants/types/ListClientGrantOrganizationsRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -139,7 +142,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/clients/types/ConnectionsGetRequest.java b/src/main/java/com/auth0/client/mgmt/clients/types/ConnectionsGetRequest.java index 1823f4f25..e668020d8 100644 --- a/src/main/java/com/auth0/client/mgmt/clients/types/ConnectionsGetRequest.java +++ b/src/main/java/com/auth0/client/mgmt/clients/types/ConnectionsGetRequest.java @@ -79,6 +79,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -231,7 +234,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/connections/types/GetConnectionEnabledClientsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/connections/types/GetConnectionEnabledClientsRequestParameters.java index a6fa3db06..8dd7953d1 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/types/GetConnectionEnabledClientsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/connections/types/GetConnectionEnabledClientsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.connections.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GetConnectionEnabledClientsRequestParameters.Builder.class) @@ -40,6 +40,9 @@ private GetConnectionEnabledClientsRequestParameters( */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -105,7 +108,7 @@ public Builder from(GetConnectionEnabledClientsRequestParameters other) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } @@ -124,7 +127,7 @@ public Builder take(Optional take) { return this; } - public Builder take(Nullable take) { + public Builder take(com.auth0.client.mgmt.core.Nullable take) { if (take.isNull()) { this.take = OptionalNullable.ofNull(); } else if (take.isEmpty()) { @@ -139,7 +142,7 @@ public Builder take(Nullable take) { *

Optional Id from which to start selection.

*/ @JsonSetter(value = "from", nulls = Nulls.SKIP) - public Builder from(@org.jetbrains.annotations.Nullable OptionalNullable from) { + public Builder from(@Nullable OptionalNullable from) { this.from = from; return this; } @@ -158,7 +161,7 @@ public Builder from(Optional from) { return this; } - public Builder from(Nullable from) { + public Builder from(com.auth0.client.mgmt.core.Nullable from) { if (from.isNull()) { this.from = OptionalNullable.ofNull(); } else if (from.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/connections/types/ListDirectoryProvisioningsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/connections/types/ListDirectoryProvisioningsRequestParameters.java index 890ef17f3..839553d4c 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/types/ListDirectoryProvisioningsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/connections/types/ListDirectoryProvisioningsRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -139,7 +142,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/connections/types/ListScimConfigurationsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/connections/types/ListScimConfigurationsRequestParameters.java index 86db8187b..b881a833d 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/types/ListScimConfigurationsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/connections/types/ListScimConfigurationsRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -139,7 +142,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/connections/types/ListSynchronizedGroupsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/connections/types/ListSynchronizedGroupsRequestParameters.java index f9c9c6a74..e25018aba 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/types/ListSynchronizedGroupsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/connections/types/ListSynchronizedGroupsRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -139,7 +142,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/errors/GoneError.java b/src/main/java/com/auth0/client/mgmt/errors/GoneError.java new file mode 100644 index 000000000..7cc45cfe7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/errors/GoneError.java @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.errors; + +import com.auth0.client.mgmt.core.ManagementApiException; +import okhttp3.Response; + +public final class GoneError extends ManagementApiException { + /** + * The body of the response that triggered the exception. + */ + private final Object body; + + public GoneError(Object body) { + super("GoneError", 410, body); + this.body = body; + } + + public GoneError(Object body, Response rawResponse) { + super("GoneError", 410, body, rawResponse); + this.body = body; + } + + /** + * @return the body + */ + @java.lang.Override + public Object body() { + return this.body; + } +} diff --git a/src/main/java/com/auth0/client/mgmt/eventstreams/types/ListEventStreamDeliveriesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/eventstreams/types/ListEventStreamDeliveriesRequestParameters.java index 500d21996..b34bbe28e 100644 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/types/ListEventStreamDeliveriesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/eventstreams/types/ListEventStreamDeliveriesRequestParameters.java @@ -113,6 +113,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -354,7 +357,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/flows/types/ListFlowExecutionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/flows/types/ListFlowExecutionsRequestParameters.java index e1cc0b104..7faee5d0a 100644 --- a/src/main/java/com/auth0/client/mgmt/flows/types/ListFlowExecutionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/flows/types/ListFlowExecutionsRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -139,7 +142,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/flows/vault/types/ListFlowsVaultConnectionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/flows/vault/types/ListFlowsVaultConnectionsRequestParameters.java index 690b12e60..522da4a41 100644 --- a/src/main/java/com/auth0/client/mgmt/flows/vault/types/ListFlowsVaultConnectionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/flows/vault/types/ListFlowsVaultConnectionsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.flows.vault.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListFlowsVaultConnectionsRequestParameters.Builder.class) @@ -46,6 +46,9 @@ private ListFlowsVaultConnectionsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -54,6 +57,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -62,6 +68,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -119,7 +128,7 @@ public Builder from(ListFlowsVaultConnectionsRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -138,7 +147,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -153,7 +162,7 @@ public Builder page(Nullable page) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -172,7 +181,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -187,7 +196,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -206,7 +215,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/groups/types/GetGroupMembersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/groups/types/GetGroupMembersRequestParameters.java index 6f4e572bd..9a9e524e9 100644 --- a/src/main/java/com/auth0/client/mgmt/groups/types/GetGroupMembersRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/groups/types/GetGroupMembersRequestParameters.java @@ -83,6 +83,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -247,7 +250,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/jobs/types/ErrorsGetResponse.java b/src/main/java/com/auth0/client/mgmt/jobs/types/ErrorsGetResponse.java index 234a856c7..2f9d812bc 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/types/ErrorsGetResponse.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/types/ErrorsGetResponse.java @@ -15,6 +15,7 @@ import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = ErrorsGetResponse.Deserializer.class) @@ -90,9 +91,14 @@ public ErrorsGetResponse deserialize(JsonParser p, DeserializationContext contex value, new TypeReference>() {})); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, GetJobGenericErrorResponseContent.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("status") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, GetJobGenericErrorResponseContent.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/keys/types/ListEncryptionKeysRequestParameters.java b/src/main/java/com/auth0/client/mgmt/keys/types/ListEncryptionKeysRequestParameters.java index 84012b673..bc9d6bde0 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/types/ListEncryptionKeysRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/keys/types/ListEncryptionKeysRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.keys.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListEncryptionKeysRequestParameters.Builder.class) @@ -46,6 +46,9 @@ private ListEncryptionKeysRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -54,6 +57,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -62,6 +68,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -119,7 +128,7 @@ public Builder from(ListEncryptionKeysRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -138,7 +147,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -153,7 +162,7 @@ public Builder page(Nullable page) { *

Number of results per page. Default value is 50, maximum value is 100.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -172,7 +181,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -187,7 +196,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -206,7 +215,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberRolesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberRolesRequestParameters.java index c0042b8a3..feabe2eaa 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberRolesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberRolesRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.organizations.members.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListOrganizationMemberRolesRequestParameters.Builder.class) @@ -46,6 +46,9 @@ private ListOrganizationMemberRolesRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -54,6 +57,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -62,6 +68,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -119,7 +128,7 @@ public Builder from(ListOrganizationMemberRolesRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -138,7 +147,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -153,7 +162,7 @@ public Builder page(Nullable page) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -172,7 +181,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -187,7 +196,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -206,7 +215,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationAllConnectionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationAllConnectionsRequestParameters.java index 418a7add1..14962022a 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationAllConnectionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationAllConnectionsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.organizations.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListOrganizationAllConnectionsRequestParameters.Builder.class) @@ -50,6 +50,9 @@ private ListOrganizationAllConnectionsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -58,6 +61,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -66,6 +72,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -140,7 +149,7 @@ public Builder from(ListOrganizationAllConnectionsRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -159,7 +168,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -174,7 +183,7 @@ public Builder page(Nullable page) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -193,7 +202,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -208,7 +217,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -227,7 +236,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { @@ -242,7 +251,7 @@ public Builder includeTotals(Nullable includeTotals) { *

Filter connections by enabled status.

*/ @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) - public Builder isEnabled(@org.jetbrains.annotations.Nullable OptionalNullable isEnabled) { + public Builder isEnabled(@Nullable OptionalNullable isEnabled) { this.isEnabled = isEnabled; return this; } @@ -261,7 +270,7 @@ public Builder isEnabled(Optional isEnabled) { return this; } - public Builder isEnabled(Nullable isEnabled) { + public Builder isEnabled(com.auth0.client.mgmt.core.Nullable isEnabled) { if (isEnabled.isNull()) { this.isEnabled = OptionalNullable.ofNull(); } else if (isEnabled.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationClientGrantsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationClientGrantsRequestParameters.java index 1f2414603..a05a0e3f0 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationClientGrantsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationClientGrantsRequestParameters.java @@ -93,6 +93,9 @@ public OptionalNullable getClientId() { */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -101,6 +104,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -109,6 +115,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -278,7 +287,7 @@ public Builder clientId(com.auth0.client.mgmt.core.Nullable clientId) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -312,7 +321,7 @@ public Builder page(com.auth0.client.mgmt.core.Nullable page) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -346,7 +355,7 @@ public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationConnectionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationConnectionsRequestParameters.java index 1c053ae7a..0079d9d99 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationConnectionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationConnectionsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.organizations.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListOrganizationConnectionsRequestParameters.Builder.class) @@ -46,6 +46,9 @@ private ListOrganizationConnectionsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -54,6 +57,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -62,6 +68,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -119,7 +128,7 @@ public Builder from(ListOrganizationConnectionsRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -138,7 +147,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -153,7 +162,7 @@ public Builder page(Nullable page) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -172,7 +181,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -187,7 +196,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -206,7 +215,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationDiscoveryDomainsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationDiscoveryDomainsRequestParameters.java index 02ac04233..ec9d637d8 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationDiscoveryDomainsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationDiscoveryDomainsRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -139,7 +142,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationInvitationsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationInvitationsRequestParameters.java index 88cc93eba..03acfb709 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationInvitationsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationInvitationsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.organizations.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListOrganizationInvitationsRequestParameters.Builder.class) @@ -58,6 +58,9 @@ private ListOrganizationInvitationsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -66,6 +69,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -74,6 +80,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -178,7 +187,7 @@ public Builder from(ListOrganizationInvitationsRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -197,7 +206,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -212,7 +221,7 @@ public Builder page(Nullable page) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -231,7 +240,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -246,7 +255,7 @@ public Builder perPage(Nullable perPage) { *

When true, return results inside an object that also contains the start and limit. When false (default), a direct array of results is returned. We do not yet support returning the total invitations count.

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -265,7 +274,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { @@ -280,7 +289,7 @@ public Builder includeTotals(Nullable includeTotals) { *

Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.

*/ @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public Builder fields(@org.jetbrains.annotations.Nullable OptionalNullable fields) { + public Builder fields(@Nullable OptionalNullable fields) { this.fields = fields; return this; } @@ -299,7 +308,7 @@ public Builder fields(Optional fields) { return this; } - public Builder fields(Nullable fields) { + public Builder fields(com.auth0.client.mgmt.core.Nullable fields) { if (fields.isNull()) { this.fields = OptionalNullable.ofNull(); } else if (fields.isEmpty()) { @@ -314,7 +323,7 @@ public Builder fields(Nullable fields) { *

Whether specified fields are to be included (true) or excluded (false). Defaults to true.

*/ @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) - public Builder includeFields(@org.jetbrains.annotations.Nullable OptionalNullable includeFields) { + public Builder includeFields(@Nullable OptionalNullable includeFields) { this.includeFields = includeFields; return this; } @@ -333,7 +342,7 @@ public Builder includeFields(Optional includeFields) { return this; } - public Builder includeFields(Nullable includeFields) { + public Builder includeFields(com.auth0.client.mgmt.core.Nullable includeFields) { if (includeFields.isNull()) { this.includeFields = OptionalNullable.ofNull(); } else if (includeFields.isEmpty()) { @@ -348,7 +357,7 @@ public Builder includeFields(Nullable includeFields) { *

Field to sort by. Use field:order where order is 1 for ascending and -1 for descending Defaults to created_at:-1.

*/ @JsonSetter(value = "sort", nulls = Nulls.SKIP) - public Builder sort(@org.jetbrains.annotations.Nullable OptionalNullable sort) { + public Builder sort(@Nullable OptionalNullable sort) { this.sort = sort; return this; } @@ -367,7 +376,7 @@ public Builder sort(Optional sort) { return this; } - public Builder sort(Nullable sort) { + public Builder sort(com.auth0.client.mgmt.core.Nullable sort) { if (sort.isNull()) { this.sort = OptionalNullable.ofNull(); } else if (sort.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationMembersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationMembersRequestParameters.java index 71c96b7f0..3a743f5c1 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationMembersRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationMembersRequestParameters.java @@ -61,6 +61,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -180,7 +183,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/prompts/types/ListAculsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/prompts/types/ListAculsRequestParameters.java index e27bcce74..6c9d1de51 100644 --- a/src/main/java/com/auth0/client/mgmt/prompts/types/ListAculsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/prompts/types/ListAculsRequestParameters.java @@ -89,6 +89,9 @@ public OptionalNullable getIncludeFields() { */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -97,6 +100,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -105,6 +111,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -292,7 +301,7 @@ public Builder includeFields(com.auth0.client.mgmt.core.Nullable includ *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -326,7 +335,7 @@ public Builder page(com.auth0.client.mgmt.core.Nullable page) { *

Number of results per page. Maximum value is 100, default value is 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -360,7 +369,7 @@ public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { *

Return results inside an object that contains the total configuration count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/roles/types/ListRolePermissionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/roles/types/ListRolePermissionsRequestParameters.java index 9645d361d..d028f0972 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/types/ListRolePermissionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/roles/types/ListRolePermissionsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.roles.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListRolePermissionsRequestParameters.Builder.class) @@ -46,6 +46,9 @@ private ListRolePermissionsRequestParameters( */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -54,6 +57,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -62,6 +68,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -119,7 +128,7 @@ public Builder from(ListRolePermissionsRequestParameters other) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -138,7 +147,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -153,7 +162,7 @@ public Builder perPage(Nullable perPage) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -172,7 +181,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -187,7 +196,7 @@ public Builder page(Nullable page) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -206,7 +215,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleUsersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleUsersRequestParameters.java index b25e6a470..321a175d1 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleUsersRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleUsersRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -138,7 +141,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncCustomTextClient.java index 383ae9e94..30ef93ca3 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncCustomTextClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncCustomTextClient.java @@ -28,7 +28,7 @@ public AsyncRawCustomTextClient withRawResponse() { } /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Retrieves text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public CompletableFuture> list( String id, SelfServiceProfileCustomTextLanguageEnum language, SelfServiceProfileCustomTextPageEnum page) { @@ -36,7 +36,7 @@ public CompletableFuture> list( } /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Retrieves text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public CompletableFuture> list( String id, @@ -47,7 +47,7 @@ public CompletableFuture> list( } /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Updates text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public CompletableFuture> set( String id, @@ -58,7 +58,7 @@ public CompletableFuture> set( } /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Updates text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public CompletableFuture> set( String id, diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawCustomTextClient.java index 84346eba1..96af90c77 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawCustomTextClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawCustomTextClient.java @@ -40,7 +40,7 @@ public AsyncRawCustomTextClient(ClientOptions clientOptions) { } /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Retrieves text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public CompletableFuture>> list( String id, SelfServiceProfileCustomTextLanguageEnum language, SelfServiceProfileCustomTextPageEnum page) { @@ -48,7 +48,7 @@ public CompletableFuture>> list( } /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Retrieves text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public CompletableFuture>> list( String id, @@ -134,7 +134,7 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { } /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Updates text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public CompletableFuture>> set( String id, @@ -145,7 +145,7 @@ public CompletableFuture>> set( } /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Updates text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public CompletableFuture>> set( String id, diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java index 4b3cf93c8..8989c71c0 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java @@ -38,7 +38,7 @@ public AsyncRawSsoTicketClient(ClientOptions clientOptions) { } /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. + * Creates an access ticket to initiate the Self-Service Enterprise Configuration flow using a self-service profile. */ public CompletableFuture> create( String id) { @@ -47,7 +47,7 @@ public CompletableFuture> create( String id, RequestOptions requestOptions) { @@ -56,7 +56,7 @@ public CompletableFuture> create( String id, CreateSelfServiceProfileSsoTicketRequestContent request) { @@ -64,7 +64,7 @@ public CompletableFuture> create( String id, CreateSelfServiceProfileSsoTicketRequestContent request, RequestOptions requestOptions) { @@ -154,7 +154,7 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { } /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. + * Revokes a Self-Service Enterprise Configuration access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service Enterprise Configuration session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. */ public CompletableFuture> revoke(String profileId, String id) { @@ -162,7 +162,7 @@ public CompletableFuture> revoke(String profileI } /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. + * Revokes a Self-Service Enterprise Configuration access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service Enterprise Configuration session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. */ public CompletableFuture> revoke( diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncSsoTicketClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncSsoTicketClient.java index 9be8e44f3..2d3966a32 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncSsoTicketClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncSsoTicketClient.java @@ -27,14 +27,14 @@ public AsyncRawSsoTicketClient withRawResponse() { } /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. + * Creates an access ticket to initiate the Self-Service Enterprise Configuration flow using a self-service profile. */ public CompletableFuture create(String id) { return this.rawClient.create(id).thenApply(response -> response.body()); } /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. + * Creates an access ticket to initiate the Self-Service Enterprise Configuration flow using a self-service profile. */ public CompletableFuture create( String id, RequestOptions requestOptions) { @@ -42,7 +42,7 @@ public CompletableFuture creat } /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. + * Creates an access ticket to initiate the Self-Service Enterprise Configuration flow using a self-service profile. */ public CompletableFuture create( String id, CreateSelfServiceProfileSsoTicketRequestContent request) { @@ -50,7 +50,7 @@ public CompletableFuture creat } /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. + * Creates an access ticket to initiate the Self-Service Enterprise Configuration flow using a self-service profile. */ public CompletableFuture create( String id, CreateSelfServiceProfileSsoTicketRequestContent request, RequestOptions requestOptions) { @@ -58,7 +58,7 @@ public CompletableFuture creat } /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. + * Revokes a Self-Service Enterprise Configuration access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service Enterprise Configuration session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. */ public CompletableFuture revoke(String profileId, String id) { @@ -66,7 +66,7 @@ public CompletableFuture revoke(String profileId, String id) { } /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. + * Revokes a Self-Service Enterprise Configuration access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service Enterprise Configuration session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. */ public CompletableFuture revoke(String profileId, String id, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/CustomTextClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/CustomTextClient.java index 60683e9d0..f08db433b 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/CustomTextClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/CustomTextClient.java @@ -27,7 +27,7 @@ public RawCustomTextClient withRawResponse() { } /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Retrieves text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public Map list( String id, SelfServiceProfileCustomTextLanguageEnum language, SelfServiceProfileCustomTextPageEnum page) { @@ -35,7 +35,7 @@ public Map list( } /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Retrieves text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public Map list( String id, @@ -46,7 +46,7 @@ public Map list( } /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Updates text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public Map set( String id, @@ -57,7 +57,7 @@ public Map set( } /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Updates text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public Map set( String id, diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawCustomTextClient.java index 6568413d1..b593085d6 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawCustomTextClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawCustomTextClient.java @@ -36,7 +36,7 @@ public RawCustomTextClient(ClientOptions clientOptions) { } /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Retrieves text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public ManagementApiHttpResponse> list( String id, SelfServiceProfileCustomTextLanguageEnum language, SelfServiceProfileCustomTextPageEnum page) { @@ -44,7 +44,7 @@ public ManagementApiHttpResponse> list( } /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Retrieves text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public ManagementApiHttpResponse> list( String id, @@ -109,7 +109,7 @@ public ManagementApiHttpResponse> list( } /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Updates text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public ManagementApiHttpResponse> set( String id, @@ -120,7 +120,7 @@ public ManagementApiHttpResponse> set( } /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. + * Updates text customizations for a given self-service profile, language and Self-Service Enterprise Configuration flow page. */ public ManagementApiHttpResponse> set( String id, diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawSsoTicketClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawSsoTicketClient.java index 6dec38a8e..fdfb2fd17 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawSsoTicketClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawSsoTicketClient.java @@ -34,7 +34,7 @@ public RawSsoTicketClient(ClientOptions clientOptions) { } /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. + * Creates an access ticket to initiate the Self-Service Enterprise Configuration flow using a self-service profile. */ public ManagementApiHttpResponse create(String id) { return create( @@ -42,7 +42,7 @@ public ManagementApiHttpResponse create( String id, RequestOptions requestOptions) { @@ -51,7 +51,7 @@ public ManagementApiHttpResponse create( String id, CreateSelfServiceProfileSsoTicketRequestContent request) { @@ -59,7 +59,7 @@ public ManagementApiHttpResponse create( String id, CreateSelfServiceProfileSsoTicketRequestContent request, RequestOptions requestOptions) { @@ -127,7 +127,7 @@ public ManagementApiHttpResponse202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. + * Revokes a Self-Service Enterprise Configuration access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service Enterprise Configuration session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. */ public ManagementApiHttpResponse revoke(String profileId, String id) { @@ -135,7 +135,7 @@ public ManagementApiHttpResponse revoke(String profileId, String id) { } /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. + * Revokes a Self-Service Enterprise Configuration access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service Enterprise Configuration session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. */ public ManagementApiHttpResponse revoke(String profileId, String id, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/SsoTicketClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/SsoTicketClient.java index c3bd7ec23..a6f9c2758 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/SsoTicketClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/SsoTicketClient.java @@ -26,21 +26,21 @@ public RawSsoTicketClient withRawResponse() { } /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. + * Creates an access ticket to initiate the Self-Service Enterprise Configuration flow using a self-service profile. */ public CreateSelfServiceProfileSsoTicketResponseContent create(String id) { return this.rawClient.create(id).body(); } /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. + * Creates an access ticket to initiate the Self-Service Enterprise Configuration flow using a self-service profile. */ public CreateSelfServiceProfileSsoTicketResponseContent create(String id, RequestOptions requestOptions) { return this.rawClient.create(id, requestOptions).body(); } /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. + * Creates an access ticket to initiate the Self-Service Enterprise Configuration flow using a self-service profile. */ public CreateSelfServiceProfileSsoTicketResponseContent create( String id, CreateSelfServiceProfileSsoTicketRequestContent request) { @@ -48,7 +48,7 @@ public CreateSelfServiceProfileSsoTicketResponseContent create( } /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. + * Creates an access ticket to initiate the Self-Service Enterprise Configuration flow using a self-service profile. */ public CreateSelfServiceProfileSsoTicketResponseContent create( String id, CreateSelfServiceProfileSsoTicketRequestContent request, RequestOptions requestOptions) { @@ -56,7 +56,7 @@ public CreateSelfServiceProfileSsoTicketResponseContent create( } /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. + * Revokes a Self-Service Enterprise Configuration access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service Enterprise Configuration session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. */ public void revoke(String profileId, String id) { @@ -64,7 +64,7 @@ public void revoke(String profileId, String id) { } /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. + * Revokes a Self-Service Enterprise Configuration access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service Enterprise Configuration session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. */ public void revoke(String profileId, String id, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/types/CreateSelfServiceProfileSsoTicketRequestContent.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/types/CreateSelfServiceProfileSsoTicketRequestContent.java index 0465001ca..93d33db82 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/types/CreateSelfServiceProfileSsoTicketRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/types/CreateSelfServiceProfileSsoTicketRequestContent.java @@ -70,7 +70,7 @@ private CreateSelfServiceProfileSsoTicketRequestContent( } /** - * @return If provided, this will allow editing of the provided connection during the SSO Flow + * @return If provided, this will allow editing of the provided connection during the Self-Service Enterprise Configuration flow */ @JsonProperty("connection_id") public Optional getConnectionId() { @@ -215,7 +215,7 @@ public Builder from(CreateSelfServiceProfileSsoTicketRequestContent other) { } /** - *

If provided, this will allow editing of the provided connection during the SSO Flow

+ *

If provided, this will allow editing of the provided connection during the Self-Service Enterprise Configuration flow

*/ @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) public Builder connectionId(Optional connectionId) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionBindingRefTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ActionBindingRefTypeEnum.java index 85c0fc20b..1dd7eed48 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ActionBindingRefTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ActionBindingRefTypeEnum.java @@ -10,11 +10,11 @@ public final class ActionBindingRefTypeEnum { public static final ActionBindingRefTypeEnum BINDING_ID = new ActionBindingRefTypeEnum(Value.BINDING_ID, "binding_id"); + public static final ActionBindingRefTypeEnum ACTION_ID = new ActionBindingRefTypeEnum(Value.ACTION_ID, "action_id"); + public static final ActionBindingRefTypeEnum ACTION_NAME = new ActionBindingRefTypeEnum(Value.ACTION_NAME, "action_name"); - public static final ActionBindingRefTypeEnum ACTION_ID = new ActionBindingRefTypeEnum(Value.ACTION_ID, "action_id"); - private final Value value; private final String string; @@ -50,10 +50,10 @@ public T visit(Visitor visitor) { switch (value) { case BINDING_ID: return visitor.visitBindingId(); - case ACTION_NAME: - return visitor.visitActionName(); case ACTION_ID: return visitor.visitActionId(); + case ACTION_NAME: + return visitor.visitActionName(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -65,10 +65,10 @@ public static ActionBindingRefTypeEnum valueOf(String value) { switch (value) { case "binding_id": return BINDING_ID; - case "action_name": - return ACTION_NAME; case "action_id": return ACTION_ID; + case "action_name": + return ACTION_NAME; default: return new ActionBindingRefTypeEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionBindingTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ActionBindingTypeEnum.java index f1495c76a..e6004018c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ActionBindingTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ActionBindingTypeEnum.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ActionBindingTypeEnum { - public static final ActionBindingTypeEnum TRIGGER_BOUND = - new ActionBindingTypeEnum(Value.TRIGGER_BOUND, "trigger-bound"); - public static final ActionBindingTypeEnum ENTITY_BOUND = new ActionBindingTypeEnum(Value.ENTITY_BOUND, "entity-bound"); + public static final ActionBindingTypeEnum TRIGGER_BOUND = + new ActionBindingTypeEnum(Value.TRIGGER_BOUND, "trigger-bound"); + private final Value value; private final String string; @@ -46,10 +46,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case TRIGGER_BOUND: - return visitor.visitTriggerBound(); case ENTITY_BOUND: return visitor.visitEntityBound(); + case TRIGGER_BOUND: + return visitor.visitTriggerBound(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -59,10 +59,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ActionBindingTypeEnum valueOf(String value) { switch (value) { - case "trigger-bound": - return TRIGGER_BOUND; case "entity-bound": return ENTITY_BOUND; + case "trigger-bound": + return TRIGGER_BOUND; default: return new ActionBindingTypeEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionExecutionStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/ActionExecutionStatusEnum.java index 180a710c3..cdc244c35 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ActionExecutionStatusEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ActionExecutionStatusEnum.java @@ -12,8 +12,6 @@ public final class ActionExecutionStatusEnum { public static final ActionExecutionStatusEnum UNSPECIFIED = new ActionExecutionStatusEnum(Value.UNSPECIFIED, "unspecified"); - public static final ActionExecutionStatusEnum FINAL = new ActionExecutionStatusEnum(Value.FINAL, "final"); - public static final ActionExecutionStatusEnum PENDING = new ActionExecutionStatusEnum(Value.PENDING, "pending"); public static final ActionExecutionStatusEnum CANCELED = new ActionExecutionStatusEnum(Value.CANCELED, "canceled"); @@ -21,6 +19,8 @@ public final class ActionExecutionStatusEnum { public static final ActionExecutionStatusEnum SUSPENDED = new ActionExecutionStatusEnum(Value.SUSPENDED, "suspended"); + public static final ActionExecutionStatusEnum FINAL = new ActionExecutionStatusEnum(Value.FINAL, "final"); + private final Value value; private final String string; @@ -58,14 +58,14 @@ public T visit(Visitor visitor) { return visitor.visitPartial(); case UNSPECIFIED: return visitor.visitUnspecified(); - case FINAL: - return visitor.visitFinal(); case PENDING: return visitor.visitPending(); case CANCELED: return visitor.visitCanceled(); case SUSPENDED: return visitor.visitSuspended(); + case FINAL: + return visitor.visitFinal(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -79,14 +79,14 @@ public static ActionExecutionStatusEnum valueOf(String value) { return PARTIAL; case "unspecified": return UNSPECIFIED; - case "final": - return FINAL; case "pending": return PENDING; case "canceled": return CANCELED; case "suspended": return SUSPENDED; + case "final": + return FINAL; default: return new ActionExecutionStatusEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionTriggerTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ActionTriggerTypeEnum.java index 8dab9c3e3..9164ae0cb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ActionTriggerTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ActionTriggerTypeEnum.java @@ -7,20 +7,26 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ActionTriggerTypeEnum { + public static final ActionTriggerTypeEnum PASSWORD_RESET_POST_CHALLENGE = + new ActionTriggerTypeEnum(Value.PASSWORD_RESET_POST_CHALLENGE, "password-reset-post-challenge"); + public static final ActionTriggerTypeEnum SIGNUP_POST_IDENTIFIER = new ActionTriggerTypeEnum(Value.SIGNUP_POST_IDENTIFIER, "signup-post-identifier"); + public static final ActionTriggerTypeEnum CUSTOM_PHONE_PROVIDER = + new ActionTriggerTypeEnum(Value.CUSTOM_PHONE_PROVIDER, "custom-phone-provider"); + + public static final ActionTriggerTypeEnum CUSTOM_EMAIL_PROVIDER = + new ActionTriggerTypeEnum(Value.CUSTOM_EMAIL_PROVIDER, "custom-email-provider"); + public static final ActionTriggerTypeEnum PRE_USER_REGISTRATION = new ActionTriggerTypeEnum(Value.PRE_USER_REGISTRATION, "pre-user-registration"); public static final ActionTriggerTypeEnum LOGIN_POST_IDENTIFIER = new ActionTriggerTypeEnum(Value.LOGIN_POST_IDENTIFIER, "login-post-identifier"); - public static final ActionTriggerTypeEnum CUSTOM_EMAIL_PROVIDER = - new ActionTriggerTypeEnum(Value.CUSTOM_EMAIL_PROVIDER, "custom-email-provider"); - - public static final ActionTriggerTypeEnum PASSWORD_RESET_POST_CHALLENGE = - new ActionTriggerTypeEnum(Value.PASSWORD_RESET_POST_CHALLENGE, "password-reset-post-challenge"); + public static final ActionTriggerTypeEnum POST_USER_REGISTRATION = + new ActionTriggerTypeEnum(Value.POST_USER_REGISTRATION, "post-user-registration"); public static final ActionTriggerTypeEnum PASSWORD_HASH_MIGRATION = new ActionTriggerTypeEnum(Value.PASSWORD_HASH_MIGRATION, "password-hash-migration"); @@ -31,23 +37,17 @@ public final class ActionTriggerTypeEnum { public static final ActionTriggerTypeEnum CUSTOM_TOKEN_EXCHANGE = new ActionTriggerTypeEnum(Value.CUSTOM_TOKEN_EXCHANGE, "custom-token-exchange"); - public static final ActionTriggerTypeEnum POST_USER_REGISTRATION = - new ActionTriggerTypeEnum(Value.POST_USER_REGISTRATION, "post-user-registration"); - - public static final ActionTriggerTypeEnum CUSTOM_PHONE_PROVIDER = - new ActionTriggerTypeEnum(Value.CUSTOM_PHONE_PROVIDER, "custom-phone-provider"); - - public static final ActionTriggerTypeEnum POST_LOGIN = new ActionTriggerTypeEnum(Value.POST_LOGIN, "post-login"); - - public static final ActionTriggerTypeEnum EVENT_STREAM = - new ActionTriggerTypeEnum(Value.EVENT_STREAM, "event-stream"); - public static final ActionTriggerTypeEnum POST_CHANGE_PASSWORD = new ActionTriggerTypeEnum(Value.POST_CHANGE_PASSWORD, "post-change-password"); public static final ActionTriggerTypeEnum SEND_PHONE_MESSAGE = new ActionTriggerTypeEnum(Value.SEND_PHONE_MESSAGE, "send-phone-message"); + public static final ActionTriggerTypeEnum EVENT_STREAM = + new ActionTriggerTypeEnum(Value.EVENT_STREAM, "event-stream"); + + public static final ActionTriggerTypeEnum POST_LOGIN = new ActionTriggerTypeEnum(Value.POST_LOGIN, "post-login"); + private final Value value; private final String string; @@ -81,34 +81,34 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case PASSWORD_RESET_POST_CHALLENGE: + return visitor.visitPasswordResetPostChallenge(); case SIGNUP_POST_IDENTIFIER: return visitor.visitSignupPostIdentifier(); + case CUSTOM_PHONE_PROVIDER: + return visitor.visitCustomPhoneProvider(); + case CUSTOM_EMAIL_PROVIDER: + return visitor.visitCustomEmailProvider(); case PRE_USER_REGISTRATION: return visitor.visitPreUserRegistration(); case LOGIN_POST_IDENTIFIER: return visitor.visitLoginPostIdentifier(); - case CUSTOM_EMAIL_PROVIDER: - return visitor.visitCustomEmailProvider(); - case PASSWORD_RESET_POST_CHALLENGE: - return visitor.visitPasswordResetPostChallenge(); + case POST_USER_REGISTRATION: + return visitor.visitPostUserRegistration(); case PASSWORD_HASH_MIGRATION: return visitor.visitPasswordHashMigration(); case CREDENTIALS_EXCHANGE: return visitor.visitCredentialsExchange(); case CUSTOM_TOKEN_EXCHANGE: return visitor.visitCustomTokenExchange(); - case POST_USER_REGISTRATION: - return visitor.visitPostUserRegistration(); - case CUSTOM_PHONE_PROVIDER: - return visitor.visitCustomPhoneProvider(); - case POST_LOGIN: - return visitor.visitPostLogin(); - case EVENT_STREAM: - return visitor.visitEventStream(); case POST_CHANGE_PASSWORD: return visitor.visitPostChangePassword(); case SEND_PHONE_MESSAGE: return visitor.visitSendPhoneMessage(); + case EVENT_STREAM: + return visitor.visitEventStream(); + case POST_LOGIN: + return visitor.visitPostLogin(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -118,34 +118,34 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ActionTriggerTypeEnum valueOf(String value) { switch (value) { + case "password-reset-post-challenge": + return PASSWORD_RESET_POST_CHALLENGE; case "signup-post-identifier": return SIGNUP_POST_IDENTIFIER; + case "custom-phone-provider": + return CUSTOM_PHONE_PROVIDER; + case "custom-email-provider": + return CUSTOM_EMAIL_PROVIDER; case "pre-user-registration": return PRE_USER_REGISTRATION; case "login-post-identifier": return LOGIN_POST_IDENTIFIER; - case "custom-email-provider": - return CUSTOM_EMAIL_PROVIDER; - case "password-reset-post-challenge": - return PASSWORD_RESET_POST_CHALLENGE; + case "post-user-registration": + return POST_USER_REGISTRATION; case "password-hash-migration": return PASSWORD_HASH_MIGRATION; case "credentials-exchange": return CREDENTIALS_EXCHANGE; case "custom-token-exchange": return CUSTOM_TOKEN_EXCHANGE; - case "post-user-registration": - return POST_USER_REGISTRATION; - case "custom-phone-provider": - return CUSTOM_PHONE_PROVIDER; - case "post-login": - return POST_LOGIN; - case "event-stream": - return EVENT_STREAM; case "post-change-password": return POST_CHANGE_PASSWORD; case "send-phone-message": return SEND_PHONE_MESSAGE; + case "event-stream": + return EVENT_STREAM; + case "post-login": + return POST_LOGIN; default: return new ActionTriggerTypeEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/AculClientFilter.java b/src/main/java/com/auth0/client/mgmt/types/AculClientFilter.java index 28d882c43..2d09bc5de 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AculClientFilter.java +++ b/src/main/java/com/auth0/client/mgmt/types/AculClientFilter.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = AculClientFilter.Deserializer.class) @@ -81,13 +82,17 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public AculClientFilter deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculClientFilterById.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculClientFilterById.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculClientFilterByMetadata.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("metadata")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculClientFilterByMetadata.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/AculContextEnum.java b/src/main/java/com/auth0/client/mgmt/types/AculContextEnum.java index 172353a2c..3a65dc92c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AculContextEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/AculContextEnum.java @@ -7,12 +7,15 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class AculContextEnum { - public static final AculContextEnum TENANT_FRIENDLY_NAME = - new AculContextEnum(Value.TENANT_FRIENDLY_NAME, "tenant.friendly_name"); + public static final AculContextEnum UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES = new AculContextEnum( + Value.UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES, "untrusted_data.authorization_params.ui_locales"); public static final AculContextEnum UNTRUSTED_DATA_AUTHORIZATION_PARAMS_SCREEN_HINT = new AculContextEnum( Value.UNTRUSTED_DATA_AUTHORIZATION_PARAMS_SCREEN_HINT, "untrusted_data.authorization_params.screen_hint"); + public static final AculContextEnum TENANT_FRIENDLY_NAME = + new AculContextEnum(Value.TENANT_FRIENDLY_NAME, "tenant.friendly_name"); + public static final AculContextEnum ORGANIZATION_BRANDING = new AculContextEnum(Value.ORGANIZATION_BRANDING, "organization.branding"); @@ -27,33 +30,30 @@ public final class AculContextEnum { public static final AculContextEnum TRANSACTION_CUSTOM_DOMAIN_DOMAIN = new AculContextEnum(Value.TRANSACTION_CUSTOM_DOMAIN_DOMAIN, "transaction.custom_domain.domain"); + public static final AculContextEnum CLIENT_LOGO_URI = new AculContextEnum(Value.CLIENT_LOGO_URI, "client.logo_uri"); + public static final AculContextEnum UNTRUSTED_DATA_SUBMITTED_FORM_DATA = new AculContextEnum(Value.UNTRUSTED_DATA_SUBMITTED_FORM_DATA, "untrusted_data.submitted_form_data"); - public static final AculContextEnum CLIENT_LOGO_URI = new AculContextEnum(Value.CLIENT_LOGO_URI, "client.logo_uri"); - public static final AculContextEnum TENANT_ENABLED_LOCALES = new AculContextEnum(Value.TENANT_ENABLED_LOCALES, "tenant.enabled_locales"); - public static final AculContextEnum ORGANIZATION_DISPLAY_NAME = - new AculContextEnum(Value.ORGANIZATION_DISPLAY_NAME, "organization.display_name"); - - public static final AculContextEnum UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT = new AculContextEnum( - Value.UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT, "untrusted_data.authorization_params.login_hint"); - public static final AculContextEnum USER_ORGANIZATIONS = new AculContextEnum(Value.USER_ORGANIZATIONS, "user.organizations"); public static final AculContextEnum BRANDING_THEMES_DEFAULT = new AculContextEnum(Value.BRANDING_THEMES_DEFAULT, "branding.themes.default"); - public static final AculContextEnum TENANT_NAME = new AculContextEnum(Value.TENANT_NAME, "tenant.name"); + public static final AculContextEnum ORGANIZATION_DISPLAY_NAME = + new AculContextEnum(Value.ORGANIZATION_DISPLAY_NAME, "organization.display_name"); - public static final AculContextEnum UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES = new AculContextEnum( - Value.UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES, "untrusted_data.authorization_params.ui_locales"); + public static final AculContextEnum TENANT_NAME = new AculContextEnum(Value.TENANT_NAME, "tenant.name"); public static final AculContextEnum TENANT_LOGO_URL = new AculContextEnum(Value.TENANT_LOGO_URL, "tenant.logo_url"); + public static final AculContextEnum UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT = new AculContextEnum( + Value.UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT, "untrusted_data.authorization_params.login_hint"); + private final Value value; private final String string; @@ -86,10 +86,12 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case TENANT_FRIENDLY_NAME: - return visitor.visitTenantFriendlyName(); + case UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES: + return visitor.visitUntrustedDataAuthorizationParamsUiLocales(); case UNTRUSTED_DATA_AUTHORIZATION_PARAMS_SCREEN_HINT: return visitor.visitUntrustedDataAuthorizationParamsScreenHint(); + case TENANT_FRIENDLY_NAME: + return visitor.visitTenantFriendlyName(); case ORGANIZATION_BRANDING: return visitor.visitOrganizationBranding(); case CLIENT_DESCRIPTION: @@ -100,26 +102,24 @@ public T visit(Visitor visitor) { return visitor.visitBrandingSettings(); case TRANSACTION_CUSTOM_DOMAIN_DOMAIN: return visitor.visitTransactionCustomDomainDomain(); - case UNTRUSTED_DATA_SUBMITTED_FORM_DATA: - return visitor.visitUntrustedDataSubmittedFormData(); case CLIENT_LOGO_URI: return visitor.visitClientLogoUri(); + case UNTRUSTED_DATA_SUBMITTED_FORM_DATA: + return visitor.visitUntrustedDataSubmittedFormData(); case TENANT_ENABLED_LOCALES: return visitor.visitTenantEnabledLocales(); - case ORGANIZATION_DISPLAY_NAME: - return visitor.visitOrganizationDisplayName(); - case UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT: - return visitor.visitUntrustedDataAuthorizationParamsLoginHint(); case USER_ORGANIZATIONS: return visitor.visitUserOrganizations(); case BRANDING_THEMES_DEFAULT: return visitor.visitBrandingThemesDefault(); + case ORGANIZATION_DISPLAY_NAME: + return visitor.visitOrganizationDisplayName(); case TENANT_NAME: return visitor.visitTenantName(); - case UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES: - return visitor.visitUntrustedDataAuthorizationParamsUiLocales(); case TENANT_LOGO_URL: return visitor.visitTenantLogoUrl(); + case UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT: + return visitor.visitUntrustedDataAuthorizationParamsLoginHint(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -129,10 +129,12 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static AculContextEnum valueOf(String value) { switch (value) { - case "tenant.friendly_name": - return TENANT_FRIENDLY_NAME; + case "untrusted_data.authorization_params.ui_locales": + return UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES; case "untrusted_data.authorization_params.screen_hint": return UNTRUSTED_DATA_AUTHORIZATION_PARAMS_SCREEN_HINT; + case "tenant.friendly_name": + return TENANT_FRIENDLY_NAME; case "organization.branding": return ORGANIZATION_BRANDING; case "client.description": @@ -143,26 +145,24 @@ public static AculContextEnum valueOf(String value) { return BRANDING_SETTINGS; case "transaction.custom_domain.domain": return TRANSACTION_CUSTOM_DOMAIN_DOMAIN; - case "untrusted_data.submitted_form_data": - return UNTRUSTED_DATA_SUBMITTED_FORM_DATA; case "client.logo_uri": return CLIENT_LOGO_URI; + case "untrusted_data.submitted_form_data": + return UNTRUSTED_DATA_SUBMITTED_FORM_DATA; case "tenant.enabled_locales": return TENANT_ENABLED_LOCALES; - case "organization.display_name": - return ORGANIZATION_DISPLAY_NAME; - case "untrusted_data.authorization_params.login_hint": - return UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT; case "user.organizations": return USER_ORGANIZATIONS; case "branding.themes.default": return BRANDING_THEMES_DEFAULT; + case "organization.display_name": + return ORGANIZATION_DISPLAY_NAME; case "tenant.name": return TENANT_NAME; - case "untrusted_data.authorization_params.ui_locales": - return UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES; case "tenant.logo_url": return TENANT_LOGO_URL; + case "untrusted_data.authorization_params.login_hint": + return UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT; default: return new AculContextEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/AculDomainFilter.java b/src/main/java/com/auth0/client/mgmt/types/AculDomainFilter.java index 6847706ef..6127ae691 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AculDomainFilter.java +++ b/src/main/java/com/auth0/client/mgmt/types/AculDomainFilter.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = AculDomainFilter.Deserializer.class) @@ -81,13 +82,17 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public AculDomainFilter deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculDomainFilterById.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculDomainFilterById.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculDomainFilterByMetadata.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("metadata")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculDomainFilterByMetadata.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilter.java b/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilter.java index 141029bd8..da7a7b6d9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilter.java +++ b/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilter.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = AculOrganizationFilter.Deserializer.class) @@ -81,13 +82,17 @@ static final class Deserializer extends StdDeserializer @java.lang.Override public AculOrganizationFilter deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculOrganizationFilterById.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculOrganizationFilterById.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculOrganizationFilterByMetadata.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("metadata")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculOrganizationFilterByMetadata.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaProviderId.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaProviderId.java index d794d09e8..37c331f65 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaProviderId.java +++ b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaProviderId.java @@ -19,12 +19,12 @@ public final class AttackProtectionCaptchaProviderId { public static final AttackProtectionCaptchaProviderId ARKOSE = new AttackProtectionCaptchaProviderId(Value.ARKOSE, "arkose"); - public static final AttackProtectionCaptchaProviderId HCAPTCHA = - new AttackProtectionCaptchaProviderId(Value.HCAPTCHA, "hcaptcha"); - public static final AttackProtectionCaptchaProviderId SIMPLE_CAPTCHA = new AttackProtectionCaptchaProviderId(Value.SIMPLE_CAPTCHA, "simple_captcha"); + public static final AttackProtectionCaptchaProviderId HCAPTCHA = + new AttackProtectionCaptchaProviderId(Value.HCAPTCHA, "hcaptcha"); + public static final AttackProtectionCaptchaProviderId RECAPTCHA_ENTERPRISE = new AttackProtectionCaptchaProviderId(Value.RECAPTCHA_ENTERPRISE, "recaptcha_enterprise"); @@ -69,10 +69,10 @@ public T visit(Visitor visitor) { return visitor.visitFriendlyCaptcha(); case ARKOSE: return visitor.visitArkose(); - case HCAPTCHA: - return visitor.visitHcaptcha(); case SIMPLE_CAPTCHA: return visitor.visitSimpleCaptcha(); + case HCAPTCHA: + return visitor.visitHcaptcha(); case RECAPTCHA_ENTERPRISE: return visitor.visitRecaptchaEnterprise(); case UNKNOWN: @@ -92,10 +92,10 @@ public static AttackProtectionCaptchaProviderId valueOf(String value) { return FRIENDLY_CAPTCHA; case "arkose": return ARKOSE; - case "hcaptcha": - return HCAPTCHA; case "simple_captcha": return SIMPLE_CAPTCHA; + case "hcaptcha": + return HCAPTCHA; case "recaptcha_enterprise": return RECAPTCHA_ENTERPRISE; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/AuthenticationMethodTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/AuthenticationMethodTypeEnum.java index 57756fa60..da5c34349 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AuthenticationMethodTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/AuthenticationMethodTypeEnum.java @@ -7,22 +7,22 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class AuthenticationMethodTypeEnum { + public static final AuthenticationMethodTypeEnum WEBAUTHN_PLATFORM = + new AuthenticationMethodTypeEnum(Value.WEBAUTHN_PLATFORM, "webauthn-platform"); + public static final AuthenticationMethodTypeEnum TOTP = new AuthenticationMethodTypeEnum(Value.TOTP, "totp"); public static final AuthenticationMethodTypeEnum EMAIL = new AuthenticationMethodTypeEnum(Value.EMAIL, "email"); + public static final AuthenticationMethodTypeEnum WEBAUTHN_ROAMING = + new AuthenticationMethodTypeEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); + public static final AuthenticationMethodTypeEnum PASSKEY = new AuthenticationMethodTypeEnum(Value.PASSKEY, "passkey"); public static final AuthenticationMethodTypeEnum PASSWORD = new AuthenticationMethodTypeEnum(Value.PASSWORD, "password"); - public static final AuthenticationMethodTypeEnum WEBAUTHN_PLATFORM = - new AuthenticationMethodTypeEnum(Value.WEBAUTHN_PLATFORM, "webauthn-platform"); - - public static final AuthenticationMethodTypeEnum GUARDIAN = - new AuthenticationMethodTypeEnum(Value.GUARDIAN, "guardian"); - public static final AuthenticationMethodTypeEnum PHONE = new AuthenticationMethodTypeEnum(Value.PHONE, "phone"); public static final AuthenticationMethodTypeEnum EMAIL_VERIFICATION = @@ -30,8 +30,8 @@ public final class AuthenticationMethodTypeEnum { public static final AuthenticationMethodTypeEnum PUSH = new AuthenticationMethodTypeEnum(Value.PUSH, "push"); - public static final AuthenticationMethodTypeEnum WEBAUTHN_ROAMING = - new AuthenticationMethodTypeEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); + public static final AuthenticationMethodTypeEnum GUARDIAN = + new AuthenticationMethodTypeEnum(Value.GUARDIAN, "guardian"); public static final AuthenticationMethodTypeEnum RECOVERY_CODE = new AuthenticationMethodTypeEnum(Value.RECOVERY_CODE, "recovery-code"); @@ -69,26 +69,26 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case WEBAUTHN_PLATFORM: + return visitor.visitWebauthnPlatform(); case TOTP: return visitor.visitTotp(); case EMAIL: return visitor.visitEmail(); + case WEBAUTHN_ROAMING: + return visitor.visitWebauthnRoaming(); case PASSKEY: return visitor.visitPasskey(); case PASSWORD: return visitor.visitPassword(); - case WEBAUTHN_PLATFORM: - return visitor.visitWebauthnPlatform(); - case GUARDIAN: - return visitor.visitGuardian(); case PHONE: return visitor.visitPhone(); case EMAIL_VERIFICATION: return visitor.visitEmailVerification(); case PUSH: return visitor.visitPush(); - case WEBAUTHN_ROAMING: - return visitor.visitWebauthnRoaming(); + case GUARDIAN: + return visitor.visitGuardian(); case RECOVERY_CODE: return visitor.visitRecoveryCode(); case UNKNOWN: @@ -100,26 +100,26 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static AuthenticationMethodTypeEnum valueOf(String value) { switch (value) { + case "webauthn-platform": + return WEBAUTHN_PLATFORM; case "totp": return TOTP; case "email": return EMAIL; + case "webauthn-roaming": + return WEBAUTHN_ROAMING; case "passkey": return PASSKEY; case "password": return PASSWORD; - case "webauthn-platform": - return WEBAUTHN_PLATFORM; - case "guardian": - return GUARDIAN; case "phone": return PHONE; case "email-verification": return EMAIL_VERIFICATION; case "push": return PUSH; - case "webauthn-roaming": - return WEBAUTHN_ROAMING; + case "guardian": + return GUARDIAN; case "recovery-code": return RECOVERY_CODE; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingIdentifiers.java b/src/main/java/com/auth0/client/mgmt/types/BrandingIdentifiers.java new file mode 100644 index 000000000..179700d77 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingIdentifiers.java @@ -0,0 +1,161 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = BrandingIdentifiers.Builder.class) +public final class BrandingIdentifiers { + private final Optional loginDisplay; + + private final Optional otpAutocomplete; + + private final Optional phoneDisplay; + + private final Map additionalProperties; + + private BrandingIdentifiers( + Optional loginDisplay, + Optional otpAutocomplete, + Optional phoneDisplay, + Map additionalProperties) { + this.loginDisplay = loginDisplay; + this.otpAutocomplete = otpAutocomplete; + this.phoneDisplay = phoneDisplay; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("login_display") + public Optional getLoginDisplay() { + return loginDisplay; + } + + /** + * @return Whether OTP autocomplete (autocomplete="one-time-code") is enabled. + */ + @JsonProperty("otp_autocomplete") + public Optional getOtpAutocomplete() { + return otpAutocomplete; + } + + @JsonProperty("phone_display") + public Optional getPhoneDisplay() { + return phoneDisplay; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BrandingIdentifiers && equalTo((BrandingIdentifiers) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(BrandingIdentifiers other) { + return loginDisplay.equals(other.loginDisplay) + && otpAutocomplete.equals(other.otpAutocomplete) + && phoneDisplay.equals(other.phoneDisplay); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.loginDisplay, this.otpAutocomplete, this.phoneDisplay); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional loginDisplay = Optional.empty(); + + private Optional otpAutocomplete = Optional.empty(); + + private Optional phoneDisplay = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(BrandingIdentifiers other) { + loginDisplay(other.getLoginDisplay()); + otpAutocomplete(other.getOtpAutocomplete()); + phoneDisplay(other.getPhoneDisplay()); + return this; + } + + @JsonSetter(value = "login_display", nulls = Nulls.SKIP) + public Builder loginDisplay(Optional loginDisplay) { + this.loginDisplay = loginDisplay; + return this; + } + + public Builder loginDisplay(BrandingLoginDisplayEnum loginDisplay) { + this.loginDisplay = Optional.ofNullable(loginDisplay); + return this; + } + + /** + *

Whether OTP autocomplete (autocomplete="one-time-code") is enabled.

+ */ + @JsonSetter(value = "otp_autocomplete", nulls = Nulls.SKIP) + public Builder otpAutocomplete(Optional otpAutocomplete) { + this.otpAutocomplete = otpAutocomplete; + return this; + } + + public Builder otpAutocomplete(Boolean otpAutocomplete) { + this.otpAutocomplete = Optional.ofNullable(otpAutocomplete); + return this; + } + + @JsonSetter(value = "phone_display", nulls = Nulls.SKIP) + public Builder phoneDisplay(Optional phoneDisplay) { + this.phoneDisplay = phoneDisplay; + return this; + } + + public Builder phoneDisplay(BrandingPhoneDisplay phoneDisplay) { + this.phoneDisplay = Optional.ofNullable(phoneDisplay); + return this; + } + + public BrandingIdentifiers build() { + return new BrandingIdentifiers(loginDisplay, otpAutocomplete, phoneDisplay, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingLoginDisplayEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingLoginDisplayEnum.java new file mode 100644 index 000000000..c5146272d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingLoginDisplayEnum.java @@ -0,0 +1,84 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class BrandingLoginDisplayEnum { + public static final BrandingLoginDisplayEnum SEPARATE = new BrandingLoginDisplayEnum(Value.SEPARATE, "separate"); + + public static final BrandingLoginDisplayEnum UNIFIED = new BrandingLoginDisplayEnum(Value.UNIFIED, "unified"); + + private final Value value; + + private final String string; + + BrandingLoginDisplayEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof BrandingLoginDisplayEnum + && this.string.equals(((BrandingLoginDisplayEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SEPARATE: + return visitor.visitSeparate(); + case UNIFIED: + return visitor.visitUnified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static BrandingLoginDisplayEnum valueOf(String value) { + switch (value) { + case "separate": + return SEPARATE; + case "unified": + return UNIFIED; + default: + return new BrandingLoginDisplayEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + UNIFIED, + + SEPARATE, + + UNKNOWN + } + + public interface Visitor { + T visitUnified(); + + T visitSeparate(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingPhoneDisplay.java b/src/main/java/com/auth0/client/mgmt/types/BrandingPhoneDisplay.java new file mode 100644 index 000000000..76aa34b12 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingPhoneDisplay.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = BrandingPhoneDisplay.Builder.class) +public final class BrandingPhoneDisplay { + private final Optional masking; + + private final Optional formatting; + + private final Map additionalProperties; + + private BrandingPhoneDisplay( + Optional masking, + Optional formatting, + Map additionalProperties) { + this.masking = masking; + this.formatting = formatting; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("masking") + public Optional getMasking() { + return masking; + } + + @JsonProperty("formatting") + public Optional getFormatting() { + return formatting; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BrandingPhoneDisplay && equalTo((BrandingPhoneDisplay) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(BrandingPhoneDisplay other) { + return masking.equals(other.masking) && formatting.equals(other.formatting); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.masking, this.formatting); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional masking = Optional.empty(); + + private Optional formatting = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(BrandingPhoneDisplay other) { + masking(other.getMasking()); + formatting(other.getFormatting()); + return this; + } + + @JsonSetter(value = "masking", nulls = Nulls.SKIP) + public Builder masking(Optional masking) { + this.masking = masking; + return this; + } + + public Builder masking(BrandingPhoneMaskingEnum masking) { + this.masking = Optional.ofNullable(masking); + return this; + } + + @JsonSetter(value = "formatting", nulls = Nulls.SKIP) + public Builder formatting(Optional formatting) { + this.formatting = formatting; + return this; + } + + public Builder formatting(BrandingPhoneFormattingEnum formatting) { + this.formatting = Optional.ofNullable(formatting); + return this; + } + + public BrandingPhoneDisplay build() { + return new BrandingPhoneDisplay(masking, formatting, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingPhoneFormattingEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingPhoneFormattingEnum.java new file mode 100644 index 000000000..3a1071df0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingPhoneFormattingEnum.java @@ -0,0 +1,86 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class BrandingPhoneFormattingEnum { + public static final BrandingPhoneFormattingEnum REGIONAL = + new BrandingPhoneFormattingEnum(Value.REGIONAL, "regional"); + + public static final BrandingPhoneFormattingEnum INTERNATIONAL = + new BrandingPhoneFormattingEnum(Value.INTERNATIONAL, "international"); + + private final Value value; + + private final String string; + + BrandingPhoneFormattingEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof BrandingPhoneFormattingEnum + && this.string.equals(((BrandingPhoneFormattingEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case REGIONAL: + return visitor.visitRegional(); + case INTERNATIONAL: + return visitor.visitInternational(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static BrandingPhoneFormattingEnum valueOf(String value) { + switch (value) { + case "regional": + return REGIONAL; + case "international": + return INTERNATIONAL; + default: + return new BrandingPhoneFormattingEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + REGIONAL, + + INTERNATIONAL, + + UNKNOWN + } + + public interface Visitor { + T visitRegional(); + + T visitInternational(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingPhoneMaskingEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingPhoneMaskingEnum.java new file mode 100644 index 000000000..68e36a16a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingPhoneMaskingEnum.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class BrandingPhoneMaskingEnum { + public static final BrandingPhoneMaskingEnum SHOW_ALL = new BrandingPhoneMaskingEnum(Value.SHOW_ALL, "show_all"); + + public static final BrandingPhoneMaskingEnum MASK_DIGITS = + new BrandingPhoneMaskingEnum(Value.MASK_DIGITS, "mask_digits"); + + public static final BrandingPhoneMaskingEnum HIDE_COUNTRY_CODE = + new BrandingPhoneMaskingEnum(Value.HIDE_COUNTRY_CODE, "hide_country_code"); + + private final Value value; + + private final String string; + + BrandingPhoneMaskingEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof BrandingPhoneMaskingEnum + && this.string.equals(((BrandingPhoneMaskingEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHOW_ALL: + return visitor.visitShowAll(); + case MASK_DIGITS: + return visitor.visitMaskDigits(); + case HIDE_COUNTRY_CODE: + return visitor.visitHideCountryCode(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static BrandingPhoneMaskingEnum valueOf(String value) { + switch (value) { + case "show_all": + return SHOW_ALL; + case "mask_digits": + return MASK_DIGITS; + case "hide_country_code": + return HIDE_COUNTRY_CODE; + default: + return new BrandingPhoneMaskingEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + SHOW_ALL, + + HIDE_COUNTRY_CODE, + + MASK_DIGITS, + + UNKNOWN + } + + public interface Visitor { + T visitShowAll(); + + T visitHideCountryCode(); + + T visitMaskDigits(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColorsCaptchaWidgetThemeEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColorsCaptchaWidgetThemeEnum.java index 2fe77ddab..012d7d15b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColorsCaptchaWidgetThemeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColorsCaptchaWidgetThemeEnum.java @@ -7,15 +7,15 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class BrandingThemeColorsCaptchaWidgetThemeEnum { - public static final BrandingThemeColorsCaptchaWidgetThemeEnum AUTO = - new BrandingThemeColorsCaptchaWidgetThemeEnum(Value.AUTO, "auto"); - public static final BrandingThemeColorsCaptchaWidgetThemeEnum LIGHT = new BrandingThemeColorsCaptchaWidgetThemeEnum(Value.LIGHT, "light"); public static final BrandingThemeColorsCaptchaWidgetThemeEnum DARK = new BrandingThemeColorsCaptchaWidgetThemeEnum(Value.DARK, "dark"); + public static final BrandingThemeColorsCaptchaWidgetThemeEnum AUTO = + new BrandingThemeColorsCaptchaWidgetThemeEnum(Value.AUTO, "auto"); + private final Value value; private final String string; @@ -49,12 +49,12 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case AUTO: - return visitor.visitAuto(); case LIGHT: return visitor.visitLight(); case DARK: return visitor.visitDark(); + case AUTO: + return visitor.visitAuto(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -64,12 +64,12 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static BrandingThemeColorsCaptchaWidgetThemeEnum valueOf(String value) { switch (value) { - case "auto": - return AUTO; case "light": return LIGHT; case "dark": return DARK; + case "auto": + return AUTO; default: return new BrandingThemeColorsCaptchaWidgetThemeEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionAdminNotificationFrequencyEnum.java b/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionAdminNotificationFrequencyEnum.java index 2ad53e7c4..f158fe05d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionAdminNotificationFrequencyEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionAdminNotificationFrequencyEnum.java @@ -10,15 +10,15 @@ public final class BreachedPasswordDetectionAdminNotificationFrequencyEnum { public static final BreachedPasswordDetectionAdminNotificationFrequencyEnum IMMEDIATELY = new BreachedPasswordDetectionAdminNotificationFrequencyEnum(Value.IMMEDIATELY, "immediately"); - public static final BreachedPasswordDetectionAdminNotificationFrequencyEnum MONTHLY = - new BreachedPasswordDetectionAdminNotificationFrequencyEnum(Value.MONTHLY, "monthly"); - public static final BreachedPasswordDetectionAdminNotificationFrequencyEnum DAILY = new BreachedPasswordDetectionAdminNotificationFrequencyEnum(Value.DAILY, "daily"); public static final BreachedPasswordDetectionAdminNotificationFrequencyEnum WEEKLY = new BreachedPasswordDetectionAdminNotificationFrequencyEnum(Value.WEEKLY, "weekly"); + public static final BreachedPasswordDetectionAdminNotificationFrequencyEnum MONTHLY = + new BreachedPasswordDetectionAdminNotificationFrequencyEnum(Value.MONTHLY, "monthly"); + private final Value value; private final String string; @@ -55,12 +55,12 @@ public T visit(Visitor visitor) { switch (value) { case IMMEDIATELY: return visitor.visitImmediately(); - case MONTHLY: - return visitor.visitMonthly(); case DAILY: return visitor.visitDaily(); case WEEKLY: return visitor.visitWeekly(); + case MONTHLY: + return visitor.visitMonthly(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -72,12 +72,12 @@ public static BreachedPasswordDetectionAdminNotificationFrequencyEnum valueOf(St switch (value) { case "immediately": return IMMEDIATELY; - case "monthly": - return MONTHLY; case "daily": return DAILY; case "weekly": return WEEKLY; + case "monthly": + return MONTHLY; default: return new BreachedPasswordDetectionAdminNotificationFrequencyEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAppTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientAppTypeEnum.java index 7a4ebeb98..0bfdbff4c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAppTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientAppTypeEnum.java @@ -9,17 +9,15 @@ public final class ClientAppTypeEnum { public static final ClientAppTypeEnum DROPBOX = new ClientAppTypeEnum(Value.DROPBOX, "dropbox"); - public static final ClientAppTypeEnum REGULAR_WEB = new ClientAppTypeEnum(Value.REGULAR_WEB, "regular_web"); - public static final ClientAppTypeEnum NEWRELIC = new ClientAppTypeEnum(Value.NEWRELIC, "newrelic"); - public static final ClientAppTypeEnum NATIVE = new ClientAppTypeEnum(Value.NATIVE, "native"); + public static final ClientAppTypeEnum REGULAR_WEB = new ClientAppTypeEnum(Value.REGULAR_WEB, "regular_web"); public static final ClientAppTypeEnum SPA = new ClientAppTypeEnum(Value.SPA, "spa"); public static final ClientAppTypeEnum SPRINGCM = new ClientAppTypeEnum(Value.SPRINGCM, "springcm"); - public static final ClientAppTypeEnum SHAREPOINT = new ClientAppTypeEnum(Value.SHAREPOINT, "sharepoint"); + public static final ClientAppTypeEnum NATIVE = new ClientAppTypeEnum(Value.NATIVE, "native"); public static final ClientAppTypeEnum EGNYTE = new ClientAppTypeEnum(Value.EGNYTE, "egnyte"); @@ -28,39 +26,41 @@ public final class ClientAppTypeEnum { public static final ClientAppTypeEnum NON_INTERACTIVE = new ClientAppTypeEnum(Value.NON_INTERACTIVE, "non_interactive"); - public static final ClientAppTypeEnum SLACK = new ClientAppTypeEnum(Value.SLACK, "slack"); + public static final ClientAppTypeEnum SHAREPOINT = new ClientAppTypeEnum(Value.SHAREPOINT, "sharepoint"); public static final ClientAppTypeEnum SENTRY = new ClientAppTypeEnum(Value.SENTRY, "sentry"); + public static final ClientAppTypeEnum SLACK = new ClientAppTypeEnum(Value.SLACK, "slack"); + public static final ClientAppTypeEnum EXPRESS_CONFIGURATION = new ClientAppTypeEnum(Value.EXPRESS_CONFIGURATION, "express_configuration"); public static final ClientAppTypeEnum SSO_INTEGRATION = new ClientAppTypeEnum(Value.SSO_INTEGRATION, "sso_integration"); - public static final ClientAppTypeEnum ECHOSIGN = new ClientAppTypeEnum(Value.ECHOSIGN, "echosign"); - public static final ClientAppTypeEnum BOX = new ClientAppTypeEnum(Value.BOX, "box"); + public static final ClientAppTypeEnum ECHOSIGN = new ClientAppTypeEnum(Value.ECHOSIGN, "echosign"); + public static final ClientAppTypeEnum RMS = new ClientAppTypeEnum(Value.RMS, "rms"); public static final ClientAppTypeEnum CLOUDBEES = new ClientAppTypeEnum(Value.CLOUDBEES, "cloudbees"); public static final ClientAppTypeEnum SALESFORCE = new ClientAppTypeEnum(Value.SALESFORCE, "salesforce"); - public static final ClientAppTypeEnum CONCUR = new ClientAppTypeEnum(Value.CONCUR, "concur"); - public static final ClientAppTypeEnum RESOURCE_SERVER = new ClientAppTypeEnum(Value.RESOURCE_SERVER, "resource_server"); public static final ClientAppTypeEnum ZOOM = new ClientAppTypeEnum(Value.ZOOM, "zoom"); + public static final ClientAppTypeEnum CONCUR = new ClientAppTypeEnum(Value.CONCUR, "concur"); + + public static final ClientAppTypeEnum OFFICE365 = new ClientAppTypeEnum(Value.OFFICE365, "office365"); + public static final ClientAppTypeEnum MSCRM = new ClientAppTypeEnum(Value.MSCRM, "mscrm"); public static final ClientAppTypeEnum OAG = new ClientAppTypeEnum(Value.OAG, "oag"); - public static final ClientAppTypeEnum OFFICE365 = new ClientAppTypeEnum(Value.OFFICE365, "office365"); - private final Value value; private final String string; @@ -95,54 +95,54 @@ public T visit(Visitor visitor) { switch (value) { case DROPBOX: return visitor.visitDropbox(); - case REGULAR_WEB: - return visitor.visitRegularWeb(); case NEWRELIC: return visitor.visitNewrelic(); - case NATIVE: - return visitor.visitNative(); + case REGULAR_WEB: + return visitor.visitRegularWeb(); case SPA: return visitor.visitSpa(); case SPRINGCM: return visitor.visitSpringcm(); - case SHAREPOINT: - return visitor.visitSharepoint(); + case NATIVE: + return visitor.visitNative(); case EGNYTE: return visitor.visitEgnyte(); case ZENDESK: return visitor.visitZendesk(); case NON_INTERACTIVE: return visitor.visitNonInteractive(); - case SLACK: - return visitor.visitSlack(); + case SHAREPOINT: + return visitor.visitSharepoint(); case SENTRY: return visitor.visitSentry(); + case SLACK: + return visitor.visitSlack(); case EXPRESS_CONFIGURATION: return visitor.visitExpressConfiguration(); case SSO_INTEGRATION: return visitor.visitSsoIntegration(); - case ECHOSIGN: - return visitor.visitEchosign(); case BOX: return visitor.visitBox(); + case ECHOSIGN: + return visitor.visitEchosign(); case RMS: return visitor.visitRms(); case CLOUDBEES: return visitor.visitCloudbees(); case SALESFORCE: return visitor.visitSalesforce(); - case CONCUR: - return visitor.visitConcur(); case RESOURCE_SERVER: return visitor.visitResourceServer(); case ZOOM: return visitor.visitZoom(); + case CONCUR: + return visitor.visitConcur(); + case OFFICE365: + return visitor.visitOffice365(); case MSCRM: return visitor.visitMscrm(); case OAG: return visitor.visitOag(); - case OFFICE365: - return visitor.visitOffice365(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -154,54 +154,54 @@ public static ClientAppTypeEnum valueOf(String value) { switch (value) { case "dropbox": return DROPBOX; - case "regular_web": - return REGULAR_WEB; case "newrelic": return NEWRELIC; - case "native": - return NATIVE; + case "regular_web": + return REGULAR_WEB; case "spa": return SPA; case "springcm": return SPRINGCM; - case "sharepoint": - return SHAREPOINT; + case "native": + return NATIVE; case "egnyte": return EGNYTE; case "zendesk": return ZENDESK; case "non_interactive": return NON_INTERACTIVE; - case "slack": - return SLACK; + case "sharepoint": + return SHAREPOINT; case "sentry": return SENTRY; + case "slack": + return SLACK; case "express_configuration": return EXPRESS_CONFIGURATION; case "sso_integration": return SSO_INTEGRATION; - case "echosign": - return ECHOSIGN; case "box": return BOX; + case "echosign": + return ECHOSIGN; case "rms": return RMS; case "cloudbees": return CLOUDBEES; case "salesforce": return SALESFORCE; - case "concur": - return CONCUR; case "resource_server": return RESOURCE_SERVER; case "zoom": return ZOOM; + case "concur": + return CONCUR; + case "office365": + return OFFICE365; case "mscrm": return MSCRM; case "oag": return OAG; - case "office365": - return OFFICE365; default: return new ClientAppTypeEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientComplianceLevelEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientComplianceLevelEnum.java index 92861c601..352fde369 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientComplianceLevelEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientComplianceLevelEnum.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ClientComplianceLevelEnum { - public static final ClientComplianceLevelEnum FAPI1ADV_MTLS_PAR = - new ClientComplianceLevelEnum(Value.FAPI1ADV_MTLS_PAR, "fapi1_adv_mtls_par"); - public static final ClientComplianceLevelEnum FAPI2SP_PKJ_MTLS = new ClientComplianceLevelEnum(Value.FAPI2SP_PKJ_MTLS, "fapi2_sp_pkj_mtls"); + public static final ClientComplianceLevelEnum FAPI1ADV_MTLS_PAR = + new ClientComplianceLevelEnum(Value.FAPI1ADV_MTLS_PAR, "fapi1_adv_mtls_par"); + public static final ClientComplianceLevelEnum FAPI2SP_MTLS_MTLS = new ClientComplianceLevelEnum(Value.FAPI2SP_MTLS_MTLS, "fapi2_sp_mtls_mtls"); @@ -54,10 +54,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case FAPI1ADV_MTLS_PAR: - return visitor.visitFapi1AdvMtlsPar(); case FAPI2SP_PKJ_MTLS: return visitor.visitFapi2SpPkjMtls(); + case FAPI1ADV_MTLS_PAR: + return visitor.visitFapi1AdvMtlsPar(); case FAPI2SP_MTLS_MTLS: return visitor.visitFapi2SpMtlsMtls(); case NONE: @@ -73,10 +73,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ClientComplianceLevelEnum valueOf(String value) { switch (value) { - case "fapi1_adv_mtls_par": - return FAPI1ADV_MTLS_PAR; case "fapi2_sp_pkj_mtls": return FAPI2SP_PKJ_MTLS; + case "fapi1_adv_mtls_par": + return FAPI1ADV_MTLS_PAR; case "fapi2_sp_mtls_mtls": return FAPI2SP_MTLS_MTLS; case "none": diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientCredentialAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientCredentialAlgorithmEnum.java index 93630fa34..47510a99d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientCredentialAlgorithmEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientCredentialAlgorithmEnum.java @@ -9,10 +9,10 @@ public final class ClientCredentialAlgorithmEnum { public static final ClientCredentialAlgorithmEnum PS256 = new ClientCredentialAlgorithmEnum(Value.PS256, "PS256"); - public static final ClientCredentialAlgorithmEnum RS256 = new ClientCredentialAlgorithmEnum(Value.RS256, "RS256"); - public static final ClientCredentialAlgorithmEnum RS384 = new ClientCredentialAlgorithmEnum(Value.RS384, "RS384"); + public static final ClientCredentialAlgorithmEnum RS256 = new ClientCredentialAlgorithmEnum(Value.RS256, "RS256"); + private final Value value; private final String string; @@ -48,10 +48,10 @@ public T visit(Visitor visitor) { switch (value) { case PS256: return visitor.visitPs256(); - case RS256: - return visitor.visitRs256(); case RS384: return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -63,10 +63,10 @@ public static ClientCredentialAlgorithmEnum valueOf(String value) { switch (value) { case "PS256": return PS256; - case "RS256": - return RS256; case "RS384": return RS384; + case "RS256": + return RS256; default: return new ClientCredentialAlgorithmEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationAllowedStrategiesEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationAllowedStrategiesEnum.java index 38bf2b5e6..001361352 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationAllowedStrategiesEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationAllowedStrategiesEnum.java @@ -16,9 +16,6 @@ public final class ClientMyOrganizationConfigurationAllowedStrategiesEnum { public static final ClientMyOrganizationConfigurationAllowedStrategiesEnum SAMLP = new ClientMyOrganizationConfigurationAllowedStrategiesEnum(Value.SAMLP, "samlp"); - public static final ClientMyOrganizationConfigurationAllowedStrategiesEnum GOOGLE_APPS = - new ClientMyOrganizationConfigurationAllowedStrategiesEnum(Value.GOOGLE_APPS, "google-apps"); - public static final ClientMyOrganizationConfigurationAllowedStrategiesEnum WAAD = new ClientMyOrganizationConfigurationAllowedStrategiesEnum(Value.WAAD, "waad"); @@ -28,6 +25,9 @@ public final class ClientMyOrganizationConfigurationAllowedStrategiesEnum { public static final ClientMyOrganizationConfigurationAllowedStrategiesEnum OIDC = new ClientMyOrganizationConfigurationAllowedStrategiesEnum(Value.OIDC, "oidc"); + public static final ClientMyOrganizationConfigurationAllowedStrategiesEnum GOOGLE_APPS = + new ClientMyOrganizationConfigurationAllowedStrategiesEnum(Value.GOOGLE_APPS, "google-apps"); + private final Value value; private final String string; @@ -67,14 +67,14 @@ public T visit(Visitor visitor) { return visitor.visitOkta(); case SAMLP: return visitor.visitSamlp(); - case GOOGLE_APPS: - return visitor.visitGoogleApps(); case WAAD: return visitor.visitWaad(); case ADFS: return visitor.visitAdfs(); case OIDC: return visitor.visitOidc(); + case GOOGLE_APPS: + return visitor.visitGoogleApps(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -90,14 +90,14 @@ public static ClientMyOrganizationConfigurationAllowedStrategiesEnum valueOf(Str return OKTA; case "samlp": return SAMLP; - case "google-apps": - return GOOGLE_APPS; case "waad": return WAAD; case "adfs": return ADFS; case "oidc": return OIDC; + case "google-apps": + return GOOGLE_APPS; default: return new ClientMyOrganizationConfigurationAllowedStrategiesEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsEnum.java index 06bdb72fb..e48d62b26 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsEnum.java @@ -7,32 +7,32 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ClientOidcBackchannelLogoutInitiatorsEnum { - public static final ClientOidcBackchannelLogoutInitiatorsEnum EMAIL_IDENTIFIER_CHANGED = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.EMAIL_IDENTIFIER_CHANGED, "email-identifier-changed"); - - public static final ClientOidcBackchannelLogoutInitiatorsEnum MFA_PHONE_UNENROLLED = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.MFA_PHONE_UNENROLLED, "mfa-phone-unenrolled"); + public static final ClientOidcBackchannelLogoutInitiatorsEnum SESSION_REVOKED = + new ClientOidcBackchannelLogoutInitiatorsEnum(Value.SESSION_REVOKED, "session-revoked"); public static final ClientOidcBackchannelLogoutInitiatorsEnum ACCOUNT_DELETED = new ClientOidcBackchannelLogoutInitiatorsEnum(Value.ACCOUNT_DELETED, "account-deleted"); - public static final ClientOidcBackchannelLogoutInitiatorsEnum SESSION_EXPIRED = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.SESSION_EXPIRED, "session-expired"); + public static final ClientOidcBackchannelLogoutInitiatorsEnum EMAIL_IDENTIFIER_CHANGED = + new ClientOidcBackchannelLogoutInitiatorsEnum(Value.EMAIL_IDENTIFIER_CHANGED, "email-identifier-changed"); public static final ClientOidcBackchannelLogoutInitiatorsEnum ACCOUNT_DEACTIVATED = new ClientOidcBackchannelLogoutInitiatorsEnum(Value.ACCOUNT_DEACTIVATED, "account-deactivated"); - public static final ClientOidcBackchannelLogoutInitiatorsEnum PASSWORD_CHANGED = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.PASSWORD_CHANGED, "password-changed"); + public static final ClientOidcBackchannelLogoutInitiatorsEnum IDP_LOGOUT = + new ClientOidcBackchannelLogoutInitiatorsEnum(Value.IDP_LOGOUT, "idp-logout"); public static final ClientOidcBackchannelLogoutInitiatorsEnum RP_LOGOUT = new ClientOidcBackchannelLogoutInitiatorsEnum(Value.RP_LOGOUT, "rp-logout"); - public static final ClientOidcBackchannelLogoutInitiatorsEnum IDP_LOGOUT = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.IDP_LOGOUT, "idp-logout"); + public static final ClientOidcBackchannelLogoutInitiatorsEnum PASSWORD_CHANGED = + new ClientOidcBackchannelLogoutInitiatorsEnum(Value.PASSWORD_CHANGED, "password-changed"); - public static final ClientOidcBackchannelLogoutInitiatorsEnum SESSION_REVOKED = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.SESSION_REVOKED, "session-revoked"); + public static final ClientOidcBackchannelLogoutInitiatorsEnum SESSION_EXPIRED = + new ClientOidcBackchannelLogoutInitiatorsEnum(Value.SESSION_EXPIRED, "session-expired"); + + public static final ClientOidcBackchannelLogoutInitiatorsEnum MFA_PHONE_UNENROLLED = + new ClientOidcBackchannelLogoutInitiatorsEnum(Value.MFA_PHONE_UNENROLLED, "mfa-phone-unenrolled"); private final Value value; @@ -67,24 +67,24 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case EMAIL_IDENTIFIER_CHANGED: - return visitor.visitEmailIdentifierChanged(); - case MFA_PHONE_UNENROLLED: - return visitor.visitMfaPhoneUnenrolled(); + case SESSION_REVOKED: + return visitor.visitSessionRevoked(); case ACCOUNT_DELETED: return visitor.visitAccountDeleted(); - case SESSION_EXPIRED: - return visitor.visitSessionExpired(); + case EMAIL_IDENTIFIER_CHANGED: + return visitor.visitEmailIdentifierChanged(); case ACCOUNT_DEACTIVATED: return visitor.visitAccountDeactivated(); - case PASSWORD_CHANGED: - return visitor.visitPasswordChanged(); - case RP_LOGOUT: - return visitor.visitRpLogout(); case IDP_LOGOUT: return visitor.visitIdpLogout(); - case SESSION_REVOKED: - return visitor.visitSessionRevoked(); + case RP_LOGOUT: + return visitor.visitRpLogout(); + case PASSWORD_CHANGED: + return visitor.visitPasswordChanged(); + case SESSION_EXPIRED: + return visitor.visitSessionExpired(); + case MFA_PHONE_UNENROLLED: + return visitor.visitMfaPhoneUnenrolled(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -94,24 +94,24 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ClientOidcBackchannelLogoutInitiatorsEnum valueOf(String value) { switch (value) { - case "email-identifier-changed": - return EMAIL_IDENTIFIER_CHANGED; - case "mfa-phone-unenrolled": - return MFA_PHONE_UNENROLLED; + case "session-revoked": + return SESSION_REVOKED; case "account-deleted": return ACCOUNT_DELETED; - case "session-expired": - return SESSION_EXPIRED; + case "email-identifier-changed": + return EMAIL_IDENTIFIER_CHANGED; case "account-deactivated": return ACCOUNT_DEACTIVATED; - case "password-changed": - return PASSWORD_CHANGED; - case "rp-logout": - return RP_LOGOUT; case "idp-logout": return IDP_LOGOUT; - case "session-revoked": - return SESSION_REVOKED; + case "rp-logout": + return RP_LOGOUT; + case "password-changed": + return PASSWORD_CHANGED; + case "session-expired": + return SESSION_EXPIRED; + case "mfa-phone-unenrolled": + return MFA_PHONE_UNENROLLED; default: return new ClientOidcBackchannelLogoutInitiatorsEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDeviceBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDeviceBindingEnum.java index bb2238bb7..ac4678b5b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDeviceBindingEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDeviceBindingEnum.java @@ -10,12 +10,12 @@ public final class ClientSessionTransferDeviceBindingEnum { public static final ClientSessionTransferDeviceBindingEnum ASN = new ClientSessionTransferDeviceBindingEnum(Value.ASN, "asn"); - public static final ClientSessionTransferDeviceBindingEnum NONE = - new ClientSessionTransferDeviceBindingEnum(Value.NONE, "none"); - public static final ClientSessionTransferDeviceBindingEnum IP = new ClientSessionTransferDeviceBindingEnum(Value.IP, "ip"); + public static final ClientSessionTransferDeviceBindingEnum NONE = + new ClientSessionTransferDeviceBindingEnum(Value.NONE, "none"); + private final Value value; private final String string; @@ -51,10 +51,10 @@ public T visit(Visitor visitor) { switch (value) { case ASN: return visitor.visitAsn(); - case NONE: - return visitor.visitNone(); case IP: return visitor.visitIp(); + case NONE: + return visitor.visitNone(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -66,10 +66,10 @@ public static ClientSessionTransferDeviceBindingEnum valueOf(String value) { switch (value) { case "asn": return ASN; - case "none": - return NONE; case "ip": return IP; + case "none": + return NONE; default: return new ClientSessionTransferDeviceBindingEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientThirdPartySecurityModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientThirdPartySecurityModeEnum.java index 27e1f4e4e..54c610fa1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientThirdPartySecurityModeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientThirdPartySecurityModeEnum.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ClientThirdPartySecurityModeEnum { - public static final ClientThirdPartySecurityModeEnum STRICT = - new ClientThirdPartySecurityModeEnum(Value.STRICT, "strict"); - public static final ClientThirdPartySecurityModeEnum PERMISSIVE = new ClientThirdPartySecurityModeEnum(Value.PERMISSIVE, "permissive"); + public static final ClientThirdPartySecurityModeEnum STRICT = + new ClientThirdPartySecurityModeEnum(Value.STRICT, "strict"); + private final Value value; private final String string; @@ -46,10 +46,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case STRICT: - return visitor.visitStrict(); case PERMISSIVE: return visitor.visitPermissive(); + case STRICT: + return visitor.visitStrict(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -59,10 +59,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ClientThirdPartySecurityModeEnum valueOf(String value) { switch (value) { - case "strict": - return STRICT; case "permissive": return PERMISSIVE; + case "strict": + return STRICT; default: return new ClientThirdPartySecurityModeEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectionSettingsPkceEnum.java index b9fd8ca29..910de26fd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectionSettingsPkceEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectionSettingsPkceEnum.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ConnectionConnectionSettingsPkceEnum { - public static final ConnectionConnectionSettingsPkceEnum AUTO = - new ConnectionConnectionSettingsPkceEnum(Value.AUTO, "auto"); - public static final ConnectionConnectionSettingsPkceEnum S256 = new ConnectionConnectionSettingsPkceEnum(Value.S256, "S256"); + public static final ConnectionConnectionSettingsPkceEnum AUTO = + new ConnectionConnectionSettingsPkceEnum(Value.AUTO, "auto"); + public static final ConnectionConnectionSettingsPkceEnum DISABLED = new ConnectionConnectionSettingsPkceEnum(Value.DISABLED, "disabled"); @@ -52,10 +52,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case AUTO: - return visitor.visitAuto(); case S256: return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); case DISABLED: return visitor.visitDisabled(); case PLAIN: @@ -69,10 +69,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ConnectionConnectionSettingsPkceEnum valueOf(String value) { switch (value) { - case "auto": - return AUTO; case "S256": return S256; + case "auto": + return AUTO; case "disabled": return DISABLED; case "plain": diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionDpopSigningAlgEnum.java index cb4e688af..adf78a4cf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionDpopSigningAlgEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionDpopSigningAlgEnum.java @@ -7,11 +7,11 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ConnectionDpopSigningAlgEnum { - public static final ConnectionDpopSigningAlgEnum ES256 = new ConnectionDpopSigningAlgEnum(Value.ES256, "ES256"); - public static final ConnectionDpopSigningAlgEnum ED25519 = new ConnectionDpopSigningAlgEnum(Value.ED25519, "Ed25519"); + public static final ConnectionDpopSigningAlgEnum ES256 = new ConnectionDpopSigningAlgEnum(Value.ES256, "ES256"); + private final Value value; private final String string; @@ -45,10 +45,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case ES256: - return visitor.visitEs256(); case ED25519: return visitor.visitEd25519(); + case ES256: + return visitor.visitEs256(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -58,10 +58,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ConnectionDpopSigningAlgEnum valueOf(String value) { switch (value) { - case "ES256": - return ES256; case "Ed25519": return ED25519; + case "ES256": + return ES256; default: return new ConnectionDpopSigningAlgEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdTokenSignedResponseAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdTokenSignedResponseAlgEnum.java index f151df032..cb417bce7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdTokenSignedResponseAlgEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdTokenSignedResponseAlgEnum.java @@ -10,24 +10,24 @@ public final class ConnectionIdTokenSignedResponseAlgEnum { public static final ConnectionIdTokenSignedResponseAlgEnum RS512 = new ConnectionIdTokenSignedResponseAlgEnum(Value.RS512, "RS512"); - public static final ConnectionIdTokenSignedResponseAlgEnum ES256 = - new ConnectionIdTokenSignedResponseAlgEnum(Value.ES256, "ES256"); - - public static final ConnectionIdTokenSignedResponseAlgEnum PS256 = - new ConnectionIdTokenSignedResponseAlgEnum(Value.PS256, "PS256"); - public static final ConnectionIdTokenSignedResponseAlgEnum ES384 = new ConnectionIdTokenSignedResponseAlgEnum(Value.ES384, "ES384"); public static final ConnectionIdTokenSignedResponseAlgEnum PS384 = new ConnectionIdTokenSignedResponseAlgEnum(Value.PS384, "PS384"); - public static final ConnectionIdTokenSignedResponseAlgEnum RS256 = - new ConnectionIdTokenSignedResponseAlgEnum(Value.RS256, "RS256"); + public static final ConnectionIdTokenSignedResponseAlgEnum ES256 = + new ConnectionIdTokenSignedResponseAlgEnum(Value.ES256, "ES256"); + + public static final ConnectionIdTokenSignedResponseAlgEnum PS256 = + new ConnectionIdTokenSignedResponseAlgEnum(Value.PS256, "PS256"); public static final ConnectionIdTokenSignedResponseAlgEnum RS384 = new ConnectionIdTokenSignedResponseAlgEnum(Value.RS384, "RS384"); + public static final ConnectionIdTokenSignedResponseAlgEnum RS256 = + new ConnectionIdTokenSignedResponseAlgEnum(Value.RS256, "RS256"); + private final Value value; private final String string; @@ -63,18 +63,18 @@ public T visit(Visitor visitor) { switch (value) { case RS512: return visitor.visitRs512(); - case ES256: - return visitor.visitEs256(); - case PS256: - return visitor.visitPs256(); case ES384: return visitor.visitEs384(); case PS384: return visitor.visitPs384(); - case RS256: - return visitor.visitRs256(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); case RS384: return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -86,18 +86,18 @@ public static ConnectionIdTokenSignedResponseAlgEnum valueOf(String value) { switch (value) { case "RS512": return RS512; - case "ES256": - return ES256; - case "PS256": - return PS256; case "ES384": return ES384; case "PS384": return PS384; - case "RS256": - return RS256; + case "ES256": + return ES256; + case "PS256": + return PS256; case "RS384": return RS384; + case "RS256": + return RS256; default: return new ConnectionIdTokenSignedResponseAlgEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java index 0fe7ab6db..b57a5be42 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java @@ -7,29 +7,98 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ConnectionIdentityProviderEnum { - public static final ConnectionIdentityProviderEnum SHOP = new ConnectionIdentityProviderEnum(Value.SHOP, "shop"); + public static final ConnectionIdentityProviderEnum AD = new ConnectionIdentityProviderEnum(Value.AD, "ad"); - public static final ConnectionIdentityProviderEnum AUTH0OIDC = - new ConnectionIdentityProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); + public static final ConnectionIdentityProviderEnum BAIDU = new ConnectionIdentityProviderEnum(Value.BAIDU, "baidu"); + + public static final ConnectionIdentityProviderEnum BITLY = new ConnectionIdentityProviderEnum(Value.BITLY, "bitly"); + + public static final ConnectionIdentityProviderEnum PAYPAL_SANDBOX = + new ConnectionIdentityProviderEnum(Value.PAYPAL_SANDBOX, "paypal-sandbox"); + + public static final ConnectionIdentityProviderEnum SAMLP = new ConnectionIdentityProviderEnum(Value.SAMLP, "samlp"); + + public static final ConnectionIdentityProviderEnum DROPBOX = + new ConnectionIdentityProviderEnum(Value.DROPBOX, "dropbox"); + + public static final ConnectionIdentityProviderEnum VKONTAKTE = + new ConnectionIdentityProviderEnum(Value.VKONTAKTE, "vkontakte"); + + public static final ConnectionIdentityProviderEnum INSTAGRAM = + new ConnectionIdentityProviderEnum(Value.INSTAGRAM, "instagram"); + + public static final ConnectionIdentityProviderEnum PINGFEDERATE = + new ConnectionIdentityProviderEnum(Value.PINGFEDERATE, "pingfederate"); + + public static final ConnectionIdentityProviderEnum THIRTYSEVENSIGNALS = + new ConnectionIdentityProviderEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); + + public static final ConnectionIdentityProviderEnum WAAD = new ConnectionIdentityProviderEnum(Value.WAAD, "waad"); + + public static final ConnectionIdentityProviderEnum OIDC = new ConnectionIdentityProviderEnum(Value.OIDC, "oidc"); + + public static final ConnectionIdentityProviderEnum SALESFORCE_COMMUNITY = + new ConnectionIdentityProviderEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community"); + + public static final ConnectionIdentityProviderEnum DACCOUNT = + new ConnectionIdentityProviderEnum(Value.DACCOUNT, "daccount"); + + public static final ConnectionIdentityProviderEnum SOUNDCLOUD = + new ConnectionIdentityProviderEnum(Value.SOUNDCLOUD, "soundcloud"); + + public static final ConnectionIdentityProviderEnum EVERNOTE_SANDBOX = + new ConnectionIdentityProviderEnum(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); + + public static final ConnectionIdentityProviderEnum OAUTH2 = + new ConnectionIdentityProviderEnum(Value.OAUTH2, "oauth2"); + + public static final ConnectionIdentityProviderEnum BOX = new ConnectionIdentityProviderEnum(Value.BOX, "box"); + + public static final ConnectionIdentityProviderEnum IP = new ConnectionIdentityProviderEnum(Value.IP, "ip"); + + public static final ConnectionIdentityProviderEnum ADFS = new ConnectionIdentityProviderEnum(Value.ADFS, "adfs"); + + public static final ConnectionIdentityProviderEnum EMAIL = new ConnectionIdentityProviderEnum(Value.EMAIL, "email"); + + public static final ConnectionIdentityProviderEnum YAHOO = new ConnectionIdentityProviderEnum(Value.YAHOO, "yahoo"); + + public static final ConnectionIdentityProviderEnum WEIBO = new ConnectionIdentityProviderEnum(Value.WEIBO, "weibo"); + + public static final ConnectionIdentityProviderEnum CUSTOM = + new ConnectionIdentityProviderEnum(Value.CUSTOM, "custom"); + + public static final ConnectionIdentityProviderEnum PAYPAL = + new ConnectionIdentityProviderEnum(Value.PAYPAL, "paypal"); + + public static final ConnectionIdentityProviderEnum LINKEDIN = + new ConnectionIdentityProviderEnum(Value.LINKEDIN, "linkedin"); + + public static final ConnectionIdentityProviderEnum GOOGLE_APPS = + new ConnectionIdentityProviderEnum(Value.GOOGLE_APPS, "google-apps"); public static final ConnectionIdentityProviderEnum DWOLLA = new ConnectionIdentityProviderEnum(Value.DWOLLA, "dwolla"); - public static final ConnectionIdentityProviderEnum OKTA = new ConnectionIdentityProviderEnum(Value.OKTA, "okta"); + public static final ConnectionIdentityProviderEnum SHOP = new ConnectionIdentityProviderEnum(Value.SHOP, "shop"); + + public static final ConnectionIdentityProviderEnum AUTH0OIDC = + new ConnectionIdentityProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); public static final ConnectionIdentityProviderEnum PLANNINGCENTER = new ConnectionIdentityProviderEnum(Value.PLANNINGCENTER, "planningcenter"); - public static final ConnectionIdentityProviderEnum GOOGLE_OAUTH2 = - new ConnectionIdentityProviderEnum(Value.GOOGLE_OAUTH2, "google-oauth2"); + public static final ConnectionIdentityProviderEnum OKTA = new ConnectionIdentityProviderEnum(Value.OKTA, "okta"); public static final ConnectionIdentityProviderEnum AUTH0 = new ConnectionIdentityProviderEnum(Value.AUTH0, "auth0"); - public static final ConnectionIdentityProviderEnum EXACT = new ConnectionIdentityProviderEnum(Value.EXACT, "exact"); + public static final ConnectionIdentityProviderEnum GOOGLE_OAUTH2 = + new ConnectionIdentityProviderEnum(Value.GOOGLE_OAUTH2, "google-oauth2"); public static final ConnectionIdentityProviderEnum WORDPRESS = new ConnectionIdentityProviderEnum(Value.WORDPRESS, "wordpress"); + public static final ConnectionIdentityProviderEnum EXACT = new ConnectionIdentityProviderEnum(Value.EXACT, "exact"); + public static final ConnectionIdentityProviderEnum FITBIT = new ConnectionIdentityProviderEnum(Value.FITBIT, "fitbit"); @@ -48,21 +117,18 @@ public final class ConnectionIdentityProviderEnum { public static final ConnectionIdentityProviderEnum FACEBOOK = new ConnectionIdentityProviderEnum(Value.FACEBOOK, "facebook"); - public static final ConnectionIdentityProviderEnum OAUTH1 = - new ConnectionIdentityProviderEnum(Value.OAUTH1, "oauth1"); - public static final ConnectionIdentityProviderEnum APPLE = new ConnectionIdentityProviderEnum(Value.APPLE, "apple"); - public static final ConnectionIdentityProviderEnum UNTAPPD = - new ConnectionIdentityProviderEnum(Value.UNTAPPD, "untappd"); + public static final ConnectionIdentityProviderEnum OAUTH1 = + new ConnectionIdentityProviderEnum(Value.OAUTH1, "oauth1"); public static final ConnectionIdentityProviderEnum AMAZON = new ConnectionIdentityProviderEnum(Value.AMAZON, "amazon"); public static final ConnectionIdentityProviderEnum LINE = new ConnectionIdentityProviderEnum(Value.LINE, "line"); - public static final ConnectionIdentityProviderEnum BITBUCKET = - new ConnectionIdentityProviderEnum(Value.BITBUCKET, "bitbucket"); + public static final ConnectionIdentityProviderEnum UNTAPPD = + new ConnectionIdentityProviderEnum(Value.UNTAPPD, "untappd"); public static final ConnectionIdentityProviderEnum GITHUB = new ConnectionIdentityProviderEnum(Value.GITHUB, "github"); @@ -70,88 +136,22 @@ public final class ConnectionIdentityProviderEnum { public static final ConnectionIdentityProviderEnum SALESFORCE = new ConnectionIdentityProviderEnum(Value.SALESFORCE, "salesforce"); + public static final ConnectionIdentityProviderEnum BITBUCKET = + new ConnectionIdentityProviderEnum(Value.BITBUCKET, "bitbucket"); + public static final ConnectionIdentityProviderEnum OFFICE365 = new ConnectionIdentityProviderEnum(Value.OFFICE365, "office365"); public static final ConnectionIdentityProviderEnum SMS = new ConnectionIdentityProviderEnum(Value.SMS, "sms"); - public static final ConnectionIdentityProviderEnum TWITTER = - new ConnectionIdentityProviderEnum(Value.TWITTER, "twitter"); - public static final ConnectionIdentityProviderEnum WINDOWSLIVE = new ConnectionIdentityProviderEnum(Value.WINDOWSLIVE, "windowslive"); public static final ConnectionIdentityProviderEnum YANDEX = new ConnectionIdentityProviderEnum(Value.YANDEX, "yandex"); - public static final ConnectionIdentityProviderEnum AD = new ConnectionIdentityProviderEnum(Value.AD, "ad"); - - public static final ConnectionIdentityProviderEnum BAIDU = new ConnectionIdentityProviderEnum(Value.BAIDU, "baidu"); - - public static final ConnectionIdentityProviderEnum BITLY = new ConnectionIdentityProviderEnum(Value.BITLY, "bitly"); - - public static final ConnectionIdentityProviderEnum PAYPAL_SANDBOX = - new ConnectionIdentityProviderEnum(Value.PAYPAL_SANDBOX, "paypal-sandbox"); - - public static final ConnectionIdentityProviderEnum SAMLP = new ConnectionIdentityProviderEnum(Value.SAMLP, "samlp"); - - public static final ConnectionIdentityProviderEnum DROPBOX = - new ConnectionIdentityProviderEnum(Value.DROPBOX, "dropbox"); - - public static final ConnectionIdentityProviderEnum VKONTAKTE = - new ConnectionIdentityProviderEnum(Value.VKONTAKTE, "vkontakte"); - - public static final ConnectionIdentityProviderEnum PINGFEDERATE = - new ConnectionIdentityProviderEnum(Value.PINGFEDERATE, "pingfederate"); - - public static final ConnectionIdentityProviderEnum INSTAGRAM = - new ConnectionIdentityProviderEnum(Value.INSTAGRAM, "instagram"); - - public static final ConnectionIdentityProviderEnum THIRTYSEVENSIGNALS = - new ConnectionIdentityProviderEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); - - public static final ConnectionIdentityProviderEnum WAAD = new ConnectionIdentityProviderEnum(Value.WAAD, "waad"); - - public static final ConnectionIdentityProviderEnum OIDC = new ConnectionIdentityProviderEnum(Value.OIDC, "oidc"); - - public static final ConnectionIdentityProviderEnum EVERNOTE_SANDBOX = - new ConnectionIdentityProviderEnum(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); - - public static final ConnectionIdentityProviderEnum SALESFORCE_COMMUNITY = - new ConnectionIdentityProviderEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community"); - - public static final ConnectionIdentityProviderEnum DACCOUNT = - new ConnectionIdentityProviderEnum(Value.DACCOUNT, "daccount"); - - public static final ConnectionIdentityProviderEnum SOUNDCLOUD = - new ConnectionIdentityProviderEnum(Value.SOUNDCLOUD, "soundcloud"); - - public static final ConnectionIdentityProviderEnum OAUTH2 = - new ConnectionIdentityProviderEnum(Value.OAUTH2, "oauth2"); - - public static final ConnectionIdentityProviderEnum BOX = new ConnectionIdentityProviderEnum(Value.BOX, "box"); - - public static final ConnectionIdentityProviderEnum IP = new ConnectionIdentityProviderEnum(Value.IP, "ip"); - - public static final ConnectionIdentityProviderEnum ADFS = new ConnectionIdentityProviderEnum(Value.ADFS, "adfs"); - - public static final ConnectionIdentityProviderEnum EMAIL = new ConnectionIdentityProviderEnum(Value.EMAIL, "email"); - - public static final ConnectionIdentityProviderEnum CUSTOM = - new ConnectionIdentityProviderEnum(Value.CUSTOM, "custom"); - - public static final ConnectionIdentityProviderEnum YAHOO = new ConnectionIdentityProviderEnum(Value.YAHOO, "yahoo"); - - public static final ConnectionIdentityProviderEnum WEIBO = new ConnectionIdentityProviderEnum(Value.WEIBO, "weibo"); - - public static final ConnectionIdentityProviderEnum GOOGLE_APPS = - new ConnectionIdentityProviderEnum(Value.GOOGLE_APPS, "google-apps"); - - public static final ConnectionIdentityProviderEnum PAYPAL = - new ConnectionIdentityProviderEnum(Value.PAYPAL, "paypal"); - - public static final ConnectionIdentityProviderEnum LINKEDIN = - new ConnectionIdentityProviderEnum(Value.LINKEDIN, "linkedin"); + public static final ConnectionIdentityProviderEnum TWITTER = + new ConnectionIdentityProviderEnum(Value.TWITTER, "twitter"); private final Value value; @@ -186,62 +186,6 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case SHOP: - return visitor.visitShop(); - case AUTH0OIDC: - return visitor.visitAuth0Oidc(); - case DWOLLA: - return visitor.visitDwolla(); - case OKTA: - return visitor.visitOkta(); - case PLANNINGCENTER: - return visitor.visitPlanningcenter(); - case GOOGLE_OAUTH2: - return visitor.visitGoogleOauth2(); - case AUTH0: - return visitor.visitAuth0(); - case EXACT: - return visitor.visitExact(); - case WORDPRESS: - return visitor.visitWordpress(); - case FITBIT: - return visitor.visitFitbit(); - case EVERNOTE: - return visitor.visitEvernote(); - case SHAREPOINT: - return visitor.visitSharepoint(); - case SHOPIFY: - return visitor.visitShopify(); - case SALESFORCE_SANDBOX: - return visitor.visitSalesforceSandbox(); - case FACEBOOK: - return visitor.visitFacebook(); - case OAUTH1: - return visitor.visitOauth1(); - case APPLE: - return visitor.visitApple(); - case UNTAPPD: - return visitor.visitUntappd(); - case AMAZON: - return visitor.visitAmazon(); - case LINE: - return visitor.visitLine(); - case BITBUCKET: - return visitor.visitBitbucket(); - case GITHUB: - return visitor.visitGithub(); - case SALESFORCE: - return visitor.visitSalesforce(); - case OFFICE365: - return visitor.visitOffice365(); - case SMS: - return visitor.visitSms(); - case TWITTER: - return visitor.visitTwitter(); - case WINDOWSLIVE: - return visitor.visitWindowslive(); - case YANDEX: - return visitor.visitYandex(); case AD: return visitor.visitAd(); case BAIDU: @@ -256,24 +200,24 @@ public T visit(Visitor visitor) { return visitor.visitDropbox(); case VKONTAKTE: return visitor.visitVkontakte(); - case PINGFEDERATE: - return visitor.visitPingfederate(); case INSTAGRAM: return visitor.visitInstagram(); + case PINGFEDERATE: + return visitor.visitPingfederate(); case THIRTYSEVENSIGNALS: return visitor.visitThirtysevensignals(); case WAAD: return visitor.visitWaad(); case OIDC: return visitor.visitOidc(); - case EVERNOTE_SANDBOX: - return visitor.visitEvernoteSandbox(); case SALESFORCE_COMMUNITY: return visitor.visitSalesforceCommunity(); case DACCOUNT: return visitor.visitDaccount(); case SOUNDCLOUD: return visitor.visitSoundcloud(); + case EVERNOTE_SANDBOX: + return visitor.visitEvernoteSandbox(); case OAUTH2: return visitor.visitOauth2(); case BOX: @@ -284,18 +228,74 @@ public T visit(Visitor visitor) { return visitor.visitAdfs(); case EMAIL: return visitor.visitEmail(); - case CUSTOM: - return visitor.visitCustom(); case YAHOO: return visitor.visitYahoo(); case WEIBO: return visitor.visitWeibo(); - case GOOGLE_APPS: - return visitor.visitGoogleApps(); + case CUSTOM: + return visitor.visitCustom(); case PAYPAL: return visitor.visitPaypal(); case LINKEDIN: return visitor.visitLinkedin(); + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case DWOLLA: + return visitor.visitDwolla(); + case SHOP: + return visitor.visitShop(); + case AUTH0OIDC: + return visitor.visitAuth0Oidc(); + case PLANNINGCENTER: + return visitor.visitPlanningcenter(); + case OKTA: + return visitor.visitOkta(); + case AUTH0: + return visitor.visitAuth0(); + case GOOGLE_OAUTH2: + return visitor.visitGoogleOauth2(); + case WORDPRESS: + return visitor.visitWordpress(); + case EXACT: + return visitor.visitExact(); + case FITBIT: + return visitor.visitFitbit(); + case EVERNOTE: + return visitor.visitEvernote(); + case SHAREPOINT: + return visitor.visitSharepoint(); + case SHOPIFY: + return visitor.visitShopify(); + case SALESFORCE_SANDBOX: + return visitor.visitSalesforceSandbox(); + case FACEBOOK: + return visitor.visitFacebook(); + case APPLE: + return visitor.visitApple(); + case OAUTH1: + return visitor.visitOauth1(); + case AMAZON: + return visitor.visitAmazon(); + case LINE: + return visitor.visitLine(); + case UNTAPPD: + return visitor.visitUntappd(); + case GITHUB: + return visitor.visitGithub(); + case SALESFORCE: + return visitor.visitSalesforce(); + case BITBUCKET: + return visitor.visitBitbucket(); + case OFFICE365: + return visitor.visitOffice365(); + case SMS: + return visitor.visitSms(); + case WINDOWSLIVE: + return visitor.visitWindowslive(); + case YANDEX: + return visitor.visitYandex(); + case TWITTER: + return visitor.visitTwitter(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -305,62 +305,6 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ConnectionIdentityProviderEnum valueOf(String value) { switch (value) { - case "shop": - return SHOP; - case "auth0-oidc": - return AUTH0OIDC; - case "dwolla": - return DWOLLA; - case "okta": - return OKTA; - case "planningcenter": - return PLANNINGCENTER; - case "google-oauth2": - return GOOGLE_OAUTH2; - case "auth0": - return AUTH0; - case "exact": - return EXACT; - case "wordpress": - return WORDPRESS; - case "fitbit": - return FITBIT; - case "evernote": - return EVERNOTE; - case "sharepoint": - return SHAREPOINT; - case "shopify": - return SHOPIFY; - case "salesforce-sandbox": - return SALESFORCE_SANDBOX; - case "facebook": - return FACEBOOK; - case "oauth1": - return OAUTH1; - case "apple": - return APPLE; - case "untappd": - return UNTAPPD; - case "amazon": - return AMAZON; - case "line": - return LINE; - case "bitbucket": - return BITBUCKET; - case "github": - return GITHUB; - case "salesforce": - return SALESFORCE; - case "office365": - return OFFICE365; - case "sms": - return SMS; - case "twitter": - return TWITTER; - case "windowslive": - return WINDOWSLIVE; - case "yandex": - return YANDEX; case "ad": return AD; case "baidu": @@ -375,24 +319,24 @@ public static ConnectionIdentityProviderEnum valueOf(String value) { return DROPBOX; case "vkontakte": return VKONTAKTE; - case "pingfederate": - return PINGFEDERATE; case "instagram": return INSTAGRAM; + case "pingfederate": + return PINGFEDERATE; case "thirtysevensignals": return THIRTYSEVENSIGNALS; case "waad": return WAAD; case "oidc": return OIDC; - case "evernote-sandbox": - return EVERNOTE_SANDBOX; case "salesforce-community": return SALESFORCE_COMMUNITY; case "daccount": return DACCOUNT; case "soundcloud": return SOUNDCLOUD; + case "evernote-sandbox": + return EVERNOTE_SANDBOX; case "oauth2": return OAUTH2; case "box": @@ -403,18 +347,74 @@ public static ConnectionIdentityProviderEnum valueOf(String value) { return ADFS; case "email": return EMAIL; - case "custom": - return CUSTOM; case "yahoo": return YAHOO; case "weibo": return WEIBO; - case "google-apps": - return GOOGLE_APPS; + case "custom": + return CUSTOM; case "paypal": return PAYPAL; case "linkedin": return LINKEDIN; + case "google-apps": + return GOOGLE_APPS; + case "dwolla": + return DWOLLA; + case "shop": + return SHOP; + case "auth0-oidc": + return AUTH0OIDC; + case "planningcenter": + return PLANNINGCENTER; + case "okta": + return OKTA; + case "auth0": + return AUTH0; + case "google-oauth2": + return GOOGLE_OAUTH2; + case "wordpress": + return WORDPRESS; + case "exact": + return EXACT; + case "fitbit": + return FITBIT; + case "evernote": + return EVERNOTE; + case "sharepoint": + return SHAREPOINT; + case "shopify": + return SHOPIFY; + case "salesforce-sandbox": + return SALESFORCE_SANDBOX; + case "facebook": + return FACEBOOK; + case "apple": + return APPLE; + case "oauth1": + return OAUTH1; + case "amazon": + return AMAZON; + case "line": + return LINE; + case "untappd": + return UNTAPPD; + case "github": + return GITHUB; + case "salesforce": + return SALESFORCE; + case "bitbucket": + return BITBUCKET; + case "office365": + return OFFICE365; + case "sms": + return SMS; + case "windowslive": + return WINDOWSLIVE; + case "yandex": + return YANDEX; + case "twitter": + return TWITTER; default: return new ConnectionIdentityProviderEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionMappingModeEnumOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionMappingModeEnumOidc.java index 1ce75c8f4..8d469d40d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionMappingModeEnumOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionMappingModeEnumOidc.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ConnectionMappingModeEnumOidc { - public static final ConnectionMappingModeEnumOidc USE_MAP = - new ConnectionMappingModeEnumOidc(Value.USE_MAP, "use_map"); - public static final ConnectionMappingModeEnumOidc BIND_ALL = new ConnectionMappingModeEnumOidc(Value.BIND_ALL, "bind_all"); + public static final ConnectionMappingModeEnumOidc USE_MAP = + new ConnectionMappingModeEnumOidc(Value.USE_MAP, "use_map"); + private final Value value; private final String string; @@ -46,10 +46,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case USE_MAP: - return visitor.visitUseMap(); case BIND_ALL: return visitor.visitBindAll(); + case USE_MAP: + return visitor.visitUseMap(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -59,10 +59,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ConnectionMappingModeEnumOidc valueOf(String value) { switch (value) { - case "use_map": - return USE_MAP; case "bind_all": return BIND_ALL; + case "use_map": + return USE_MAP; default: return new ConnectionMappingModeEnumOidc(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsProtocolEnumTwitter.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsProtocolEnumTwitter.java index 45bcb8921..102c4be26 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsProtocolEnumTwitter.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsProtocolEnumTwitter.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ConnectionOptionsProtocolEnumTwitter { - public static final ConnectionOptionsProtocolEnumTwitter OAUTH1 = - new ConnectionOptionsProtocolEnumTwitter(Value.OAUTH1, "oauth1"); - public static final ConnectionOptionsProtocolEnumTwitter OAUTH2 = new ConnectionOptionsProtocolEnumTwitter(Value.OAUTH2, "oauth2"); + public static final ConnectionOptionsProtocolEnumTwitter OAUTH1 = + new ConnectionOptionsProtocolEnumTwitter(Value.OAUTH1, "oauth1"); + private final Value value; private final String string; @@ -46,10 +46,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case OAUTH1: - return visitor.visitOauth1(); case OAUTH2: return visitor.visitOauth2(); + case OAUTH1: + return visitor.visitOauth1(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -59,10 +59,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ConnectionOptionsProtocolEnumTwitter valueOf(String value) { switch (value) { - case "oauth1": - return OAUTH1; case "oauth2": return OAUTH2; + case "oauth1": + return OAUTH1; default: return new ConnectionOptionsProtocolEnumTwitter(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationAssignMembershipOnLoginEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationAssignMembershipOnLoginEnum.java index f6c9714dc..d233f89f4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationAssignMembershipOnLoginEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationAssignMembershipOnLoginEnum.java @@ -10,12 +10,12 @@ public final class ConnectionProfileOrganizationAssignMembershipOnLoginEnum { public static final ConnectionProfileOrganizationAssignMembershipOnLoginEnum REQUIRED = new ConnectionProfileOrganizationAssignMembershipOnLoginEnum(Value.REQUIRED, "required"); - public static final ConnectionProfileOrganizationAssignMembershipOnLoginEnum NONE = - new ConnectionProfileOrganizationAssignMembershipOnLoginEnum(Value.NONE, "none"); - public static final ConnectionProfileOrganizationAssignMembershipOnLoginEnum OPTIONAL = new ConnectionProfileOrganizationAssignMembershipOnLoginEnum(Value.OPTIONAL, "optional"); + public static final ConnectionProfileOrganizationAssignMembershipOnLoginEnum NONE = + new ConnectionProfileOrganizationAssignMembershipOnLoginEnum(Value.NONE, "none"); + private final Value value; private final String string; @@ -52,10 +52,10 @@ public T visit(Visitor visitor) { switch (value) { case REQUIRED: return visitor.visitRequired(); - case NONE: - return visitor.visitNone(); case OPTIONAL: return visitor.visitOptional(); + case NONE: + return visitor.visitNone(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -67,10 +67,10 @@ public static ConnectionProfileOrganizationAssignMembershipOnLoginEnum valueOf(S switch (value) { case "required": return REQUIRED; - case "none": - return NONE; case "optional": return OPTIONAL; + case "none": + return NONE; default: return new ConnectionProfileOrganizationAssignMembershipOnLoginEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationShowAsButtonEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationShowAsButtonEnum.java index 0eabb579d..ef6b04601 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationShowAsButtonEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationShowAsButtonEnum.java @@ -10,12 +10,12 @@ public final class ConnectionProfileOrganizationShowAsButtonEnum { public static final ConnectionProfileOrganizationShowAsButtonEnum REQUIRED = new ConnectionProfileOrganizationShowAsButtonEnum(Value.REQUIRED, "required"); - public static final ConnectionProfileOrganizationShowAsButtonEnum NONE = - new ConnectionProfileOrganizationShowAsButtonEnum(Value.NONE, "none"); - public static final ConnectionProfileOrganizationShowAsButtonEnum OPTIONAL = new ConnectionProfileOrganizationShowAsButtonEnum(Value.OPTIONAL, "optional"); + public static final ConnectionProfileOrganizationShowAsButtonEnum NONE = + new ConnectionProfileOrganizationShowAsButtonEnum(Value.NONE, "none"); + private final Value value; private final String string; @@ -51,10 +51,10 @@ public T visit(Visitor visitor) { switch (value) { case REQUIRED: return visitor.visitRequired(); - case NONE: - return visitor.visitNone(); case OPTIONAL: return visitor.visitOptional(); + case NONE: + return visitor.visitNone(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -66,10 +66,10 @@ public static ConnectionProfileOrganizationShowAsButtonEnum valueOf(String value switch (value) { case "required": return REQUIRED; - case "none": - return NONE; case "optional": return OPTIONAL; + case "none": + return NONE; default: return new ConnectionProfileOrganizationShowAsButtonEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java index 8abf89dff..cd07c3e5c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java @@ -87,6 +87,14 @@ public final class ConnectionPropertiesOptions { private final Optional passwordOptions; + private final OptionalNullable> idTokenSignedResponseAlgs; + + private final OptionalNullable tokenEndpointAuthMethod; + + private final OptionalNullable tokenEndpointAuthSigningAlg; + + private final Optional tokenEndpointJwtcaAudFormat; + private final Map additionalProperties; private ConnectionPropertiesOptions( @@ -121,6 +129,10 @@ private ConnectionPropertiesOptions( OptionalNullable gatewayAuthentication, OptionalNullable federatedConnectionsAccessTokens, Optional passwordOptions, + OptionalNullable> idTokenSignedResponseAlgs, + OptionalNullable tokenEndpointAuthMethod, + OptionalNullable tokenEndpointAuthSigningAlg, + Optional tokenEndpointJwtcaAudFormat, Map additionalProperties) { this.validation = validation; this.nonPersistentAttrs = nonPersistentAttrs; @@ -153,6 +165,10 @@ private ConnectionPropertiesOptions( this.gatewayAuthentication = gatewayAuthentication; this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.passwordOptions = passwordOptions; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.additionalProperties = additionalProperties; } @@ -381,6 +397,38 @@ public Optional getPasswordOptions() { return passwordOptions; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("id_token_signed_response_algs") + public OptionalNullable> getIdTokenSignedResponseAlgs() { + if (idTokenSignedResponseAlgs == null) { + return OptionalNullable.absent(); + } + return idTokenSignedResponseAlgs; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_endpoint_auth_method") + public OptionalNullable getTokenEndpointAuthMethod() { + if (tokenEndpointAuthMethod == null) { + return OptionalNullable.absent(); + } + return tokenEndpointAuthMethod; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_endpoint_auth_signing_alg") + public OptionalNullable getTokenEndpointAuthSigningAlg() { + if (tokenEndpointAuthSigningAlg == null) { + return OptionalNullable.absent(); + } + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("validation") private OptionalNullable _getValidation() { @@ -460,6 +508,24 @@ private OptionalNullable _getFederat return federatedConnectionsAccessTokens; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("id_token_signed_response_algs") + private OptionalNullable> _getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_endpoint_auth_method") + private OptionalNullable _getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_endpoint_auth_signing_alg") + private OptionalNullable _getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -502,7 +568,11 @@ private boolean equalTo(ConnectionPropertiesOptions other) { && setUserRootAttributes.equals(other.setUserRootAttributes) && gatewayAuthentication.equals(other.gatewayAuthentication) && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) - && passwordOptions.equals(other.passwordOptions); + && passwordOptions.equals(other.passwordOptions) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat); } @java.lang.Override @@ -538,7 +608,11 @@ public int hashCode() { this.setUserRootAttributes, this.gatewayAuthentication, this.federatedConnectionsAccessTokens, - this.passwordOptions); + this.passwordOptions, + this.idTokenSignedResponseAlgs, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat); } @java.lang.Override @@ -618,6 +692,17 @@ public static final class Builder { private Optional passwordOptions = Optional.empty(); + private OptionalNullable> idTokenSignedResponseAlgs = + OptionalNullable.absent(); + + private OptionalNullable tokenEndpointAuthMethod = + OptionalNullable.absent(); + + private OptionalNullable tokenEndpointAuthSigningAlg = + OptionalNullable.absent(); + + private Optional tokenEndpointJwtcaAudFormat = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -655,6 +740,10 @@ public Builder from(ConnectionPropertiesOptions other) { gatewayAuthentication(other.getGatewayAuthentication()); federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); passwordOptions(other.getPasswordOptions()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); return this; } @@ -1306,6 +1395,125 @@ public Builder passwordOptions(ConnectionPasswordOptions passwordOptions) { return this; } + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) + public Builder idTokenSignedResponseAlgs( + @Nullable OptionalNullable> idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + return this; + } + + public Builder idTokenSignedResponseAlgs( + List idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs); + return this; + } + + public Builder idTokenSignedResponseAlgs( + Optional> idTokenSignedResponseAlgs) { + if (idTokenSignedResponseAlgs.isPresent()) { + this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs.get()); + } else { + this.idTokenSignedResponseAlgs = OptionalNullable.absent(); + } + return this; + } + + public Builder idTokenSignedResponseAlgs( + com.auth0.client.mgmt.core.Nullable> + idTokenSignedResponseAlgs) { + if (idTokenSignedResponseAlgs.isNull()) { + this.idTokenSignedResponseAlgs = OptionalNullable.ofNull(); + } else if (idTokenSignedResponseAlgs.isEmpty()) { + this.idTokenSignedResponseAlgs = OptionalNullable.absent(); + } else { + this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs.get()); + } + return this; + } + + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public Builder tokenEndpointAuthMethod( + @Nullable OptionalNullable tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + public Builder tokenEndpointAuthMethod(ConnectionTokenEndpointAuthMethodEnum tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod); + return this; + } + + public Builder tokenEndpointAuthMethod( + Optional tokenEndpointAuthMethod) { + if (tokenEndpointAuthMethod.isPresent()) { + this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod.get()); + } else { + this.tokenEndpointAuthMethod = OptionalNullable.absent(); + } + return this; + } + + public Builder tokenEndpointAuthMethod( + com.auth0.client.mgmt.core.Nullable tokenEndpointAuthMethod) { + if (tokenEndpointAuthMethod.isNull()) { + this.tokenEndpointAuthMethod = OptionalNullable.ofNull(); + } else if (tokenEndpointAuthMethod.isEmpty()) { + this.tokenEndpointAuthMethod = OptionalNullable.absent(); + } else { + this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod.get()); + } + return this; + } + + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public Builder tokenEndpointAuthSigningAlg( + @Nullable OptionalNullable tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + public Builder tokenEndpointAuthSigningAlg( + ConnectionTokenEndpointAuthSigningAlgEnum tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg); + return this; + } + + public Builder tokenEndpointAuthSigningAlg( + Optional tokenEndpointAuthSigningAlg) { + if (tokenEndpointAuthSigningAlg.isPresent()) { + this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg.get()); + } else { + this.tokenEndpointAuthSigningAlg = OptionalNullable.absent(); + } + return this; + } + + public Builder tokenEndpointAuthSigningAlg( + com.auth0.client.mgmt.core.Nullable + tokenEndpointAuthSigningAlg) { + if (tokenEndpointAuthSigningAlg.isNull()) { + this.tokenEndpointAuthSigningAlg = OptionalNullable.ofNull(); + } else if (tokenEndpointAuthSigningAlg.isEmpty()) { + this.tokenEndpointAuthSigningAlg = OptionalNullable.absent(); + } else { + this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg.get()); + } + return this; + } + + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public Builder tokenEndpointJwtcaAudFormat( + Optional tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + public Builder tokenEndpointJwtcaAudFormat( + ConnectionTokenEndpointJwtcaAudFormatEnumOidc tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + public ConnectionPropertiesOptions build() { return new ConnectionPropertiesOptions( validation, @@ -1339,6 +1547,10 @@ public ConnectionPropertiesOptions build() { gatewayAuthentication, federatedConnectionsAccessTokens, passwordOptions, + idTokenSignedResponseAlgs, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseCommon.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseCommon.java index 137559f63..605e75c8e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseCommon.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseCommon.java @@ -18,16 +18,15 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseCommon.Builder.class) public final class ConnectionResponseCommon implements IConnectionResponseCommon, ICreateConnectionCommon { - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,9 +39,9 @@ public final class ConnectionResponseCommon implements IConnectionResponseCommon private final Map additionalProperties; private ConnectionResponseCommon( - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +59,7 @@ private ConnectionResponseCommon( @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -72,7 +71,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -141,73 +140,31 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static Builder builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseCommon other); - } - - public interface NameStage { - _FinalStage name(@NotNull String name); - } - - public interface _FinalStage { - ConnectionResponseCommon build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - /** - *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

- */ - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - } - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, _FinalStage { - private String id; + public static final class Builder { + private Optional id = Optional.empty(); - private String name; + private Optional> realms = Optional.empty(); - private Optional>> metadata = Optional.empty(); + private Optional name = Optional.empty(); - private Optional isDomainConnection = Optional.empty(); + private Optional> enabledClients = Optional.empty(); private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); + private Optional isDomainConnection = Optional.empty(); - private Optional> realms = Optional.empty(); + private Optional>> metadata = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConnectionResponseCommon other) { id(other.getId()); realms(other.getRealms()); @@ -219,105 +176,96 @@ public Builder from(ConnectionResponseCommon other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public Builder id(Optional id) { + this.id = id; return this; } - @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); + public Builder id(String id) { + this.id = Optional.ofNullable(id); return this; } - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public Builder realms(Optional> realms) { + this.realms = realms; return this; } - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; + public Builder realms(List realms) { + this.realms = Optional.ofNullable(realms); return this; } - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; return this; } - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; + public Builder name(String name) { + this.name = Optional.ofNullable(name); return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); + /** + *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

+ */ + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public Builder enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + public Builder enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); return this; } - @java.lang.Override @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { + public Builder displayName(Optional displayName) { this.displayName = displayName; return this; } - /** - *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); + public Builder displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); return this; } - /** - *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

- */ - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public Builder isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; return this; } - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); + public Builder isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); return this; } - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public Builder metadata(Optional>> metadata) { + this.metadata = metadata; + return this; + } + + public Builder metadata(Map> metadata) { + this.metadata = Optional.ofNullable(metadata); return this; } - @java.lang.Override public ConnectionResponseCommon build() { return new ConnectionResponseCommon( id, realms, name, enabledClients, displayName, isDomainConnection, metadata, additionalProperties); } - @java.lang.Override public Builder additionalProperty(String key, Object value) { this.additionalProperties.put(key, value); return this; } - @java.lang.Override public Builder additionalProperties(Map additionalProperties) { this.additionalProperties.putAll(additionalProperties); return this; diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAd.java index cb1bb84a5..8af3afde9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAd.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAd.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentAd private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -53,9 +53,9 @@ public final class ConnectionResponseContentAd private ConnectionResponseContentAd( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -93,7 +93,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -105,7 +105,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -199,22 +199,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentAd other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentAdStrategy strategy); + + Builder from(ConnectionResponseContentAd other); } public interface _FinalStage { @@ -232,10 +224,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -265,11 +265,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentAdStrategy strategy; private Optional provisioningTicketUrl = Optional.empty(); @@ -284,8 +280,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -312,20 +312,6 @@ public Builder from(ConnectionResponseContentAd other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentAdStrategy strategy) { @@ -418,6 +404,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -431,6 +430,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfs.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfs.java index 5916ad687..60a70edaa 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfs.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfs.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentAdfs private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -55,9 +55,9 @@ public final class ConnectionResponseContentAdfs private ConnectionResponseContentAdfs( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -97,7 +97,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -109,7 +109,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -210,22 +210,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentAdfs other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentAdfsStrategy strategy); + + Builder from(ConnectionResponseContentAdfs other); } public interface _FinalStage { @@ -243,10 +235,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -280,11 +280,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentAdfsStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -301,8 +297,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -330,20 +330,6 @@ public Builder from(ConnectionResponseContentAdfs other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentAdfsStrategy strategy) { @@ -449,6 +435,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -462,6 +461,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazon.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazon.java index dbb45b337..2a6b36d2a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazon.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazon.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentAmazon private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentAmazon private ConnectionResponseContentAmazon( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentAmazon other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentAmazonStrategy strategy); + + Builder from(ConnectionResponseContentAmazon other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentAmazonStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentAmazon other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentAmazonStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentApple.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentApple.java index ad956b284..5cbf523b5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentApple.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentApple.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentApple private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentApple private ConnectionResponseContentApple( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentApple other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentAppleStrategy strategy); + + Builder from(ConnectionResponseContentApple other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentAppleStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentApple other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentAppleStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0.java index 5e26f32c1..061c2f6f1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentAuth0 private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentAuth0 private ConnectionResponseContentAuth0( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentAuth0 other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentAuth0Strategy strategy); + + Builder from(ConnectionResponseContentAuth0 other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentAuth0Strategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentAuth0 other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentAuth0Strategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Oidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Oidc.java index 9fe0306f6..bab21b759 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Oidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Oidc.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentAuth0Oidc private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentAuth0Oidc private ConnectionResponseContentAuth0Oidc( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentAuth0Oidc other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentAuth0OidcStrategy strategy); + + Builder from(ConnectionResponseContentAuth0Oidc other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentAuth0OidcStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentAuth0Oidc other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentAuth0OidcStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAd.java index 831897ac5..1c699ebd7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAd.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAd.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentAzureAd private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -55,9 +55,9 @@ public final class ConnectionResponseContentAzureAd private ConnectionResponseContentAzureAd( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -97,7 +97,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -109,7 +109,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -210,22 +210,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentAzureAd other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentAzureAdStrategy strategy); + + Builder from(ConnectionResponseContentAzureAd other); } public interface _FinalStage { @@ -243,10 +235,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -280,11 +280,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentAzureAdStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -301,8 +297,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -330,20 +330,6 @@ public Builder from(ConnectionResponseContentAzureAd other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentAzureAdStrategy strategy) { @@ -449,6 +435,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -462,6 +461,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaidu.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaidu.java index 19ae5aeb2..9256fd710 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaidu.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaidu.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentBaidu private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentBaidu private ConnectionResponseContentBaidu( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentBaidu other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentBaiduStrategy strategy); + + Builder from(ConnectionResponseContentBaidu other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentBaiduStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentBaidu other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentBaiduStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucket.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucket.java index 10abc2e75..a95d4d1a0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucket.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucket.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentBitbucket private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentBitbucket private ConnectionResponseContentBitbucket( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentBitbucket other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentBitbucketStrategy strategy); + + Builder from(ConnectionResponseContentBitbucket other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentBitbucketStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentBitbucket other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentBitbucketStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitly.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitly.java index be3b56ab3..e099ea4c7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitly.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitly.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentBitly private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentBitly private ConnectionResponseContentBitly( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentBitly other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentBitlyStrategy strategy); + + Builder from(ConnectionResponseContentBitly other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentBitlyStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentBitly other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentBitlyStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBox.java index 14a5eb3f5..1d94c7158 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBox.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBox.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentBox private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentBox private ConnectionResponseContentBox( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentBox other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentBoxStrategy strategy); + + Builder from(ConnectionResponseContentBox other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentBoxStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentBox other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentBoxStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustom.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustom.java index 13a2077d0..6ce647a66 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustom.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustom.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentCustom private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -53,9 +53,9 @@ public final class ConnectionResponseContentCustom private ConnectionResponseContentCustom( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -93,7 +93,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -105,7 +105,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -199,22 +199,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentCustom other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentCustomStrategy strategy); + + Builder from(ConnectionResponseContentCustom other); } public interface _FinalStage { @@ -232,10 +224,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -265,11 +265,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentCustomStrategy strategy; private Optional provisioningTicketUrl = Optional.empty(); @@ -284,8 +280,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -312,20 +312,6 @@ public Builder from(ConnectionResponseContentCustom other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentCustomStrategy strategy) { @@ -418,6 +404,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -431,6 +430,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccount.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccount.java index a0956e91e..57b832570 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccount.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccount.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentDaccount private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentDaccount private ConnectionResponseContentDaccount( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentDaccount other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentDaccountStrategy strategy); + + Builder from(ConnectionResponseContentDaccount other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentDaccountStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentDaccount other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentDaccountStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropbox.java index 070ee7ff8..b0b2a13f0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropbox.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropbox.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentDropbox private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentDropbox private ConnectionResponseContentDropbox( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentDropbox other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentDropboxStrategy strategy); + + Builder from(ConnectionResponseContentDropbox other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentDropboxStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentDropbox other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentDropboxStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwolla.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwolla.java index cc7546bdf..a33c30154 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwolla.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwolla.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentDwolla private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentDwolla private ConnectionResponseContentDwolla( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentDwolla other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentDwollaStrategy strategy); + + Builder from(ConnectionResponseContentDwolla other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentDwollaStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentDwolla other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentDwollaStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmail.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmail.java index 95fb4cc2b..70a2fc0fc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmail.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmail.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentEmail private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentEmail private ConnectionResponseContentEmail( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentEmail other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentEmailStrategy strategy); + + Builder from(ConnectionResponseContentEmail other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentEmailStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentEmail other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentEmailStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernote.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernote.java index 9cb54e484..6e6b05492 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernote.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernote.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentEvernote private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentEvernote private ConnectionResponseContentEvernote( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentEvernote other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentEvernoteStrategy strategy); + + Builder from(ConnectionResponseContentEvernote other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentEvernoteStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentEvernote other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentEvernoteStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandbox.java index e537fcc81..36a7769d3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandbox.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandbox.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentEvernoteSandbox private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentEvernoteSandbox private ConnectionResponseContentEvernoteSandbox( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentEvernoteSandbox other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentEvernoteSandboxStrategy strategy); + + Builder from(ConnectionResponseContentEvernoteSandbox other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentEvernoteSandboxStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentEvernoteSandbox other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentEvernoteSandboxStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExact.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExact.java index a482f224f..edeecaebe 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExact.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExact.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentExact private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentExact private ConnectionResponseContentExact( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentExact other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentExactStrategy strategy); + + Builder from(ConnectionResponseContentExact other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentExactStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentExact other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentExactStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebook.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebook.java index 7e796603d..565127b80 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebook.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebook.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentFacebook private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentFacebook private ConnectionResponseContentFacebook( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentFacebook other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentFacebookStrategy strategy); + + Builder from(ConnectionResponseContentFacebook other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentFacebookStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentFacebook other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentFacebookStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbit.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbit.java index cac628120..f02b15954 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbit.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbit.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentFitbit private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentFitbit private ConnectionResponseContentFitbit( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentFitbit other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentFitbitStrategy strategy); + + Builder from(ConnectionResponseContentFitbit other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentFitbitStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentFitbit other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentFitbitStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHub.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHub.java index 7ab899f24..94d17a59c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHub.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHub.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentGitHub private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentGitHub private ConnectionResponseContentGitHub( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentGitHub other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentGitHubStrategy strategy); + + Builder from(ConnectionResponseContentGitHub other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentGitHubStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentGitHub other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentGitHubStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleApps.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleApps.java index bea9e2ba2..a6b278e2b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleApps.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleApps.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentGoogleApps private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -55,9 +55,9 @@ public final class ConnectionResponseContentGoogleApps private ConnectionResponseContentGoogleApps( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -97,7 +97,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -109,7 +109,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -211,22 +211,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentGoogleApps other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentGoogleAppsStrategy strategy); + + Builder from(ConnectionResponseContentGoogleApps other); } public interface _FinalStage { @@ -244,10 +236,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -281,11 +281,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentGoogleAppsStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -302,8 +298,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -331,20 +331,6 @@ public Builder from(ConnectionResponseContentGoogleApps other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentGoogleAppsStrategy strategy) { @@ -450,6 +436,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -463,6 +462,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2.java index 607e6ed2c..a634ad012 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentGoogleOAuth2 private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentGoogleOAuth2 private ConnectionResponseContentGoogleOAuth2( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentGoogleOAuth2 other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentGoogleOAuth2Strategy strategy); + + Builder from(ConnectionResponseContentGoogleOAuth2 other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentGoogleOAuth2Strategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentGoogleOAuth2 other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentGoogleOAuth2Strategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagram.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagram.java index 10727a09f..1ee269758 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagram.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagram.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentInstagram private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentInstagram private ConnectionResponseContentInstagram( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentInstagram other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentInstagramStrategy strategy); + + Builder from(ConnectionResponseContentInstagram other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentInstagramStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentInstagram other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentInstagramStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIp.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIp.java index 2bf0d39a7..715429b3c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIp.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIp.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentIp private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -53,9 +53,9 @@ public final class ConnectionResponseContentIp private ConnectionResponseContentIp( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -93,7 +93,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -105,7 +105,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -199,22 +199,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentIp other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentIpStrategy strategy); + + Builder from(ConnectionResponseContentIp other); } public interface _FinalStage { @@ -232,10 +224,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -265,11 +265,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentIpStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -284,8 +280,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -312,20 +312,6 @@ public Builder from(ConnectionResponseContentIp other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentIpStrategy strategy) { @@ -418,6 +404,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -431,6 +430,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLine.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLine.java index bf3cfaa6c..22199f6e3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLine.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLine.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentLine private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentLine private ConnectionResponseContentLine( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentLine other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentLineStrategy strategy); + + Builder from(ConnectionResponseContentLine other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentLineStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentLine other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentLineStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedin.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedin.java index 9eefe70df..438e81c6b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedin.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedin.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentLinkedin private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentLinkedin private ConnectionResponseContentLinkedin( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentLinkedin other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentLinkedinStrategy strategy); + + Builder from(ConnectionResponseContentLinkedin other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentLinkedinStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentLinkedin other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentLinkedinStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1.java index 6e395ceb6..024ed9a1b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentOAuth1 private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentOAuth1 private ConnectionResponseContentOAuth1( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentOAuth1 other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentOAuth1Strategy strategy); + + Builder from(ConnectionResponseContentOAuth1 other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentOAuth1Strategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentOAuth1 other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentOAuth1Strategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2.java index 9d29726a1..edf2a2e87 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentOAuth2 private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentOAuth2 private ConnectionResponseContentOAuth2( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentOAuth2 other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentOAuth2Strategy strategy); + + Builder from(ConnectionResponseContentOAuth2 other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentOAuth2Strategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentOAuth2 other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentOAuth2Strategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365.java index 48fc0731b..b53f4398c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentOffice365 private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -55,9 +55,9 @@ public final class ConnectionResponseContentOffice365 private ConnectionResponseContentOffice365( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -97,7 +97,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -109,7 +109,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -211,22 +211,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentOffice365 other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentOffice365Strategy strategy); + + Builder from(ConnectionResponseContentOffice365 other); } public interface _FinalStage { @@ -244,10 +236,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -281,11 +281,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentOffice365Strategy strategy; private Optional showAsButton = Optional.empty(); @@ -302,8 +298,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -331,20 +331,6 @@ public Builder from(ConnectionResponseContentOffice365 other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentOffice365Strategy strategy) { @@ -450,6 +436,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -463,6 +462,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java index b665ced4e..dcaae12a2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java @@ -23,11 +23,11 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentOidc.Builder.class) public final class ConnectionResponseContentOidc implements IConnectionResponseCommon, ICreateConnectionCommon { - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -50,9 +50,9 @@ public final class ConnectionResponseContentOidc implements IConnectionResponseC private final Map additionalProperties; private ConnectionResponseContentOidc( - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -80,7 +80,7 @@ private ConnectionResponseContentOidc( @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -92,7 +92,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -196,22 +196,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentOidc other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentOidcStrategy strategy); + + Builder from(ConnectionResponseContentOidc other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -262,11 +262,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentOidcStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -285,8 +281,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -309,20 +309,6 @@ public Builder from(ConnectionResponseContentOidc other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentOidcStrategy strategy) { @@ -441,6 +427,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -454,6 +453,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public ConnectionResponseContentOidc build() { return new ConnectionResponseContentOidc( diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java index 69e173ed1..d0d64dd1f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentOkta private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -53,9 +53,9 @@ public final class ConnectionResponseContentOkta private ConnectionResponseContentOkta( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -93,7 +93,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -105,7 +105,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -199,22 +199,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentOkta other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentOktaStrategy strategy); + + Builder from(ConnectionResponseContentOkta other); } public interface _FinalStage { @@ -232,10 +224,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -265,11 +265,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentOktaStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -284,8 +280,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -312,20 +312,6 @@ public Builder from(ConnectionResponseContentOkta other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentOktaStrategy strategy) { @@ -418,6 +404,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -431,6 +430,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypal.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypal.java index 254b3be43..8aaf113f8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypal.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypal.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentPaypal private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentPaypal private ConnectionResponseContentPaypal( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentPaypal other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentPaypalStrategy strategy); + + Builder from(ConnectionResponseContentPaypal other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentPaypalStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentPaypal other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentPaypalStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandbox.java index 00fa7f405..9320ca9bd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandbox.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandbox.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentPaypalSandbox private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentPaypalSandbox private ConnectionResponseContentPaypalSandbox( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentPaypalSandbox other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentPaypalSandboxStrategy strategy); + + Builder from(ConnectionResponseContentPaypalSandbox other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentPaypalSandboxStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentPaypalSandbox other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentPaypalSandboxStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederate.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederate.java index 3f799ae06..1a2c13122 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederate.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederate.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentPingFederate private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -55,9 +55,9 @@ public final class ConnectionResponseContentPingFederate private ConnectionResponseContentPingFederate( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -97,7 +97,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -109,7 +109,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -211,22 +211,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentPingFederate other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentPingFederateStrategy strategy); + + Builder from(ConnectionResponseContentPingFederate other); } public interface _FinalStage { @@ -244,10 +236,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -281,11 +281,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentPingFederateStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -302,8 +298,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -331,20 +331,6 @@ public Builder from(ConnectionResponseContentPingFederate other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentPingFederateStrategy strategy) { @@ -450,6 +436,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -463,6 +462,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenter.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenter.java index 2930b305a..b1dd863eb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenter.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenter.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentPlanningCenter private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentPlanningCenter private ConnectionResponseContentPlanningCenter( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentPlanningCenter other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentPlanningCenterStrategy strategy); + + Builder from(ConnectionResponseContentPlanningCenter other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentPlanningCenterStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentPlanningCenter other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentPlanningCenterStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforce.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforce.java index f5b843e46..cd097acf6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforce.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforce.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentSalesforce private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentSalesforce private ConnectionResponseContentSalesforce( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentSalesforce other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentSalesforceStrategy strategy); + + Builder from(ConnectionResponseContentSalesforce other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentSalesforceStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentSalesforce other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentSalesforceStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunity.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunity.java index 4664bbd50..b9ea87149 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunity.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunity.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentSalesforceCommunity private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentSalesforceCommunity private ConnectionResponseContentSalesforceCommunity( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentSalesforceCommunity other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentSalesforceCommunityStrategy strategy); + + Builder from(ConnectionResponseContentSalesforceCommunity other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentSalesforceCommunityStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentSalesforceCommunity other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentSalesforceCommunityStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandbox.java index 6b03e1e13..8b76a3a38 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandbox.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandbox.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentSalesforceSandbox private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentSalesforceSandbox private ConnectionResponseContentSalesforceSandbox( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentSalesforceSandbox other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentSalesforceSandboxStrategy strategy); + + Builder from(ConnectionResponseContentSalesforceSandbox other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentSalesforceSandboxStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentSalesforceSandbox other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentSalesforceSandboxStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSaml.java index 0f67f9076..75a012a20 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSaml.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSaml.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentSaml private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -55,9 +55,9 @@ public final class ConnectionResponseContentSaml private ConnectionResponseContentSaml( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -97,7 +97,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -109,7 +109,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -210,22 +210,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentSaml other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentSamlStrategy strategy); + + Builder from(ConnectionResponseContentSaml other); } public interface _FinalStage { @@ -243,10 +235,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -280,11 +280,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentSamlStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -301,8 +297,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -330,20 +330,6 @@ public Builder from(ConnectionResponseContentSaml other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentSamlStrategy strategy) { @@ -449,6 +435,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -462,6 +461,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepoint.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepoint.java index bdfd9414e..a47792c3a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepoint.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepoint.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentSharepoint private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -53,9 +53,9 @@ public final class ConnectionResponseContentSharepoint private ConnectionResponseContentSharepoint( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -93,7 +93,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -105,7 +105,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -200,22 +200,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentSharepoint other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentSharepointStrategy strategy); + + Builder from(ConnectionResponseContentSharepoint other); } public interface _FinalStage { @@ -233,10 +225,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -266,11 +266,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentSharepointStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -285,8 +281,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -313,20 +313,6 @@ public Builder from(ConnectionResponseContentSharepoint other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentSharepointStrategy strategy) { @@ -419,6 +405,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -432,6 +431,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShop.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShop.java index b33addf8a..bf9d696d5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShop.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShop.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentShop private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentShop private ConnectionResponseContentShop( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentShop other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentShopStrategy strategy); + + Builder from(ConnectionResponseContentShop other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentShopStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentShop other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentShopStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopify.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopify.java index b07ce6e31..5445a89e2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopify.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopify.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentShopify private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentShopify private ConnectionResponseContentShopify( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentShopify other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentShopifyStrategy strategy); + + Builder from(ConnectionResponseContentShopify other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentShopifyStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentShopify other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentShopifyStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSms.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSms.java index 879db62ad..9df56c9ad 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSms.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSms.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentSms private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentSms private ConnectionResponseContentSms( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentSms other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentSmsStrategy strategy); + + Builder from(ConnectionResponseContentSms other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentSmsStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentSms other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentSmsStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloud.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloud.java index 701aacd9d..d076eedb4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloud.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloud.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentSoundcloud private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentSoundcloud private ConnectionResponseContentSoundcloud( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentSoundcloud other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentSoundcloudStrategy strategy); + + Builder from(ConnectionResponseContentSoundcloud other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentSoundcloudStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentSoundcloud other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentSoundcloudStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignals.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignals.java index c4b78f38d..b8ac5a8bd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignals.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignals.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentThirtySevenSignals private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentThirtySevenSignals private ConnectionResponseContentThirtySevenSignals( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentThirtySevenSignals other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentThirtySevenSignalsStrategy strategy); + + Builder from(ConnectionResponseContentThirtySevenSignals other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentThirtySevenSignalsStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentThirtySevenSignals other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentThirtySevenSignalsStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitter.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitter.java index 196c10616..998c1e7cf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitter.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitter.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentTwitter private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentTwitter private ConnectionResponseContentTwitter( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentTwitter other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentTwitterStrategy strategy); + + Builder from(ConnectionResponseContentTwitter other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentTwitterStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentTwitter other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentTwitterStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappd.java index edc2f685e..6621b8c6e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappd.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappd.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentUntappd private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentUntappd private ConnectionResponseContentUntappd( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentUntappd other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentUntappdStrategy strategy); + + Builder from(ConnectionResponseContentUntappd other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentUntappdStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentUntappd other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentUntappdStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakte.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakte.java index 60144a7cc..554ed2639 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakte.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakte.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentVkontakte private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentVkontakte private ConnectionResponseContentVkontakte( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentVkontakte other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentVkontakteStrategy strategy); + + Builder from(ConnectionResponseContentVkontakte other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentVkontakteStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentVkontakte other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentVkontakteStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeibo.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeibo.java index 0a2c280ec..4ae32d2bf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeibo.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeibo.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentWeibo private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentWeibo private ConnectionResponseContentWeibo( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentWeibo other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentWeiboStrategy strategy); + + Builder from(ConnectionResponseContentWeibo other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentWeiboStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentWeibo other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentWeiboStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLive.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLive.java index 2a83ff47f..110da6eae 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLive.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLive.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentWindowsLive private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentWindowsLive private ConnectionResponseContentWindowsLive( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentWindowsLive other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentWindowsLiveStrategy strategy); + + Builder from(ConnectionResponseContentWindowsLive other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentWindowsLiveStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentWindowsLive other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentWindowsLiveStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpress.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpress.java index d3613d8d1..5db72235d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpress.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpress.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentWordpress private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentWordpress private ConnectionResponseContentWordpress( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -189,22 +189,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentWordpress other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentWordpressStrategy strategy); + + Builder from(ConnectionResponseContentWordpress other); } public interface _FinalStage { @@ -222,10 +214,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -251,11 +251,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentWordpressStrategy strategy; private Optional options = Optional.empty(); @@ -268,8 +264,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -295,20 +295,6 @@ public Builder from(ConnectionResponseContentWordpress other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentWordpressStrategy strategy) { @@ -388,6 +374,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -401,6 +400,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahoo.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahoo.java index f41177c59..77de9202d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahoo.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahoo.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentYahoo private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentYahoo private ConnectionResponseContentYahoo( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentYahoo other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentYahooStrategy strategy); + + Builder from(ConnectionResponseContentYahoo other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentYahooStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentYahoo other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentYahooStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandex.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandex.java index 2e9b80661..9129ee734 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandex.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandex.java @@ -28,11 +28,11 @@ public final class ConnectionResponseContentYandex private final Optional connectedAccounts; - private final String id; + private final Optional id; private final Optional> realms; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -51,9 +51,9 @@ public final class ConnectionResponseContentYandex private ConnectionResponseContentYandex( Optional authentication, Optional connectedAccounts, - String id, + Optional id, Optional> realms, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -89,7 +89,7 @@ public Optional getConnectedAccounts() { @JsonProperty("id") @java.lang.Override - public String getId() { + public Optional getId() { return id; } @@ -101,7 +101,7 @@ public Optional> getRealms() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -188,22 +188,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentYandex other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - public interface StrategyStage { _FinalStage strategy(@NotNull ConnectionResponseContentYandexStrategy strategy); + + Builder from(ConnectionResponseContentYandex other); } public interface _FinalStage { @@ -221,10 +213,18 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage id(Optional id); + + _FinalStage id(String id); + _FinalStage realms(Optional> realms); _FinalStage realms(List realms); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -250,11 +250,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private ConnectionResponseContentYandexStrategy strategy; private Optional options = Optional.empty(); @@ -267,8 +263,12 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional> realms = Optional.empty(); + private Optional id = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -294,20 +294,6 @@ public Builder from(ConnectionResponseContentYandex other) { return this; } - @java.lang.Override - @JsonSetter("id") - public NameStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull ConnectionResponseContentYandexStrategy strategy) { @@ -387,6 +373,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage realms(List realms) { this.realms = Optional.ofNullable(realms); @@ -400,6 +399,19 @@ public _FinalStage realms(Optional> realms) { return this; } + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionShouldTrustEmailVerifiedConnectionEnum.java index 4c926026a..38693c990 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionShouldTrustEmailVerifiedConnectionEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionShouldTrustEmailVerifiedConnectionEnum.java @@ -7,14 +7,14 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ConnectionShouldTrustEmailVerifiedConnectionEnum { - public static final ConnectionShouldTrustEmailVerifiedConnectionEnum ALWAYS_SET_EMAILS_AS_VERIFIED = - new ConnectionShouldTrustEmailVerifiedConnectionEnum( - Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); - public static final ConnectionShouldTrustEmailVerifiedConnectionEnum NEVER_SET_EMAILS_AS_VERIFIED = new ConnectionShouldTrustEmailVerifiedConnectionEnum( Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + public static final ConnectionShouldTrustEmailVerifiedConnectionEnum ALWAYS_SET_EMAILS_AS_VERIFIED = + new ConnectionShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + private final Value value; private final String string; @@ -48,10 +48,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case ALWAYS_SET_EMAILS_AS_VERIFIED: - return visitor.visitAlwaysSetEmailsAsVerified(); case NEVER_SET_EMAILS_AS_VERIFIED: return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -61,10 +61,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ConnectionShouldTrustEmailVerifiedConnectionEnum valueOf(String value) { switch (value) { - case "always_set_emails_as_verified": - return ALWAYS_SET_EMAILS_AS_VERIFIED; case "never_set_emails_as_verified": return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; default: return new ConnectionShouldTrustEmailVerifiedConnectionEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java index 7b196125b..16be79e84 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java @@ -7,128 +7,128 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ConnectionStrategyEnum { - public static final ConnectionStrategyEnum SHOP = new ConnectionStrategyEnum(Value.SHOP, "shop"); + public static final ConnectionStrategyEnum AD = new ConnectionStrategyEnum(Value.AD, "ad"); - public static final ConnectionStrategyEnum AUTH0OIDC = new ConnectionStrategyEnum(Value.AUTH0OIDC, "auth0-oidc"); + public static final ConnectionStrategyEnum BAIDU = new ConnectionStrategyEnum(Value.BAIDU, "baidu"); - public static final ConnectionStrategyEnum DWOLLA = new ConnectionStrategyEnum(Value.DWOLLA, "dwolla"); + public static final ConnectionStrategyEnum BITLY = new ConnectionStrategyEnum(Value.BITLY, "bitly"); - public static final ConnectionStrategyEnum OKTA = new ConnectionStrategyEnum(Value.OKTA, "okta"); + public static final ConnectionStrategyEnum PAYPAL_SANDBOX = + new ConnectionStrategyEnum(Value.PAYPAL_SANDBOX, "paypal-sandbox"); - public static final ConnectionStrategyEnum PLANNINGCENTER = - new ConnectionStrategyEnum(Value.PLANNINGCENTER, "planningcenter"); + public static final ConnectionStrategyEnum SAMLP = new ConnectionStrategyEnum(Value.SAMLP, "samlp"); - public static final ConnectionStrategyEnum GOOGLE_OAUTH2 = - new ConnectionStrategyEnum(Value.GOOGLE_OAUTH2, "google-oauth2"); + public static final ConnectionStrategyEnum DROPBOX = new ConnectionStrategyEnum(Value.DROPBOX, "dropbox"); - public static final ConnectionStrategyEnum AUTH0 = new ConnectionStrategyEnum(Value.AUTH0, "auth0"); + public static final ConnectionStrategyEnum VKONTAKTE = new ConnectionStrategyEnum(Value.VKONTAKTE, "vkontakte"); - public static final ConnectionStrategyEnum EXACT = new ConnectionStrategyEnum(Value.EXACT, "exact"); + public static final ConnectionStrategyEnum INSTAGRAM = new ConnectionStrategyEnum(Value.INSTAGRAM, "instagram"); - public static final ConnectionStrategyEnum WORDPRESS = new ConnectionStrategyEnum(Value.WORDPRESS, "wordpress"); + public static final ConnectionStrategyEnum AUTH0ADLDAP = + new ConnectionStrategyEnum(Value.AUTH0ADLDAP, "auth0-adldap"); - public static final ConnectionStrategyEnum FITBIT = new ConnectionStrategyEnum(Value.FITBIT, "fitbit"); + public static final ConnectionStrategyEnum PINGFEDERATE = + new ConnectionStrategyEnum(Value.PINGFEDERATE, "pingfederate"); - public static final ConnectionStrategyEnum EVERNOTE = new ConnectionStrategyEnum(Value.EVERNOTE, "evernote"); + public static final ConnectionStrategyEnum THIRTYSEVENSIGNALS = + new ConnectionStrategyEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); - public static final ConnectionStrategyEnum SHAREPOINT = new ConnectionStrategyEnum(Value.SHAREPOINT, "sharepoint"); + public static final ConnectionStrategyEnum WAAD = new ConnectionStrategyEnum(Value.WAAD, "waad"); - public static final ConnectionStrategyEnum SHOPIFY = new ConnectionStrategyEnum(Value.SHOPIFY, "shopify"); + public static final ConnectionStrategyEnum OIDC = new ConnectionStrategyEnum(Value.OIDC, "oidc"); - public static final ConnectionStrategyEnum SALESFORCE_SANDBOX = - new ConnectionStrategyEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); + public static final ConnectionStrategyEnum SALESFORCE_COMMUNITY = + new ConnectionStrategyEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community"); - public static final ConnectionStrategyEnum FACEBOOK = new ConnectionStrategyEnum(Value.FACEBOOK, "facebook"); + public static final ConnectionStrategyEnum DACCOUNT = new ConnectionStrategyEnum(Value.DACCOUNT, "daccount"); - public static final ConnectionStrategyEnum OAUTH1 = new ConnectionStrategyEnum(Value.OAUTH1, "oauth1"); + public static final ConnectionStrategyEnum SOUNDCLOUD = new ConnectionStrategyEnum(Value.SOUNDCLOUD, "soundcloud"); - public static final ConnectionStrategyEnum APPLE = new ConnectionStrategyEnum(Value.APPLE, "apple"); + public static final ConnectionStrategyEnum EVERNOTE_SANDBOX = + new ConnectionStrategyEnum(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); - public static final ConnectionStrategyEnum UNTAPPD = new ConnectionStrategyEnum(Value.UNTAPPD, "untappd"); + public static final ConnectionStrategyEnum OAUTH2 = new ConnectionStrategyEnum(Value.OAUTH2, "oauth2"); - public static final ConnectionStrategyEnum AMAZON = new ConnectionStrategyEnum(Value.AMAZON, "amazon"); + public static final ConnectionStrategyEnum BOX = new ConnectionStrategyEnum(Value.BOX, "box"); - public static final ConnectionStrategyEnum LINE = new ConnectionStrategyEnum(Value.LINE, "line"); + public static final ConnectionStrategyEnum IP = new ConnectionStrategyEnum(Value.IP, "ip"); - public static final ConnectionStrategyEnum BITBUCKET = new ConnectionStrategyEnum(Value.BITBUCKET, "bitbucket"); + public static final ConnectionStrategyEnum ADFS = new ConnectionStrategyEnum(Value.ADFS, "adfs"); - public static final ConnectionStrategyEnum GITHUB = new ConnectionStrategyEnum(Value.GITHUB, "github"); + public static final ConnectionStrategyEnum EMAIL = new ConnectionStrategyEnum(Value.EMAIL, "email"); - public static final ConnectionStrategyEnum SALESFORCE = new ConnectionStrategyEnum(Value.SALESFORCE, "salesforce"); + public static final ConnectionStrategyEnum YAHOO = new ConnectionStrategyEnum(Value.YAHOO, "yahoo"); - public static final ConnectionStrategyEnum OFFICE365 = new ConnectionStrategyEnum(Value.OFFICE365, "office365"); + public static final ConnectionStrategyEnum WEIBO = new ConnectionStrategyEnum(Value.WEIBO, "weibo"); - public static final ConnectionStrategyEnum SMS = new ConnectionStrategyEnum(Value.SMS, "sms"); + public static final ConnectionStrategyEnum CUSTOM = new ConnectionStrategyEnum(Value.CUSTOM, "custom"); - public static final ConnectionStrategyEnum TWITTER = new ConnectionStrategyEnum(Value.TWITTER, "twitter"); + public static final ConnectionStrategyEnum PAYPAL = new ConnectionStrategyEnum(Value.PAYPAL, "paypal"); - public static final ConnectionStrategyEnum WINDOWSLIVE = - new ConnectionStrategyEnum(Value.WINDOWSLIVE, "windowslive"); + public static final ConnectionStrategyEnum LINKEDIN = new ConnectionStrategyEnum(Value.LINKEDIN, "linkedin"); - public static final ConnectionStrategyEnum YANDEX = new ConnectionStrategyEnum(Value.YANDEX, "yandex"); + public static final ConnectionStrategyEnum GOOGLE_APPS = + new ConnectionStrategyEnum(Value.GOOGLE_APPS, "google-apps"); - public static final ConnectionStrategyEnum AD = new ConnectionStrategyEnum(Value.AD, "ad"); + public static final ConnectionStrategyEnum DWOLLA = new ConnectionStrategyEnum(Value.DWOLLA, "dwolla"); - public static final ConnectionStrategyEnum BAIDU = new ConnectionStrategyEnum(Value.BAIDU, "baidu"); + public static final ConnectionStrategyEnum SHOP = new ConnectionStrategyEnum(Value.SHOP, "shop"); - public static final ConnectionStrategyEnum BITLY = new ConnectionStrategyEnum(Value.BITLY, "bitly"); + public static final ConnectionStrategyEnum AUTH0OIDC = new ConnectionStrategyEnum(Value.AUTH0OIDC, "auth0-oidc"); - public static final ConnectionStrategyEnum PAYPAL_SANDBOX = - new ConnectionStrategyEnum(Value.PAYPAL_SANDBOX, "paypal-sandbox"); + public static final ConnectionStrategyEnum PLANNINGCENTER = + new ConnectionStrategyEnum(Value.PLANNINGCENTER, "planningcenter"); - public static final ConnectionStrategyEnum SAMLP = new ConnectionStrategyEnum(Value.SAMLP, "samlp"); + public static final ConnectionStrategyEnum OKTA = new ConnectionStrategyEnum(Value.OKTA, "okta"); - public static final ConnectionStrategyEnum DROPBOX = new ConnectionStrategyEnum(Value.DROPBOX, "dropbox"); + public static final ConnectionStrategyEnum AUTH0 = new ConnectionStrategyEnum(Value.AUTH0, "auth0"); - public static final ConnectionStrategyEnum VKONTAKTE = new ConnectionStrategyEnum(Value.VKONTAKTE, "vkontakte"); + public static final ConnectionStrategyEnum GOOGLE_OAUTH2 = + new ConnectionStrategyEnum(Value.GOOGLE_OAUTH2, "google-oauth2"); - public static final ConnectionStrategyEnum AUTH0ADLDAP = - new ConnectionStrategyEnum(Value.AUTH0ADLDAP, "auth0-adldap"); + public static final ConnectionStrategyEnum WORDPRESS = new ConnectionStrategyEnum(Value.WORDPRESS, "wordpress"); - public static final ConnectionStrategyEnum PINGFEDERATE = - new ConnectionStrategyEnum(Value.PINGFEDERATE, "pingfederate"); + public static final ConnectionStrategyEnum EXACT = new ConnectionStrategyEnum(Value.EXACT, "exact"); - public static final ConnectionStrategyEnum INSTAGRAM = new ConnectionStrategyEnum(Value.INSTAGRAM, "instagram"); + public static final ConnectionStrategyEnum FITBIT = new ConnectionStrategyEnum(Value.FITBIT, "fitbit"); - public static final ConnectionStrategyEnum THIRTYSEVENSIGNALS = - new ConnectionStrategyEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); + public static final ConnectionStrategyEnum EVERNOTE = new ConnectionStrategyEnum(Value.EVERNOTE, "evernote"); - public static final ConnectionStrategyEnum WAAD = new ConnectionStrategyEnum(Value.WAAD, "waad"); + public static final ConnectionStrategyEnum SHAREPOINT = new ConnectionStrategyEnum(Value.SHAREPOINT, "sharepoint"); - public static final ConnectionStrategyEnum OIDC = new ConnectionStrategyEnum(Value.OIDC, "oidc"); + public static final ConnectionStrategyEnum SHOPIFY = new ConnectionStrategyEnum(Value.SHOPIFY, "shopify"); - public static final ConnectionStrategyEnum EVERNOTE_SANDBOX = - new ConnectionStrategyEnum(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); + public static final ConnectionStrategyEnum SALESFORCE_SANDBOX = + new ConnectionStrategyEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); - public static final ConnectionStrategyEnum SALESFORCE_COMMUNITY = - new ConnectionStrategyEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community"); + public static final ConnectionStrategyEnum FACEBOOK = new ConnectionStrategyEnum(Value.FACEBOOK, "facebook"); - public static final ConnectionStrategyEnum DACCOUNT = new ConnectionStrategyEnum(Value.DACCOUNT, "daccount"); + public static final ConnectionStrategyEnum APPLE = new ConnectionStrategyEnum(Value.APPLE, "apple"); - public static final ConnectionStrategyEnum SOUNDCLOUD = new ConnectionStrategyEnum(Value.SOUNDCLOUD, "soundcloud"); + public static final ConnectionStrategyEnum OAUTH1 = new ConnectionStrategyEnum(Value.OAUTH1, "oauth1"); - public static final ConnectionStrategyEnum OAUTH2 = new ConnectionStrategyEnum(Value.OAUTH2, "oauth2"); + public static final ConnectionStrategyEnum AMAZON = new ConnectionStrategyEnum(Value.AMAZON, "amazon"); - public static final ConnectionStrategyEnum BOX = new ConnectionStrategyEnum(Value.BOX, "box"); + public static final ConnectionStrategyEnum LINE = new ConnectionStrategyEnum(Value.LINE, "line"); - public static final ConnectionStrategyEnum IP = new ConnectionStrategyEnum(Value.IP, "ip"); + public static final ConnectionStrategyEnum UNTAPPD = new ConnectionStrategyEnum(Value.UNTAPPD, "untappd"); - public static final ConnectionStrategyEnum ADFS = new ConnectionStrategyEnum(Value.ADFS, "adfs"); + public static final ConnectionStrategyEnum GITHUB = new ConnectionStrategyEnum(Value.GITHUB, "github"); - public static final ConnectionStrategyEnum EMAIL = new ConnectionStrategyEnum(Value.EMAIL, "email"); + public static final ConnectionStrategyEnum SALESFORCE = new ConnectionStrategyEnum(Value.SALESFORCE, "salesforce"); - public static final ConnectionStrategyEnum CUSTOM = new ConnectionStrategyEnum(Value.CUSTOM, "custom"); + public static final ConnectionStrategyEnum BITBUCKET = new ConnectionStrategyEnum(Value.BITBUCKET, "bitbucket"); - public static final ConnectionStrategyEnum YAHOO = new ConnectionStrategyEnum(Value.YAHOO, "yahoo"); + public static final ConnectionStrategyEnum OFFICE365 = new ConnectionStrategyEnum(Value.OFFICE365, "office365"); - public static final ConnectionStrategyEnum WEIBO = new ConnectionStrategyEnum(Value.WEIBO, "weibo"); + public static final ConnectionStrategyEnum SMS = new ConnectionStrategyEnum(Value.SMS, "sms"); - public static final ConnectionStrategyEnum GOOGLE_APPS = - new ConnectionStrategyEnum(Value.GOOGLE_APPS, "google-apps"); + public static final ConnectionStrategyEnum WINDOWSLIVE = + new ConnectionStrategyEnum(Value.WINDOWSLIVE, "windowslive"); - public static final ConnectionStrategyEnum PAYPAL = new ConnectionStrategyEnum(Value.PAYPAL, "paypal"); + public static final ConnectionStrategyEnum YANDEX = new ConnectionStrategyEnum(Value.YANDEX, "yandex"); - public static final ConnectionStrategyEnum LINKEDIN = new ConnectionStrategyEnum(Value.LINKEDIN, "linkedin"); + public static final ConnectionStrategyEnum TWITTER = new ConnectionStrategyEnum(Value.TWITTER, "twitter"); private final Value value; @@ -163,62 +163,6 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case SHOP: - return visitor.visitShop(); - case AUTH0OIDC: - return visitor.visitAuth0Oidc(); - case DWOLLA: - return visitor.visitDwolla(); - case OKTA: - return visitor.visitOkta(); - case PLANNINGCENTER: - return visitor.visitPlanningcenter(); - case GOOGLE_OAUTH2: - return visitor.visitGoogleOauth2(); - case AUTH0: - return visitor.visitAuth0(); - case EXACT: - return visitor.visitExact(); - case WORDPRESS: - return visitor.visitWordpress(); - case FITBIT: - return visitor.visitFitbit(); - case EVERNOTE: - return visitor.visitEvernote(); - case SHAREPOINT: - return visitor.visitSharepoint(); - case SHOPIFY: - return visitor.visitShopify(); - case SALESFORCE_SANDBOX: - return visitor.visitSalesforceSandbox(); - case FACEBOOK: - return visitor.visitFacebook(); - case OAUTH1: - return visitor.visitOauth1(); - case APPLE: - return visitor.visitApple(); - case UNTAPPD: - return visitor.visitUntappd(); - case AMAZON: - return visitor.visitAmazon(); - case LINE: - return visitor.visitLine(); - case BITBUCKET: - return visitor.visitBitbucket(); - case GITHUB: - return visitor.visitGithub(); - case SALESFORCE: - return visitor.visitSalesforce(); - case OFFICE365: - return visitor.visitOffice365(); - case SMS: - return visitor.visitSms(); - case TWITTER: - return visitor.visitTwitter(); - case WINDOWSLIVE: - return visitor.visitWindowslive(); - case YANDEX: - return visitor.visitYandex(); case AD: return visitor.visitAd(); case BAIDU: @@ -233,26 +177,26 @@ public T visit(Visitor visitor) { return visitor.visitDropbox(); case VKONTAKTE: return visitor.visitVkontakte(); + case INSTAGRAM: + return visitor.visitInstagram(); case AUTH0ADLDAP: return visitor.visitAuth0Adldap(); case PINGFEDERATE: return visitor.visitPingfederate(); - case INSTAGRAM: - return visitor.visitInstagram(); case THIRTYSEVENSIGNALS: return visitor.visitThirtysevensignals(); case WAAD: return visitor.visitWaad(); case OIDC: return visitor.visitOidc(); - case EVERNOTE_SANDBOX: - return visitor.visitEvernoteSandbox(); case SALESFORCE_COMMUNITY: return visitor.visitSalesforceCommunity(); case DACCOUNT: return visitor.visitDaccount(); case SOUNDCLOUD: return visitor.visitSoundcloud(); + case EVERNOTE_SANDBOX: + return visitor.visitEvernoteSandbox(); case OAUTH2: return visitor.visitOauth2(); case BOX: @@ -263,18 +207,74 @@ public T visit(Visitor visitor) { return visitor.visitAdfs(); case EMAIL: return visitor.visitEmail(); - case CUSTOM: - return visitor.visitCustom(); case YAHOO: return visitor.visitYahoo(); case WEIBO: return visitor.visitWeibo(); - case GOOGLE_APPS: - return visitor.visitGoogleApps(); + case CUSTOM: + return visitor.visitCustom(); case PAYPAL: return visitor.visitPaypal(); case LINKEDIN: return visitor.visitLinkedin(); + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case DWOLLA: + return visitor.visitDwolla(); + case SHOP: + return visitor.visitShop(); + case AUTH0OIDC: + return visitor.visitAuth0Oidc(); + case PLANNINGCENTER: + return visitor.visitPlanningcenter(); + case OKTA: + return visitor.visitOkta(); + case AUTH0: + return visitor.visitAuth0(); + case GOOGLE_OAUTH2: + return visitor.visitGoogleOauth2(); + case WORDPRESS: + return visitor.visitWordpress(); + case EXACT: + return visitor.visitExact(); + case FITBIT: + return visitor.visitFitbit(); + case EVERNOTE: + return visitor.visitEvernote(); + case SHAREPOINT: + return visitor.visitSharepoint(); + case SHOPIFY: + return visitor.visitShopify(); + case SALESFORCE_SANDBOX: + return visitor.visitSalesforceSandbox(); + case FACEBOOK: + return visitor.visitFacebook(); + case APPLE: + return visitor.visitApple(); + case OAUTH1: + return visitor.visitOauth1(); + case AMAZON: + return visitor.visitAmazon(); + case LINE: + return visitor.visitLine(); + case UNTAPPD: + return visitor.visitUntappd(); + case GITHUB: + return visitor.visitGithub(); + case SALESFORCE: + return visitor.visitSalesforce(); + case BITBUCKET: + return visitor.visitBitbucket(); + case OFFICE365: + return visitor.visitOffice365(); + case SMS: + return visitor.visitSms(); + case WINDOWSLIVE: + return visitor.visitWindowslive(); + case YANDEX: + return visitor.visitYandex(); + case TWITTER: + return visitor.visitTwitter(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -284,62 +284,6 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ConnectionStrategyEnum valueOf(String value) { switch (value) { - case "shop": - return SHOP; - case "auth0-oidc": - return AUTH0OIDC; - case "dwolla": - return DWOLLA; - case "okta": - return OKTA; - case "planningcenter": - return PLANNINGCENTER; - case "google-oauth2": - return GOOGLE_OAUTH2; - case "auth0": - return AUTH0; - case "exact": - return EXACT; - case "wordpress": - return WORDPRESS; - case "fitbit": - return FITBIT; - case "evernote": - return EVERNOTE; - case "sharepoint": - return SHAREPOINT; - case "shopify": - return SHOPIFY; - case "salesforce-sandbox": - return SALESFORCE_SANDBOX; - case "facebook": - return FACEBOOK; - case "oauth1": - return OAUTH1; - case "apple": - return APPLE; - case "untappd": - return UNTAPPD; - case "amazon": - return AMAZON; - case "line": - return LINE; - case "bitbucket": - return BITBUCKET; - case "github": - return GITHUB; - case "salesforce": - return SALESFORCE; - case "office365": - return OFFICE365; - case "sms": - return SMS; - case "twitter": - return TWITTER; - case "windowslive": - return WINDOWSLIVE; - case "yandex": - return YANDEX; case "ad": return AD; case "baidu": @@ -354,26 +298,26 @@ public static ConnectionStrategyEnum valueOf(String value) { return DROPBOX; case "vkontakte": return VKONTAKTE; + case "instagram": + return INSTAGRAM; case "auth0-adldap": return AUTH0ADLDAP; case "pingfederate": return PINGFEDERATE; - case "instagram": - return INSTAGRAM; case "thirtysevensignals": return THIRTYSEVENSIGNALS; case "waad": return WAAD; case "oidc": return OIDC; - case "evernote-sandbox": - return EVERNOTE_SANDBOX; case "salesforce-community": return SALESFORCE_COMMUNITY; case "daccount": return DACCOUNT; case "soundcloud": return SOUNDCLOUD; + case "evernote-sandbox": + return EVERNOTE_SANDBOX; case "oauth2": return OAUTH2; case "box": @@ -384,18 +328,74 @@ public static ConnectionStrategyEnum valueOf(String value) { return ADFS; case "email": return EMAIL; - case "custom": - return CUSTOM; case "yahoo": return YAHOO; case "weibo": return WEIBO; - case "google-apps": - return GOOGLE_APPS; + case "custom": + return CUSTOM; case "paypal": return PAYPAL; case "linkedin": return LINKEDIN; + case "google-apps": + return GOOGLE_APPS; + case "dwolla": + return DWOLLA; + case "shop": + return SHOP; + case "auth0-oidc": + return AUTH0OIDC; + case "planningcenter": + return PLANNINGCENTER; + case "okta": + return OKTA; + case "auth0": + return AUTH0; + case "google-oauth2": + return GOOGLE_OAUTH2; + case "wordpress": + return WORDPRESS; + case "exact": + return EXACT; + case "fitbit": + return FITBIT; + case "evernote": + return EVERNOTE; + case "sharepoint": + return SHAREPOINT; + case "shopify": + return SHOPIFY; + case "salesforce-sandbox": + return SALESFORCE_SANDBOX; + case "facebook": + return FACEBOOK; + case "apple": + return APPLE; + case "oauth1": + return OAUTH1; + case "amazon": + return AMAZON; + case "line": + return LINE; + case "untappd": + return UNTAPPD; + case "github": + return GITHUB; + case "salesforce": + return SALESFORCE; + case "bitbucket": + return BITBUCKET; + case "office365": + return OFFICE365; + case "sms": + return SMS; + case "windowslive": + return WINDOWSLIVE; + case "yandex": + return YANDEX; + case "twitter": + return TWITTER; default: return new ConnectionStrategyEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointAuthSigningAlgEnum.java index 792a55219..463e4ab97 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointAuthSigningAlgEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointAuthSigningAlgEnum.java @@ -10,24 +10,24 @@ public final class ConnectionTokenEndpointAuthSigningAlgEnum { public static final ConnectionTokenEndpointAuthSigningAlgEnum RS512 = new ConnectionTokenEndpointAuthSigningAlgEnum(Value.RS512, "RS512"); - public static final ConnectionTokenEndpointAuthSigningAlgEnum ES256 = - new ConnectionTokenEndpointAuthSigningAlgEnum(Value.ES256, "ES256"); - - public static final ConnectionTokenEndpointAuthSigningAlgEnum PS256 = - new ConnectionTokenEndpointAuthSigningAlgEnum(Value.PS256, "PS256"); - public static final ConnectionTokenEndpointAuthSigningAlgEnum ES384 = new ConnectionTokenEndpointAuthSigningAlgEnum(Value.ES384, "ES384"); public static final ConnectionTokenEndpointAuthSigningAlgEnum PS384 = new ConnectionTokenEndpointAuthSigningAlgEnum(Value.PS384, "PS384"); - public static final ConnectionTokenEndpointAuthSigningAlgEnum RS256 = - new ConnectionTokenEndpointAuthSigningAlgEnum(Value.RS256, "RS256"); + public static final ConnectionTokenEndpointAuthSigningAlgEnum ES256 = + new ConnectionTokenEndpointAuthSigningAlgEnum(Value.ES256, "ES256"); + + public static final ConnectionTokenEndpointAuthSigningAlgEnum PS256 = + new ConnectionTokenEndpointAuthSigningAlgEnum(Value.PS256, "PS256"); public static final ConnectionTokenEndpointAuthSigningAlgEnum RS384 = new ConnectionTokenEndpointAuthSigningAlgEnum(Value.RS384, "RS384"); + public static final ConnectionTokenEndpointAuthSigningAlgEnum RS256 = + new ConnectionTokenEndpointAuthSigningAlgEnum(Value.RS256, "RS256"); + private final Value value; private final String string; @@ -63,18 +63,18 @@ public T visit(Visitor visitor) { switch (value) { case RS512: return visitor.visitRs512(); - case ES256: - return visitor.visitEs256(); - case PS256: - return visitor.visitPs256(); case ES384: return visitor.visitEs384(); case PS384: return visitor.visitPs384(); - case RS256: - return visitor.visitRs256(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); case RS384: return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -86,18 +86,18 @@ public static ConnectionTokenEndpointAuthSigningAlgEnum valueOf(String value) { switch (value) { case "RS512": return RS512; - case "ES256": - return ES256; - case "PS256": - return PS256; case "ES384": return ES384; case "PS384": return PS384; - case "RS256": - return RS256; + case "ES256": + return ES256; + case "PS256": + return PS256; case "RS384": return RS384; + case "RS256": + return RS256; default: return new ConnectionTokenEndpointAuthSigningAlgEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointJwtcaAudFormatEnumOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointJwtcaAudFormatEnumOidc.java index 7ca6f3908..2d10adb5b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointJwtcaAudFormatEnumOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointJwtcaAudFormatEnumOidc.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ConnectionTokenEndpointJwtcaAudFormatEnumOidc { - public static final ConnectionTokenEndpointJwtcaAudFormatEnumOidc TOKEN_ENDPOINT = - new ConnectionTokenEndpointJwtcaAudFormatEnumOidc(Value.TOKEN_ENDPOINT, "token_endpoint"); - public static final ConnectionTokenEndpointJwtcaAudFormatEnumOidc ISSUER = new ConnectionTokenEndpointJwtcaAudFormatEnumOidc(Value.ISSUER, "issuer"); + public static final ConnectionTokenEndpointJwtcaAudFormatEnumOidc TOKEN_ENDPOINT = + new ConnectionTokenEndpointJwtcaAudFormatEnumOidc(Value.TOKEN_ENDPOINT, "token_endpoint"); + private final Value value; private final String string; @@ -46,10 +46,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case TOKEN_ENDPOINT: - return visitor.visitTokenEndpoint(); case ISSUER: return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -59,10 +59,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ConnectionTokenEndpointJwtcaAudFormatEnumOidc valueOf(String value) { switch (value) { - case "token_endpoint": - return TOKEN_ENDPOINT; case "issuer": return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; default: return new ConnectionTokenEndpointJwtcaAudFormatEnumOidc(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamAliasEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamAliasEnum.java index 0b0c55d13..9de86bbff 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamAliasEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamAliasEnum.java @@ -7,6 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ConnectionUpstreamAliasEnum { + public static final ConnectionUpstreamAliasEnum CLIENT_ID = + new ConnectionUpstreamAliasEnum(Value.CLIENT_ID, "client_id"); + + public static final ConnectionUpstreamAliasEnum UI_LOCALES = + new ConnectionUpstreamAliasEnum(Value.UI_LOCALES, "ui_locales"); + public static final ConnectionUpstreamAliasEnum ACR_VALUES = new ConnectionUpstreamAliasEnum(Value.ACR_VALUES, "acr_values"); @@ -19,19 +25,11 @@ public final class ConnectionUpstreamAliasEnum { public static final ConnectionUpstreamAliasEnum RESPONSE_TYPE = new ConnectionUpstreamAliasEnum(Value.RESPONSE_TYPE, "response_type"); - public static final ConnectionUpstreamAliasEnum CLIENT_ID = - new ConnectionUpstreamAliasEnum(Value.CLIENT_ID, "client_id"); - - public static final ConnectionUpstreamAliasEnum UI_LOCALES = - new ConnectionUpstreamAliasEnum(Value.UI_LOCALES, "ui_locales"); - public static final ConnectionUpstreamAliasEnum ID_TOKEN_HINT = new ConnectionUpstreamAliasEnum(Value.ID_TOKEN_HINT, "id_token_hint"); public static final ConnectionUpstreamAliasEnum DISPLAY = new ConnectionUpstreamAliasEnum(Value.DISPLAY, "display"); - public static final ConnectionUpstreamAliasEnum PROMPT = new ConnectionUpstreamAliasEnum(Value.PROMPT, "prompt"); - public static final ConnectionUpstreamAliasEnum MAX_AGE = new ConnectionUpstreamAliasEnum(Value.MAX_AGE, "max_age"); public static final ConnectionUpstreamAliasEnum RESOURCE = @@ -40,6 +38,8 @@ public final class ConnectionUpstreamAliasEnum { public static final ConnectionUpstreamAliasEnum RESPONSE_MODE = new ConnectionUpstreamAliasEnum(Value.RESPONSE_MODE, "response_mode"); + public static final ConnectionUpstreamAliasEnum PROMPT = new ConnectionUpstreamAliasEnum(Value.PROMPT, "prompt"); + private final Value value; private final String string; @@ -73,6 +73,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case CLIENT_ID: + return visitor.visitClientId(); + case UI_LOCALES: + return visitor.visitUiLocales(); case ACR_VALUES: return visitor.visitAcrValues(); case AUDIENCE: @@ -81,22 +85,18 @@ public T visit(Visitor visitor) { return visitor.visitLoginHint(); case RESPONSE_TYPE: return visitor.visitResponseType(); - case CLIENT_ID: - return visitor.visitClientId(); - case UI_LOCALES: - return visitor.visitUiLocales(); case ID_TOKEN_HINT: return visitor.visitIdTokenHint(); case DISPLAY: return visitor.visitDisplay(); - case PROMPT: - return visitor.visitPrompt(); case MAX_AGE: return visitor.visitMaxAge(); case RESOURCE: return visitor.visitResource(); case RESPONSE_MODE: return visitor.visitResponseMode(); + case PROMPT: + return visitor.visitPrompt(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -106,6 +106,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ConnectionUpstreamAliasEnum valueOf(String value) { switch (value) { + case "client_id": + return CLIENT_ID; + case "ui_locales": + return UI_LOCALES; case "acr_values": return ACR_VALUES; case "audience": @@ -114,22 +118,18 @@ public static ConnectionUpstreamAliasEnum valueOf(String value) { return LOGIN_HINT; case "response_type": return RESPONSE_TYPE; - case "client_id": - return CLIENT_ID; - case "ui_locales": - return UI_LOCALES; case "id_token_hint": return ID_TOKEN_HINT; case "display": return DISPLAY; - case "prompt": - return PROMPT; case "max_age": return MAX_AGE; case "resource": return RESOURCE; case "response_mode": return RESPONSE_MODE; + case "prompt": + return PROMPT; default: return new ConnectionUpstreamAliasEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionCommon.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionCommon.java index 8b1b600c3..173e6dd80 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionCommon.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionCommon.java @@ -18,12 +18,11 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionCommon.Builder.class) public final class CreateConnectionCommon implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -36,7 +35,7 @@ public final class CreateConnectionCommon implements ICreateConnectionCommon { private final Map additionalProperties; private CreateConnectionCommon( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -52,7 +51,7 @@ private CreateConnectionCommon( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -112,61 +111,27 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static Builder builder() { return new Builder(); } - public interface NameStage { - _FinalStage name(@NotNull String name); - - Builder from(CreateConnectionCommon other); - } - - public interface _FinalStage { - CreateConnectionCommon build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

- */ - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - } - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private Optional>> metadata = Optional.empty(); + public static final class Builder { + private Optional name = Optional.empty(); - private Optional isDomainConnection = Optional.empty(); + private Optional> enabledClients = Optional.empty(); private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); + private Optional isDomainConnection = Optional.empty(); + + private Optional>> metadata = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(CreateConnectionCommon other) { name(other.getName()); enabledClients(other.getEnabledClients()); @@ -176,85 +141,74 @@ public Builder from(CreateConnectionCommon other) { return this; } - @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; return this; } - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); + public Builder name(String name) { + this.name = Optional.ofNullable(name); return this; } - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; + /** + *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

+ */ + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public Builder enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; return this; } - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); + public Builder enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); return this; } - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public Builder displayName(Optional displayName) { + this.displayName = displayName; return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { + public Builder displayName(String displayName) { this.displayName = Optional.ofNullable(displayName); return this; } - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public Builder isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; return this; } - /** - *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); + public Builder isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); return this; } - /** - *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

- */ - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public Builder metadata(Optional>> metadata) { + this.metadata = metadata; + return this; + } + + public Builder metadata(Map> metadata) { + this.metadata = Optional.ofNullable(metadata); return this; } - @java.lang.Override public CreateConnectionCommon build() { return new CreateConnectionCommon( name, enabledClients, displayName, isDomainConnection, metadata, additionalProperties); } - @java.lang.Override public Builder additionalProperty(String key, Object value) { this.additionalProperties.put(key, value); return this; } - @java.lang.Override public Builder additionalProperties(Map additionalProperties) { this.additionalProperties.putAll(additionalProperties); return this; diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAd.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAd.java index 032f118c1..17f56ffcd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAd.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAd.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentAd.Builder.class) public final class CreateConnectionRequestContentAd implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentAd implements ICreateConnection private final Map additionalProperties; private CreateConnectionRequestContentAd( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentAd( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -139,18 +139,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentAd other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentAdStrategy strategy); + + Builder from(CreateConnectionRequestContentAd other); } public interface _FinalStage { @@ -160,6 +156,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -185,9 +185,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentAdStrategy strategy; private Optional options = Optional.empty(); @@ -200,6 +198,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -217,13 +217,6 @@ public Builder from(CreateConnectionRequestContentAd other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentAdStrategy strategy) { @@ -303,6 +296,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentAd build() { return new CreateConnectionRequestContentAd( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAdfs.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAdfs.java index 7b427e324..238baa056 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAdfs.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAdfs.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentAdfs.Builder.class) public final class CreateConnectionRequestContentAdfs implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -42,7 +42,7 @@ public final class CreateConnectionRequestContentAdfs implements ICreateConnecti private final Map additionalProperties; private CreateConnectionRequestContentAdfs( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -64,7 +64,7 @@ private CreateConnectionRequestContentAdfs( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -151,18 +151,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentAdfs other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentAdfsStrategy strategy); + + Builder from(CreateConnectionRequestContentAdfs other); } public interface _FinalStage { @@ -172,6 +168,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -201,9 +201,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentAdfsStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -218,6 +216,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -236,13 +236,6 @@ public Builder from(CreateConnectionRequestContentAdfs other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentAdfsStrategy strategy) { @@ -335,6 +328,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentAdfs build() { return new CreateConnectionRequestContentAdfs( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAmazon.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAmazon.java index 771740e7b..73bf3b411 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAmazon.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAmazon.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentAmazon.Builder.class) public final class CreateConnectionRequestContentAmazon implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentAmazon implements ICreateConnec private final Map additionalProperties; private CreateConnectionRequestContentAmazon( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentAmazon( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentAmazon other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentAmazonStrategy strategy); + + Builder from(CreateConnectionRequestContentAmazon other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentAmazonStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentAmazon other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentAmazonStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentAmazon build() { return new CreateConnectionRequestContentAmazon( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentApple.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentApple.java index 73af97478..9efcc37c6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentApple.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentApple.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentApple.Builder.class) public final class CreateConnectionRequestContentApple implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentApple implements ICreateConnect private final Map additionalProperties; private CreateConnectionRequestContentApple( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentApple( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentApple other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentAppleStrategy strategy); + + Builder from(CreateConnectionRequestContentApple other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentAppleStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentApple other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentAppleStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentApple build() { return new CreateConnectionRequestContentApple( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0.java index 7b9f0fd7a..40facf327 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentAuth0.Builder.class) public final class CreateConnectionRequestContentAuth0 implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -42,7 +42,7 @@ public final class CreateConnectionRequestContentAuth0 implements ICreateConnect private final Map additionalProperties; private CreateConnectionRequestContentAuth0( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -64,7 +64,7 @@ private CreateConnectionRequestContentAuth0( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -151,18 +151,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentAuth0 other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentAuth0Strategy strategy); + + Builder from(CreateConnectionRequestContentAuth0 other); } public interface _FinalStage { @@ -172,6 +168,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -201,9 +201,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentAuth0Strategy strategy; private Optional> realms = Optional.empty(); @@ -218,6 +216,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -236,13 +236,6 @@ public Builder from(CreateConnectionRequestContentAuth0 other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentAuth0Strategy strategy) { @@ -335,6 +328,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentAuth0 build() { return new CreateConnectionRequestContentAuth0( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0Oidc.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0Oidc.java index e255366e3..5c231bca1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0Oidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0Oidc.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentAuth0Oidc.Builder.class) public final class CreateConnectionRequestContentAuth0Oidc implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentAuth0Oidc implements ICreateCon private final Map additionalProperties; private CreateConnectionRequestContentAuth0Oidc( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentAuth0Oidc( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentAuth0Oidc other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentAuth0OidcStrategy strategy); + + Builder from(CreateConnectionRequestContentAuth0Oidc other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentAuth0OidcStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentAuth0Oidc other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentAuth0OidcStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentAuth0Oidc build() { return new CreateConnectionRequestContentAuth0Oidc( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAzureAd.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAzureAd.java index 3333dea33..5bf7aa3e3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAzureAd.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAzureAd.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentAzureAd.Builder.class) public final class CreateConnectionRequestContentAzureAd implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -42,7 +42,7 @@ public final class CreateConnectionRequestContentAzureAd implements ICreateConne private final Map additionalProperties; private CreateConnectionRequestContentAzureAd( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -64,7 +64,7 @@ private CreateConnectionRequestContentAzureAd( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -151,18 +151,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentAzureAd other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentAzureAdStrategy strategy); + + Builder from(CreateConnectionRequestContentAzureAd other); } public interface _FinalStage { @@ -172,6 +168,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -201,9 +201,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentAzureAdStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -218,6 +216,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -236,13 +236,6 @@ public Builder from(CreateConnectionRequestContentAzureAd other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentAzureAdStrategy strategy) { @@ -335,6 +328,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentAzureAd build() { return new CreateConnectionRequestContentAzureAd( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBaidu.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBaidu.java index d2ba8d86d..4dffd8628 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBaidu.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBaidu.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentBaidu.Builder.class) public final class CreateConnectionRequestContentBaidu implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentBaidu implements ICreateConnect private final Map additionalProperties; private CreateConnectionRequestContentBaidu( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentBaidu( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentBaidu other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentBaiduStrategy strategy); + + Builder from(CreateConnectionRequestContentBaidu other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentBaiduStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentBaidu other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentBaiduStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentBaidu build() { return new CreateConnectionRequestContentBaidu( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitbucket.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitbucket.java index 50ae27f01..f1e220c4f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitbucket.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitbucket.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentBitbucket.Builder.class) public final class CreateConnectionRequestContentBitbucket implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentBitbucket implements ICreateCon private final Map additionalProperties; private CreateConnectionRequestContentBitbucket( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentBitbucket( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentBitbucket other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentBitbucketStrategy strategy); + + Builder from(CreateConnectionRequestContentBitbucket other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentBitbucketStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentBitbucket other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentBitbucketStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentBitbucket build() { return new CreateConnectionRequestContentBitbucket( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitly.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitly.java index e11f9eb74..8d3750c5b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitly.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitly.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentBitly.Builder.class) public final class CreateConnectionRequestContentBitly implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentBitly implements ICreateConnect private final Map additionalProperties; private CreateConnectionRequestContentBitly( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentBitly( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentBitly other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentBitlyStrategy strategy); + + Builder from(CreateConnectionRequestContentBitly other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentBitlyStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentBitly other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentBitlyStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentBitly build() { return new CreateConnectionRequestContentBitly( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBox.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBox.java index 64f5d475e..d2faf7522 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBox.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBox.java @@ -27,7 +27,7 @@ public final class CreateConnectionRequestContentBox implements IConnectionPurpo private final Optional connectedAccounts; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -46,7 +46,7 @@ public final class CreateConnectionRequestContentBox implements IConnectionPurpo private CreateConnectionRequestContentBox( Optional authentication, Optional connectedAccounts, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -80,7 +80,7 @@ public Optional getConnectedAccounts() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -163,18 +163,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentBox other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentBoxStrategy strategy); + + Builder from(CreateConnectionRequestContentBox other); } public interface _FinalStage { @@ -192,6 +188,10 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -217,9 +217,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentBoxStrategy strategy; private Optional options = Optional.empty(); @@ -232,6 +230,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -255,13 +255,6 @@ public Builder from(CreateConnectionRequestContentBox other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentBoxStrategy strategy) { @@ -341,6 +334,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentCustom.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentCustom.java index 6ef2c1387..9077d8095 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentCustom.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentCustom.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentCustom.Builder.class) public final class CreateConnectionRequestContentCustom implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentCustom implements ICreateConnec private final Map additionalProperties; private CreateConnectionRequestContentCustom( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentCustom( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentCustom other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentCustomStrategy strategy); + + Builder from(CreateConnectionRequestContentCustom other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentCustomStrategy strategy; private Optional> options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentCustom other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentCustomStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentCustom build() { return new CreateConnectionRequestContentCustom( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDaccount.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDaccount.java index ced13c31a..d4a07ec7b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDaccount.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDaccount.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentDaccount.Builder.class) public final class CreateConnectionRequestContentDaccount implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentDaccount implements ICreateConn private final Map additionalProperties; private CreateConnectionRequestContentDaccount( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentDaccount( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentDaccount other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentDaccountStrategy strategy); + + Builder from(CreateConnectionRequestContentDaccount other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentDaccountStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentDaccount other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentDaccountStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentDaccount build() { return new CreateConnectionRequestContentDaccount( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDropbox.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDropbox.java index 265094b90..cdc79e02e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDropbox.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDropbox.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentDropbox.Builder.class) public final class CreateConnectionRequestContentDropbox implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentDropbox implements ICreateConne private final Map additionalProperties; private CreateConnectionRequestContentDropbox( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentDropbox( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentDropbox other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentDropboxStrategy strategy); + + Builder from(CreateConnectionRequestContentDropbox other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentDropboxStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentDropbox other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentDropboxStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentDropbox build() { return new CreateConnectionRequestContentDropbox( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDwolla.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDwolla.java index 6274629a0..61bfa1e78 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDwolla.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDwolla.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentDwolla.Builder.class) public final class CreateConnectionRequestContentDwolla implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentDwolla implements ICreateConnec private final Map additionalProperties; private CreateConnectionRequestContentDwolla( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentDwolla( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentDwolla other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentDwollaStrategy strategy); + + Builder from(CreateConnectionRequestContentDwolla other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentDwollaStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentDwolla other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentDwollaStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentDwolla build() { return new CreateConnectionRequestContentDwolla( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEmail.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEmail.java index 1a27d719e..fe59960d6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEmail.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEmail.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentEmail.Builder.class) public final class CreateConnectionRequestContentEmail implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentEmail implements ICreateConnect private final Map additionalProperties; private CreateConnectionRequestContentEmail( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentEmail( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentEmail other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentEmailStrategy strategy); + + Builder from(CreateConnectionRequestContentEmail other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentEmailStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentEmail other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentEmailStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentEmail build() { return new CreateConnectionRequestContentEmail( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernote.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernote.java index e4a217a99..19b101653 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernote.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernote.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentEvernote.Builder.class) public final class CreateConnectionRequestContentEvernote implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentEvernote implements ICreateConn private final Map additionalProperties; private CreateConnectionRequestContentEvernote( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentEvernote( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentEvernote other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentEvernoteStrategy strategy); + + Builder from(CreateConnectionRequestContentEvernote other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentEvernoteStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentEvernote other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentEvernoteStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentEvernote build() { return new CreateConnectionRequestContentEvernote( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteSandbox.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteSandbox.java index fddd86fb8..3e09accc2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteSandbox.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteSandbox.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentEvernoteSandbox.Builder.class) public final class CreateConnectionRequestContentEvernoteSandbox implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentEvernoteSandbox implements ICre private final Map additionalProperties; private CreateConnectionRequestContentEvernoteSandbox( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentEvernoteSandbox( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentEvernoteSandbox other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentEvernoteSandboxStrategy strategy); + + Builder from(CreateConnectionRequestContentEvernoteSandbox other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentEvernoteSandboxStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentEvernoteSandbox other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentEvernoteSandboxStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentEvernoteSandbox build() { return new CreateConnectionRequestContentEvernoteSandbox( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentExact.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentExact.java index 4f277b573..96561c140 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentExact.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentExact.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentExact.Builder.class) public final class CreateConnectionRequestContentExact implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentExact implements ICreateConnect private final Map additionalProperties; private CreateConnectionRequestContentExact( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentExact( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentExact other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentExactStrategy strategy); + + Builder from(CreateConnectionRequestContentExact other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentExactStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentExact other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentExactStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentExact build() { return new CreateConnectionRequestContentExact( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFacebook.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFacebook.java index de68b3619..7f2e99830 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFacebook.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFacebook.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentFacebook.Builder.class) public final class CreateConnectionRequestContentFacebook implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentFacebook implements ICreateConn private final Map additionalProperties; private CreateConnectionRequestContentFacebook( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentFacebook( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentFacebook other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentFacebookStrategy strategy); + + Builder from(CreateConnectionRequestContentFacebook other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentFacebookStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentFacebook other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentFacebookStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentFacebook build() { return new CreateConnectionRequestContentFacebook( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFitbit.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFitbit.java index a1a9c4edc..2937108cb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFitbit.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFitbit.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentFitbit.Builder.class) public final class CreateConnectionRequestContentFitbit implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentFitbit implements ICreateConnec private final Map additionalProperties; private CreateConnectionRequestContentFitbit( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentFitbit( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentFitbit other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentFitbitStrategy strategy); + + Builder from(CreateConnectionRequestContentFitbit other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentFitbitStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentFitbit other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentFitbitStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentFitbit build() { return new CreateConnectionRequestContentFitbit( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGitHub.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGitHub.java index db6ed10ff..ec9f436e5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGitHub.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGitHub.java @@ -27,7 +27,7 @@ public final class CreateConnectionRequestContentGitHub implements IConnectionPu private final Optional connectedAccounts; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -46,7 +46,7 @@ public final class CreateConnectionRequestContentGitHub implements IConnectionPu private CreateConnectionRequestContentGitHub( Optional authentication, Optional connectedAccounts, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -80,7 +80,7 @@ public Optional getConnectedAccounts() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -164,18 +164,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentGitHub other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentGitHubStrategy strategy); + + Builder from(CreateConnectionRequestContentGitHub other); } public interface _FinalStage { @@ -193,6 +189,10 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -218,9 +218,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentGitHubStrategy strategy; private Optional options = Optional.empty(); @@ -233,6 +231,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -256,13 +256,6 @@ public Builder from(CreateConnectionRequestContentGitHub other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentGitHubStrategy strategy) { @@ -342,6 +335,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleApps.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleApps.java index be3feb526..b2bd6b4df 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleApps.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleApps.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentGoogleApps.Builder.class) public final class CreateConnectionRequestContentGoogleApps implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -42,7 +42,7 @@ public final class CreateConnectionRequestContentGoogleApps implements ICreateCo private final Map additionalProperties; private CreateConnectionRequestContentGoogleApps( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -64,7 +64,7 @@ private CreateConnectionRequestContentGoogleApps( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -151,18 +151,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentGoogleApps other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentGoogleAppsStrategy strategy); + + Builder from(CreateConnectionRequestContentGoogleApps other); } public interface _FinalStage { @@ -172,6 +168,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -201,9 +201,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentGoogleAppsStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -218,6 +216,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -236,13 +236,6 @@ public Builder from(CreateConnectionRequestContentGoogleApps other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentGoogleAppsStrategy strategy) { @@ -335,6 +328,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentGoogleApps build() { return new CreateConnectionRequestContentGoogleApps( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleOAuth2.java index ff0b1c3c8..b680e3c9e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleOAuth2.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleOAuth2.java @@ -27,7 +27,7 @@ public final class CreateConnectionRequestContentGoogleOAuth2 implements IConnec private final Optional connectedAccounts; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -46,7 +46,7 @@ public final class CreateConnectionRequestContentGoogleOAuth2 implements IConnec private CreateConnectionRequestContentGoogleOAuth2( Optional authentication, Optional connectedAccounts, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -80,7 +80,7 @@ public Optional getConnectedAccounts() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -164,18 +164,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentGoogleOAuth2 other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentGoogleOAuth2Strategy strategy); + + Builder from(CreateConnectionRequestContentGoogleOAuth2 other); } public interface _FinalStage { @@ -193,6 +189,10 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -218,9 +218,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentGoogleOAuth2Strategy strategy; private Optional options = Optional.empty(); @@ -233,6 +231,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -256,13 +256,6 @@ public Builder from(CreateConnectionRequestContentGoogleOAuth2 other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentGoogleOAuth2Strategy strategy) { @@ -342,6 +335,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentInstagram.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentInstagram.java index 009d19bc4..ad4890ca6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentInstagram.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentInstagram.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentInstagram.Builder.class) public final class CreateConnectionRequestContentInstagram implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentInstagram implements ICreateCon private final Map additionalProperties; private CreateConnectionRequestContentInstagram( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentInstagram( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentInstagram other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentInstagramStrategy strategy); + + Builder from(CreateConnectionRequestContentInstagram other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentInstagramStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentInstagram other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentInstagramStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentInstagram build() { return new CreateConnectionRequestContentInstagram( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentIp.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentIp.java index 3004cb30d..96f15837d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentIp.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentIp.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentIp.Builder.class) public final class CreateConnectionRequestContentIp implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -42,7 +42,7 @@ public final class CreateConnectionRequestContentIp implements ICreateConnection private final Map additionalProperties; private CreateConnectionRequestContentIp( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -64,7 +64,7 @@ private CreateConnectionRequestContentIp( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -150,18 +150,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentIp other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentIpStrategy strategy); + + Builder from(CreateConnectionRequestContentIp other); } public interface _FinalStage { @@ -171,6 +167,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -200,9 +200,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentIpStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -217,6 +215,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -235,13 +235,6 @@ public Builder from(CreateConnectionRequestContentIp other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentIpStrategy strategy) { @@ -334,6 +327,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentIp build() { return new CreateConnectionRequestContentIp( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLine.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLine.java index 1ecac5ca0..fa5d650a3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLine.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLine.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentLine.Builder.class) public final class CreateConnectionRequestContentLine implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentLine implements ICreateConnecti private final Map additionalProperties; private CreateConnectionRequestContentLine( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentLine( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentLine other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentLineStrategy strategy); + + Builder from(CreateConnectionRequestContentLine other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentLineStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentLine other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentLineStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentLine build() { return new CreateConnectionRequestContentLine( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLinkedin.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLinkedin.java index 1ea5869a2..888f97289 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLinkedin.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLinkedin.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentLinkedin.Builder.class) public final class CreateConnectionRequestContentLinkedin implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentLinkedin implements ICreateConn private final Map additionalProperties; private CreateConnectionRequestContentLinkedin( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentLinkedin( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentLinkedin other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentLinkedinStrategy strategy); + + Builder from(CreateConnectionRequestContentLinkedin other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentLinkedinStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentLinkedin other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentLinkedinStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentLinkedin build() { return new CreateConnectionRequestContentLinkedin( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth1.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth1.java index 92adfdab4..ecfd1aafe 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth1.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth1.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentOAuth1.Builder.class) public final class CreateConnectionRequestContentOAuth1 implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentOAuth1 implements ICreateConnec private final Map additionalProperties; private CreateConnectionRequestContentOAuth1( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentOAuth1( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentOAuth1 other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentOAuth1Strategy strategy); + + Builder from(CreateConnectionRequestContentOAuth1 other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentOAuth1Strategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentOAuth1 other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentOAuth1Strategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentOAuth1 build() { return new CreateConnectionRequestContentOAuth1( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth2.java index 966a80314..b113ba979 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth2.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth2.java @@ -27,7 +27,7 @@ public final class CreateConnectionRequestContentOAuth2 implements IConnectionPu private final Optional connectedAccounts; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -46,7 +46,7 @@ public final class CreateConnectionRequestContentOAuth2 implements IConnectionPu private CreateConnectionRequestContentOAuth2( Optional authentication, Optional connectedAccounts, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -80,7 +80,7 @@ public Optional getConnectedAccounts() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -164,18 +164,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentOAuth2 other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentOAuth2Strategy strategy); + + Builder from(CreateConnectionRequestContentOAuth2 other); } public interface _FinalStage { @@ -193,6 +189,10 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -218,9 +218,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentOAuth2Strategy strategy; private Optional options = Optional.empty(); @@ -233,6 +231,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -256,13 +256,6 @@ public Builder from(CreateConnectionRequestContentOAuth2 other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentOAuth2Strategy strategy) { @@ -342,6 +335,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOffice365.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOffice365.java index d4a70a02c..958f0ccad 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOffice365.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOffice365.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentOffice365.Builder.class) public final class CreateConnectionRequestContentOffice365 implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -42,7 +42,7 @@ public final class CreateConnectionRequestContentOffice365 implements ICreateCon private final Map additionalProperties; private CreateConnectionRequestContentOffice365( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -64,7 +64,7 @@ private CreateConnectionRequestContentOffice365( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -151,18 +151,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentOffice365 other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentOffice365Strategy strategy); + + Builder from(CreateConnectionRequestContentOffice365 other); } public interface _FinalStage { @@ -172,6 +168,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -201,9 +201,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentOffice365Strategy strategy; private Optional showAsButton = Optional.empty(); @@ -218,6 +216,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -236,13 +236,6 @@ public Builder from(CreateConnectionRequestContentOffice365 other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentOffice365Strategy strategy) { @@ -335,6 +328,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentOffice365 build() { return new CreateConnectionRequestContentOffice365( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java index dab2f821a..b11b69da1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentOidc.Builder.class) public final class CreateConnectionRequestContentOidc implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -46,7 +46,7 @@ public final class CreateConnectionRequestContentOidc implements ICreateConnecti private final Map additionalProperties; private CreateConnectionRequestContentOidc( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -72,7 +72,7 @@ private CreateConnectionRequestContentOidc( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -173,18 +173,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentOidc other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentOidcStrategy strategy); + + Builder from(CreateConnectionRequestContentOidc other); } public interface _FinalStage { @@ -194,6 +190,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -231,9 +231,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentOidcStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -252,6 +250,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -272,13 +272,6 @@ public Builder from(CreateConnectionRequestContentOidc other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentOidcStrategy strategy) { @@ -397,6 +390,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentOidc build() { return new CreateConnectionRequestContentOidc( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOkta.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOkta.java index 0a9724fe8..43d9dbf63 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOkta.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOkta.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentOkta.Builder.class) public final class CreateConnectionRequestContentOkta implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -42,7 +42,7 @@ public final class CreateConnectionRequestContentOkta implements ICreateConnecti private final Map additionalProperties; private CreateConnectionRequestContentOkta( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -64,7 +64,7 @@ private CreateConnectionRequestContentOkta( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -151,18 +151,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentOkta other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentOktaStrategy strategy); + + Builder from(CreateConnectionRequestContentOkta other); } public interface _FinalStage { @@ -172,6 +168,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -201,9 +201,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentOktaStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -218,6 +216,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -236,13 +236,6 @@ public Builder from(CreateConnectionRequestContentOkta other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentOktaStrategy strategy) { @@ -335,6 +328,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentOkta build() { return new CreateConnectionRequestContentOkta( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypal.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypal.java index 4b96f8c3a..fb9b80830 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypal.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypal.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentPaypal.Builder.class) public final class CreateConnectionRequestContentPaypal implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentPaypal implements ICreateConnec private final Map additionalProperties; private CreateConnectionRequestContentPaypal( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentPaypal( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentPaypal other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentPaypalStrategy strategy); + + Builder from(CreateConnectionRequestContentPaypal other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentPaypalStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentPaypal other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentPaypalStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentPaypal build() { return new CreateConnectionRequestContentPaypal( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalSandbox.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalSandbox.java index edc453f2c..0a7740324 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalSandbox.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalSandbox.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentPaypalSandbox.Builder.class) public final class CreateConnectionRequestContentPaypalSandbox implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentPaypalSandbox implements ICreat private final Map additionalProperties; private CreateConnectionRequestContentPaypalSandbox( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentPaypalSandbox( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentPaypalSandbox other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentPaypalSandboxStrategy strategy); + + Builder from(CreateConnectionRequestContentPaypalSandbox other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentPaypalSandboxStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentPaypalSandbox other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentPaypalSandboxStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentPaypalSandbox build() { return new CreateConnectionRequestContentPaypalSandbox( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPingFederate.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPingFederate.java index b0b92814c..06b74b3a9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPingFederate.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPingFederate.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentPingFederate.Builder.class) public final class CreateConnectionRequestContentPingFederate implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -42,7 +42,7 @@ public final class CreateConnectionRequestContentPingFederate implements ICreate private final Map additionalProperties; private CreateConnectionRequestContentPingFederate( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -64,7 +64,7 @@ private CreateConnectionRequestContentPingFederate( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -151,18 +151,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentPingFederate other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentPingFederateStrategy strategy); + + Builder from(CreateConnectionRequestContentPingFederate other); } public interface _FinalStage { @@ -172,6 +168,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -201,9 +201,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentPingFederateStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -218,6 +216,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -236,13 +236,6 @@ public Builder from(CreateConnectionRequestContentPingFederate other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentPingFederateStrategy strategy) { @@ -335,6 +328,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentPingFederate build() { return new CreateConnectionRequestContentPingFederate( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPlanningCenter.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPlanningCenter.java index d25f7e56d..48cc7285a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPlanningCenter.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPlanningCenter.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentPlanningCenter.Builder.class) public final class CreateConnectionRequestContentPlanningCenter implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentPlanningCenter implements ICrea private final Map additionalProperties; private CreateConnectionRequestContentPlanningCenter( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentPlanningCenter( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentPlanningCenter other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentPlanningCenterStrategy strategy); + + Builder from(CreateConnectionRequestContentPlanningCenter other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentPlanningCenterStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentPlanningCenter other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentPlanningCenterStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentPlanningCenter build() { return new CreateConnectionRequestContentPlanningCenter( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforce.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforce.java index 39fa56d00..a1c56b282 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforce.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforce.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentSalesforce.Builder.class) public final class CreateConnectionRequestContentSalesforce implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentSalesforce implements ICreateCo private final Map additionalProperties; private CreateConnectionRequestContentSalesforce( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentSalesforce( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentSalesforce other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentSalesforceStrategy strategy); + + Builder from(CreateConnectionRequestContentSalesforce other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentSalesforceStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentSalesforce other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentSalesforceStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentSalesforce build() { return new CreateConnectionRequestContentSalesforce( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceCommunity.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceCommunity.java index 8e721e5db..d7b9b4e8c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceCommunity.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceCommunity.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentSalesforceCommunity.Builder.class) public final class CreateConnectionRequestContentSalesforceCommunity implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentSalesforceCommunity implements private final Map additionalProperties; private CreateConnectionRequestContentSalesforceCommunity( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentSalesforceCommunity( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentSalesforceCommunity other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentSalesforceCommunityStrategy strategy); + + Builder from(CreateConnectionRequestContentSalesforceCommunity other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentSalesforceCommunityStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentSalesforceCommunity other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentSalesforceCommunityStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentSalesforceCommunity build() { return new CreateConnectionRequestContentSalesforceCommunity( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceSandbox.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceSandbox.java index 7b6bf4b16..77ed97a64 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceSandbox.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceSandbox.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentSalesforceSandbox.Builder.class) public final class CreateConnectionRequestContentSalesforceSandbox implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentSalesforceSandbox implements IC private final Map additionalProperties; private CreateConnectionRequestContentSalesforceSandbox( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentSalesforceSandbox( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentSalesforceSandbox other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentSalesforceSandboxStrategy strategy); + + Builder from(CreateConnectionRequestContentSalesforceSandbox other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentSalesforceSandboxStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentSalesforceSandbox other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentSalesforceSandboxStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentSalesforceSandbox build() { return new CreateConnectionRequestContentSalesforceSandbox( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSaml.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSaml.java index f0790ca25..162bc80bb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSaml.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSaml.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentSaml.Builder.class) public final class CreateConnectionRequestContentSaml implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -42,7 +42,7 @@ public final class CreateConnectionRequestContentSaml implements ICreateConnecti private final Map additionalProperties; private CreateConnectionRequestContentSaml( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -64,7 +64,7 @@ private CreateConnectionRequestContentSaml( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -151,18 +151,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentSaml other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentSamlStrategy strategy); + + Builder from(CreateConnectionRequestContentSaml other); } public interface _FinalStage { @@ -172,6 +168,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -201,9 +201,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentSamlStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -218,6 +216,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -236,13 +236,6 @@ public Builder from(CreateConnectionRequestContentSaml other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentSamlStrategy strategy) { @@ -335,6 +328,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentSaml build() { return new CreateConnectionRequestContentSaml( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSharepoint.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSharepoint.java index 4fb2214a0..d3fd94ddf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSharepoint.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSharepoint.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentSharepoint.Builder.class) public final class CreateConnectionRequestContentSharepoint implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -42,7 +42,7 @@ public final class CreateConnectionRequestContentSharepoint implements ICreateCo private final Map additionalProperties; private CreateConnectionRequestContentSharepoint( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -64,7 +64,7 @@ private CreateConnectionRequestContentSharepoint( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -151,18 +151,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentSharepoint other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentSharepointStrategy strategy); + + Builder from(CreateConnectionRequestContentSharepoint other); } public interface _FinalStage { @@ -172,6 +168,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -201,9 +201,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentSharepointStrategy strategy; private Optional showAsButton = Optional.empty(); @@ -218,6 +216,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -236,13 +236,6 @@ public Builder from(CreateConnectionRequestContentSharepoint other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentSharepointStrategy strategy) { @@ -335,6 +328,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentSharepoint build() { return new CreateConnectionRequestContentSharepoint( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShop.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShop.java index da07b6865..bb3f32381 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShop.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShop.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentShop.Builder.class) public final class CreateConnectionRequestContentShop implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentShop implements ICreateConnecti private final Map additionalProperties; private CreateConnectionRequestContentShop( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentShop( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentShop other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentShopStrategy strategy); + + Builder from(CreateConnectionRequestContentShop other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentShopStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentShop other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentShopStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentShop build() { return new CreateConnectionRequestContentShop( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopify.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopify.java index 92b0f60e3..d809763ec 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopify.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopify.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentShopify.Builder.class) public final class CreateConnectionRequestContentShopify implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentShopify implements ICreateConne private final Map additionalProperties; private CreateConnectionRequestContentShopify( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentShopify( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentShopify other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentShopifyStrategy strategy); + + Builder from(CreateConnectionRequestContentShopify other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentShopifyStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentShopify other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentShopifyStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentShopify build() { return new CreateConnectionRequestContentShopify( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSms.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSms.java index 40bd5e909..45d3359b6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSms.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSms.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentSms.Builder.class) public final class CreateConnectionRequestContentSms implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentSms implements ICreateConnectio private final Map additionalProperties; private CreateConnectionRequestContentSms( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentSms( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -139,18 +139,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentSms other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentSmsStrategy strategy); + + Builder from(CreateConnectionRequestContentSms other); } public interface _FinalStage { @@ -160,6 +156,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -185,9 +185,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentSmsStrategy strategy; private Optional options = Optional.empty(); @@ -200,6 +198,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -217,13 +217,6 @@ public Builder from(CreateConnectionRequestContentSms other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentSmsStrategy strategy) { @@ -303,6 +296,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentSms build() { return new CreateConnectionRequestContentSms( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSoundcloud.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSoundcloud.java index b673c6407..cab7a9db6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSoundcloud.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSoundcloud.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentSoundcloud.Builder.class) public final class CreateConnectionRequestContentSoundcloud implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentSoundcloud implements ICreateCo private final Map additionalProperties; private CreateConnectionRequestContentSoundcloud( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentSoundcloud( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentSoundcloud other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentSoundcloudStrategy strategy); + + Builder from(CreateConnectionRequestContentSoundcloud other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentSoundcloudStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentSoundcloud other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentSoundcloudStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentSoundcloud build() { return new CreateConnectionRequestContentSoundcloud( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentThirtySevenSignals.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentThirtySevenSignals.java index 7cb2d3194..17dca9a13 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentThirtySevenSignals.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentThirtySevenSignals.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentThirtySevenSignals.Builder.class) public final class CreateConnectionRequestContentThirtySevenSignals implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentThirtySevenSignals implements I private final Map additionalProperties; private CreateConnectionRequestContentThirtySevenSignals( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentThirtySevenSignals( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentThirtySevenSignals other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentThirtySevenSignalsStrategy strategy); + + Builder from(CreateConnectionRequestContentThirtySevenSignals other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentThirtySevenSignalsStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentThirtySevenSignals other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentThirtySevenSignalsStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentThirtySevenSignals build() { return new CreateConnectionRequestContentThirtySevenSignals( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentTwitter.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentTwitter.java index 498ce34dc..df64ef951 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentTwitter.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentTwitter.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentTwitter.Builder.class) public final class CreateConnectionRequestContentTwitter implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentTwitter implements ICreateConne private final Map additionalProperties; private CreateConnectionRequestContentTwitter( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentTwitter( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentTwitter other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentTwitterStrategy strategy); + + Builder from(CreateConnectionRequestContentTwitter other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentTwitterStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentTwitter other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentTwitterStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentTwitter build() { return new CreateConnectionRequestContentTwitter( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentUntappd.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentUntappd.java index ef2e9a3ce..b84d99db2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentUntappd.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentUntappd.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentUntappd.Builder.class) public final class CreateConnectionRequestContentUntappd implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentUntappd implements ICreateConne private final Map additionalProperties; private CreateConnectionRequestContentUntappd( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentUntappd( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentUntappd other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentUntappdStrategy strategy); + + Builder from(CreateConnectionRequestContentUntappd other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentUntappdStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentUntappd other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentUntappdStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentUntappd build() { return new CreateConnectionRequestContentUntappd( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentVkontakte.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentVkontakte.java index ea45dc8c3..efba62d13 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentVkontakte.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentVkontakte.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentVkontakte.Builder.class) public final class CreateConnectionRequestContentVkontakte implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentVkontakte implements ICreateCon private final Map additionalProperties; private CreateConnectionRequestContentVkontakte( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentVkontakte( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentVkontakte other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentVkontakteStrategy strategy); + + Builder from(CreateConnectionRequestContentVkontakte other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentVkontakteStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentVkontakte other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentVkontakteStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentVkontakte build() { return new CreateConnectionRequestContentVkontakte( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWeibo.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWeibo.java index 99f8a3bec..171a4ae0c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWeibo.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWeibo.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentWeibo.Builder.class) public final class CreateConnectionRequestContentWeibo implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentWeibo implements ICreateConnect private final Map additionalProperties; private CreateConnectionRequestContentWeibo( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentWeibo( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentWeibo other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentWeiboStrategy strategy); + + Builder from(CreateConnectionRequestContentWeibo other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentWeiboStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentWeibo other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentWeiboStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentWeibo build() { return new CreateConnectionRequestContentWeibo( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWindowsLive.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWindowsLive.java index 4fb6518ed..5165f21e8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWindowsLive.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWindowsLive.java @@ -27,7 +27,7 @@ public final class CreateConnectionRequestContentWindowsLive implements IConnect private final Optional connectedAccounts; - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -46,7 +46,7 @@ public final class CreateConnectionRequestContentWindowsLive implements IConnect private CreateConnectionRequestContentWindowsLive( Optional authentication, Optional connectedAccounts, - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -80,7 +80,7 @@ public Optional getConnectedAccounts() { @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -164,18 +164,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentWindowsLive other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentWindowsLiveStrategy strategy); + + Builder from(CreateConnectionRequestContentWindowsLive other); } public interface _FinalStage { @@ -193,6 +189,10 @@ public interface _FinalStage { _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -218,9 +218,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentWindowsLiveStrategy strategy; private Optional options = Optional.empty(); @@ -233,6 +231,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + private Optional connectedAccounts = Optional.empty(); private Optional authentication = Optional.empty(); @@ -256,13 +256,6 @@ public Builder from(CreateConnectionRequestContentWindowsLive other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentWindowsLiveStrategy strategy) { @@ -342,6 +335,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { this.connectedAccounts = Optional.ofNullable(connectedAccounts); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWordpress.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWordpress.java index 2099ee797..f98d6f672 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWordpress.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWordpress.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentWordpress.Builder.class) public final class CreateConnectionRequestContentWordpress implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentWordpress implements ICreateCon private final Map additionalProperties; private CreateConnectionRequestContentWordpress( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentWordpress( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentWordpress other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentWordpressStrategy strategy); + + Builder from(CreateConnectionRequestContentWordpress other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentWordpressStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentWordpress other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentWordpressStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentWordpress build() { return new CreateConnectionRequestContentWordpress( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYahoo.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYahoo.java index 97dbeb61b..6b44031da 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYahoo.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYahoo.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentYahoo.Builder.class) public final class CreateConnectionRequestContentYahoo implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentYahoo implements ICreateConnect private final Map additionalProperties; private CreateConnectionRequestContentYahoo( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentYahoo( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentYahoo other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentYahooStrategy strategy); + + Builder from(CreateConnectionRequestContentYahoo other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentYahooStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentYahoo other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentYahooStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentYahoo build() { return new CreateConnectionRequestContentYahoo( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYandex.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYandex.java index 092de700a..377fce462 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYandex.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYandex.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentYandex.Builder.class) public final class CreateConnectionRequestContentYandex implements ICreateConnectionCommon { - private final String name; + private final Optional name; private final Optional> enabledClients; @@ -40,7 +40,7 @@ public final class CreateConnectionRequestContentYandex implements ICreateConnec private final Map additionalProperties; private CreateConnectionRequestContentYandex( - String name, + Optional name, Optional> enabledClients, Optional displayName, Optional isDomainConnection, @@ -60,7 +60,7 @@ private CreateConnectionRequestContentYandex( @JsonProperty("name") @java.lang.Override - public String getName() { + public Optional getName() { return name; } @@ -140,18 +140,14 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static StrategyStage builder() { return new Builder(); } - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentYandex other); - } - public interface StrategyStage { _FinalStage strategy(@NotNull CreateConnectionRequestContentYandexStrategy strategy); + + Builder from(CreateConnectionRequestContentYandex other); } public interface _FinalStage { @@ -161,6 +157,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage name(Optional name); + + _FinalStage name(String name); + /** *

Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

*/ @@ -186,9 +186,7 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - + public static final class Builder implements StrategyStage, _FinalStage { private CreateConnectionRequestContentYandexStrategy strategy; private Optional options = Optional.empty(); @@ -201,6 +199,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional> enabledClients = Optional.empty(); + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -218,13 +218,6 @@ public Builder from(CreateConnectionRequestContentYandex other) { return this; } - @java.lang.Override - @JsonSetter("name") - public StrategyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - @java.lang.Override @JsonSetter("strategy") public _FinalStage strategy(@NotNull CreateConnectionRequestContentYandexStrategy strategy) { @@ -304,6 +297,19 @@ public _FinalStage enabledClients(Optional> enabledClients) { return this; } + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public CreateConnectionRequestContentYandex build() { return new CreateConnectionRequestContentYandex( diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyType.java b/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyType.java index 8391b512d..c46cf4c01 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyType.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyType.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class CreateEncryptionKeyType { - public static final CreateEncryptionKeyType CUSTOMER_PROVIDED_ROOT_KEY = - new CreateEncryptionKeyType(Value.CUSTOMER_PROVIDED_ROOT_KEY, "customer-provided-root-key"); - public static final CreateEncryptionKeyType TENANT_ENCRYPTION_KEY = new CreateEncryptionKeyType(Value.TENANT_ENCRYPTION_KEY, "tenant-encryption-key"); + public static final CreateEncryptionKeyType CUSTOMER_PROVIDED_ROOT_KEY = + new CreateEncryptionKeyType(Value.CUSTOMER_PROVIDED_ROOT_KEY, "customer-provided-root-key"); + private final Value value; private final String string; @@ -46,10 +46,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case CUSTOMER_PROVIDED_ROOT_KEY: - return visitor.visitCustomerProvidedRootKey(); case TENANT_ENCRYPTION_KEY: return visitor.visitTenantEncryptionKey(); + case CUSTOMER_PROVIDED_ROOT_KEY: + return visitor.visitCustomerProvidedRootKey(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -59,10 +59,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static CreateEncryptionKeyType valueOf(String value) { switch (value) { - case "customer-provided-root-key": - return CUSTOMER_PROVIDED_ROOT_KEY; case "tenant-encryption-key": return TENANT_ENCRYPTION_KEY; + case "customer-provided-root-key": + return CUSTOMER_PROVIDED_ROOT_KEY; default: return new CreateEncryptionKeyType(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaign.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaign.java index ce2e7f0ad..afd937fc4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaign.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaign.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionActivecampaign.Deserializer.class) @@ -84,15 +85,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionActivecampaignApiKey.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionActivecampaignUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionActivecampaignUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtable.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtable.java index c168ea6e1..c632fb16a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtable.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtable.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionAirtable.Deserializer.class) @@ -83,15 +84,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionAirtableApiKey.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionAirtableUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionAirtableUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0.java index 4aaa10e63..a037cd655 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionAuth0.Deserializer.class) @@ -82,14 +83,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionAuth0OauthApp.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionAuth0Uninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionAuth0Uninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigquery.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigquery.java index 41d28befc..4b80efae1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigquery.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigquery.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionBigquery.Deserializer.class) @@ -83,14 +84,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionBigqueryJwt.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionBigqueryUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionBigqueryUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbit.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbit.java index 0cdf09707..87e72570a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbit.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbit.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionClearbit.Deserializer.class) @@ -83,15 +84,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionClearbitApiKey.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionClearbitUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionClearbitUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusign.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusign.java index d8b9140c8..eca6a3630 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusign.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusign.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionDocusign.Deserializer.class) @@ -83,15 +84,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionDocusignOauthCode.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionDocusignUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionDocusignUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheets.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheets.java index 81394a333..265ba8a72 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheets.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheets.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionGoogleSheets.Deserializer.class) @@ -83,15 +84,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionGoogleSheetsOauthCode.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionGoogleSheetsUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionGoogleSheetsUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttp.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttp.java index 40158b1f9..a7fc293d4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttp.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttp.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionHttp.Deserializer.class) @@ -106,27 +107,54 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionHttpBearer.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionHttpBasicAuth.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionHttpBasicAuth.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionHttpApiKey.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionHttpApiKey.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionHttpOauthClientCredentials.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionHttpOauthClientCredentials.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionHttpUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionHttpUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspot.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspot.java index c70dfcdce..8cfe16d0a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspot.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspot.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionHubspot.Deserializer.class) @@ -90,19 +91,34 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionHubspotApiKey.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionHubspotOauthCode.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionHubspotOauthCode.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionHubspotUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionHubspotUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwt.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwt.java index e1d3316b2..9ae738a9f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwt.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwt.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionJwt.Deserializer.class) @@ -82,14 +83,23 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionJwtJwt.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionJwtUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionJwtUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimp.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimp.java index 6d9afed3f..672ecba8d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimp.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimp.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionMailchimp.Deserializer.class) @@ -91,20 +92,34 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionMailchimpApiKey.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionMailchimpOauthCode.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionMailchimpOauthCode.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionMailchimpUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionMailchimpUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjet.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjet.java index 194d1a74b..cd1a61473 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjet.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjet.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionMailjet.Deserializer.class) @@ -82,14 +83,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionMailjetApiKey.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionMailjetUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionMailjetUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedrive.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedrive.java index d8e1fc244..841e32df9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedrive.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedrive.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionPipedrive.Deserializer.class) @@ -91,20 +92,34 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionPipedriveToken.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionPipedriveOauthCode.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionPipedriveOauthCode.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionPipedriveUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionPipedriveUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforce.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforce.java index 4d6944097..f12a1f0e3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforce.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforce.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionSalesforce.Deserializer.class) @@ -83,15 +84,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionSalesforceOauthCode.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionSalesforceUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionSalesforceUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgrid.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgrid.java index b43c88c1e..5cc1bc2fa 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgrid.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgrid.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionSendgrid.Deserializer.class) @@ -83,15 +84,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionSendgridApiKey.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionSendgridUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionSendgridUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlack.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlack.java index dc95884d2..e3b822da6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlack.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlack.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionSlack.Deserializer.class) @@ -90,19 +91,34 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionSlackWebhook.class)); + } catch (RuntimeException e) { + } } - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionSlackOauthCode.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionSlackOauthCode.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionSlackUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionSlackUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripe.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripe.java index 3ee830644..bbe0acd06 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripe.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripe.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionStripe.Deserializer.class) @@ -90,19 +91,34 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionStripeKeyPair.class)); + } catch (RuntimeException e) { + } } - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionStripeOauthCode.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionStripeOauthCode.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionStripeUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionStripeUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegram.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegram.java index 25b120da9..8eb3d7c02 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegram.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegram.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionTelegram.Deserializer.class) @@ -83,14 +84,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionTelegramToken.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionTelegramUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionTelegramUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilio.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilio.java index 30aa978a6..30d0b2689 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilio.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilio.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionTwilio.Deserializer.class) @@ -82,14 +83,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionTwilioApiKey.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionTwilioUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionTwilioUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsapp.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsapp.java index 0dad15a03..bfe49b9bd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsapp.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsapp.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionWhatsapp.Deserializer.class) @@ -83,14 +84,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionWhatsappToken.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionWhatsappUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionWhatsappUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapier.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapier.java index 9d713daed..e8da36a34 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapier.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapier.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateFlowsVaultConnectionZapier.Deserializer.class) @@ -82,14 +83,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id") + && ((Map) value).containsKey("setup")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionZapierWebhook.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionZapierUninitialized.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("app_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateFlowsVaultConnectionZapierUninitialized.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamRequestContent.java index 00e507c5d..da4f04ad1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamRequestContent.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = CreateLogStreamRequestContent.Deserializer.class) @@ -130,37 +131,70 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("sink")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamHttpRequestBody.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamEventBridgeRequestBody.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("sink")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamEventBridgeRequestBody.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamEventGridRequestBody.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("sink")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamEventGridRequestBody.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamDatadogRequestBody.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("sink")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamDatadogRequestBody.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamSplunkRequestBody.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("sink")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamSplunkRequestBody.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamSumoRequestBody.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("sink")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamSumoRequestBody.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamSegmentRequestBody.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("sink")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamSegmentRequestBody.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamMixpanelRequestBody.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("sink")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamMixpanelRequestBody.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java index 9094ba60a..587901736 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java @@ -57,6 +57,8 @@ public final class CreateResourceServerRequestContent { private final Optional subjectTypeAuthorization; + private final OptionalNullable authorizationPolicy; + private final Map additionalProperties; private CreateResourceServerRequestContent( @@ -76,6 +78,7 @@ private CreateResourceServerRequestContent( OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, + OptionalNullable authorizationPolicy, Map additionalProperties) { this.name = name; this.identifier = identifier; @@ -93,6 +96,7 @@ private CreateResourceServerRequestContent( this.authorizationDetails = authorizationDetails; this.proofOfPossession = proofOfPossession; this.subjectTypeAuthorization = subjectTypeAuthorization; + this.authorizationPolicy = authorizationPolicy; this.additionalProperties = additionalProperties; } @@ -219,6 +223,15 @@ public Optional getSubjectTypeAuthorizat return subjectTypeAuthorization; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + public OptionalNullable getAuthorizationPolicy() { + if (authorizationPolicy == null) { + return OptionalNullable.absent(); + } + return authorizationPolicy; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") private OptionalNullable _getTokenEncryption() { @@ -243,6 +256,12 @@ private OptionalNullable _getProofOfPossession( return proofOfPossession; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + private OptionalNullable _getAuthorizationPolicy() { + return authorizationPolicy; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -271,7 +290,8 @@ private boolean equalTo(CreateResourceServerRequestContent other) { && consentPolicy.equals(other.consentPolicy) && authorizationDetails.equals(other.authorizationDetails) && proofOfPossession.equals(other.proofOfPossession) - && subjectTypeAuthorization.equals(other.subjectTypeAuthorization); + && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) + && authorizationPolicy.equals(other.authorizationPolicy); } @java.lang.Override @@ -292,7 +312,8 @@ public int hashCode() { this.consentPolicy, this.authorizationDetails, this.proofOfPossession, - this.subjectTypeAuthorization); + this.subjectTypeAuthorization, + this.authorizationPolicy); } @java.lang.Override @@ -421,12 +442,24 @@ _FinalStage proofOfPossession( _FinalStage subjectTypeAuthorization(Optional subjectTypeAuthorization); _FinalStage subjectTypeAuthorization(ResourceServerSubjectTypeAuthorization subjectTypeAuthorization); + + _FinalStage authorizationPolicy( + @Nullable OptionalNullable authorizationPolicy); + + _FinalStage authorizationPolicy(ResourceServerAuthorizationPolicy authorizationPolicy); + + _FinalStage authorizationPolicy(Optional authorizationPolicy); + + _FinalStage authorizationPolicy( + com.auth0.client.mgmt.core.Nullable authorizationPolicy); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements IdentifierStage, _FinalStage { private String identifier; + private OptionalNullable authorizationPolicy = OptionalNullable.absent(); + private Optional subjectTypeAuthorization = Optional.empty(); private OptionalNullable proofOfPossession = OptionalNullable.absent(); @@ -480,6 +513,7 @@ public Builder from(CreateResourceServerRequestContent other) { authorizationDetails(other.getAuthorizationDetails()); proofOfPossession(other.getProofOfPossession()); subjectTypeAuthorization(other.getSubjectTypeAuthorization()); + authorizationPolicy(other.getAuthorizationPolicy()); return this; } @@ -495,6 +529,43 @@ public _FinalStage identifier(@NotNull String identifier) { return this; } + @java.lang.Override + public _FinalStage authorizationPolicy( + com.auth0.client.mgmt.core.Nullable authorizationPolicy) { + if (authorizationPolicy.isNull()) { + this.authorizationPolicy = OptionalNullable.ofNull(); + } else if (authorizationPolicy.isEmpty()) { + this.authorizationPolicy = OptionalNullable.absent(); + } else { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage authorizationPolicy(Optional authorizationPolicy) { + if (authorizationPolicy.isPresent()) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } else { + this.authorizationPolicy = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage authorizationPolicy(ResourceServerAuthorizationPolicy authorizationPolicy) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authorization_policy", nulls = Nulls.SKIP) + public _FinalStage authorizationPolicy( + @Nullable OptionalNullable authorizationPolicy) { + this.authorizationPolicy = authorizationPolicy; + return this; + } + @java.lang.Override public _FinalStage subjectTypeAuthorization(ResourceServerSubjectTypeAuthorization subjectTypeAuthorization) { this.subjectTypeAuthorization = Optional.ofNullable(subjectTypeAuthorization); @@ -862,6 +933,7 @@ public CreateResourceServerRequestContent build() { authorizationDetails, proofOfPossession, subjectTypeAuthorization, + authorizationPolicy, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java index 47335c692..b289e5d98 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java @@ -62,6 +62,8 @@ public final class CreateResourceServerResponseContent { private final Optional subjectTypeAuthorization; + private final OptionalNullable authorizationPolicy; + private final Optional clientId; private final Map additionalProperties; @@ -86,6 +88,7 @@ private CreateResourceServerResponseContent( OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, + OptionalNullable authorizationPolicy, Optional clientId, Map additionalProperties) { this.id = id; @@ -107,6 +110,7 @@ private CreateResourceServerResponseContent( this.authorizationDetails = authorizationDetails; this.proofOfPossession = proofOfPossession; this.subjectTypeAuthorization = subjectTypeAuthorization; + this.authorizationPolicy = authorizationPolicy; this.clientId = clientId; this.additionalProperties = additionalProperties; } @@ -258,6 +262,15 @@ public Optional getSubjectTypeAuthorizat return subjectTypeAuthorization; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + public OptionalNullable getAuthorizationPolicy() { + if (authorizationPolicy == null) { + return OptionalNullable.absent(); + } + return authorizationPolicy; + } + /** * @return The client ID of the client that this resource server is linked to */ @@ -290,6 +303,12 @@ private OptionalNullable _getProofOfPossession( return proofOfPossession; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + private OptionalNullable _getAuthorizationPolicy() { + return authorizationPolicy; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -322,6 +341,7 @@ private boolean equalTo(CreateResourceServerResponseContent other) { && authorizationDetails.equals(other.authorizationDetails) && proofOfPossession.equals(other.proofOfPossession) && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) + && authorizationPolicy.equals(other.authorizationPolicy) && clientId.equals(other.clientId); } @@ -347,6 +367,7 @@ public int hashCode() { this.authorizationDetails, this.proofOfPossession, this.subjectTypeAuthorization, + this.authorizationPolicy, this.clientId); } @@ -399,6 +420,8 @@ public static final class Builder { private Optional subjectTypeAuthorization = Optional.empty(); + private OptionalNullable authorizationPolicy = OptionalNullable.absent(); + private Optional clientId = Optional.empty(); @JsonAnySetter @@ -426,6 +449,7 @@ public Builder from(CreateResourceServerResponseContent other) { authorizationDetails(other.getAuthorizationDetails()); proofOfPossession(other.getProofOfPossession()); subjectTypeAuthorization(other.getSubjectTypeAuthorization()); + authorizationPolicy(other.getAuthorizationPolicy()); clientId(other.getClientId()); return this; } @@ -762,6 +786,39 @@ public Builder subjectTypeAuthorization(ResourceServerSubjectTypeAuthorization s return this; } + @JsonSetter(value = "authorization_policy", nulls = Nulls.SKIP) + public Builder authorizationPolicy( + @Nullable OptionalNullable authorizationPolicy) { + this.authorizationPolicy = authorizationPolicy; + return this; + } + + public Builder authorizationPolicy(ResourceServerAuthorizationPolicy authorizationPolicy) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy); + return this; + } + + public Builder authorizationPolicy(Optional authorizationPolicy) { + if (authorizationPolicy.isPresent()) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } else { + this.authorizationPolicy = OptionalNullable.absent(); + } + return this; + } + + public Builder authorizationPolicy( + com.auth0.client.mgmt.core.Nullable authorizationPolicy) { + if (authorizationPolicy.isNull()) { + this.authorizationPolicy = OptionalNullable.ofNull(); + } else if (authorizationPolicy.isEmpty()) { + this.authorizationPolicy = OptionalNullable.absent(); + } else { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } + return this; + } + /** *

The client ID of the client that this resource server is linked to

*/ @@ -797,6 +854,7 @@ public CreateResourceServerResponseContent build() { authorizationDetails, proofOfPossession, subjectTypeAuthorization, + authorizationPolicy, clientId, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileRequestContent.java index 3240bf39a..2283ca8f3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileRequestContent.java @@ -75,7 +75,7 @@ public Optional getBranding() { } /** - * @return List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate] + * @return List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate] */ @JsonProperty("allowed_strategies") public Optional> getAllowedStrategies() { @@ -83,7 +83,7 @@ public Optional> getAllowedStrategie } /** - * @return List of attributes to be mapped that will be shown to the user during the SS-SSO flow. + * @return List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow. */ @JsonProperty("user_attributes") public Optional> getUserAttributes() { @@ -167,14 +167,14 @@ public interface _FinalStage { _FinalStage branding(SelfServiceProfileBrandingProperties branding); /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

+ *

List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

*/ _FinalStage allowedStrategies(Optional> allowedStrategies); _FinalStage allowedStrategies(List allowedStrategies); /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

+ *

List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow.

*/ _FinalStage userAttributes(Optional> userAttributes); @@ -251,7 +251,7 @@ public _FinalStage userAttributeProfileId(Optional userAttributeProfileI } /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

+ *

List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -261,7 +261,7 @@ public _FinalStage userAttributes(List userAttr } /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

+ *

List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow.

*/ @java.lang.Override @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) @@ -271,7 +271,7 @@ public _FinalStage userAttributes(Optional } /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

+ *

List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -281,7 +281,7 @@ public _FinalStage allowedStrategies(List } /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

+ *

List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

*/ @java.lang.Override @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileResponseContent.java index e74ef8105..601adca7a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileResponseContent.java @@ -90,7 +90,7 @@ public Optional getDescription() { } /** - * @return List of attributes to be mapped that will be shown to the user during the SS-SSO flow. + * @return List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow. */ @JsonProperty("user_attributes") public Optional> getUserAttributes() { @@ -119,7 +119,7 @@ public Optional getBranding() { } /** - * @return List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate] + * @return List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate] */ @JsonProperty("allowed_strategies") public Optional> getAllowedStrategies() { @@ -262,7 +262,7 @@ public Builder description(String description) { } /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

+ *

List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow.

*/ @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) public Builder userAttributes(Optional> userAttributes) { @@ -315,7 +315,7 @@ public Builder branding(SelfServiceProfileBrandingProperties branding) { } /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

+ *

List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

*/ @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) public Builder allowedStrategies(Optional> allowedStrategies) { diff --git a/src/main/java/com/auth0/client/mgmt/types/CreatedAuthenticationMethodTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/CreatedAuthenticationMethodTypeEnum.java index 06f30e70d..61170a4ba 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreatedAuthenticationMethodTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreatedAuthenticationMethodTypeEnum.java @@ -13,12 +13,12 @@ public final class CreatedAuthenticationMethodTypeEnum { public static final CreatedAuthenticationMethodTypeEnum TOTP = new CreatedAuthenticationMethodTypeEnum(Value.TOTP, "totp"); - public static final CreatedAuthenticationMethodTypeEnum PHONE = - new CreatedAuthenticationMethodTypeEnum(Value.PHONE, "phone"); - public static final CreatedAuthenticationMethodTypeEnum WEBAUTHN_ROAMING = new CreatedAuthenticationMethodTypeEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); + public static final CreatedAuthenticationMethodTypeEnum PHONE = + new CreatedAuthenticationMethodTypeEnum(Value.PHONE, "phone"); + private final Value value; private final String string; @@ -56,10 +56,10 @@ public T visit(Visitor visitor) { return visitor.visitEmail(); case TOTP: return visitor.visitTotp(); - case PHONE: - return visitor.visitPhone(); case WEBAUTHN_ROAMING: return visitor.visitWebauthnRoaming(); + case PHONE: + return visitor.visitPhone(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -73,10 +73,10 @@ public static CreatedAuthenticationMethodTypeEnum valueOf(String value) { return EMAIL; case "totp": return TOTP; - case "phone": - return PHONE; case "webauthn-roaming": return WEBAUTHN_ROAMING; + case "phone": + return PHONE; default: return new CreatedAuthenticationMethodTypeEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreatedUserAuthenticationMethodTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/CreatedUserAuthenticationMethodTypeEnum.java index 2cb6a0feb..b556e72f2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreatedUserAuthenticationMethodTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreatedUserAuthenticationMethodTypeEnum.java @@ -13,15 +13,15 @@ public final class CreatedUserAuthenticationMethodTypeEnum { public static final CreatedUserAuthenticationMethodTypeEnum TOTP = new CreatedUserAuthenticationMethodTypeEnum(Value.TOTP, "totp"); + public static final CreatedUserAuthenticationMethodTypeEnum WEBAUTHN_ROAMING = + new CreatedUserAuthenticationMethodTypeEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); + public static final CreatedUserAuthenticationMethodTypeEnum PASSKEY = new CreatedUserAuthenticationMethodTypeEnum(Value.PASSKEY, "passkey"); public static final CreatedUserAuthenticationMethodTypeEnum PHONE = new CreatedUserAuthenticationMethodTypeEnum(Value.PHONE, "phone"); - public static final CreatedUserAuthenticationMethodTypeEnum WEBAUTHN_ROAMING = - new CreatedUserAuthenticationMethodTypeEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); - private final Value value; private final String string; @@ -59,12 +59,12 @@ public T visit(Visitor visitor) { return visitor.visitEmail(); case TOTP: return visitor.visitTotp(); + case WEBAUTHN_ROAMING: + return visitor.visitWebauthnRoaming(); case PASSKEY: return visitor.visitPasskey(); case PHONE: return visitor.visitPhone(); - case WEBAUTHN_ROAMING: - return visitor.visitWebauthnRoaming(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -78,12 +78,12 @@ public static CreatedUserAuthenticationMethodTypeEnum valueOf(String value) { return EMAIL; case "totp": return TOTP; + case "webauthn-roaming": + return WEBAUTHN_ROAMING; case "passkey": return PASSKEY; case "phone": return PHONE; - case "webauthn-roaming": - return WEBAUTHN_ROAMING; default: return new CreatedUserAuthenticationMethodTypeEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomDomainCustomClientIpHeaderEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomDomainCustomClientIpHeaderEnum.java index 0325fd72d..cb192f918 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CustomDomainCustomClientIpHeaderEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/CustomDomainCustomClientIpHeaderEnum.java @@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class CustomDomainCustomClientIpHeaderEnum { + public static final CustomDomainCustomClientIpHeaderEnum X_FORWARDED_FOR = + new CustomDomainCustomClientIpHeaderEnum(Value.X_FORWARDED_FOR, "x-forwarded-for"); + public static final CustomDomainCustomClientIpHeaderEnum TRUE_CLIENT_IP = new CustomDomainCustomClientIpHeaderEnum(Value.TRUE_CLIENT_IP, "true-client-ip"); @@ -16,9 +19,6 @@ public final class CustomDomainCustomClientIpHeaderEnum { public static final CustomDomainCustomClientIpHeaderEnum EMPTY = new CustomDomainCustomClientIpHeaderEnum(Value.EMPTY, ""); - public static final CustomDomainCustomClientIpHeaderEnum X_FORWARDED_FOR = - new CustomDomainCustomClientIpHeaderEnum(Value.X_FORWARDED_FOR, "x-forwarded-for"); - public static final CustomDomainCustomClientIpHeaderEnum CF_CONNECTING_IP = new CustomDomainCustomClientIpHeaderEnum(Value.CF_CONNECTING_IP, "cf-connecting-ip"); @@ -55,14 +55,14 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case X_FORWARDED_FOR: + return visitor.visitXForwardedFor(); case TRUE_CLIENT_IP: return visitor.visitTrueClientIp(); case X_AZURE_CLIENTIP: return visitor.visitXAzureClientip(); case EMPTY: return visitor.visitEmpty(); - case X_FORWARDED_FOR: - return visitor.visitXForwardedFor(); case CF_CONNECTING_IP: return visitor.visitCfConnectingIp(); case UNKNOWN: @@ -74,14 +74,14 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static CustomDomainCustomClientIpHeaderEnum valueOf(String value) { switch (value) { + case "x-forwarded-for": + return X_FORWARDED_FOR; case "true-client-ip": return TRUE_CLIENT_IP; case "x-azure-clientip": return X_AZURE_CLIENTIP; case "": return EMPTY; - case "x-forwarded-for": - return X_FORWARDED_FOR; case "cf-connecting-ip": return CF_CONNECTING_IP; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomDomainStatusFilterEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomDomainStatusFilterEnum.java index d2ca162d6..07a986080 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CustomDomainStatusFilterEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/CustomDomainStatusFilterEnum.java @@ -9,11 +9,11 @@ public final class CustomDomainStatusFilterEnum { public static final CustomDomainStatusFilterEnum FAILED = new CustomDomainStatusFilterEnum(Value.FAILED, "failed"); - public static final CustomDomainStatusFilterEnum READY = new CustomDomainStatusFilterEnum(Value.READY, "ready"); - public static final CustomDomainStatusFilterEnum PENDING_VERIFICATION = new CustomDomainStatusFilterEnum(Value.PENDING_VERIFICATION, "pending_verification"); + public static final CustomDomainStatusFilterEnum READY = new CustomDomainStatusFilterEnum(Value.READY, "ready"); + private final Value value; private final String string; @@ -49,10 +49,10 @@ public T visit(Visitor visitor) { switch (value) { case FAILED: return visitor.visitFailed(); - case READY: - return visitor.visitReady(); case PENDING_VERIFICATION: return visitor.visitPendingVerification(); + case READY: + return visitor.visitReady(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -64,10 +64,10 @@ public static CustomDomainStatusFilterEnum valueOf(String value) { switch (value) { case "failed": return FAILED; - case "ready": - return READY; case "pending_verification": return PENDING_VERIFICATION; + case "ready": + return READY; default: return new CustomDomainStatusFilterEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyAlgorithmEnum.java index e9709e539..ba9fed921 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyAlgorithmEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyAlgorithmEnum.java @@ -9,22 +9,22 @@ public final class CustomSigningKeyAlgorithmEnum { public static final CustomSigningKeyAlgorithmEnum RS512 = new CustomSigningKeyAlgorithmEnum(Value.RS512, "RS512"); - public static final CustomSigningKeyAlgorithmEnum ES256 = new CustomSigningKeyAlgorithmEnum(Value.ES256, "ES256"); - - public static final CustomSigningKeyAlgorithmEnum PS256 = new CustomSigningKeyAlgorithmEnum(Value.PS256, "PS256"); - public static final CustomSigningKeyAlgorithmEnum ES384 = new CustomSigningKeyAlgorithmEnum(Value.ES384, "ES384"); public static final CustomSigningKeyAlgorithmEnum PS384 = new CustomSigningKeyAlgorithmEnum(Value.PS384, "PS384"); - public static final CustomSigningKeyAlgorithmEnum ES512 = new CustomSigningKeyAlgorithmEnum(Value.ES512, "ES512"); + public static final CustomSigningKeyAlgorithmEnum ES256 = new CustomSigningKeyAlgorithmEnum(Value.ES256, "ES256"); + + public static final CustomSigningKeyAlgorithmEnum PS256 = new CustomSigningKeyAlgorithmEnum(Value.PS256, "PS256"); public static final CustomSigningKeyAlgorithmEnum PS512 = new CustomSigningKeyAlgorithmEnum(Value.PS512, "PS512"); - public static final CustomSigningKeyAlgorithmEnum RS256 = new CustomSigningKeyAlgorithmEnum(Value.RS256, "RS256"); + public static final CustomSigningKeyAlgorithmEnum ES512 = new CustomSigningKeyAlgorithmEnum(Value.ES512, "ES512"); public static final CustomSigningKeyAlgorithmEnum RS384 = new CustomSigningKeyAlgorithmEnum(Value.RS384, "RS384"); + public static final CustomSigningKeyAlgorithmEnum RS256 = new CustomSigningKeyAlgorithmEnum(Value.RS256, "RS256"); + private final Value value; private final String string; @@ -60,22 +60,22 @@ public T visit(Visitor visitor) { switch (value) { case RS512: return visitor.visitRs512(); - case ES256: - return visitor.visitEs256(); - case PS256: - return visitor.visitPs256(); case ES384: return visitor.visitEs384(); case PS384: return visitor.visitPs384(); - case ES512: - return visitor.visitEs512(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); case PS512: return visitor.visitPs512(); - case RS256: - return visitor.visitRs256(); + case ES512: + return visitor.visitEs512(); case RS384: return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -87,22 +87,22 @@ public static CustomSigningKeyAlgorithmEnum valueOf(String value) { switch (value) { case "RS512": return RS512; - case "ES256": - return ES256; - case "PS256": - return PS256; case "ES384": return ES384; case "PS384": return PS384; - case "ES512": - return ES512; + case "ES256": + return ES256; + case "PS256": + return PS256; case "PS512": return PS512; - case "RS256": - return RS256; + case "ES512": + return ES512; case "RS384": return RS384; + case "RS256": + return RS256; default: return new CustomSigningKeyAlgorithmEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyCurveEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyCurveEnum.java index bfb12f6d9..dbaa4b3fa 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyCurveEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyCurveEnum.java @@ -9,10 +9,10 @@ public final class CustomSigningKeyCurveEnum { public static final CustomSigningKeyCurveEnum P521 = new CustomSigningKeyCurveEnum(Value.P521, "P-521"); - public static final CustomSigningKeyCurveEnum P256 = new CustomSigningKeyCurveEnum(Value.P256, "P-256"); - public static final CustomSigningKeyCurveEnum P384 = new CustomSigningKeyCurveEnum(Value.P384, "P-384"); + public static final CustomSigningKeyCurveEnum P256 = new CustomSigningKeyCurveEnum(Value.P256, "P-256"); + private final Value value; private final String string; @@ -48,10 +48,10 @@ public T visit(Visitor visitor) { switch (value) { case P521: return visitor.visitP521(); - case P256: - return visitor.visitP256(); case P384: return visitor.visitP384(); + case P256: + return visitor.visitP256(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -63,10 +63,10 @@ public static CustomSigningKeyCurveEnum valueOf(String value) { switch (value) { case "P-521": return P521; - case "P-256": - return P256; case "P-384": return P384; + case "P-256": + return P256; default: return new CustomSigningKeyCurveEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/DeviceCredentialTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/DeviceCredentialTypeEnum.java index 10fe7a1ae..9e1cb9386 100644 --- a/src/main/java/com/auth0/client/mgmt/types/DeviceCredentialTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/DeviceCredentialTypeEnum.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class DeviceCredentialTypeEnum { - public static final DeviceCredentialTypeEnum REFRESH_TOKEN = - new DeviceCredentialTypeEnum(Value.REFRESH_TOKEN, "refresh_token"); - public static final DeviceCredentialTypeEnum ROTATING_REFRESH_TOKEN = new DeviceCredentialTypeEnum(Value.ROTATING_REFRESH_TOKEN, "rotating_refresh_token"); + public static final DeviceCredentialTypeEnum REFRESH_TOKEN = + new DeviceCredentialTypeEnum(Value.REFRESH_TOKEN, "refresh_token"); + public static final DeviceCredentialTypeEnum PUBLIC_KEY = new DeviceCredentialTypeEnum(Value.PUBLIC_KEY, "public_key"); @@ -49,10 +49,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case REFRESH_TOKEN: - return visitor.visitRefreshToken(); case ROTATING_REFRESH_TOKEN: return visitor.visitRotatingRefreshToken(); + case REFRESH_TOKEN: + return visitor.visitRefreshToken(); case PUBLIC_KEY: return visitor.visitPublicKey(); case UNKNOWN: @@ -64,10 +64,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static DeviceCredentialTypeEnum valueOf(String value) { switch (value) { - case "refresh_token": - return REFRESH_TOKEN; case "rotating_refresh_token": return ROTATING_REFRESH_TOKEN; + case "refresh_token": + return REFRESH_TOKEN; case "public_key": return PUBLIC_KEY; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchema.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchema.java index 2ab98a41f..5a046cfd5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchema.java +++ b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchema.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = EmailProviderCredentialsSchema.Deserializer.class) @@ -130,9 +131,11 @@ static final class Deserializer extends StdDeserializer && ((Map) value).containsKey("api_key")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EmailProviderCredentialsSchemaZero.class)); + } catch (RuntimeException e) { + } } try { return of( diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderNameEnum.java index 750b0620d..9629a0ad0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderNameEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EmailProviderNameEnum.java @@ -13,10 +13,10 @@ public final class EmailProviderNameEnum { public static final EmailProviderNameEnum MS365 = new EmailProviderNameEnum(Value.MS365, "ms365"); - public static final EmailProviderNameEnum CUSTOM = new EmailProviderNameEnum(Value.CUSTOM, "custom"); - public static final EmailProviderNameEnum SPARKPOST = new EmailProviderNameEnum(Value.SPARKPOST, "sparkpost"); + public static final EmailProviderNameEnum CUSTOM = new EmailProviderNameEnum(Value.CUSTOM, "custom"); + public static final EmailProviderNameEnum RESEND = new EmailProviderNameEnum(Value.RESEND, "resend"); public static final EmailProviderNameEnum AZURE_CS = new EmailProviderNameEnum(Value.AZURE_CS, "azure_cs"); @@ -66,10 +66,10 @@ public T visit(Visitor visitor) { return visitor.visitSes(); case MS365: return visitor.visitMs365(); - case CUSTOM: - return visitor.visitCustom(); case SPARKPOST: return visitor.visitSparkpost(); + case CUSTOM: + return visitor.visitCustom(); case RESEND: return visitor.visitResend(); case AZURE_CS: @@ -95,10 +95,10 @@ public static EmailProviderNameEnum valueOf(String value) { return SES; case "ms365": return MS365; - case "custom": - return CUSTOM; case "sparkpost": return SPARKPOST; + case "custom": + return CUSTOM; case "resend": return RESEND; case "azure_cs": diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailTemplateNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/EmailTemplateNameEnum.java index cde3175c9..dedb45a0d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EmailTemplateNameEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EmailTemplateNameEnum.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class EmailTemplateNameEnum { - public static final EmailTemplateNameEnum RESET_EMAIL_BY_CODE = - new EmailTemplateNameEnum(Value.RESET_EMAIL_BY_CODE, "reset_email_by_code"); - public static final EmailTemplateNameEnum CHANGE_PASSWORD = new EmailTemplateNameEnum(Value.CHANGE_PASSWORD, "change_password"); + public static final EmailTemplateNameEnum RESET_EMAIL_BY_CODE = + new EmailTemplateNameEnum(Value.RESET_EMAIL_BY_CODE, "reset_email_by_code"); + public static final EmailTemplateNameEnum STOLEN_CREDENTIALS = new EmailTemplateNameEnum(Value.STOLEN_CREDENTIALS, "stolen_credentials"); @@ -28,23 +28,23 @@ public final class EmailTemplateNameEnum { public static final EmailTemplateNameEnum PASSWORD_RESET = new EmailTemplateNameEnum(Value.PASSWORD_RESET, "password_reset"); - public static final EmailTemplateNameEnum VERIFY_EMAIL = - new EmailTemplateNameEnum(Value.VERIFY_EMAIL, "verify_email"); - public static final EmailTemplateNameEnum WELCOME_EMAIL = new EmailTemplateNameEnum(Value.WELCOME_EMAIL, "welcome_email"); public static final EmailTemplateNameEnum VERIFY_EMAIL_BY_CODE = new EmailTemplateNameEnum(Value.VERIFY_EMAIL_BY_CODE, "verify_email_by_code"); + public static final EmailTemplateNameEnum VERIFY_EMAIL = + new EmailTemplateNameEnum(Value.VERIFY_EMAIL, "verify_email"); + public static final EmailTemplateNameEnum MFA_OOB_CODE = new EmailTemplateNameEnum(Value.MFA_OOB_CODE, "mfa_oob_code"); + public static final EmailTemplateNameEnum RESET_EMAIL = new EmailTemplateNameEnum(Value.RESET_EMAIL, "reset_email"); + public static final EmailTemplateNameEnum ASYNC_APPROVAL = new EmailTemplateNameEnum(Value.ASYNC_APPROVAL, "async_approval"); - public static final EmailTemplateNameEnum RESET_EMAIL = new EmailTemplateNameEnum(Value.RESET_EMAIL, "reset_email"); - private final Value value; private final String string; @@ -78,10 +78,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case RESET_EMAIL_BY_CODE: - return visitor.visitResetEmailByCode(); case CHANGE_PASSWORD: return visitor.visitChangePassword(); + case RESET_EMAIL_BY_CODE: + return visitor.visitResetEmailByCode(); case STOLEN_CREDENTIALS: return visitor.visitStolenCredentials(); case USER_INVITATION: @@ -92,18 +92,18 @@ public T visit(Visitor visitor) { return visitor.visitEnrollmentEmail(); case PASSWORD_RESET: return visitor.visitPasswordReset(); - case VERIFY_EMAIL: - return visitor.visitVerifyEmail(); case WELCOME_EMAIL: return visitor.visitWelcomeEmail(); case VERIFY_EMAIL_BY_CODE: return visitor.visitVerifyEmailByCode(); + case VERIFY_EMAIL: + return visitor.visitVerifyEmail(); case MFA_OOB_CODE: return visitor.visitMfaOobCode(); - case ASYNC_APPROVAL: - return visitor.visitAsyncApproval(); case RESET_EMAIL: return visitor.visitResetEmail(); + case ASYNC_APPROVAL: + return visitor.visitAsyncApproval(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -113,10 +113,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static EmailTemplateNameEnum valueOf(String value) { switch (value) { - case "reset_email_by_code": - return RESET_EMAIL_BY_CODE; case "change_password": return CHANGE_PASSWORD; + case "reset_email_by_code": + return RESET_EMAIL_BY_CODE; case "stolen_credentials": return STOLEN_CREDENTIALS; case "user_invitation": @@ -127,18 +127,18 @@ public static EmailTemplateNameEnum valueOf(String value) { return ENROLLMENT_EMAIL; case "password_reset": return PASSWORD_RESET; - case "verify_email": - return VERIFY_EMAIL; case "welcome_email": return WELCOME_EMAIL; case "verify_email_by_code": return VERIFY_EMAIL_BY_CODE; + case "verify_email": + return VERIFY_EMAIL; case "mfa_oob_code": return MFA_OOB_CODE; - case "async_approval": - return ASYNC_APPROVAL; case "reset_email": return RESET_EMAIL; + case "async_approval": + return ASYNC_APPROVAL; default: return new EmailTemplateNameEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyType.java b/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyType.java index 6eaa7164b..119cf2a5c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyType.java +++ b/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyType.java @@ -7,17 +7,17 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class EncryptionKeyType { + public static final EncryptionKeyType TENANT_ENCRYPTION_KEY = + new EncryptionKeyType(Value.TENANT_ENCRYPTION_KEY, "tenant-encryption-key"); + public static final EncryptionKeyType ENVIRONMENT_ROOT_KEY = new EncryptionKeyType(Value.ENVIRONMENT_ROOT_KEY, "environment-root-key"); - public static final EncryptionKeyType CUSTOMER_PROVIDED_ROOT_KEY = - new EncryptionKeyType(Value.CUSTOMER_PROVIDED_ROOT_KEY, "customer-provided-root-key"); - public static final EncryptionKeyType TENANT_MASTER_KEY = new EncryptionKeyType(Value.TENANT_MASTER_KEY, "tenant-master-key"); - public static final EncryptionKeyType TENANT_ENCRYPTION_KEY = - new EncryptionKeyType(Value.TENANT_ENCRYPTION_KEY, "tenant-encryption-key"); + public static final EncryptionKeyType CUSTOMER_PROVIDED_ROOT_KEY = + new EncryptionKeyType(Value.CUSTOMER_PROVIDED_ROOT_KEY, "customer-provided-root-key"); private final Value value; @@ -51,14 +51,14 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case TENANT_ENCRYPTION_KEY: + return visitor.visitTenantEncryptionKey(); case ENVIRONMENT_ROOT_KEY: return visitor.visitEnvironmentRootKey(); - case CUSTOMER_PROVIDED_ROOT_KEY: - return visitor.visitCustomerProvidedRootKey(); case TENANT_MASTER_KEY: return visitor.visitTenantMasterKey(); - case TENANT_ENCRYPTION_KEY: - return visitor.visitTenantEncryptionKey(); + case CUSTOMER_PROVIDED_ROOT_KEY: + return visitor.visitCustomerProvidedRootKey(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -68,14 +68,14 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static EncryptionKeyType valueOf(String value) { switch (value) { + case "tenant-encryption-key": + return TENANT_ENCRYPTION_KEY; case "environment-root-key": return ENVIRONMENT_ROOT_KEY; - case "customer-provided-root-key": - return CUSTOMER_PROVIDED_ROOT_KEY; case "tenant-master-key": return TENANT_MASTER_KEY; - case "tenant-encryption-key": - return TENANT_ENCRYPTION_KEY; + case "customer-provided-root-key": + return CUSTOMER_PROVIDED_ROOT_KEY; default: return new EncryptionKeyType(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventA0PurposeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventA0PurposeEnum.java new file mode 100644 index 000000000..91af3e26f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventA0PurposeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventA0PurposeEnum { + public static final EventStreamCloudEventA0PurposeEnum TEST = + new EventStreamCloudEventA0PurposeEnum(Value.TEST, "test"); + + private final Value value; + + private final String string; + + EventStreamCloudEventA0PurposeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventA0PurposeEnum + && this.string.equals(((EventStreamCloudEventA0PurposeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TEST: + return visitor.visitTest(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventA0PurposeEnum valueOf(String value) { + switch (value) { + case "test": + return TEST; + default: + return new EventStreamCloudEventA0PurposeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TEST, + + UNKNOWN + } + + public interface Visitor { + T visitTest(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContext.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContext.java new file mode 100644 index 000000000..b064e9a92 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContext.java @@ -0,0 +1,212 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventContext.Builder.class) +public final class EventStreamCloudEventContext { + private final Optional client; + + private final Optional connection; + + private final Optional request; + + private final EventStreamCloudEventContextTenant tenant; + + private final Map additionalProperties; + + private EventStreamCloudEventContext( + Optional client, + Optional connection, + Optional request, + EventStreamCloudEventContextTenant tenant, + Map additionalProperties) { + this.client = client; + this.connection = connection; + this.request = request; + this.tenant = tenant; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("client") + public Optional getClient() { + return client; + } + + @JsonProperty("connection") + public Optional getConnection() { + return connection; + } + + @JsonProperty("request") + public Optional getRequest() { + return request; + } + + @JsonProperty("tenant") + public EventStreamCloudEventContextTenant getTenant() { + return tenant; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventContext && equalTo((EventStreamCloudEventContext) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventContext other) { + return client.equals(other.client) + && connection.equals(other.connection) + && request.equals(other.request) + && tenant.equals(other.tenant); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.client, this.connection, this.request, this.tenant); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TenantStage builder() { + return new Builder(); + } + + public interface TenantStage { + _FinalStage tenant(@NotNull EventStreamCloudEventContextTenant tenant); + + Builder from(EventStreamCloudEventContext other); + } + + public interface _FinalStage { + EventStreamCloudEventContext build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage client(Optional client); + + _FinalStage client(EventStreamCloudEventContextClient client); + + _FinalStage connection(Optional connection); + + _FinalStage connection(EventStreamCloudEventContextConnection connection); + + _FinalStage request(Optional request); + + _FinalStage request(EventStreamCloudEventContextRequest request); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TenantStage, _FinalStage { + private EventStreamCloudEventContextTenant tenant; + + private Optional request = Optional.empty(); + + private Optional connection = Optional.empty(); + + private Optional client = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventContext other) { + client(other.getClient()); + connection(other.getConnection()); + request(other.getRequest()); + tenant(other.getTenant()); + return this; + } + + @java.lang.Override + @JsonSetter("tenant") + public _FinalStage tenant(@NotNull EventStreamCloudEventContextTenant tenant) { + this.tenant = Objects.requireNonNull(tenant, "tenant must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage request(EventStreamCloudEventContextRequest request) { + this.request = Optional.ofNullable(request); + return this; + } + + @java.lang.Override + @JsonSetter(value = "request", nulls = Nulls.SKIP) + public _FinalStage request(Optional request) { + this.request = request; + return this; + } + + @java.lang.Override + public _FinalStage connection(EventStreamCloudEventContextConnection connection) { + this.connection = Optional.ofNullable(connection); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection", nulls = Nulls.SKIP) + public _FinalStage connection(Optional connection) { + this.connection = connection; + return this; + } + + @java.lang.Override + public _FinalStage client(EventStreamCloudEventContextClient client) { + this.client = Optional.ofNullable(client); + return this; + } + + @java.lang.Override + @JsonSetter(value = "client", nulls = Nulls.SKIP) + public _FinalStage client(Optional client) { + this.client = client; + return this; + } + + @java.lang.Override + public EventStreamCloudEventContext build() { + return new EventStreamCloudEventContext(client, connection, request, tenant, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextClient.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextClient.java new file mode 100644 index 000000000..40d48673f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextClient.java @@ -0,0 +1,207 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventContextClient.Builder.class) +public final class EventStreamCloudEventContextClient { + private final String id; + + private final String name; + + private final Map metadata; + + private final Map additionalProperties; + + private EventStreamCloudEventContextClient( + String id, String name, Map metadata, Map additionalProperties) { + this.id = id; + this.name = name; + this.metadata = metadata; + this.additionalProperties = additionalProperties; + } + + /** + * @return The client identifier. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The client name. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("metadata") + public Map getMetadata() { + return metadata; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventContextClient + && equalTo((EventStreamCloudEventContextClient) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventContextClient other) { + return id.equals(other.id) && name.equals(other.name) && metadata.equals(other.metadata); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.metadata); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The client identifier.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventContextClient other); + } + + public interface NameStage { + /** + *

The client name.

+ */ + _FinalStage name(@NotNull String name); + } + + public interface _FinalStage { + EventStreamCloudEventContextClient build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage metadata(Map metadata); + + _FinalStage putAllMetadata(Map metadata); + + _FinalStage metadata(String key, Object value); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, _FinalStage { + private String id; + + private String name; + + private Map metadata = new LinkedHashMap<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventContextClient other) { + id(other.getId()); + name(other.getName()); + metadata(other.getMetadata()); + return this; + } + + /** + *

The client identifier.

+ *

The client identifier.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The client name.

+ *

The client name.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage metadata(String key, Object value) { + this.metadata.put(key, value); + return this; + } + + @java.lang.Override + public _FinalStage putAllMetadata(Map metadata) { + if (metadata != null) { + this.metadata.putAll(metadata); + } + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Map metadata) { + this.metadata.clear(); + if (metadata != null) { + this.metadata.putAll(metadata); + } + return this; + } + + @java.lang.Override + public EventStreamCloudEventContextClient build() { + return new EventStreamCloudEventContextClient(id, name, metadata, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextConnection.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextConnection.java new file mode 100644 index 000000000..a1c9040eb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextConnection.java @@ -0,0 +1,197 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventContextConnection.Builder.class) +public final class EventStreamCloudEventContextConnection { + private final String id; + + private final String name; + + private final String strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventContextConnection( + String id, String name, String strategy, Map additionalProperties) { + this.id = id; + this.name = name; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the connection. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the connection. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The auth strategy implemented by the connection. + */ + @JsonProperty("strategy") + public String getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventContextConnection + && equalTo((EventStreamCloudEventContextConnection) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventContextConnection other) { + return id.equals(other.id) && name.equals(other.name) && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The ID of the connection.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventContextConnection other); + } + + public interface NameStage { + /** + *

The name of the connection.

+ */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + /** + *

The auth strategy implemented by the connection.

+ */ + _FinalStage strategy(@NotNull String strategy); + } + + public interface _FinalStage { + EventStreamCloudEventContextConnection build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private String strategy; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventContextConnection other) { + id(other.getId()); + name(other.getName()); + strategy(other.getStrategy()); + return this; + } + + /** + *

The ID of the connection.

+ *

The ID of the connection.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the connection.

+ *

The name of the connection.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

The auth strategy implemented by the connection.

+ *

The auth strategy implemented by the connection.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull String strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventContextConnection build() { + return new EventStreamCloudEventContextConnection(id, name, strategy, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextRequest.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextRequest.java new file mode 100644 index 000000000..8698c70ba --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextRequest.java @@ -0,0 +1,308 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventContextRequest.Builder.class) +public final class EventStreamCloudEventContextRequest { + private final EventStreamCloudEventContextRequestGeo geo; + + private final String hostname; + + private final Optional customDomain; + + private final String ip; + + private final String method; + + private final String userAgent; + + private final Map additionalProperties; + + private EventStreamCloudEventContextRequest( + EventStreamCloudEventContextRequestGeo geo, + String hostname, + Optional customDomain, + String ip, + String method, + String userAgent, + Map additionalProperties) { + this.geo = geo; + this.hostname = hostname; + this.customDomain = customDomain; + this.ip = ip; + this.method = method; + this.userAgent = userAgent; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("geo") + public EventStreamCloudEventContextRequestGeo getGeo() { + return geo; + } + + /** + * @return The hostname the request is for. + */ + @JsonProperty("hostname") + public String getHostname() { + return hostname; + } + + /** + * @return The custom domain used in the request (if any). + */ + @JsonProperty("custom_domain") + public Optional getCustomDomain() { + return customDomain; + } + + /** + * @return The originating IP address of the request. + */ + @JsonProperty("ip") + public String getIp() { + return ip; + } + + /** + * @return The HTTP method used for the request. + */ + @JsonProperty("method") + public String getMethod() { + return method; + } + + /** + * @return The value of the User-Agent header. + */ + @JsonProperty("user_agent") + public String getUserAgent() { + return userAgent; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventContextRequest + && equalTo((EventStreamCloudEventContextRequest) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventContextRequest other) { + return geo.equals(other.geo) + && hostname.equals(other.hostname) + && customDomain.equals(other.customDomain) + && ip.equals(other.ip) + && method.equals(other.method) + && userAgent.equals(other.userAgent); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.geo, this.hostname, this.customDomain, this.ip, this.method, this.userAgent); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static GeoStage builder() { + return new Builder(); + } + + public interface GeoStage { + HostnameStage geo(@NotNull EventStreamCloudEventContextRequestGeo geo); + + Builder from(EventStreamCloudEventContextRequest other); + } + + public interface HostnameStage { + /** + *

The hostname the request is for.

+ */ + IpStage hostname(@NotNull String hostname); + } + + public interface IpStage { + /** + *

The originating IP address of the request.

+ */ + MethodStage ip(@NotNull String ip); + } + + public interface MethodStage { + /** + *

The HTTP method used for the request.

+ */ + UserAgentStage method(@NotNull String method); + } + + public interface UserAgentStage { + /** + *

The value of the User-Agent header.

+ */ + _FinalStage userAgent(@NotNull String userAgent); + } + + public interface _FinalStage { + EventStreamCloudEventContextRequest build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The custom domain used in the request (if any).

+ */ + _FinalStage customDomain(Optional customDomain); + + _FinalStage customDomain(String customDomain); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements GeoStage, HostnameStage, IpStage, MethodStage, UserAgentStage, _FinalStage { + private EventStreamCloudEventContextRequestGeo geo; + + private String hostname; + + private String ip; + + private String method; + + private String userAgent; + + private Optional customDomain = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventContextRequest other) { + geo(other.getGeo()); + hostname(other.getHostname()); + customDomain(other.getCustomDomain()); + ip(other.getIp()); + method(other.getMethod()); + userAgent(other.getUserAgent()); + return this; + } + + @java.lang.Override + @JsonSetter("geo") + public HostnameStage geo(@NotNull EventStreamCloudEventContextRequestGeo geo) { + this.geo = Objects.requireNonNull(geo, "geo must not be null"); + return this; + } + + /** + *

The hostname the request is for.

+ *

The hostname the request is for.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("hostname") + public IpStage hostname(@NotNull String hostname) { + this.hostname = Objects.requireNonNull(hostname, "hostname must not be null"); + return this; + } + + /** + *

The originating IP address of the request.

+ *

The originating IP address of the request.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("ip") + public MethodStage ip(@NotNull String ip) { + this.ip = Objects.requireNonNull(ip, "ip must not be null"); + return this; + } + + /** + *

The HTTP method used for the request.

+ *

The HTTP method used for the request.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("method") + public UserAgentStage method(@NotNull String method) { + this.method = Objects.requireNonNull(method, "method must not be null"); + return this; + } + + /** + *

The value of the User-Agent header.

+ *

The value of the User-Agent header.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_agent") + public _FinalStage userAgent(@NotNull String userAgent) { + this.userAgent = Objects.requireNonNull(userAgent, "userAgent must not be null"); + return this; + } + + /** + *

The custom domain used in the request (if any).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage customDomain(String customDomain) { + this.customDomain = Optional.ofNullable(customDomain); + return this; + } + + /** + *

The custom domain used in the request (if any).

+ */ + @java.lang.Override + @JsonSetter(value = "custom_domain", nulls = Nulls.SKIP) + public _FinalStage customDomain(Optional customDomain) { + this.customDomain = customDomain; + return this; + } + + @java.lang.Override + public EventStreamCloudEventContextRequest build() { + return new EventStreamCloudEventContextRequest( + geo, hostname, customDomain, ip, method, userAgent, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextRequestGeo.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextRequestGeo.java new file mode 100644 index 000000000..9afbb1acc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextRequestGeo.java @@ -0,0 +1,373 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventContextRequestGeo.Builder.class) +public final class EventStreamCloudEventContextRequestGeo { + private final Optional continentCode; + + private final Optional countryCode; + + private final Optional countryName; + + private final Optional latitude; + + private final Optional longitude; + + private final Optional subdivisionCode; + + private final Optional subdivisionName; + + private final Optional cityName; + + private final Optional timeZone; + + private final Map additionalProperties; + + private EventStreamCloudEventContextRequestGeo( + Optional continentCode, + Optional countryCode, + Optional countryName, + Optional latitude, + Optional longitude, + Optional subdivisionCode, + Optional subdivisionName, + Optional cityName, + Optional timeZone, + Map additionalProperties) { + this.continentCode = continentCode; + this.countryCode = countryCode; + this.countryName = countryName; + this.latitude = latitude; + this.longitude = longitude; + this.subdivisionCode = subdivisionCode; + this.subdivisionName = subdivisionName; + this.cityName = cityName; + this.timeZone = timeZone; + this.additionalProperties = additionalProperties; + } + + /** + * @return Continent code. + */ + @JsonProperty("continent_code") + public Optional getContinentCode() { + return continentCode; + } + + /** + * @return Country code. + */ + @JsonProperty("country_code") + public Optional getCountryCode() { + return countryCode; + } + + /** + * @return Country name. + */ + @JsonProperty("country_name") + public Optional getCountryName() { + return countryName; + } + + /** + * @return Latitude coordinate. + */ + @JsonProperty("latitude") + public Optional getLatitude() { + return latitude; + } + + /** + * @return Longitude coordinate. + */ + @JsonProperty("longitude") + public Optional getLongitude() { + return longitude; + } + + /** + * @return Subdivision (state/province) code. + */ + @JsonProperty("subdivision_code") + public Optional getSubdivisionCode() { + return subdivisionCode; + } + + /** + * @return Subdivision (state/province) name. + */ + @JsonProperty("subdivision_name") + public Optional getSubdivisionName() { + return subdivisionName; + } + + /** + * @return City name. + */ + @JsonProperty("city_name") + public Optional getCityName() { + return cityName; + } + + /** + * @return Time zone. + */ + @JsonProperty("time_zone") + public Optional getTimeZone() { + return timeZone; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventContextRequestGeo + && equalTo((EventStreamCloudEventContextRequestGeo) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventContextRequestGeo other) { + return continentCode.equals(other.continentCode) + && countryCode.equals(other.countryCode) + && countryName.equals(other.countryName) + && latitude.equals(other.latitude) + && longitude.equals(other.longitude) + && subdivisionCode.equals(other.subdivisionCode) + && subdivisionName.equals(other.subdivisionName) + && cityName.equals(other.cityName) + && timeZone.equals(other.timeZone); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.continentCode, + this.countryCode, + this.countryName, + this.latitude, + this.longitude, + this.subdivisionCode, + this.subdivisionName, + this.cityName, + this.timeZone); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional continentCode = Optional.empty(); + + private Optional countryCode = Optional.empty(); + + private Optional countryName = Optional.empty(); + + private Optional latitude = Optional.empty(); + + private Optional longitude = Optional.empty(); + + private Optional subdivisionCode = Optional.empty(); + + private Optional subdivisionName = Optional.empty(); + + private Optional cityName = Optional.empty(); + + private Optional timeZone = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventContextRequestGeo other) { + continentCode(other.getContinentCode()); + countryCode(other.getCountryCode()); + countryName(other.getCountryName()); + latitude(other.getLatitude()); + longitude(other.getLongitude()); + subdivisionCode(other.getSubdivisionCode()); + subdivisionName(other.getSubdivisionName()); + cityName(other.getCityName()); + timeZone(other.getTimeZone()); + return this; + } + + /** + *

Continent code.

+ */ + @JsonSetter(value = "continent_code", nulls = Nulls.SKIP) + public Builder continentCode(Optional continentCode) { + this.continentCode = continentCode; + return this; + } + + public Builder continentCode(String continentCode) { + this.continentCode = Optional.ofNullable(continentCode); + return this; + } + + /** + *

Country code.

+ */ + @JsonSetter(value = "country_code", nulls = Nulls.SKIP) + public Builder countryCode(Optional countryCode) { + this.countryCode = countryCode; + return this; + } + + public Builder countryCode(String countryCode) { + this.countryCode = Optional.ofNullable(countryCode); + return this; + } + + /** + *

Country name.

+ */ + @JsonSetter(value = "country_name", nulls = Nulls.SKIP) + public Builder countryName(Optional countryName) { + this.countryName = countryName; + return this; + } + + public Builder countryName(String countryName) { + this.countryName = Optional.ofNullable(countryName); + return this; + } + + /** + *

Latitude coordinate.

+ */ + @JsonSetter(value = "latitude", nulls = Nulls.SKIP) + public Builder latitude(Optional latitude) { + this.latitude = latitude; + return this; + } + + public Builder latitude(Double latitude) { + this.latitude = Optional.ofNullable(latitude); + return this; + } + + /** + *

Longitude coordinate.

+ */ + @JsonSetter(value = "longitude", nulls = Nulls.SKIP) + public Builder longitude(Optional longitude) { + this.longitude = longitude; + return this; + } + + public Builder longitude(Double longitude) { + this.longitude = Optional.ofNullable(longitude); + return this; + } + + /** + *

Subdivision (state/province) code.

+ */ + @JsonSetter(value = "subdivision_code", nulls = Nulls.SKIP) + public Builder subdivisionCode(Optional subdivisionCode) { + this.subdivisionCode = subdivisionCode; + return this; + } + + public Builder subdivisionCode(String subdivisionCode) { + this.subdivisionCode = Optional.ofNullable(subdivisionCode); + return this; + } + + /** + *

Subdivision (state/province) name.

+ */ + @JsonSetter(value = "subdivision_name", nulls = Nulls.SKIP) + public Builder subdivisionName(Optional subdivisionName) { + this.subdivisionName = subdivisionName; + return this; + } + + public Builder subdivisionName(String subdivisionName) { + this.subdivisionName = Optional.ofNullable(subdivisionName); + return this; + } + + /** + *

City name.

+ */ + @JsonSetter(value = "city_name", nulls = Nulls.SKIP) + public Builder cityName(Optional cityName) { + this.cityName = cityName; + return this; + } + + public Builder cityName(String cityName) { + this.cityName = Optional.ofNullable(cityName); + return this; + } + + /** + *

Time zone.

+ */ + @JsonSetter(value = "time_zone", nulls = Nulls.SKIP) + public Builder timeZone(Optional timeZone) { + this.timeZone = timeZone; + return this; + } + + public Builder timeZone(String timeZone) { + this.timeZone = Optional.ofNullable(timeZone); + return this; + } + + public EventStreamCloudEventContextRequestGeo build() { + return new EventStreamCloudEventContextRequestGeo( + continentCode, + countryCode, + countryName, + latitude, + longitude, + subdivisionCode, + subdivisionName, + cityName, + timeZone, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTenant.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTenant.java new file mode 100644 index 000000000..277036b81 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTenant.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventContextTenant.Builder.class) +public final class EventStreamCloudEventContextTenant { + private final String tenantId; + + private final Map additionalProperties; + + private EventStreamCloudEventContextTenant(String tenantId, Map additionalProperties) { + this.tenantId = tenantId; + this.additionalProperties = additionalProperties; + } + + /** + * @return Machine-generated unique tenant identifier. + */ + @JsonProperty("tenant_id") + public String getTenantId() { + return tenantId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventContextTenant + && equalTo((EventStreamCloudEventContextTenant) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventContextTenant other) { + return tenantId.equals(other.tenantId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.tenantId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TenantIdStage builder() { + return new Builder(); + } + + public interface TenantIdStage { + /** + *

Machine-generated unique tenant identifier.

+ */ + _FinalStage tenantId(@NotNull String tenantId); + + Builder from(EventStreamCloudEventContextTenant other); + } + + public interface _FinalStage { + EventStreamCloudEventContextTenant build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TenantIdStage, _FinalStage { + private String tenantId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventContextTenant other) { + tenantId(other.getTenantId()); + return this; + } + + /** + *

Machine-generated unique tenant identifier.

+ *

Machine-generated unique tenant identifier.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("tenant_id") + public _FinalStage tenantId(@NotNull String tenantId) { + this.tenantId = Objects.requireNonNull(tenantId, "tenantId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventContextTenant build() { + return new EventStreamCloudEventContextTenant(tenantId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorCodeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorCodeEnum.java new file mode 100644 index 000000000..44b04e0e7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorCodeEnum.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventErrorCodeEnum { + public static final EventStreamCloudEventErrorCodeEnum PROCESSING_ERROR = + new EventStreamCloudEventErrorCodeEnum(Value.PROCESSING_ERROR, "processing_error"); + + public static final EventStreamCloudEventErrorCodeEnum INVALID_CURSOR = + new EventStreamCloudEventErrorCodeEnum(Value.INVALID_CURSOR, "invalid_cursor"); + + public static final EventStreamCloudEventErrorCodeEnum CURSOR_EXPIRED = + new EventStreamCloudEventErrorCodeEnum(Value.CURSOR_EXPIRED, "cursor_expired"); + + public static final EventStreamCloudEventErrorCodeEnum PAYLOAD_TOO_LARGE = + new EventStreamCloudEventErrorCodeEnum(Value.PAYLOAD_TOO_LARGE, "payload_too_large"); + + public static final EventStreamCloudEventErrorCodeEnum CONNECTION_TIMEOUT = + new EventStreamCloudEventErrorCodeEnum(Value.CONNECTION_TIMEOUT, "connection_timeout"); + + public static final EventStreamCloudEventErrorCodeEnum TIMEOUT = + new EventStreamCloudEventErrorCodeEnum(Value.TIMEOUT, "timeout"); + + private final Value value; + + private final String string; + + EventStreamCloudEventErrorCodeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventErrorCodeEnum + && this.string.equals(((EventStreamCloudEventErrorCodeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PROCESSING_ERROR: + return visitor.visitProcessingError(); + case INVALID_CURSOR: + return visitor.visitInvalidCursor(); + case CURSOR_EXPIRED: + return visitor.visitCursorExpired(); + case PAYLOAD_TOO_LARGE: + return visitor.visitPayloadTooLarge(); + case CONNECTION_TIMEOUT: + return visitor.visitConnectionTimeout(); + case TIMEOUT: + return visitor.visitTimeout(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventErrorCodeEnum valueOf(String value) { + switch (value) { + case "processing_error": + return PROCESSING_ERROR; + case "invalid_cursor": + return INVALID_CURSOR; + case "cursor_expired": + return CURSOR_EXPIRED; + case "payload_too_large": + return PAYLOAD_TOO_LARGE; + case "connection_timeout": + return CONNECTION_TIMEOUT; + case "timeout": + return TIMEOUT; + default: + return new EventStreamCloudEventErrorCodeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + INVALID_CURSOR, + + CURSOR_EXPIRED, + + TIMEOUT, + + PAYLOAD_TOO_LARGE, + + PROCESSING_ERROR, + + CONNECTION_TIMEOUT, + + UNKNOWN + } + + public interface Visitor { + T visitInvalidCursor(); + + T visitCursorExpired(); + + T visitTimeout(); + + T visitPayloadTooLarge(); + + T visitProcessingError(); + + T visitConnectionTimeout(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorDetail.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorDetail.java new file mode 100644 index 000000000..83f28b303 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorDetail.java @@ -0,0 +1,198 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventErrorDetail.Builder.class) +public final class EventStreamCloudEventErrorDetail { + private final EventStreamCloudEventErrorCodeEnum code; + + private final String message; + + private final Optional offset; + + private final Map additionalProperties; + + private EventStreamCloudEventErrorDetail( + EventStreamCloudEventErrorCodeEnum code, + String message, + Optional offset, + Map additionalProperties) { + this.code = code; + this.message = message; + this.offset = offset; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("code") + public EventStreamCloudEventErrorCodeEnum getCode() { + return code; + } + + /** + * @return Human-readable error message. + */ + @JsonProperty("message") + public String getMessage() { + return message; + } + + /** + * @return The cursor at the time of the error (when available). Can be used to resume from this position. + */ + @JsonProperty("offset") + public Optional getOffset() { + return offset; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventErrorDetail && equalTo((EventStreamCloudEventErrorDetail) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventErrorDetail other) { + return code.equals(other.code) && message.equals(other.message) && offset.equals(other.offset); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.code, this.message, this.offset); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static CodeStage builder() { + return new Builder(); + } + + public interface CodeStage { + MessageStage code(@NotNull EventStreamCloudEventErrorCodeEnum code); + + Builder from(EventStreamCloudEventErrorDetail other); + } + + public interface MessageStage { + /** + *

Human-readable error message.

+ */ + _FinalStage message(@NotNull String message); + } + + public interface _FinalStage { + EventStreamCloudEventErrorDetail build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The cursor at the time of the error (when available). Can be used to resume from this position.

+ */ + _FinalStage offset(Optional offset); + + _FinalStage offset(String offset); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements CodeStage, MessageStage, _FinalStage { + private EventStreamCloudEventErrorCodeEnum code; + + private String message; + + private Optional offset = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventErrorDetail other) { + code(other.getCode()); + message(other.getMessage()); + offset(other.getOffset()); + return this; + } + + @java.lang.Override + @JsonSetter("code") + public MessageStage code(@NotNull EventStreamCloudEventErrorCodeEnum code) { + this.code = Objects.requireNonNull(code, "code must not be null"); + return this; + } + + /** + *

Human-readable error message.

+ *

Human-readable error message.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("message") + public _FinalStage message(@NotNull String message) { + this.message = Objects.requireNonNull(message, "message must not be null"); + return this; + } + + /** + *

The cursor at the time of the error (when available). Can be used to resume from this position.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage offset(String offset) { + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + *

The cursor at the time of the error (when available). Can be used to resume from this position.

+ */ + @java.lang.Override + @JsonSetter(value = "offset", nulls = Nulls.SKIP) + public _FinalStage offset(Optional offset) { + this.offset = offset; + return this; + } + + @java.lang.Override + public EventStreamCloudEventErrorDetail build() { + return new EventStreamCloudEventErrorDetail(code, message, offset, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorMessage.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorMessage.java new file mode 100644 index 000000000..150f42b00 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorMessage.java @@ -0,0 +1,119 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventErrorMessage.Builder.class) +public final class EventStreamCloudEventErrorMessage { + private final EventStreamCloudEventErrorDetail error; + + private final Map additionalProperties; + + private EventStreamCloudEventErrorMessage( + EventStreamCloudEventErrorDetail error, Map additionalProperties) { + this.error = error; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("error") + public EventStreamCloudEventErrorDetail getError() { + return error; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventErrorMessage && equalTo((EventStreamCloudEventErrorMessage) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventErrorMessage other) { + return error.equals(other.error); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.error); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ErrorStage builder() { + return new Builder(); + } + + public interface ErrorStage { + _FinalStage error(@NotNull EventStreamCloudEventErrorDetail error); + + Builder from(EventStreamCloudEventErrorMessage other); + } + + public interface _FinalStage { + EventStreamCloudEventErrorMessage build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ErrorStage, _FinalStage { + private EventStreamCloudEventErrorDetail error; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventErrorMessage other) { + error(other.getError()); + return this; + } + + @java.lang.Override + @JsonSetter("error") + public _FinalStage error(@NotNull EventStreamCloudEventErrorDetail error) { + this.error = Objects.requireNonNull(error, "error must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventErrorMessage build() { + return new EventStreamCloudEventErrorMessage(error, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorMessageTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorMessageTypeEnum.java new file mode 100644 index 000000000..f73ead26a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorMessageTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventErrorMessageTypeEnum { + public static final EventStreamCloudEventErrorMessageTypeEnum ERROR = + new EventStreamCloudEventErrorMessageTypeEnum(Value.ERROR, "error"); + + private final Value value; + + private final String string; + + EventStreamCloudEventErrorMessageTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventErrorMessageTypeEnum + && this.string.equals(((EventStreamCloudEventErrorMessageTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ERROR: + return visitor.visitError(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventErrorMessageTypeEnum valueOf(String value) { + switch (value) { + case "error": + return ERROR; + default: + return new EventStreamCloudEventErrorMessageTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ERROR, + + UNKNOWN + } + + public interface Visitor { + T visitError(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreated.java new file mode 100644 index 000000000..14f8faa04 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreated.java @@ -0,0 +1,154 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupCreated.Builder.class) +public final class EventStreamCloudEventGroupCreated { + private final String offset; + + private final EventStreamCloudEventGroupCreatedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupCreated( + String offset, + EventStreamCloudEventGroupCreatedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventGroupCreatedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupCreated && equalTo((EventStreamCloudEventGroupCreated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupCreated other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventGroupCreated other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventGroupCreatedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventGroupCreated build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventGroupCreatedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupCreated other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventGroupCreatedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupCreated build() { + return new EventStreamCloudEventGroupCreated(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedCloudEvent.java new file mode 100644 index 000000000..2074d415a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupCreatedCloudEvent.Builder.class) +public final class EventStreamCloudEventGroupCreatedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventGroupCreatedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventGroupCreatedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupCreatedCloudEvent( + String specversion, + EventStreamCloudEventGroupCreatedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventGroupCreatedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupCreatedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventGroupCreatedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupCreatedCloudEvent + && equalTo((EventStreamCloudEventGroupCreatedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupCreatedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventGroupCreatedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventGroupCreatedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventGroupCreatedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventGroupCreatedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventGroupCreatedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventGroupCreatedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupCreatedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventGroupCreatedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventGroupCreatedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupCreatedCloudEvent build() { + return new EventStreamCloudEventGroupCreatedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedCloudEventTypeEnum.java new file mode 100644 index 000000000..7bbe5a408 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedCloudEventTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupCreatedCloudEventTypeEnum { + public static final EventStreamCloudEventGroupCreatedCloudEventTypeEnum GROUP_CREATED = + new EventStreamCloudEventGroupCreatedCloudEventTypeEnum(Value.GROUP_CREATED, "group.created"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupCreatedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupCreatedCloudEventTypeEnum + && this.string.equals(((EventStreamCloudEventGroupCreatedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_CREATED: + return visitor.visitGroupCreated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupCreatedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "group.created": + return GROUP_CREATED; + default: + return new EventStreamCloudEventGroupCreatedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_CREATED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupCreated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedData.java new file mode 100644 index 000000000..166413eb5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupCreatedData.Builder.class) +public final class EventStreamCloudEventGroupCreatedData { + private final EventStreamCloudEventGroupCreatedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupCreatedData( + EventStreamCloudEventGroupCreatedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventGroupCreatedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupCreatedData + && equalTo((EventStreamCloudEventGroupCreatedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupCreatedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventGroupCreatedObject object); + + Builder from(EventStreamCloudEventGroupCreatedData other); + } + + public interface _FinalStage { + EventStreamCloudEventGroupCreatedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventGroupCreatedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupCreatedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventGroupCreatedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupCreatedData build() { + return new EventStreamCloudEventGroupCreatedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject.java new file mode 100644 index 000000000..a5f04b1af --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject.java @@ -0,0 +1,133 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupCreatedObject.Deserializer.class) +public final class EventStreamCloudEventGroupCreatedObject { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupCreatedObject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupCreatedObject0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupCreatedObject1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupCreatedObject2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupCreatedObject + && equalTo((EventStreamCloudEventGroupCreatedObject) other); + } + + private boolean equalTo(EventStreamCloudEventGroupCreatedObject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupCreatedObject of(EventStreamCloudEventGroupCreatedObject0 value) { + return new EventStreamCloudEventGroupCreatedObject(value, 0); + } + + public static EventStreamCloudEventGroupCreatedObject of(EventStreamCloudEventGroupCreatedObject1 value) { + return new EventStreamCloudEventGroupCreatedObject(value, 1); + } + + public static EventStreamCloudEventGroupCreatedObject of(EventStreamCloudEventGroupCreatedObject2 value) { + return new EventStreamCloudEventGroupCreatedObject(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupCreatedObject0 value); + + T visit(EventStreamCloudEventGroupCreatedObject1 value); + + T visit(EventStreamCloudEventGroupCreatedObject2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupCreatedObject.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupCreatedObject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupCreatedObject0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupCreatedObject1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupCreatedObject2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject0.java new file mode 100644 index 000000000..bdf7ff22a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject0.java @@ -0,0 +1,309 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupCreatedObject0.Builder.class) +public final class EventStreamCloudEventGroupCreatedObject0 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupCreatedObject0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupCreatedObject0( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupCreatedObject0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupCreatedObject0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupCreatedObject0 + && equalTo((EventStreamCloudEventGroupCreatedObject0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupCreatedObject0 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.externalId, this.createdAt, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupCreatedObject0 other); + } + + public interface NameStage { + /** + *

The name of the group.

+ */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

Date and time when this entity was created (ISO_8601 format).

+ */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupCreatedObject0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

The connection ID associated with the group.

+ */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupCreatedObject0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupCreatedObject0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupCreatedObject0 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the group.

+ *

The name of the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

Date and time when this entity was created (ISO_8601 format).

+ *

Date and time when this entity was created (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupCreatedObject0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The connection ID associated with the group.

+ *

The connection ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupCreatedObject0 build() { + return new EventStreamCloudEventGroupCreatedObject0( + id, name, externalId, createdAt, type, connectionId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject0TypeEnum.java new file mode 100644 index 000000000..0fc237c7d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject0TypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupCreatedObject0TypeEnum { + public static final EventStreamCloudEventGroupCreatedObject0TypeEnum CONNECTION = + new EventStreamCloudEventGroupCreatedObject0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupCreatedObject0TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupCreatedObject0TypeEnum + && this.string.equals(((EventStreamCloudEventGroupCreatedObject0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupCreatedObject0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupCreatedObject0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject1.java new file mode 100644 index 000000000..a62b38b49 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject1.java @@ -0,0 +1,309 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupCreatedObject1.Builder.class) +public final class EventStreamCloudEventGroupCreatedObject1 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupCreatedObject1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupCreatedObject1( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupCreatedObject1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupCreatedObject1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupCreatedObject1 + && equalTo((EventStreamCloudEventGroupCreatedObject1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupCreatedObject1 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.externalId, this.createdAt, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupCreatedObject1 other); + } + + public interface NameStage { + /** + *

The name of the group.

+ */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

Date and time when this entity was created (ISO_8601 format).

+ */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupCreatedObject1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

The organization ID associated with the group.

+ */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupCreatedObject1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupCreatedObject1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupCreatedObject1 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the group.

+ *

The name of the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

Date and time when this entity was created (ISO_8601 format).

+ *

Date and time when this entity was created (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupCreatedObject1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The organization ID associated with the group.

+ *

The organization ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupCreatedObject1 build() { + return new EventStreamCloudEventGroupCreatedObject1( + id, name, externalId, createdAt, type, organizationId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject1TypeEnum.java new file mode 100644 index 000000000..0035fad4c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject1TypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupCreatedObject1TypeEnum { + public static final EventStreamCloudEventGroupCreatedObject1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupCreatedObject1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupCreatedObject1TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupCreatedObject1TypeEnum + && this.string.equals(((EventStreamCloudEventGroupCreatedObject1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupCreatedObject1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupCreatedObject1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject2.java new file mode 100644 index 000000000..e4ba9ccee --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject2.java @@ -0,0 +1,273 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupCreatedObject2.Builder.class) +public final class EventStreamCloudEventGroupCreatedObject2 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupCreatedObject2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupCreatedObject2( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupCreatedObject2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupCreatedObject2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupCreatedObject2 + && equalTo((EventStreamCloudEventGroupCreatedObject2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupCreatedObject2 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.externalId, this.createdAt, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupCreatedObject2 other); + } + + public interface NameStage { + /** + *

The name of the group.

+ */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

Date and time when this entity was created (ISO_8601 format).

+ */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventGroupCreatedObject2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventGroupCreatedObject2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, CreatedAtStage, TypeStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupCreatedObject2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupCreatedObject2 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the group.

+ *

The name of the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

Date and time when this entity was created (ISO_8601 format).

+ *

Date and time when this entity was created (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventGroupCreatedObject2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupCreatedObject2 build() { + return new EventStreamCloudEventGroupCreatedObject2( + id, name, externalId, createdAt, type, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject2TypeEnum.java new file mode 100644 index 000000000..372cfadbd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject2TypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupCreatedObject2TypeEnum { + public static final EventStreamCloudEventGroupCreatedObject2TypeEnum TENANT = + new EventStreamCloudEventGroupCreatedObject2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupCreatedObject2TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupCreatedObject2TypeEnum + && this.string.equals(((EventStreamCloudEventGroupCreatedObject2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupCreatedObject2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupCreatedObject2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedTypeEnum.java new file mode 100644 index 000000000..d2190bd18 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupCreatedTypeEnum { + public static final EventStreamCloudEventGroupCreatedTypeEnum GROUP_CREATED = + new EventStreamCloudEventGroupCreatedTypeEnum(Value.GROUP_CREATED, "group.created"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupCreatedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupCreatedTypeEnum + && this.string.equals(((EventStreamCloudEventGroupCreatedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_CREATED: + return visitor.visitGroupCreated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupCreatedTypeEnum valueOf(String value) { + switch (value) { + case "group.created": + return GROUP_CREATED; + default: + return new EventStreamCloudEventGroupCreatedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_CREATED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupCreated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeleted.java new file mode 100644 index 000000000..a73906a65 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeleted.java @@ -0,0 +1,154 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupDeleted.Builder.class) +public final class EventStreamCloudEventGroupDeleted { + private final String offset; + + private final EventStreamCloudEventGroupDeletedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupDeleted( + String offset, + EventStreamCloudEventGroupDeletedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventGroupDeletedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupDeleted && equalTo((EventStreamCloudEventGroupDeleted) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupDeleted other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventGroupDeleted other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventGroupDeletedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventGroupDeleted build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventGroupDeletedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupDeleted other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventGroupDeletedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupDeleted build() { + return new EventStreamCloudEventGroupDeleted(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedCloudEvent.java new file mode 100644 index 000000000..f82090ff7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupDeletedCloudEvent.Builder.class) +public final class EventStreamCloudEventGroupDeletedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventGroupDeletedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventGroupDeletedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupDeletedCloudEvent( + String specversion, + EventStreamCloudEventGroupDeletedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventGroupDeletedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupDeletedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventGroupDeletedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupDeletedCloudEvent + && equalTo((EventStreamCloudEventGroupDeletedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupDeletedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventGroupDeletedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventGroupDeletedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventGroupDeletedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventGroupDeletedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventGroupDeletedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventGroupDeletedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupDeletedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventGroupDeletedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventGroupDeletedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupDeletedCloudEvent build() { + return new EventStreamCloudEventGroupDeletedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedCloudEventTypeEnum.java new file mode 100644 index 000000000..a049d97b3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedCloudEventTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupDeletedCloudEventTypeEnum { + public static final EventStreamCloudEventGroupDeletedCloudEventTypeEnum GROUP_DELETED = + new EventStreamCloudEventGroupDeletedCloudEventTypeEnum(Value.GROUP_DELETED, "group.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupDeletedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupDeletedCloudEventTypeEnum + && this.string.equals(((EventStreamCloudEventGroupDeletedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_DELETED: + return visitor.visitGroupDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupDeletedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "group.deleted": + return GROUP_DELETED; + default: + return new EventStreamCloudEventGroupDeletedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedData.java new file mode 100644 index 000000000..22efcaafd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupDeletedData.Builder.class) +public final class EventStreamCloudEventGroupDeletedData { + private final EventStreamCloudEventGroupDeletedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupDeletedData( + EventStreamCloudEventGroupDeletedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventGroupDeletedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupDeletedData + && equalTo((EventStreamCloudEventGroupDeletedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupDeletedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventGroupDeletedObject object); + + Builder from(EventStreamCloudEventGroupDeletedData other); + } + + public interface _FinalStage { + EventStreamCloudEventGroupDeletedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventGroupDeletedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupDeletedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventGroupDeletedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupDeletedData build() { + return new EventStreamCloudEventGroupDeletedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject.java new file mode 100644 index 000000000..5d11eb856 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject.java @@ -0,0 +1,136 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupDeletedObject.Deserializer.class) +public final class EventStreamCloudEventGroupDeletedObject { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupDeletedObject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupDeletedObject0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupDeletedObject1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupDeletedObject2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupDeletedObject + && equalTo((EventStreamCloudEventGroupDeletedObject) other); + } + + private boolean equalTo(EventStreamCloudEventGroupDeletedObject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupDeletedObject of(EventStreamCloudEventGroupDeletedObject0 value) { + return new EventStreamCloudEventGroupDeletedObject(value, 0); + } + + public static EventStreamCloudEventGroupDeletedObject of(EventStreamCloudEventGroupDeletedObject1 value) { + return new EventStreamCloudEventGroupDeletedObject(value, 1); + } + + public static EventStreamCloudEventGroupDeletedObject of(EventStreamCloudEventGroupDeletedObject2 value) { + return new EventStreamCloudEventGroupDeletedObject(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupDeletedObject0 value); + + T visit(EventStreamCloudEventGroupDeletedObject1 value); + + T visit(EventStreamCloudEventGroupDeletedObject2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupDeletedObject.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupDeletedObject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id") + && ((Map) value).containsKey("updated_at")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupDeletedObject0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id") + && ((Map) value).containsKey("updated_at")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupDeletedObject1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("updated_at")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupDeletedObject2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject0.java new file mode 100644 index 000000000..8dff4b989 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject0.java @@ -0,0 +1,345 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupDeletedObject0.Builder.class) +public final class EventStreamCloudEventGroupDeletedObject0 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupDeletedObject0TypeEnum type; + + private final String connectionId; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupDeletedObject0( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupDeletedObject0TypeEnum type, + String connectionId, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.connectionId = connectionId; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupDeletedObject0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupDeletedObject0 + && equalTo((EventStreamCloudEventGroupDeletedObject0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupDeletedObject0 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && connectionId.equals(other.connectionId) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, this.name, this.externalId, this.createdAt, this.type, this.connectionId, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupDeletedObject0 other); + } + + public interface NameStage { + /** + *

The name of the group.

+ */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

Date and time when this entity was created (ISO_8601 format).

+ */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupDeletedObject0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

The connection ID associated with the group.

+ */ + UpdatedAtStage connectionId(@NotNull String connectionId); + } + + public interface UpdatedAtStage { + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupDeletedObject0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, ConnectionIdStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupDeletedObject0TypeEnum type; + + private String connectionId; + + private OffsetDateTime updatedAt; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupDeletedObject0 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + connectionId(other.getConnectionId()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the group.

+ *

The name of the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

Date and time when this entity was created (ISO_8601 format).

+ *

Date and time when this entity was created (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupDeletedObject0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The connection ID associated with the group.

+ *

The connection ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public UpdatedAtStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupDeletedObject0 build() { + return new EventStreamCloudEventGroupDeletedObject0( + id, name, externalId, createdAt, type, connectionId, updatedAt, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject0TypeEnum.java new file mode 100644 index 000000000..a1fd370ce --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject0TypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupDeletedObject0TypeEnum { + public static final EventStreamCloudEventGroupDeletedObject0TypeEnum CONNECTION = + new EventStreamCloudEventGroupDeletedObject0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupDeletedObject0TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupDeletedObject0TypeEnum + && this.string.equals(((EventStreamCloudEventGroupDeletedObject0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupDeletedObject0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupDeletedObject0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject1.java new file mode 100644 index 000000000..dc8d00096 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject1.java @@ -0,0 +1,345 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupDeletedObject1.Builder.class) +public final class EventStreamCloudEventGroupDeletedObject1 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupDeletedObject1TypeEnum type; + + private final String organizationId; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupDeletedObject1( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupDeletedObject1TypeEnum type, + String organizationId, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.organizationId = organizationId; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupDeletedObject1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupDeletedObject1 + && equalTo((EventStreamCloudEventGroupDeletedObject1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupDeletedObject1 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && organizationId.equals(other.organizationId) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, this.name, this.externalId, this.createdAt, this.type, this.organizationId, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupDeletedObject1 other); + } + + public interface NameStage { + /** + *

The name of the group.

+ */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

Date and time when this entity was created (ISO_8601 format).

+ */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupDeletedObject1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

The organization ID associated with the group.

+ */ + UpdatedAtStage organizationId(@NotNull String organizationId); + } + + public interface UpdatedAtStage { + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupDeletedObject1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, OrganizationIdStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupDeletedObject1TypeEnum type; + + private String organizationId; + + private OffsetDateTime updatedAt; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupDeletedObject1 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + organizationId(other.getOrganizationId()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the group.

+ *

The name of the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

Date and time when this entity was created (ISO_8601 format).

+ *

Date and time when this entity was created (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupDeletedObject1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The organization ID associated with the group.

+ *

The organization ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public UpdatedAtStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupDeletedObject1 build() { + return new EventStreamCloudEventGroupDeletedObject1( + id, name, externalId, createdAt, type, organizationId, updatedAt, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject1TypeEnum.java new file mode 100644 index 000000000..b7e2d8b35 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject1TypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupDeletedObject1TypeEnum { + public static final EventStreamCloudEventGroupDeletedObject1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupDeletedObject1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupDeletedObject1TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupDeletedObject1TypeEnum + && this.string.equals(((EventStreamCloudEventGroupDeletedObject1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupDeletedObject1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupDeletedObject1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject2.java new file mode 100644 index 000000000..e482dc4d6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject2.java @@ -0,0 +1,309 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupDeletedObject2.Builder.class) +public final class EventStreamCloudEventGroupDeletedObject2 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupDeletedObject2TypeEnum type; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupDeletedObject2( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupDeletedObject2TypeEnum type, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupDeletedObject2TypeEnum getType() { + return type; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupDeletedObject2 + && equalTo((EventStreamCloudEventGroupDeletedObject2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupDeletedObject2 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.externalId, this.createdAt, this.type, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupDeletedObject2 other); + } + + public interface NameStage { + /** + *

The name of the group.

+ */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

Date and time when this entity was created (ISO_8601 format).

+ */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + UpdatedAtStage type(@NotNull EventStreamCloudEventGroupDeletedObject2TypeEnum type); + } + + public interface UpdatedAtStage { + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupDeletedObject2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupDeletedObject2TypeEnum type; + + private OffsetDateTime updatedAt; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupDeletedObject2 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the group.

+ *

The name of the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

Date and time when this entity was created (ISO_8601 format).

+ *

Date and time when this entity was created (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public UpdatedAtStage type(@NotNull EventStreamCloudEventGroupDeletedObject2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupDeletedObject2 build() { + return new EventStreamCloudEventGroupDeletedObject2( + id, name, externalId, createdAt, type, updatedAt, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject2TypeEnum.java new file mode 100644 index 000000000..bca1a990b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject2TypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupDeletedObject2TypeEnum { + public static final EventStreamCloudEventGroupDeletedObject2TypeEnum TENANT = + new EventStreamCloudEventGroupDeletedObject2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupDeletedObject2TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupDeletedObject2TypeEnum + && this.string.equals(((EventStreamCloudEventGroupDeletedObject2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupDeletedObject2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupDeletedObject2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedTypeEnum.java new file mode 100644 index 000000000..6cb20f215 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupDeletedTypeEnum { + public static final EventStreamCloudEventGroupDeletedTypeEnum GROUP_DELETED = + new EventStreamCloudEventGroupDeletedTypeEnum(Value.GROUP_DELETED, "group.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupDeletedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupDeletedTypeEnum + && this.string.equals(((EventStreamCloudEventGroupDeletedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_DELETED: + return visitor.visitGroupDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupDeletedTypeEnum valueOf(String value) { + switch (value) { + case "group.deleted": + return GROUP_DELETED; + default: + return new EventStreamCloudEventGroupDeletedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAdded.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAdded.java new file mode 100644 index 000000000..b9a09c15a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAdded.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberAdded.Builder.class) +public final class EventStreamCloudEventGroupMemberAdded { + private final String offset; + + private final EventStreamCloudEventGroupMemberAddedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAdded( + String offset, + EventStreamCloudEventGroupMemberAddedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventGroupMemberAddedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAdded + && equalTo((EventStreamCloudEventGroupMemberAdded) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAdded other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventGroupMemberAdded other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventGroupMemberAddedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAdded build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventGroupMemberAddedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAdded other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventGroupMemberAddedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAdded build() { + return new EventStreamCloudEventGroupMemberAdded(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedCloudEvent.java new file mode 100644 index 000000000..c0489f425 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberAddedCloudEvent.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventGroupMemberAddedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedCloudEvent( + String specversion, + EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventGroupMemberAddedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventGroupMemberAddedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedCloudEvent + && equalTo((EventStreamCloudEventGroupMemberAddedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventGroupMemberAddedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventGroupMemberAddedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventGroupMemberAddedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventGroupMemberAddedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedCloudEvent build() { + return new EventStreamCloudEventGroupMemberAddedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum.java new file mode 100644 index 000000000..14cd6343a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum { + public static final EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum GROUP_MEMBER_ADDED = + new EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_MEMBER_ADDED: + return visitor.visitGroupMemberAdded(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "group.member.added": + return GROUP_MEMBER_ADDED; + default: + return new EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_MEMBER_ADDED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupMemberAdded(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedData.java new file mode 100644 index 000000000..30580b809 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberAddedData.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedData { + private final EventStreamCloudEventGroupMemberAddedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedData( + EventStreamCloudEventGroupMemberAddedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventGroupMemberAddedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedData + && equalTo((EventStreamCloudEventGroupMemberAddedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventGroupMemberAddedObject object); + + Builder from(EventStreamCloudEventGroupMemberAddedData other); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventGroupMemberAddedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventGroupMemberAddedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedData build() { + return new EventStreamCloudEventGroupMemberAddedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObject.java new file mode 100644 index 000000000..76bd6b8ee --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObject.java @@ -0,0 +1,144 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberAddedObject.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedObject { + private final EventStreamCloudEventGroupMemberAddedObjectGroup group; + + private final EventStreamCloudEventGroupMemberAddedObjectMember member; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedObject( + EventStreamCloudEventGroupMemberAddedObjectGroup group, + EventStreamCloudEventGroupMemberAddedObjectMember member, + Map additionalProperties) { + this.group = group; + this.member = member; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("group") + public EventStreamCloudEventGroupMemberAddedObjectGroup getGroup() { + return group; + } + + @JsonProperty("member") + public EventStreamCloudEventGroupMemberAddedObjectMember getMember() { + return member; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedObject + && equalTo((EventStreamCloudEventGroupMemberAddedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedObject other) { + return group.equals(other.group) && member.equals(other.member); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.group, this.member); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static GroupStage builder() { + return new Builder(); + } + + public interface GroupStage { + MemberStage group(@NotNull EventStreamCloudEventGroupMemberAddedObjectGroup group); + + Builder from(EventStreamCloudEventGroupMemberAddedObject other); + } + + public interface MemberStage { + _FinalStage member(@NotNull EventStreamCloudEventGroupMemberAddedObjectMember member); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements GroupStage, MemberStage, _FinalStage { + private EventStreamCloudEventGroupMemberAddedObjectGroup group; + + private EventStreamCloudEventGroupMemberAddedObjectMember member; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedObject other) { + group(other.getGroup()); + member(other.getMember()); + return this; + } + + @java.lang.Override + @JsonSetter("group") + public MemberStage group(@NotNull EventStreamCloudEventGroupMemberAddedObjectGroup group) { + this.group = Objects.requireNonNull(group, "group must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("member") + public _FinalStage member(@NotNull EventStreamCloudEventGroupMemberAddedObjectMember member) { + this.member = Objects.requireNonNull(member, "member must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedObject build() { + return new EventStreamCloudEventGroupMemberAddedObject(group, member, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup.java new file mode 100644 index 000000000..849322173 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupMemberAddedObjectGroup.Deserializer.class) +public final class EventStreamCloudEventGroupMemberAddedObjectGroup { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupMemberAddedObjectGroup(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupMemberAddedObjectGroup0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupMemberAddedObjectGroup1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupMemberAddedObjectGroup2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedObjectGroup + && equalTo((EventStreamCloudEventGroupMemberAddedObjectGroup) other); + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedObjectGroup other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupMemberAddedObjectGroup of( + EventStreamCloudEventGroupMemberAddedObjectGroup0 value) { + return new EventStreamCloudEventGroupMemberAddedObjectGroup(value, 0); + } + + public static EventStreamCloudEventGroupMemberAddedObjectGroup of( + EventStreamCloudEventGroupMemberAddedObjectGroup1 value) { + return new EventStreamCloudEventGroupMemberAddedObjectGroup(value, 1); + } + + public static EventStreamCloudEventGroupMemberAddedObjectGroup of( + EventStreamCloudEventGroupMemberAddedObjectGroup2 value) { + return new EventStreamCloudEventGroupMemberAddedObjectGroup(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupMemberAddedObjectGroup0 value); + + T visit(EventStreamCloudEventGroupMemberAddedObjectGroup1 value); + + T visit(EventStreamCloudEventGroupMemberAddedObjectGroup2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupMemberAddedObjectGroup.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedObjectGroup deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberAddedObjectGroup0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberAddedObjectGroup1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberAddedObjectGroup2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup0.java new file mode 100644 index 000000000..1fccd52fc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup0.java @@ -0,0 +1,237 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberAddedObjectGroup0.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedObjectGroup0 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedObjectGroup0( + String id, + Optional externalId, + EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedObjectGroup0 + && equalTo((EventStreamCloudEventGroupMemberAddedObjectGroup0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedObjectGroup0 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupMemberAddedObjectGroup0 other); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

The connection ID associated with the group.

+ */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedObjectGroup0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedObjectGroup0 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The connection ID associated with the group.

+ *

The connection ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedObjectGroup0 build() { + return new EventStreamCloudEventGroupMemberAddedObjectGroup0( + id, externalId, type, connectionId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum.java new file mode 100644 index 000000000..d9df3ecf9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum { + public static final EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum CONNECTION = + new EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupMemberAddedObjectGroup0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup1.java new file mode 100644 index 000000000..fc0887104 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup1.java @@ -0,0 +1,237 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberAddedObjectGroup1.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedObjectGroup1 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedObjectGroup1( + String id, + Optional externalId, + EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedObjectGroup1 + && equalTo((EventStreamCloudEventGroupMemberAddedObjectGroup1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedObjectGroup1 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupMemberAddedObjectGroup1 other); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

The organization ID associated with the group.

+ */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedObjectGroup1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedObjectGroup1 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The organization ID associated with the group.

+ *

The organization ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedObjectGroup1 build() { + return new EventStreamCloudEventGroupMemberAddedObjectGroup1( + id, externalId, type, organizationId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum.java new file mode 100644 index 000000000..53af7c095 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum { + public static final EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupMemberAddedObjectGroup1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup2.java new file mode 100644 index 000000000..19e261536 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup2.java @@ -0,0 +1,199 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberAddedObjectGroup2.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedObjectGroup2 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedObjectGroup2( + String id, + Optional externalId, + EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedObjectGroup2 + && equalTo((EventStreamCloudEventGroupMemberAddedObjectGroup2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedObjectGroup2 other) { + return id.equals(other.id) && externalId.equals(other.externalId) && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupMemberAddedObjectGroup2 other); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedObjectGroup2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedObjectGroup2 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedObjectGroup2 build() { + return new EventStreamCloudEventGroupMemberAddedObjectGroup2(id, externalId, type, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum.java new file mode 100644 index 000000000..8de261445 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum { + public static final EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum TENANT = + new EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupMemberAddedObjectGroup2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember.java new file mode 100644 index 000000000..79a111214 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember.java @@ -0,0 +1,112 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupMemberAddedObjectMember.Deserializer.class) +public final class EventStreamCloudEventGroupMemberAddedObjectMember { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupMemberAddedObjectMember(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupMemberAddedObjectMember0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupMemberAddedObjectMember1) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedObjectMember + && equalTo((EventStreamCloudEventGroupMemberAddedObjectMember) other); + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedObjectMember other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupMemberAddedObjectMember of( + EventStreamCloudEventGroupMemberAddedObjectMember0 value) { + return new EventStreamCloudEventGroupMemberAddedObjectMember(value, 0); + } + + public static EventStreamCloudEventGroupMemberAddedObjectMember of( + EventStreamCloudEventGroupMemberAddedObjectMember1 value) { + return new EventStreamCloudEventGroupMemberAddedObjectMember(value, 1); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupMemberAddedObjectMember0 value); + + T visit(EventStreamCloudEventGroupMemberAddedObjectMember1 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupMemberAddedObjectMember.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedObjectMember deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("member_type") + && ((Map) value).containsKey("id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberAddedObjectMember0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("member_type") + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberAddedObjectMember1.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember0.java new file mode 100644 index 000000000..7433827fa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember0.java @@ -0,0 +1,156 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberAddedObjectMember0.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedObjectMember0 { + private final EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum memberType; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedObjectMember0( + EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum memberType, + String id, + Map additionalProperties) { + this.memberType = memberType; + this.id = id; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("member_type") + public EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum getMemberType() { + return memberType; + } + + /** + * @return The user's unique identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedObjectMember0 + && equalTo((EventStreamCloudEventGroupMemberAddedObjectMember0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedObjectMember0 other) { + return memberType.equals(other.memberType) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.memberType, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MemberTypeStage builder() { + return new Builder(); + } + + public interface MemberTypeStage { + IdStage memberType(@NotNull EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum memberType); + + Builder from(EventStreamCloudEventGroupMemberAddedObjectMember0 other); + } + + public interface IdStage { + /** + *

The user's unique identifier

+ */ + _FinalStage id(@NotNull String id); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedObjectMember0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MemberTypeStage, IdStage, _FinalStage { + private EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum memberType; + + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedObjectMember0 other) { + memberType(other.getMemberType()); + id(other.getId()); + return this; + } + + @java.lang.Override + @JsonSetter("member_type") + public IdStage memberType( + @NotNull EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum memberType) { + this.memberType = Objects.requireNonNull(memberType, "memberType must not be null"); + return this; + } + + /** + *

The user's unique identifier

+ *

The user's unique identifier

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedObjectMember0 build() { + return new EventStreamCloudEventGroupMemberAddedObjectMember0(memberType, id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum.java new file mode 100644 index 000000000..01b60fa4f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum { + public static final EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum USER = + new EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum(Value.USER, "user"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USER: + return visitor.visitUser(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum valueOf(String value) { + switch (value) { + case "user": + return USER; + default: + return new EventStreamCloudEventGroupMemberAddedObjectMember0MemberTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + USER, + + UNKNOWN + } + + public interface Visitor { + T visitUser(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember1.java new file mode 100644 index 000000000..e660fce3f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember1.java @@ -0,0 +1,228 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberAddedObjectMember1.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedObjectMember1 { + private final EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum memberType; + + private final String id; + + private final String type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedObjectMember1( + EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum memberType, + String id, + String type, + String connectionId, + Map additionalProperties) { + this.memberType = memberType; + this.id = id; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("member_type") + public EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum getMemberType() { + return memberType; + } + + /** + * @return The connection member's unique identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The type of the connection + */ + @JsonProperty("type") + public String getType() { + return type; + } + + /** + * @return Connection ID associated with the member + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedObjectMember1 + && equalTo((EventStreamCloudEventGroupMemberAddedObjectMember1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedObjectMember1 other) { + return memberType.equals(other.memberType) + && id.equals(other.id) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.memberType, this.id, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MemberTypeStage builder() { + return new Builder(); + } + + public interface MemberTypeStage { + IdStage memberType(@NotNull EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum memberType); + + Builder from(EventStreamCloudEventGroupMemberAddedObjectMember1 other); + } + + public interface IdStage { + /** + *

The connection member's unique identifier

+ */ + TypeStage id(@NotNull String id); + } + + public interface TypeStage { + /** + *

The type of the connection

+ */ + ConnectionIdStage type(@NotNull String type); + } + + public interface ConnectionIdStage { + /** + *

Connection ID associated with the member

+ */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedObjectMember1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MemberTypeStage, IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum memberType; + + private String id; + + private String type; + + private String connectionId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedObjectMember1 other) { + memberType(other.getMemberType()); + id(other.getId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + @java.lang.Override + @JsonSetter("member_type") + public IdStage memberType( + @NotNull EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum memberType) { + this.memberType = Objects.requireNonNull(memberType, "memberType must not be null"); + return this; + } + + /** + *

The connection member's unique identifier

+ *

The connection member's unique identifier

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The type of the connection

+ *

The type of the connection

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull String type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

Connection ID associated with the member

+ *

Connection ID associated with the member

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedObjectMember1 build() { + return new EventStreamCloudEventGroupMemberAddedObjectMember1( + memberType, id, type, connectionId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum.java new file mode 100644 index 000000000..e7b623a1c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum { + public static final EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum CONNECTION = + new EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupMemberAddedObjectMember1MemberTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedTypeEnum.java new file mode 100644 index 000000000..0e91ac1a7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberAddedTypeEnum { + public static final EventStreamCloudEventGroupMemberAddedTypeEnum GROUP_MEMBER_ADDED = + new EventStreamCloudEventGroupMemberAddedTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberAddedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberAddedTypeEnum + && this.string.equals(((EventStreamCloudEventGroupMemberAddedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_MEMBER_ADDED: + return visitor.visitGroupMemberAdded(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberAddedTypeEnum valueOf(String value) { + switch (value) { + case "group.member.added": + return GROUP_MEMBER_ADDED; + default: + return new EventStreamCloudEventGroupMemberAddedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_MEMBER_ADDED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupMemberAdded(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeleted.java new file mode 100644 index 000000000..90c510efc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeleted.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeleted.Builder.class) +public final class EventStreamCloudEventGroupMemberDeleted { + private final String offset; + + private final EventStreamCloudEventGroupMemberDeletedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeleted( + String offset, + EventStreamCloudEventGroupMemberDeletedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventGroupMemberDeletedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeleted + && equalTo((EventStreamCloudEventGroupMemberDeleted) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeleted other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventGroupMemberDeleted other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventGroupMemberDeletedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeleted build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventGroupMemberDeletedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeleted other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventGroupMemberDeletedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeleted build() { + return new EventStreamCloudEventGroupMemberDeleted(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedCloudEvent.java new file mode 100644 index 000000000..0df4b6eda --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeletedCloudEvent.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventGroupMemberDeletedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedCloudEvent( + String specversion, + EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventGroupMemberDeletedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventGroupMemberDeletedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedCloudEvent + && equalTo((EventStreamCloudEventGroupMemberDeletedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventGroupMemberDeletedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventGroupMemberDeletedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventGroupMemberDeletedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventGroupMemberDeletedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedCloudEvent build() { + return new EventStreamCloudEventGroupMemberDeletedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum.java new file mode 100644 index 000000000..4e2d4fa49 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum { + public static final EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum GROUP_MEMBER_DELETED = + new EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum( + Value.GROUP_MEMBER_DELETED, "group.member.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_MEMBER_DELETED: + return visitor.visitGroupMemberDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "group.member.deleted": + return GROUP_MEMBER_DELETED; + default: + return new EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_MEMBER_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupMemberDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedData.java new file mode 100644 index 000000000..98e743bb4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeletedData.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedData { + private final EventStreamCloudEventGroupMemberDeletedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedData( + EventStreamCloudEventGroupMemberDeletedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventGroupMemberDeletedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedData + && equalTo((EventStreamCloudEventGroupMemberDeletedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventGroupMemberDeletedObject object); + + Builder from(EventStreamCloudEventGroupMemberDeletedData other); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventGroupMemberDeletedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventGroupMemberDeletedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedData build() { + return new EventStreamCloudEventGroupMemberDeletedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObject.java new file mode 100644 index 000000000..411100529 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObject.java @@ -0,0 +1,144 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeletedObject.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedObject { + private final EventStreamCloudEventGroupMemberDeletedObjectGroup group; + + private final EventStreamCloudEventGroupMemberDeletedObjectMember member; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedObject( + EventStreamCloudEventGroupMemberDeletedObjectGroup group, + EventStreamCloudEventGroupMemberDeletedObjectMember member, + Map additionalProperties) { + this.group = group; + this.member = member; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("group") + public EventStreamCloudEventGroupMemberDeletedObjectGroup getGroup() { + return group; + } + + @JsonProperty("member") + public EventStreamCloudEventGroupMemberDeletedObjectMember getMember() { + return member; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedObject + && equalTo((EventStreamCloudEventGroupMemberDeletedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedObject other) { + return group.equals(other.group) && member.equals(other.member); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.group, this.member); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static GroupStage builder() { + return new Builder(); + } + + public interface GroupStage { + MemberStage group(@NotNull EventStreamCloudEventGroupMemberDeletedObjectGroup group); + + Builder from(EventStreamCloudEventGroupMemberDeletedObject other); + } + + public interface MemberStage { + _FinalStage member(@NotNull EventStreamCloudEventGroupMemberDeletedObjectMember member); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements GroupStage, MemberStage, _FinalStage { + private EventStreamCloudEventGroupMemberDeletedObjectGroup group; + + private EventStreamCloudEventGroupMemberDeletedObjectMember member; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedObject other) { + group(other.getGroup()); + member(other.getMember()); + return this; + } + + @java.lang.Override + @JsonSetter("group") + public MemberStage group(@NotNull EventStreamCloudEventGroupMemberDeletedObjectGroup group) { + this.group = Objects.requireNonNull(group, "group must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("member") + public _FinalStage member(@NotNull EventStreamCloudEventGroupMemberDeletedObjectMember member) { + this.member = Objects.requireNonNull(member, "member must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedObject build() { + return new EventStreamCloudEventGroupMemberDeletedObject(group, member, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup.java new file mode 100644 index 000000000..574488ab3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupMemberDeletedObjectGroup.Deserializer.class) +public final class EventStreamCloudEventGroupMemberDeletedObjectGroup { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupMemberDeletedObjectGroup(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupMemberDeletedObjectGroup0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupMemberDeletedObjectGroup1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupMemberDeletedObjectGroup2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedObjectGroup + && equalTo((EventStreamCloudEventGroupMemberDeletedObjectGroup) other); + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedObjectGroup other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupMemberDeletedObjectGroup of( + EventStreamCloudEventGroupMemberDeletedObjectGroup0 value) { + return new EventStreamCloudEventGroupMemberDeletedObjectGroup(value, 0); + } + + public static EventStreamCloudEventGroupMemberDeletedObjectGroup of( + EventStreamCloudEventGroupMemberDeletedObjectGroup1 value) { + return new EventStreamCloudEventGroupMemberDeletedObjectGroup(value, 1); + } + + public static EventStreamCloudEventGroupMemberDeletedObjectGroup of( + EventStreamCloudEventGroupMemberDeletedObjectGroup2 value) { + return new EventStreamCloudEventGroupMemberDeletedObjectGroup(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupMemberDeletedObjectGroup0 value); + + T visit(EventStreamCloudEventGroupMemberDeletedObjectGroup1 value); + + T visit(EventStreamCloudEventGroupMemberDeletedObjectGroup2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupMemberDeletedObjectGroup.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedObjectGroup deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberDeletedObjectGroup0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberDeletedObjectGroup1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberDeletedObjectGroup2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup0.java new file mode 100644 index 000000000..fa1b9252b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup0.java @@ -0,0 +1,237 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeletedObjectGroup0.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedObjectGroup0 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedObjectGroup0( + String id, + Optional externalId, + EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedObjectGroup0 + && equalTo((EventStreamCloudEventGroupMemberDeletedObjectGroup0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedObjectGroup0 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupMemberDeletedObjectGroup0 other); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

The connection ID associated with the group.

+ */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedObjectGroup0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedObjectGroup0 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The connection ID associated with the group.

+ *

The connection ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedObjectGroup0 build() { + return new EventStreamCloudEventGroupMemberDeletedObjectGroup0( + id, externalId, type, connectionId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum.java new file mode 100644 index 000000000..4403f5585 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum { + public static final EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum CONNECTION = + new EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupMemberDeletedObjectGroup0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup1.java new file mode 100644 index 000000000..0dae6da85 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup1.java @@ -0,0 +1,237 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeletedObjectGroup1.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedObjectGroup1 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedObjectGroup1( + String id, + Optional externalId, + EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedObjectGroup1 + && equalTo((EventStreamCloudEventGroupMemberDeletedObjectGroup1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedObjectGroup1 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupMemberDeletedObjectGroup1 other); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

The organization ID associated with the group.

+ */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedObjectGroup1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedObjectGroup1 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The organization ID associated with the group.

+ *

The organization ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedObjectGroup1 build() { + return new EventStreamCloudEventGroupMemberDeletedObjectGroup1( + id, externalId, type, organizationId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum.java new file mode 100644 index 000000000..02d60bf42 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum { + public static final EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupMemberDeletedObjectGroup1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup2.java new file mode 100644 index 000000000..6a62c78c2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup2.java @@ -0,0 +1,199 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeletedObjectGroup2.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedObjectGroup2 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedObjectGroup2( + String id, + Optional externalId, + EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedObjectGroup2 + && equalTo((EventStreamCloudEventGroupMemberDeletedObjectGroup2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedObjectGroup2 other) { + return id.equals(other.id) && externalId.equals(other.externalId) && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupMemberDeletedObjectGroup2 other); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedObjectGroup2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedObjectGroup2 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedObjectGroup2 build() { + return new EventStreamCloudEventGroupMemberDeletedObjectGroup2(id, externalId, type, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum.java new file mode 100644 index 000000000..33467a430 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum { + public static final EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum TENANT = + new EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupMemberDeletedObjectGroup2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember.java new file mode 100644 index 000000000..b89a2ec0a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember.java @@ -0,0 +1,112 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupMemberDeletedObjectMember.Deserializer.class) +public final class EventStreamCloudEventGroupMemberDeletedObjectMember { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupMemberDeletedObjectMember(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupMemberDeletedObjectMember0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupMemberDeletedObjectMember1) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedObjectMember + && equalTo((EventStreamCloudEventGroupMemberDeletedObjectMember) other); + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedObjectMember other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupMemberDeletedObjectMember of( + EventStreamCloudEventGroupMemberDeletedObjectMember0 value) { + return new EventStreamCloudEventGroupMemberDeletedObjectMember(value, 0); + } + + public static EventStreamCloudEventGroupMemberDeletedObjectMember of( + EventStreamCloudEventGroupMemberDeletedObjectMember1 value) { + return new EventStreamCloudEventGroupMemberDeletedObjectMember(value, 1); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupMemberDeletedObjectMember0 value); + + T visit(EventStreamCloudEventGroupMemberDeletedObjectMember1 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupMemberDeletedObjectMember.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedObjectMember deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("member_type") + && ((Map) value).containsKey("id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberDeletedObjectMember0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("member_type") + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberDeletedObjectMember1.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember0.java new file mode 100644 index 000000000..e0f9f6e40 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember0.java @@ -0,0 +1,156 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeletedObjectMember0.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedObjectMember0 { + private final EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum memberType; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedObjectMember0( + EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum memberType, + String id, + Map additionalProperties) { + this.memberType = memberType; + this.id = id; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("member_type") + public EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum getMemberType() { + return memberType; + } + + /** + * @return The user's unique identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedObjectMember0 + && equalTo((EventStreamCloudEventGroupMemberDeletedObjectMember0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedObjectMember0 other) { + return memberType.equals(other.memberType) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.memberType, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MemberTypeStage builder() { + return new Builder(); + } + + public interface MemberTypeStage { + IdStage memberType(@NotNull EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum memberType); + + Builder from(EventStreamCloudEventGroupMemberDeletedObjectMember0 other); + } + + public interface IdStage { + /** + *

The user's unique identifier

+ */ + _FinalStage id(@NotNull String id); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedObjectMember0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MemberTypeStage, IdStage, _FinalStage { + private EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum memberType; + + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedObjectMember0 other) { + memberType(other.getMemberType()); + id(other.getId()); + return this; + } + + @java.lang.Override + @JsonSetter("member_type") + public IdStage memberType( + @NotNull EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum memberType) { + this.memberType = Objects.requireNonNull(memberType, "memberType must not be null"); + return this; + } + + /** + *

The user's unique identifier

+ *

The user's unique identifier

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedObjectMember0 build() { + return new EventStreamCloudEventGroupMemberDeletedObjectMember0(memberType, id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum.java new file mode 100644 index 000000000..dc85d5e5a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum { + public static final EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum USER = + new EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum(Value.USER, "user"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USER: + return visitor.visitUser(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum valueOf(String value) { + switch (value) { + case "user": + return USER; + default: + return new EventStreamCloudEventGroupMemberDeletedObjectMember0MemberTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + USER, + + UNKNOWN + } + + public interface Visitor { + T visitUser(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember1.java new file mode 100644 index 000000000..9258b7960 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember1.java @@ -0,0 +1,228 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeletedObjectMember1.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedObjectMember1 { + private final EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum memberType; + + private final String id; + + private final String type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedObjectMember1( + EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum memberType, + String id, + String type, + String connectionId, + Map additionalProperties) { + this.memberType = memberType; + this.id = id; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("member_type") + public EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum getMemberType() { + return memberType; + } + + /** + * @return The connection member's unique identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The type of the connection + */ + @JsonProperty("type") + public String getType() { + return type; + } + + /** + * @return Connection ID associated with the member + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedObjectMember1 + && equalTo((EventStreamCloudEventGroupMemberDeletedObjectMember1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedObjectMember1 other) { + return memberType.equals(other.memberType) + && id.equals(other.id) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.memberType, this.id, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MemberTypeStage builder() { + return new Builder(); + } + + public interface MemberTypeStage { + IdStage memberType(@NotNull EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum memberType); + + Builder from(EventStreamCloudEventGroupMemberDeletedObjectMember1 other); + } + + public interface IdStage { + /** + *

The connection member's unique identifier

+ */ + TypeStage id(@NotNull String id); + } + + public interface TypeStage { + /** + *

The type of the connection

+ */ + ConnectionIdStage type(@NotNull String type); + } + + public interface ConnectionIdStage { + /** + *

Connection ID associated with the member

+ */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedObjectMember1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MemberTypeStage, IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum memberType; + + private String id; + + private String type; + + private String connectionId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedObjectMember1 other) { + memberType(other.getMemberType()); + id(other.getId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + @java.lang.Override + @JsonSetter("member_type") + public IdStage memberType( + @NotNull EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum memberType) { + this.memberType = Objects.requireNonNull(memberType, "memberType must not be null"); + return this; + } + + /** + *

The connection member's unique identifier

+ *

The connection member's unique identifier

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The type of the connection

+ *

The type of the connection

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull String type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

Connection ID associated with the member

+ *

Connection ID associated with the member

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedObjectMember1 build() { + return new EventStreamCloudEventGroupMemberDeletedObjectMember1( + memberType, id, type, connectionId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum.java new file mode 100644 index 000000000..1c0528075 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum { + public static final EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum CONNECTION = + new EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupMemberDeletedObjectMember1MemberTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedTypeEnum.java new file mode 100644 index 000000000..923d1fbc5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupMemberDeletedTypeEnum { + public static final EventStreamCloudEventGroupMemberDeletedTypeEnum GROUP_MEMBER_DELETED = + new EventStreamCloudEventGroupMemberDeletedTypeEnum(Value.GROUP_MEMBER_DELETED, "group.member.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberDeletedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupMemberDeletedTypeEnum + && this.string.equals(((EventStreamCloudEventGroupMemberDeletedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_MEMBER_DELETED: + return visitor.visitGroupMemberDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberDeletedTypeEnum valueOf(String value) { + switch (value) { + case "group.member.deleted": + return GROUP_MEMBER_DELETED; + default: + return new EventStreamCloudEventGroupMemberDeletedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_MEMBER_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupMemberDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssigned.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssigned.java new file mode 100644 index 000000000..ef74a3fbc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssigned.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssigned.Builder.class) +public final class EventStreamCloudEventGroupRoleAssigned { + private final String offset; + + private final EventStreamCloudEventGroupRoleAssignedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssigned( + String offset, + EventStreamCloudEventGroupRoleAssignedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventGroupRoleAssignedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssigned + && equalTo((EventStreamCloudEventGroupRoleAssigned) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssigned other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventGroupRoleAssigned other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventGroupRoleAssignedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssigned build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventGroupRoleAssignedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssigned other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventGroupRoleAssignedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssigned build() { + return new EventStreamCloudEventGroupRoleAssigned(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedCloudEvent.java new file mode 100644 index 000000000..15157990e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssignedCloudEvent.Builder.class) +public final class EventStreamCloudEventGroupRoleAssignedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventGroupRoleAssignedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssignedCloudEvent( + String specversion, + EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventGroupRoleAssignedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventGroupRoleAssignedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedCloudEvent + && equalTo((EventStreamCloudEventGroupRoleAssignedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventGroupRoleAssignedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventGroupRoleAssignedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssignedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventGroupRoleAssignedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssignedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventGroupRoleAssignedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedCloudEvent build() { + return new EventStreamCloudEventGroupRoleAssignedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum.java new file mode 100644 index 000000000..f0dc10d25 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum { + public static final EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum GROUP_ROLE_ASSIGNED = + new EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum( + Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_ROLE_ASSIGNED: + return visitor.visitGroupRoleAssigned(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "group.role.assigned": + return GROUP_ROLE_ASSIGNED; + default: + return new EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_ROLE_ASSIGNED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupRoleAssigned(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedData.java new file mode 100644 index 000000000..f5996e558 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssignedData.Builder.class) +public final class EventStreamCloudEventGroupRoleAssignedData { + private final EventStreamCloudEventGroupRoleAssignedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssignedData( + EventStreamCloudEventGroupRoleAssignedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventGroupRoleAssignedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedData + && equalTo((EventStreamCloudEventGroupRoleAssignedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventGroupRoleAssignedObject object); + + Builder from(EventStreamCloudEventGroupRoleAssignedData other); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssignedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventGroupRoleAssignedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssignedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventGroupRoleAssignedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedData build() { + return new EventStreamCloudEventGroupRoleAssignedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObject.java new file mode 100644 index 000000000..8ad51d5fd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObject.java @@ -0,0 +1,179 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssignedObject.Builder.class) +public final class EventStreamCloudEventGroupRoleAssignedObject { + private final EventStreamCloudEventGroupRoleAssignedObjectGroup group; + + private final EventStreamCloudEventGroupRoleAssignedObjectRole role; + + private final OffsetDateTime createdAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssignedObject( + EventStreamCloudEventGroupRoleAssignedObjectGroup group, + EventStreamCloudEventGroupRoleAssignedObjectRole role, + OffsetDateTime createdAt, + Map additionalProperties) { + this.group = group; + this.role = role; + this.createdAt = createdAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("group") + public EventStreamCloudEventGroupRoleAssignedObjectGroup getGroup() { + return group; + } + + @JsonProperty("role") + public EventStreamCloudEventGroupRoleAssignedObjectRole getRole() { + return role; + } + + /** + * @return The time at which the role was assigned to the group. + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedObject + && equalTo((EventStreamCloudEventGroupRoleAssignedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedObject other) { + return group.equals(other.group) && role.equals(other.role) && createdAt.equals(other.createdAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.group, this.role, this.createdAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static GroupStage builder() { + return new Builder(); + } + + public interface GroupStage { + RoleStage group(@NotNull EventStreamCloudEventGroupRoleAssignedObjectGroup group); + + Builder from(EventStreamCloudEventGroupRoleAssignedObject other); + } + + public interface RoleStage { + CreatedAtStage role(@NotNull EventStreamCloudEventGroupRoleAssignedObjectRole role); + } + + public interface CreatedAtStage { + /** + *

The time at which the role was assigned to the group.

+ */ + _FinalStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssignedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements GroupStage, RoleStage, CreatedAtStage, _FinalStage { + private EventStreamCloudEventGroupRoleAssignedObjectGroup group; + + private EventStreamCloudEventGroupRoleAssignedObjectRole role; + + private OffsetDateTime createdAt; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssignedObject other) { + group(other.getGroup()); + role(other.getRole()); + createdAt(other.getCreatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("group") + public RoleStage group(@NotNull EventStreamCloudEventGroupRoleAssignedObjectGroup group) { + this.group = Objects.requireNonNull(group, "group must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("role") + public CreatedAtStage role(@NotNull EventStreamCloudEventGroupRoleAssignedObjectRole role) { + this.role = Objects.requireNonNull(role, "role must not be null"); + return this; + } + + /** + *

The time at which the role was assigned to the group.

+ *

The time at which the role was assigned to the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public _FinalStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedObject build() { + return new EventStreamCloudEventGroupRoleAssignedObject(group, role, createdAt, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup.java new file mode 100644 index 000000000..362e58155 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupRoleAssignedObjectGroup.Deserializer.class) +public final class EventStreamCloudEventGroupRoleAssignedObjectGroup { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupRoleAssignedObjectGroup(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupRoleAssignedObjectGroup0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupRoleAssignedObjectGroup1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupRoleAssignedObjectGroup2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedObjectGroup + && equalTo((EventStreamCloudEventGroupRoleAssignedObjectGroup) other); + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedObjectGroup other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupRoleAssignedObjectGroup of( + EventStreamCloudEventGroupRoleAssignedObjectGroup0 value) { + return new EventStreamCloudEventGroupRoleAssignedObjectGroup(value, 0); + } + + public static EventStreamCloudEventGroupRoleAssignedObjectGroup of( + EventStreamCloudEventGroupRoleAssignedObjectGroup1 value) { + return new EventStreamCloudEventGroupRoleAssignedObjectGroup(value, 1); + } + + public static EventStreamCloudEventGroupRoleAssignedObjectGroup of( + EventStreamCloudEventGroupRoleAssignedObjectGroup2 value) { + return new EventStreamCloudEventGroupRoleAssignedObjectGroup(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupRoleAssignedObjectGroup0 value); + + T visit(EventStreamCloudEventGroupRoleAssignedObjectGroup1 value); + + T visit(EventStreamCloudEventGroupRoleAssignedObjectGroup2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupRoleAssignedObjectGroup.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedObjectGroup deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupRoleAssignedObjectGroup0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupRoleAssignedObjectGroup1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupRoleAssignedObjectGroup2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup0.java new file mode 100644 index 000000000..57512718e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup0.java @@ -0,0 +1,237 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssignedObjectGroup0.Builder.class) +public final class EventStreamCloudEventGroupRoleAssignedObjectGroup0 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssignedObjectGroup0( + String id, + Optional externalId, + EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedObjectGroup0 + && equalTo((EventStreamCloudEventGroupRoleAssignedObjectGroup0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedObjectGroup0 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleAssignedObjectGroup0 other); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

The connection ID associated with the group.

+ */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssignedObjectGroup0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssignedObjectGroup0 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The connection ID associated with the group.

+ *

The connection ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedObjectGroup0 build() { + return new EventStreamCloudEventGroupRoleAssignedObjectGroup0( + id, externalId, type, connectionId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum.java new file mode 100644 index 000000000..ac6c344c2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum { + public static final EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum CONNECTION = + new EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupRoleAssignedObjectGroup0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup1.java new file mode 100644 index 000000000..94584d80b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup1.java @@ -0,0 +1,237 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssignedObjectGroup1.Builder.class) +public final class EventStreamCloudEventGroupRoleAssignedObjectGroup1 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssignedObjectGroup1( + String id, + Optional externalId, + EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedObjectGroup1 + && equalTo((EventStreamCloudEventGroupRoleAssignedObjectGroup1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedObjectGroup1 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleAssignedObjectGroup1 other); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

The organization ID associated with the group.

+ */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssignedObjectGroup1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssignedObjectGroup1 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The organization ID associated with the group.

+ *

The organization ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedObjectGroup1 build() { + return new EventStreamCloudEventGroupRoleAssignedObjectGroup1( + id, externalId, type, organizationId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum.java new file mode 100644 index 000000000..ba88c64e8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum { + public static final EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup2.java new file mode 100644 index 000000000..c6df4222c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup2.java @@ -0,0 +1,199 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssignedObjectGroup2.Builder.class) +public final class EventStreamCloudEventGroupRoleAssignedObjectGroup2 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssignedObjectGroup2( + String id, + Optional externalId, + EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedObjectGroup2 + && equalTo((EventStreamCloudEventGroupRoleAssignedObjectGroup2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedObjectGroup2 other) { + return id.equals(other.id) && externalId.equals(other.externalId) && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleAssignedObjectGroup2 other); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssignedObjectGroup2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssignedObjectGroup2 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedObjectGroup2 build() { + return new EventStreamCloudEventGroupRoleAssignedObjectGroup2(id, externalId, type, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum.java new file mode 100644 index 000000000..27cddf129 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum { + public static final EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum TENANT = + new EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupRoleAssignedObjectGroup2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectRole.java new file mode 100644 index 000000000..b28d6d65d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectRole.java @@ -0,0 +1,164 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssignedObjectRole.Builder.class) +public final class EventStreamCloudEventGroupRoleAssignedObjectRole { + private final String id; + + private final String name; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssignedObjectRole( + String id, String name, Map additionalProperties) { + this.id = id; + this.name = name; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the role. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the role. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedObjectRole + && equalTo((EventStreamCloudEventGroupRoleAssignedObjectRole) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedObjectRole other) { + return id.equals(other.id) && name.equals(other.name); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The ID of the role.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleAssignedObjectRole other); + } + + public interface NameStage { + /** + *

The name of the role.

+ */ + _FinalStage name(@NotNull String name); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssignedObjectRole build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, _FinalStage { + private String id; + + private String name; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssignedObjectRole other) { + id(other.getId()); + name(other.getName()); + return this; + } + + /** + *

The ID of the role.

+ *

The ID of the role.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the role.

+ *

The name of the role.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedObjectRole build() { + return new EventStreamCloudEventGroupRoleAssignedObjectRole(id, name, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedTypeEnum.java new file mode 100644 index 000000000..cc2ee9c86 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupRoleAssignedTypeEnum { + public static final EventStreamCloudEventGroupRoleAssignedTypeEnum GROUP_ROLE_ASSIGNED = + new EventStreamCloudEventGroupRoleAssignedTypeEnum(Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleAssignedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupRoleAssignedTypeEnum + && this.string.equals(((EventStreamCloudEventGroupRoleAssignedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_ROLE_ASSIGNED: + return visitor.visitGroupRoleAssigned(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleAssignedTypeEnum valueOf(String value) { + switch (value) { + case "group.role.assigned": + return GROUP_ROLE_ASSIGNED; + default: + return new EventStreamCloudEventGroupRoleAssignedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_ROLE_ASSIGNED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupRoleAssigned(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeleted.java new file mode 100644 index 000000000..d54b11104 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeleted.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeleted.Builder.class) +public final class EventStreamCloudEventGroupRoleDeleted { + private final String offset; + + private final EventStreamCloudEventGroupRoleDeletedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeleted( + String offset, + EventStreamCloudEventGroupRoleDeletedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventGroupRoleDeletedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeleted + && equalTo((EventStreamCloudEventGroupRoleDeleted) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeleted other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventGroupRoleDeleted other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventGroupRoleDeletedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeleted build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventGroupRoleDeletedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeleted other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventGroupRoleDeletedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeleted build() { + return new EventStreamCloudEventGroupRoleDeleted(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedCloudEvent.java new file mode 100644 index 000000000..8d2d10688 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeletedCloudEvent.Builder.class) +public final class EventStreamCloudEventGroupRoleDeletedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventGroupRoleDeletedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeletedCloudEvent( + String specversion, + EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventGroupRoleDeletedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventGroupRoleDeletedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedCloudEvent + && equalTo((EventStreamCloudEventGroupRoleDeletedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventGroupRoleDeletedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventGroupRoleDeletedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeletedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventGroupRoleDeletedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeletedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventGroupRoleDeletedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedCloudEvent build() { + return new EventStreamCloudEventGroupRoleDeletedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum.java new file mode 100644 index 000000000..4dbd612d3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum { + public static final EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum GROUP_ROLE_DELETED = + new EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum(Value.GROUP_ROLE_DELETED, "group.role.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_ROLE_DELETED: + return visitor.visitGroupRoleDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "group.role.deleted": + return GROUP_ROLE_DELETED; + default: + return new EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_ROLE_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupRoleDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedData.java new file mode 100644 index 000000000..71069b3a3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeletedData.Builder.class) +public final class EventStreamCloudEventGroupRoleDeletedData { + private final EventStreamCloudEventGroupRoleDeletedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeletedData( + EventStreamCloudEventGroupRoleDeletedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventGroupRoleDeletedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedData + && equalTo((EventStreamCloudEventGroupRoleDeletedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventGroupRoleDeletedObject object); + + Builder from(EventStreamCloudEventGroupRoleDeletedData other); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeletedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventGroupRoleDeletedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeletedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventGroupRoleDeletedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedData build() { + return new EventStreamCloudEventGroupRoleDeletedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObject.java new file mode 100644 index 000000000..45d18c057 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObject.java @@ -0,0 +1,179 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeletedObject.Builder.class) +public final class EventStreamCloudEventGroupRoleDeletedObject { + private final EventStreamCloudEventGroupRoleDeletedObjectGroup group; + + private final EventStreamCloudEventGroupRoleDeletedObjectRole role; + + private final OffsetDateTime deletedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeletedObject( + EventStreamCloudEventGroupRoleDeletedObjectGroup group, + EventStreamCloudEventGroupRoleDeletedObjectRole role, + OffsetDateTime deletedAt, + Map additionalProperties) { + this.group = group; + this.role = role; + this.deletedAt = deletedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("group") + public EventStreamCloudEventGroupRoleDeletedObjectGroup getGroup() { + return group; + } + + @JsonProperty("role") + public EventStreamCloudEventGroupRoleDeletedObjectRole getRole() { + return role; + } + + /** + * @return The time at which the role was removed from the group. + */ + @JsonProperty("deleted_at") + public OffsetDateTime getDeletedAt() { + return deletedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedObject + && equalTo((EventStreamCloudEventGroupRoleDeletedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedObject other) { + return group.equals(other.group) && role.equals(other.role) && deletedAt.equals(other.deletedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.group, this.role, this.deletedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static GroupStage builder() { + return new Builder(); + } + + public interface GroupStage { + RoleStage group(@NotNull EventStreamCloudEventGroupRoleDeletedObjectGroup group); + + Builder from(EventStreamCloudEventGroupRoleDeletedObject other); + } + + public interface RoleStage { + DeletedAtStage role(@NotNull EventStreamCloudEventGroupRoleDeletedObjectRole role); + } + + public interface DeletedAtStage { + /** + *

The time at which the role was removed from the group.

+ */ + _FinalStage deletedAt(@NotNull OffsetDateTime deletedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeletedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements GroupStage, RoleStage, DeletedAtStage, _FinalStage { + private EventStreamCloudEventGroupRoleDeletedObjectGroup group; + + private EventStreamCloudEventGroupRoleDeletedObjectRole role; + + private OffsetDateTime deletedAt; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeletedObject other) { + group(other.getGroup()); + role(other.getRole()); + deletedAt(other.getDeletedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("group") + public RoleStage group(@NotNull EventStreamCloudEventGroupRoleDeletedObjectGroup group) { + this.group = Objects.requireNonNull(group, "group must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("role") + public DeletedAtStage role(@NotNull EventStreamCloudEventGroupRoleDeletedObjectRole role) { + this.role = Objects.requireNonNull(role, "role must not be null"); + return this; + } + + /** + *

The time at which the role was removed from the group.

+ *

The time at which the role was removed from the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("deleted_at") + public _FinalStage deletedAt(@NotNull OffsetDateTime deletedAt) { + this.deletedAt = Objects.requireNonNull(deletedAt, "deletedAt must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedObject build() { + return new EventStreamCloudEventGroupRoleDeletedObject(group, role, deletedAt, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup.java new file mode 100644 index 000000000..8505ae589 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupRoleDeletedObjectGroup.Deserializer.class) +public final class EventStreamCloudEventGroupRoleDeletedObjectGroup { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupRoleDeletedObjectGroup(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupRoleDeletedObjectGroup0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupRoleDeletedObjectGroup1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupRoleDeletedObjectGroup2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedObjectGroup + && equalTo((EventStreamCloudEventGroupRoleDeletedObjectGroup) other); + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedObjectGroup other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupRoleDeletedObjectGroup of( + EventStreamCloudEventGroupRoleDeletedObjectGroup0 value) { + return new EventStreamCloudEventGroupRoleDeletedObjectGroup(value, 0); + } + + public static EventStreamCloudEventGroupRoleDeletedObjectGroup of( + EventStreamCloudEventGroupRoleDeletedObjectGroup1 value) { + return new EventStreamCloudEventGroupRoleDeletedObjectGroup(value, 1); + } + + public static EventStreamCloudEventGroupRoleDeletedObjectGroup of( + EventStreamCloudEventGroupRoleDeletedObjectGroup2 value) { + return new EventStreamCloudEventGroupRoleDeletedObjectGroup(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupRoleDeletedObjectGroup0 value); + + T visit(EventStreamCloudEventGroupRoleDeletedObjectGroup1 value); + + T visit(EventStreamCloudEventGroupRoleDeletedObjectGroup2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupRoleDeletedObjectGroup.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedObjectGroup deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupRoleDeletedObjectGroup0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupRoleDeletedObjectGroup1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupRoleDeletedObjectGroup2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup0.java new file mode 100644 index 000000000..045bdaf48 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup0.java @@ -0,0 +1,237 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeletedObjectGroup0.Builder.class) +public final class EventStreamCloudEventGroupRoleDeletedObjectGroup0 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeletedObjectGroup0( + String id, + Optional externalId, + EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedObjectGroup0 + && equalTo((EventStreamCloudEventGroupRoleDeletedObjectGroup0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedObjectGroup0 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleDeletedObjectGroup0 other); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

The connection ID associated with the group.

+ */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeletedObjectGroup0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeletedObjectGroup0 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The connection ID associated with the group.

+ *

The connection ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedObjectGroup0 build() { + return new EventStreamCloudEventGroupRoleDeletedObjectGroup0( + id, externalId, type, connectionId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum.java new file mode 100644 index 000000000..108e5537a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum { + public static final EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum CONNECTION = + new EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupRoleDeletedObjectGroup0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup1.java new file mode 100644 index 000000000..ff9f9c457 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup1.java @@ -0,0 +1,237 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeletedObjectGroup1.Builder.class) +public final class EventStreamCloudEventGroupRoleDeletedObjectGroup1 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeletedObjectGroup1( + String id, + Optional externalId, + EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedObjectGroup1 + && equalTo((EventStreamCloudEventGroupRoleDeletedObjectGroup1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedObjectGroup1 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleDeletedObjectGroup1 other); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

The organization ID associated with the group.

+ */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeletedObjectGroup1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeletedObjectGroup1 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The organization ID associated with the group.

+ *

The organization ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedObjectGroup1 build() { + return new EventStreamCloudEventGroupRoleDeletedObjectGroup1( + id, externalId, type, organizationId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum.java new file mode 100644 index 000000000..3e8525d25 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum { + public static final EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupRoleDeletedObjectGroup1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup2.java new file mode 100644 index 000000000..a778d6d48 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup2.java @@ -0,0 +1,199 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeletedObjectGroup2.Builder.class) +public final class EventStreamCloudEventGroupRoleDeletedObjectGroup2 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeletedObjectGroup2( + String id, + Optional externalId, + EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedObjectGroup2 + && equalTo((EventStreamCloudEventGroupRoleDeletedObjectGroup2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedObjectGroup2 other) { + return id.equals(other.id) && externalId.equals(other.externalId) && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleDeletedObjectGroup2 other); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeletedObjectGroup2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeletedObjectGroup2 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedObjectGroup2 build() { + return new EventStreamCloudEventGroupRoleDeletedObjectGroup2(id, externalId, type, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum.java new file mode 100644 index 000000000..91603135c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum { + public static final EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum TENANT = + new EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupRoleDeletedObjectGroup2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectRole.java new file mode 100644 index 000000000..47abba575 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectRole.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeletedObjectRole.Builder.class) +public final class EventStreamCloudEventGroupRoleDeletedObjectRole { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeletedObjectRole(String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the role. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedObjectRole + && equalTo((EventStreamCloudEventGroupRoleDeletedObjectRole) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedObjectRole other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The ID of the role.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleDeletedObjectRole other); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeletedObjectRole build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeletedObjectRole other) { + id(other.getId()); + return this; + } + + /** + *

The ID of the role.

+ *

The ID of the role.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedObjectRole build() { + return new EventStreamCloudEventGroupRoleDeletedObjectRole(id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedTypeEnum.java new file mode 100644 index 000000000..72bc9248e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupRoleDeletedTypeEnum { + public static final EventStreamCloudEventGroupRoleDeletedTypeEnum GROUP_ROLE_DELETED = + new EventStreamCloudEventGroupRoleDeletedTypeEnum(Value.GROUP_ROLE_DELETED, "group.role.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleDeletedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupRoleDeletedTypeEnum + && this.string.equals(((EventStreamCloudEventGroupRoleDeletedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_ROLE_DELETED: + return visitor.visitGroupRoleDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleDeletedTypeEnum valueOf(String value) { + switch (value) { + case "group.role.deleted": + return GROUP_ROLE_DELETED; + default: + return new EventStreamCloudEventGroupRoleDeletedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_ROLE_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupRoleDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdated.java new file mode 100644 index 000000000..fca339cb2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdated.java @@ -0,0 +1,154 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupUpdated.Builder.class) +public final class EventStreamCloudEventGroupUpdated { + private final String offset; + + private final EventStreamCloudEventGroupUpdatedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupUpdated( + String offset, + EventStreamCloudEventGroupUpdatedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventGroupUpdatedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupUpdated && equalTo((EventStreamCloudEventGroupUpdated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupUpdated other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventGroupUpdated other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventGroupUpdatedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventGroupUpdated build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventGroupUpdatedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupUpdated other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventGroupUpdatedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupUpdated build() { + return new EventStreamCloudEventGroupUpdated(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedCloudEvent.java new file mode 100644 index 000000000..0b5944f46 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupUpdatedCloudEvent.Builder.class) +public final class EventStreamCloudEventGroupUpdatedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventGroupUpdatedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventGroupUpdatedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupUpdatedCloudEvent( + String specversion, + EventStreamCloudEventGroupUpdatedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventGroupUpdatedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupUpdatedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventGroupUpdatedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupUpdatedCloudEvent + && equalTo((EventStreamCloudEventGroupUpdatedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupUpdatedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventGroupUpdatedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventGroupUpdatedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventGroupUpdatedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventGroupUpdatedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventGroupUpdatedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventGroupUpdatedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupUpdatedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventGroupUpdatedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventGroupUpdatedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupUpdatedCloudEvent build() { + return new EventStreamCloudEventGroupUpdatedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedCloudEventTypeEnum.java new file mode 100644 index 000000000..1b0ff3500 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedCloudEventTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupUpdatedCloudEventTypeEnum { + public static final EventStreamCloudEventGroupUpdatedCloudEventTypeEnum GROUP_UPDATED = + new EventStreamCloudEventGroupUpdatedCloudEventTypeEnum(Value.GROUP_UPDATED, "group.updated"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupUpdatedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupUpdatedCloudEventTypeEnum + && this.string.equals(((EventStreamCloudEventGroupUpdatedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_UPDATED: + return visitor.visitGroupUpdated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupUpdatedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "group.updated": + return GROUP_UPDATED; + default: + return new EventStreamCloudEventGroupUpdatedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_UPDATED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupUpdated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedData.java new file mode 100644 index 000000000..5dd71c0a1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupUpdatedData.Builder.class) +public final class EventStreamCloudEventGroupUpdatedData { + private final EventStreamCloudEventGroupUpdatedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupUpdatedData( + EventStreamCloudEventGroupUpdatedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventGroupUpdatedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupUpdatedData + && equalTo((EventStreamCloudEventGroupUpdatedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupUpdatedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventGroupUpdatedObject object); + + Builder from(EventStreamCloudEventGroupUpdatedData other); + } + + public interface _FinalStage { + EventStreamCloudEventGroupUpdatedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventGroupUpdatedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupUpdatedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventGroupUpdatedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupUpdatedData build() { + return new EventStreamCloudEventGroupUpdatedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject.java new file mode 100644 index 000000000..7467d8f52 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject.java @@ -0,0 +1,136 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupUpdatedObject.Deserializer.class) +public final class EventStreamCloudEventGroupUpdatedObject { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupUpdatedObject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupUpdatedObject0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupUpdatedObject1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupUpdatedObject2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupUpdatedObject + && equalTo((EventStreamCloudEventGroupUpdatedObject) other); + } + + private boolean equalTo(EventStreamCloudEventGroupUpdatedObject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupUpdatedObject of(EventStreamCloudEventGroupUpdatedObject0 value) { + return new EventStreamCloudEventGroupUpdatedObject(value, 0); + } + + public static EventStreamCloudEventGroupUpdatedObject of(EventStreamCloudEventGroupUpdatedObject1 value) { + return new EventStreamCloudEventGroupUpdatedObject(value, 1); + } + + public static EventStreamCloudEventGroupUpdatedObject of(EventStreamCloudEventGroupUpdatedObject2 value) { + return new EventStreamCloudEventGroupUpdatedObject(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupUpdatedObject0 value); + + T visit(EventStreamCloudEventGroupUpdatedObject1 value); + + T visit(EventStreamCloudEventGroupUpdatedObject2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupUpdatedObject.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupUpdatedObject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id") + && ((Map) value).containsKey("updated_at")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupUpdatedObject0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id") + && ((Map) value).containsKey("updated_at")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupUpdatedObject1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("updated_at")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupUpdatedObject2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject0.java new file mode 100644 index 000000000..7b5731c0d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject0.java @@ -0,0 +1,345 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupUpdatedObject0.Builder.class) +public final class EventStreamCloudEventGroupUpdatedObject0 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupUpdatedObject0TypeEnum type; + + private final String connectionId; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupUpdatedObject0( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupUpdatedObject0TypeEnum type, + String connectionId, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.connectionId = connectionId; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupUpdatedObject0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupUpdatedObject0 + && equalTo((EventStreamCloudEventGroupUpdatedObject0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupUpdatedObject0 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && connectionId.equals(other.connectionId) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, this.name, this.externalId, this.createdAt, this.type, this.connectionId, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupUpdatedObject0 other); + } + + public interface NameStage { + /** + *

The name of the group.

+ */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

Date and time when this entity was created (ISO_8601 format).

+ */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupUpdatedObject0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

The connection ID associated with the group.

+ */ + UpdatedAtStage connectionId(@NotNull String connectionId); + } + + public interface UpdatedAtStage { + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupUpdatedObject0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, ConnectionIdStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupUpdatedObject0TypeEnum type; + + private String connectionId; + + private OffsetDateTime updatedAt; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupUpdatedObject0 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + connectionId(other.getConnectionId()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the group.

+ *

The name of the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

Date and time when this entity was created (ISO_8601 format).

+ *

Date and time when this entity was created (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupUpdatedObject0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The connection ID associated with the group.

+ *

The connection ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public UpdatedAtStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupUpdatedObject0 build() { + return new EventStreamCloudEventGroupUpdatedObject0( + id, name, externalId, createdAt, type, connectionId, updatedAt, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject0TypeEnum.java new file mode 100644 index 000000000..142b62709 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject0TypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupUpdatedObject0TypeEnum { + public static final EventStreamCloudEventGroupUpdatedObject0TypeEnum CONNECTION = + new EventStreamCloudEventGroupUpdatedObject0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupUpdatedObject0TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupUpdatedObject0TypeEnum + && this.string.equals(((EventStreamCloudEventGroupUpdatedObject0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupUpdatedObject0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupUpdatedObject0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject1.java new file mode 100644 index 000000000..f62fd9565 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject1.java @@ -0,0 +1,345 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupUpdatedObject1.Builder.class) +public final class EventStreamCloudEventGroupUpdatedObject1 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupUpdatedObject1TypeEnum type; + + private final String organizationId; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupUpdatedObject1( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupUpdatedObject1TypeEnum type, + String organizationId, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.organizationId = organizationId; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupUpdatedObject1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupUpdatedObject1 + && equalTo((EventStreamCloudEventGroupUpdatedObject1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupUpdatedObject1 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && organizationId.equals(other.organizationId) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, this.name, this.externalId, this.createdAt, this.type, this.organizationId, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupUpdatedObject1 other); + } + + public interface NameStage { + /** + *

The name of the group.

+ */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

Date and time when this entity was created (ISO_8601 format).

+ */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupUpdatedObject1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

The organization ID associated with the group.

+ */ + UpdatedAtStage organizationId(@NotNull String organizationId); + } + + public interface UpdatedAtStage { + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupUpdatedObject1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, OrganizationIdStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupUpdatedObject1TypeEnum type; + + private String organizationId; + + private OffsetDateTime updatedAt; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupUpdatedObject1 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + organizationId(other.getOrganizationId()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the group.

+ *

The name of the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

Date and time when this entity was created (ISO_8601 format).

+ *

Date and time when this entity was created (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupUpdatedObject1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The organization ID associated with the group.

+ *

The organization ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public UpdatedAtStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupUpdatedObject1 build() { + return new EventStreamCloudEventGroupUpdatedObject1( + id, name, externalId, createdAt, type, organizationId, updatedAt, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject1TypeEnum.java new file mode 100644 index 000000000..55b6c235e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject1TypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupUpdatedObject1TypeEnum { + public static final EventStreamCloudEventGroupUpdatedObject1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupUpdatedObject1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupUpdatedObject1TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupUpdatedObject1TypeEnum + && this.string.equals(((EventStreamCloudEventGroupUpdatedObject1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupUpdatedObject1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupUpdatedObject1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject2.java new file mode 100644 index 000000000..e22e201e2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject2.java @@ -0,0 +1,309 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupUpdatedObject2.Builder.class) +public final class EventStreamCloudEventGroupUpdatedObject2 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupUpdatedObject2TypeEnum type; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupUpdatedObject2( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupUpdatedObject2TypeEnum type, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupUpdatedObject2TypeEnum getType() { + return type; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupUpdatedObject2 + && equalTo((EventStreamCloudEventGroupUpdatedObject2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupUpdatedObject2 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.externalId, this.createdAt, this.type, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupUpdatedObject2 other); + } + + public interface NameStage { + /** + *

The name of the group.

+ */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

Date and time when this entity was created (ISO_8601 format).

+ */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + UpdatedAtStage type(@NotNull EventStreamCloudEventGroupUpdatedObject2TypeEnum type); + } + + public interface UpdatedAtStage { + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupUpdatedObject2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupUpdatedObject2TypeEnum type; + + private OffsetDateTime updatedAt; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupUpdatedObject2 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the group.

+ *

The name of the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

Date and time when this entity was created (ISO_8601 format).

+ *

Date and time when this entity was created (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public UpdatedAtStage type(@NotNull EventStreamCloudEventGroupUpdatedObject2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupUpdatedObject2 build() { + return new EventStreamCloudEventGroupUpdatedObject2( + id, name, externalId, createdAt, type, updatedAt, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject2TypeEnum.java new file mode 100644 index 000000000..16e8e7c2b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject2TypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupUpdatedObject2TypeEnum { + public static final EventStreamCloudEventGroupUpdatedObject2TypeEnum TENANT = + new EventStreamCloudEventGroupUpdatedObject2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupUpdatedObject2TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupUpdatedObject2TypeEnum + && this.string.equals(((EventStreamCloudEventGroupUpdatedObject2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupUpdatedObject2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupUpdatedObject2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedTypeEnum.java new file mode 100644 index 000000000..aab65106b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventGroupUpdatedTypeEnum { + public static final EventStreamCloudEventGroupUpdatedTypeEnum GROUP_UPDATED = + new EventStreamCloudEventGroupUpdatedTypeEnum(Value.GROUP_UPDATED, "group.updated"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupUpdatedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventGroupUpdatedTypeEnum + && this.string.equals(((EventStreamCloudEventGroupUpdatedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_UPDATED: + return visitor.visitGroupUpdated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupUpdatedTypeEnum valueOf(String value) { + switch (value) { + case "group.updated": + return GROUP_UPDATED; + default: + return new EventStreamCloudEventGroupUpdatedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_UPDATED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupUpdated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOffsetOnlyMessage.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOffsetOnlyMessage.java new file mode 100644 index 000000000..2e1f1515c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOffsetOnlyMessage.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOffsetOnlyMessage.Builder.class) +public final class EventStreamCloudEventOffsetOnlyMessage { + private final String offset; + + private final Map additionalProperties; + + private EventStreamCloudEventOffsetOnlyMessage(String offset, Map additionalProperties) { + this.offset = offset; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing the latest position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOffsetOnlyMessage + && equalTo((EventStreamCloudEventOffsetOnlyMessage) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOffsetOnlyMessage other) { + return offset.equals(other.offset); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing the latest position in the stream. Pass as the from query parameter to resume.

+ */ + _FinalStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOffsetOnlyMessage other); + } + + public interface _FinalStage { + EventStreamCloudEventOffsetOnlyMessage build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, _FinalStage { + private String offset; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOffsetOnlyMessage other) { + offset(other.getOffset()); + return this; + } + + /** + *

Opaque cursor representing the latest position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing the latest position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public _FinalStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOffsetOnlyMessage build() { + return new EventStreamCloudEventOffsetOnlyMessage(offset, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOffsetOnlyMessageTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOffsetOnlyMessageTypeEnum.java new file mode 100644 index 000000000..cb74969ab --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOffsetOnlyMessageTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOffsetOnlyMessageTypeEnum { + public static final EventStreamCloudEventOffsetOnlyMessageTypeEnum OFFSET_ONLY = + new EventStreamCloudEventOffsetOnlyMessageTypeEnum(Value.OFFSET_ONLY, "offset-only"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOffsetOnlyMessageTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOffsetOnlyMessageTypeEnum + && this.string.equals(((EventStreamCloudEventOffsetOnlyMessageTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OFFSET_ONLY: + return visitor.visitOffsetOnly(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOffsetOnlyMessageTypeEnum valueOf(String value) { + switch (value) { + case "offset-only": + return OFFSET_ONLY; + default: + return new EventStreamCloudEventOffsetOnlyMessageTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OFFSET_ONLY, + + UNKNOWN + } + + public interface Visitor { + T visitOffsetOnly(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAdded.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAdded.java new file mode 100644 index 000000000..ba9bbf010 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAdded.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionAdded.Builder.class) +public final class EventStreamCloudEventOrgConnectionAdded { + private final String offset; + + private final EventStreamCloudEventOrgConnectionAddedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionAdded( + String offset, + EventStreamCloudEventOrgConnectionAddedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventOrgConnectionAddedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAdded + && equalTo((EventStreamCloudEventOrgConnectionAdded) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAdded other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOrgConnectionAdded other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventOrgConnectionAddedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionAdded build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventOrgConnectionAddedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionAdded other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventOrgConnectionAddedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAdded build() { + return new EventStreamCloudEventOrgConnectionAdded(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedCloudEvent.java new file mode 100644 index 000000000..315e2d042 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionAddedCloudEvent.Builder.class) +public final class EventStreamCloudEventOrgConnectionAddedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventOrgConnectionAddedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionAddedCloudEvent( + String specversion, + EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventOrgConnectionAddedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventOrgConnectionAddedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAddedCloudEvent + && equalTo((EventStreamCloudEventOrgConnectionAddedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAddedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventOrgConnectionAddedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventOrgConnectionAddedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionAddedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventOrgConnectionAddedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionAddedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventOrgConnectionAddedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAddedCloudEvent build() { + return new EventStreamCloudEventOrgConnectionAddedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum.java new file mode 100644 index 000000000..08b6d09e6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum { + public static final EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum ORGANIZATION_CONNECTION_ADDED = + new EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum( + Value.ORGANIZATION_CONNECTION_ADDED, "organization.connection.added"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_CONNECTION_ADDED: + return visitor.visitOrganizationConnectionAdded(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "organization.connection.added": + return ORGANIZATION_CONNECTION_ADDED; + default: + return new EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_CONNECTION_ADDED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationConnectionAdded(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedData.java new file mode 100644 index 000000000..3f2f44c93 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionAddedData.Builder.class) +public final class EventStreamCloudEventOrgConnectionAddedData { + private final EventStreamCloudEventOrgConnectionAddedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionAddedData( + EventStreamCloudEventOrgConnectionAddedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventOrgConnectionAddedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAddedData + && equalTo((EventStreamCloudEventOrgConnectionAddedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAddedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventOrgConnectionAddedObject object); + + Builder from(EventStreamCloudEventOrgConnectionAddedData other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionAddedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventOrgConnectionAddedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionAddedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventOrgConnectionAddedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAddedData build() { + return new EventStreamCloudEventOrgConnectionAddedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObject.java new file mode 100644 index 000000000..385a467e3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObject.java @@ -0,0 +1,304 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionAddedObject.Builder.class) +public final class EventStreamCloudEventOrgConnectionAddedObject { + private final EventStreamCloudEventOrgConnectionAddedObjectOrganization organization; + + private final EventStreamCloudEventOrgConnectionAddedObjectConnection connection; + + private final Optional assignMembershipOnLogin; + + private final Optional showAsButton; + + private final Optional isSignupEnabled; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionAddedObject( + EventStreamCloudEventOrgConnectionAddedObjectOrganization organization, + EventStreamCloudEventOrgConnectionAddedObjectConnection connection, + Optional assignMembershipOnLogin, + Optional showAsButton, + Optional isSignupEnabled, + Map additionalProperties) { + this.organization = organization; + this.connection = connection; + this.assignMembershipOnLogin = assignMembershipOnLogin; + this.showAsButton = showAsButton; + this.isSignupEnabled = isSignupEnabled; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgConnectionAddedObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("connection") + public EventStreamCloudEventOrgConnectionAddedObjectConnection getConnection() { + return connection; + } + + /** + * @return When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection. + */ + @JsonProperty("assign_membership_on_login") + public Optional getAssignMembershipOnLogin() { + return assignMembershipOnLogin; + } + + /** + * @return Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + /** + * @return Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections. + */ + @JsonProperty("is_signup_enabled") + public Optional getIsSignupEnabled() { + return isSignupEnabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAddedObject + && equalTo((EventStreamCloudEventOrgConnectionAddedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAddedObject other) { + return organization.equals(other.organization) + && connection.equals(other.connection) + && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) + && showAsButton.equals(other.showAsButton) + && isSignupEnabled.equals(other.isSignupEnabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.organization, + this.connection, + this.assignMembershipOnLogin, + this.showAsButton, + this.isSignupEnabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + ConnectionStage organization(@NotNull EventStreamCloudEventOrgConnectionAddedObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgConnectionAddedObject other); + } + + public interface ConnectionStage { + _FinalStage connection(@NotNull EventStreamCloudEventOrgConnectionAddedObjectConnection connection); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionAddedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection.

+ */ + _FinalStage assignMembershipOnLogin(Optional assignMembershipOnLogin); + + _FinalStage assignMembershipOnLogin(Boolean assignMembershipOnLogin); + + /** + *

Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections.

+ */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + + /** + *

Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections.

+ */ + _FinalStage isSignupEnabled(Optional isSignupEnabled); + + _FinalStage isSignupEnabled(Boolean isSignupEnabled); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, ConnectionStage, _FinalStage { + private EventStreamCloudEventOrgConnectionAddedObjectOrganization organization; + + private EventStreamCloudEventOrgConnectionAddedObjectConnection connection; + + private Optional isSignupEnabled = Optional.empty(); + + private Optional showAsButton = Optional.empty(); + + private Optional assignMembershipOnLogin = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionAddedObject other) { + organization(other.getOrganization()); + connection(other.getConnection()); + assignMembershipOnLogin(other.getAssignMembershipOnLogin()); + showAsButton(other.getShowAsButton()); + isSignupEnabled(other.getIsSignupEnabled()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public ConnectionStage organization( + @NotNull EventStreamCloudEventOrgConnectionAddedObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("connection") + public _FinalStage connection(@NotNull EventStreamCloudEventOrgConnectionAddedObjectConnection connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + /** + *

Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isSignupEnabled(Boolean isSignupEnabled) { + this.isSignupEnabled = Optional.ofNullable(isSignupEnabled); + return this; + } + + /** + *

Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections.

+ */ + @java.lang.Override + @JsonSetter(value = "is_signup_enabled", nulls = Nulls.SKIP) + public _FinalStage isSignupEnabled(Optional isSignupEnabled) { + this.isSignupEnabled = isSignupEnabled; + return this; + } + + /** + *

Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections.

+ */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + /** + *

When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage assignMembershipOnLogin(Boolean assignMembershipOnLogin) { + this.assignMembershipOnLogin = Optional.ofNullable(assignMembershipOnLogin); + return this; + } + + /** + *

When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection.

+ */ + @java.lang.Override + @JsonSetter(value = "assign_membership_on_login", nulls = Nulls.SKIP) + public _FinalStage assignMembershipOnLogin(Optional assignMembershipOnLogin) { + this.assignMembershipOnLogin = assignMembershipOnLogin; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAddedObject build() { + return new EventStreamCloudEventOrgConnectionAddedObject( + organization, + connection, + assignMembershipOnLogin, + showAsButton, + isSignupEnabled, + additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectConnection.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectConnection.java new file mode 100644 index 000000000..e9d4a1646 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectConnection.java @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionAddedObjectConnection.Builder.class) +public final class EventStreamCloudEventOrgConnectionAddedObjectConnection { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionAddedObjectConnection( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the connection. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAddedObjectConnection + && equalTo((EventStreamCloudEventOrgConnectionAddedObjectConnection) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAddedObjectConnection other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The ID of the connection.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgConnectionAddedObjectConnection other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionAddedObjectConnection build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionAddedObjectConnection other) { + id(other.getId()); + return this; + } + + /** + *

The ID of the connection.

+ *

The ID of the connection.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAddedObjectConnection build() { + return new EventStreamCloudEventOrgConnectionAddedObjectConnection(id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganization.java new file mode 100644 index 000000000..6dbc5e0d9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganization.java @@ -0,0 +1,174 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionAddedObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgConnectionAddedObjectOrganization { + private final Optional name; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionAddedObjectOrganization( + Optional name, String id, Map additionalProperties) { + this.name = name; + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAddedObjectOrganization + && equalTo((EventStreamCloudEventOrgConnectionAddedObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAddedObjectOrganization other) { + return name.equals(other.name) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

ID of the organization.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgConnectionAddedObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionAddedObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionAddedObjectOrganization other) { + name(other.getName()); + id(other.getId()); + return this; + } + + /** + *

ID of the organization.

+ *

ID of the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAddedObjectOrganization build() { + return new EventStreamCloudEventOrgConnectionAddedObjectOrganization(name, id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedTypeEnum.java new file mode 100644 index 000000000..52db65cc3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgConnectionAddedTypeEnum { + public static final EventStreamCloudEventOrgConnectionAddedTypeEnum ORGANIZATION_CONNECTION_ADDED = + new EventStreamCloudEventOrgConnectionAddedTypeEnum( + Value.ORGANIZATION_CONNECTION_ADDED, "organization.connection.added"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgConnectionAddedTypeEnum + && this.string.equals(((EventStreamCloudEventOrgConnectionAddedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_CONNECTION_ADDED: + return visitor.visitOrganizationConnectionAdded(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedTypeEnum valueOf(String value) { + switch (value) { + case "organization.connection.added": + return ORGANIZATION_CONNECTION_ADDED; + default: + return new EventStreamCloudEventOrgConnectionAddedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_CONNECTION_ADDED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationConnectionAdded(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemoved.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemoved.java new file mode 100644 index 000000000..8c0be8d18 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemoved.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionRemoved.Builder.class) +public final class EventStreamCloudEventOrgConnectionRemoved { + private final String offset; + + private final EventStreamCloudEventOrgConnectionRemovedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionRemoved( + String offset, + EventStreamCloudEventOrgConnectionRemovedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventOrgConnectionRemovedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionRemoved + && equalTo((EventStreamCloudEventOrgConnectionRemoved) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionRemoved other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOrgConnectionRemoved other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventOrgConnectionRemovedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionRemoved build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventOrgConnectionRemovedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionRemoved other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventOrgConnectionRemovedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionRemoved build() { + return new EventStreamCloudEventOrgConnectionRemoved(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedCloudEvent.java new file mode 100644 index 000000000..c0d77abe3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionRemovedCloudEvent.Builder.class) +public final class EventStreamCloudEventOrgConnectionRemovedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventOrgConnectionRemovedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionRemovedCloudEvent( + String specversion, + EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventOrgConnectionRemovedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventOrgConnectionRemovedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionRemovedCloudEvent + && equalTo((EventStreamCloudEventOrgConnectionRemovedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionRemovedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventOrgConnectionRemovedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventOrgConnectionRemovedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionRemovedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventOrgConnectionRemovedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionRemovedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventOrgConnectionRemovedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionRemovedCloudEvent build() { + return new EventStreamCloudEventOrgConnectionRemovedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum.java new file mode 100644 index 000000000..280c6ae51 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum { + public static final EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum ORGANIZATION_CONNECTION_REMOVED = + new EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum( + Value.ORGANIZATION_CONNECTION_REMOVED, "organization.connection.removed"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_CONNECTION_REMOVED: + return visitor.visitOrganizationConnectionRemoved(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "organization.connection.removed": + return ORGANIZATION_CONNECTION_REMOVED; + default: + return new EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_CONNECTION_REMOVED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationConnectionRemoved(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedData.java new file mode 100644 index 000000000..e733915b9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionRemovedData.Builder.class) +public final class EventStreamCloudEventOrgConnectionRemovedData { + private final EventStreamCloudEventOrgConnectionRemovedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionRemovedData( + EventStreamCloudEventOrgConnectionRemovedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventOrgConnectionRemovedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionRemovedData + && equalTo((EventStreamCloudEventOrgConnectionRemovedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionRemovedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventOrgConnectionRemovedObject object); + + Builder from(EventStreamCloudEventOrgConnectionRemovedData other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionRemovedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventOrgConnectionRemovedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionRemovedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventOrgConnectionRemovedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionRemovedData build() { + return new EventStreamCloudEventOrgConnectionRemovedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObject.java new file mode 100644 index 000000000..10d1a7068 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObject.java @@ -0,0 +1,145 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionRemovedObject.Builder.class) +public final class EventStreamCloudEventOrgConnectionRemovedObject { + private final EventStreamCloudEventOrgConnectionRemovedObjectOrganization organization; + + private final EventStreamCloudEventOrgConnectionRemovedObjectConnection connection; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionRemovedObject( + EventStreamCloudEventOrgConnectionRemovedObjectOrganization organization, + EventStreamCloudEventOrgConnectionRemovedObjectConnection connection, + Map additionalProperties) { + this.organization = organization; + this.connection = connection; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgConnectionRemovedObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("connection") + public EventStreamCloudEventOrgConnectionRemovedObjectConnection getConnection() { + return connection; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionRemovedObject + && equalTo((EventStreamCloudEventOrgConnectionRemovedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionRemovedObject other) { + return organization.equals(other.organization) && connection.equals(other.connection); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.connection); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + ConnectionStage organization(@NotNull EventStreamCloudEventOrgConnectionRemovedObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgConnectionRemovedObject other); + } + + public interface ConnectionStage { + _FinalStage connection(@NotNull EventStreamCloudEventOrgConnectionRemovedObjectConnection connection); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionRemovedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, ConnectionStage, _FinalStage { + private EventStreamCloudEventOrgConnectionRemovedObjectOrganization organization; + + private EventStreamCloudEventOrgConnectionRemovedObjectConnection connection; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionRemovedObject other) { + organization(other.getOrganization()); + connection(other.getConnection()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public ConnectionStage organization( + @NotNull EventStreamCloudEventOrgConnectionRemovedObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("connection") + public _FinalStage connection(@NotNull EventStreamCloudEventOrgConnectionRemovedObjectConnection connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionRemovedObject build() { + return new EventStreamCloudEventOrgConnectionRemovedObject(organization, connection, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectConnection.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectConnection.java new file mode 100644 index 000000000..d2774af3b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectConnection.java @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionRemovedObjectConnection.Builder.class) +public final class EventStreamCloudEventOrgConnectionRemovedObjectConnection { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionRemovedObjectConnection( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the connection. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionRemovedObjectConnection + && equalTo((EventStreamCloudEventOrgConnectionRemovedObjectConnection) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionRemovedObjectConnection other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The ID of the connection.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgConnectionRemovedObjectConnection other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionRemovedObjectConnection build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionRemovedObjectConnection other) { + id(other.getId()); + return this; + } + + /** + *

The ID of the connection.

+ *

The ID of the connection.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionRemovedObjectConnection build() { + return new EventStreamCloudEventOrgConnectionRemovedObjectConnection(id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectOrganization.java new file mode 100644 index 000000000..3523d774b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectOrganization.java @@ -0,0 +1,174 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionRemovedObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgConnectionRemovedObjectOrganization { + private final Optional name; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionRemovedObjectOrganization( + Optional name, String id, Map additionalProperties) { + this.name = name; + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionRemovedObjectOrganization + && equalTo((EventStreamCloudEventOrgConnectionRemovedObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionRemovedObjectOrganization other) { + return name.equals(other.name) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

ID of the organization.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgConnectionRemovedObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionRemovedObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionRemovedObjectOrganization other) { + name(other.getName()); + id(other.getId()); + return this; + } + + /** + *

ID of the organization.

+ *

ID of the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionRemovedObjectOrganization build() { + return new EventStreamCloudEventOrgConnectionRemovedObjectOrganization(name, id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedTypeEnum.java new file mode 100644 index 000000000..b595d59c2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgConnectionRemovedTypeEnum { + public static final EventStreamCloudEventOrgConnectionRemovedTypeEnum ORGANIZATION_CONNECTION_REMOVED = + new EventStreamCloudEventOrgConnectionRemovedTypeEnum( + Value.ORGANIZATION_CONNECTION_REMOVED, "organization.connection.removed"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionRemovedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgConnectionRemovedTypeEnum + && this.string.equals(((EventStreamCloudEventOrgConnectionRemovedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_CONNECTION_REMOVED: + return visitor.visitOrganizationConnectionRemoved(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionRemovedTypeEnum valueOf(String value) { + switch (value) { + case "organization.connection.removed": + return ORGANIZATION_CONNECTION_REMOVED; + default: + return new EventStreamCloudEventOrgConnectionRemovedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_CONNECTION_REMOVED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationConnectionRemoved(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdated.java new file mode 100644 index 000000000..7b7ecbe60 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdated.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionUpdated.Builder.class) +public final class EventStreamCloudEventOrgConnectionUpdated { + private final String offset; + + private final EventStreamCloudEventOrgConnectionUpdatedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionUpdated( + String offset, + EventStreamCloudEventOrgConnectionUpdatedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventOrgConnectionUpdatedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdated + && equalTo((EventStreamCloudEventOrgConnectionUpdated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionUpdated other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOrgConnectionUpdated other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventOrgConnectionUpdatedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionUpdated build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventOrgConnectionUpdatedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionUpdated other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventOrgConnectionUpdatedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdated build() { + return new EventStreamCloudEventOrgConnectionUpdated(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedCloudEvent.java new file mode 100644 index 000000000..65604425d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionUpdatedCloudEvent.Builder.class) +public final class EventStreamCloudEventOrgConnectionUpdatedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventOrgConnectionUpdatedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionUpdatedCloudEvent( + String specversion, + EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventOrgConnectionUpdatedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventOrgConnectionUpdatedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdatedCloudEvent + && equalTo((EventStreamCloudEventOrgConnectionUpdatedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventOrgConnectionUpdatedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventOrgConnectionUpdatedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionUpdatedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventOrgConnectionUpdatedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionUpdatedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventOrgConnectionUpdatedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdatedCloudEvent build() { + return new EventStreamCloudEventOrgConnectionUpdatedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum.java new file mode 100644 index 000000000..8e304ea83 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum { + public static final EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum ORGANIZATION_CONNECTION_UPDATED = + new EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum( + Value.ORGANIZATION_CONNECTION_UPDATED, "organization.connection.updated"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_CONNECTION_UPDATED: + return visitor.visitOrganizationConnectionUpdated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "organization.connection.updated": + return ORGANIZATION_CONNECTION_UPDATED; + default: + return new EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_CONNECTION_UPDATED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationConnectionUpdated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedData.java new file mode 100644 index 000000000..66d342133 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionUpdatedData.Builder.class) +public final class EventStreamCloudEventOrgConnectionUpdatedData { + private final EventStreamCloudEventOrgConnectionUpdatedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionUpdatedData( + EventStreamCloudEventOrgConnectionUpdatedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventOrgConnectionUpdatedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdatedData + && equalTo((EventStreamCloudEventOrgConnectionUpdatedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventOrgConnectionUpdatedObject object); + + Builder from(EventStreamCloudEventOrgConnectionUpdatedData other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionUpdatedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventOrgConnectionUpdatedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionUpdatedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventOrgConnectionUpdatedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdatedData build() { + return new EventStreamCloudEventOrgConnectionUpdatedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObject.java new file mode 100644 index 000000000..15c1d971b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObject.java @@ -0,0 +1,304 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionUpdatedObject.Builder.class) +public final class EventStreamCloudEventOrgConnectionUpdatedObject { + private final EventStreamCloudEventOrgConnectionUpdatedObjectOrganization organization; + + private final EventStreamCloudEventOrgConnectionUpdatedObjectConnection connection; + + private final Optional assignMembershipOnLogin; + + private final Optional showAsButton; + + private final Optional isSignupEnabled; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionUpdatedObject( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganization organization, + EventStreamCloudEventOrgConnectionUpdatedObjectConnection connection, + Optional assignMembershipOnLogin, + Optional showAsButton, + Optional isSignupEnabled, + Map additionalProperties) { + this.organization = organization; + this.connection = connection; + this.assignMembershipOnLogin = assignMembershipOnLogin; + this.showAsButton = showAsButton; + this.isSignupEnabled = isSignupEnabled; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgConnectionUpdatedObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("connection") + public EventStreamCloudEventOrgConnectionUpdatedObjectConnection getConnection() { + return connection; + } + + /** + * @return When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection. + */ + @JsonProperty("assign_membership_on_login") + public Optional getAssignMembershipOnLogin() { + return assignMembershipOnLogin; + } + + /** + * @return Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + /** + * @return Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections. + */ + @JsonProperty("is_signup_enabled") + public Optional getIsSignupEnabled() { + return isSignupEnabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdatedObject + && equalTo((EventStreamCloudEventOrgConnectionUpdatedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedObject other) { + return organization.equals(other.organization) + && connection.equals(other.connection) + && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) + && showAsButton.equals(other.showAsButton) + && isSignupEnabled.equals(other.isSignupEnabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.organization, + this.connection, + this.assignMembershipOnLogin, + this.showAsButton, + this.isSignupEnabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + ConnectionStage organization(@NotNull EventStreamCloudEventOrgConnectionUpdatedObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgConnectionUpdatedObject other); + } + + public interface ConnectionStage { + _FinalStage connection(@NotNull EventStreamCloudEventOrgConnectionUpdatedObjectConnection connection); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionUpdatedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection.

+ */ + _FinalStage assignMembershipOnLogin(Optional assignMembershipOnLogin); + + _FinalStage assignMembershipOnLogin(Boolean assignMembershipOnLogin); + + /** + *

Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections.

+ */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + + /** + *

Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections.

+ */ + _FinalStage isSignupEnabled(Optional isSignupEnabled); + + _FinalStage isSignupEnabled(Boolean isSignupEnabled); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, ConnectionStage, _FinalStage { + private EventStreamCloudEventOrgConnectionUpdatedObjectOrganization organization; + + private EventStreamCloudEventOrgConnectionUpdatedObjectConnection connection; + + private Optional isSignupEnabled = Optional.empty(); + + private Optional showAsButton = Optional.empty(); + + private Optional assignMembershipOnLogin = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionUpdatedObject other) { + organization(other.getOrganization()); + connection(other.getConnection()); + assignMembershipOnLogin(other.getAssignMembershipOnLogin()); + showAsButton(other.getShowAsButton()); + isSignupEnabled(other.getIsSignupEnabled()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public ConnectionStage organization( + @NotNull EventStreamCloudEventOrgConnectionUpdatedObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("connection") + public _FinalStage connection(@NotNull EventStreamCloudEventOrgConnectionUpdatedObjectConnection connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + /** + *

Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isSignupEnabled(Boolean isSignupEnabled) { + this.isSignupEnabled = Optional.ofNullable(isSignupEnabled); + return this; + } + + /** + *

Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections.

+ */ + @java.lang.Override + @JsonSetter(value = "is_signup_enabled", nulls = Nulls.SKIP) + public _FinalStage isSignupEnabled(Optional isSignupEnabled) { + this.isSignupEnabled = isSignupEnabled; + return this; + } + + /** + *

Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections.

+ */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + /** + *

When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage assignMembershipOnLogin(Boolean assignMembershipOnLogin) { + this.assignMembershipOnLogin = Optional.ofNullable(assignMembershipOnLogin); + return this; + } + + /** + *

When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection.

+ */ + @java.lang.Override + @JsonSetter(value = "assign_membership_on_login", nulls = Nulls.SKIP) + public _FinalStage assignMembershipOnLogin(Optional assignMembershipOnLogin) { + this.assignMembershipOnLogin = assignMembershipOnLogin; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdatedObject build() { + return new EventStreamCloudEventOrgConnectionUpdatedObject( + organization, + connection, + assignMembershipOnLogin, + showAsButton, + isSignupEnabled, + additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectConnection.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectConnection.java new file mode 100644 index 000000000..41eaa70f0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectConnection.java @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionUpdatedObjectConnection.Builder.class) +public final class EventStreamCloudEventOrgConnectionUpdatedObjectConnection { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionUpdatedObjectConnection( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the connection. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdatedObjectConnection + && equalTo((EventStreamCloudEventOrgConnectionUpdatedObjectConnection) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedObjectConnection other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The ID of the connection.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgConnectionUpdatedObjectConnection other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionUpdatedObjectConnection build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionUpdatedObjectConnection other) { + id(other.getId()); + return this; + } + + /** + *

The ID of the connection.

+ *

The ID of the connection.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdatedObjectConnection build() { + return new EventStreamCloudEventOrgConnectionUpdatedObjectConnection(id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganization.java new file mode 100644 index 000000000..a1c161622 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganization.java @@ -0,0 +1,174 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionUpdatedObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgConnectionUpdatedObjectOrganization { + private final Optional name; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionUpdatedObjectOrganization( + Optional name, String id, Map additionalProperties) { + this.name = name; + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdatedObjectOrganization + && equalTo((EventStreamCloudEventOrgConnectionUpdatedObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedObjectOrganization other) { + return name.equals(other.name) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

ID of the organization.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgConnectionUpdatedObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionUpdatedObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionUpdatedObjectOrganization other) { + name(other.getName()); + id(other.getId()); + return this; + } + + /** + *

ID of the organization.

+ *

ID of the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdatedObjectOrganization build() { + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganization(name, id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedTypeEnum.java new file mode 100644 index 000000000..c7447291f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgConnectionUpdatedTypeEnum { + public static final EventStreamCloudEventOrgConnectionUpdatedTypeEnum ORGANIZATION_CONNECTION_UPDATED = + new EventStreamCloudEventOrgConnectionUpdatedTypeEnum( + Value.ORGANIZATION_CONNECTION_UPDATED, "organization.connection.updated"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgConnectionUpdatedTypeEnum + && this.string.equals(((EventStreamCloudEventOrgConnectionUpdatedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_CONNECTION_UPDATED: + return visitor.visitOrganizationConnectionUpdated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedTypeEnum valueOf(String value) { + switch (value) { + case "organization.connection.updated": + return ORGANIZATION_CONNECTION_UPDATED; + default: + return new EventStreamCloudEventOrgConnectionUpdatedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_CONNECTION_UPDATED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationConnectionUpdated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreated.java new file mode 100644 index 000000000..e168f6334 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreated.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgCreated.Builder.class) +public final class EventStreamCloudEventOrgCreated { + private final String offset; + + private final EventStreamCloudEventOrgCreatedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgCreated( + String offset, EventStreamCloudEventOrgCreatedCloudEvent event, Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventOrgCreatedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgCreated && equalTo((EventStreamCloudEventOrgCreated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgCreated other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOrgCreated other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventOrgCreatedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventOrgCreated build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventOrgCreatedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgCreated other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventOrgCreatedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgCreated build() { + return new EventStreamCloudEventOrgCreated(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedCloudEvent.java new file mode 100644 index 000000000..a593ff35f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgCreatedCloudEvent.Builder.class) +public final class EventStreamCloudEventOrgCreatedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventOrgCreatedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventOrgCreatedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgCreatedCloudEvent( + String specversion, + EventStreamCloudEventOrgCreatedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventOrgCreatedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgCreatedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventOrgCreatedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgCreatedCloudEvent + && equalTo((EventStreamCloudEventOrgCreatedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgCreatedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventOrgCreatedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventOrgCreatedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventOrgCreatedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventOrgCreatedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventOrgCreatedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventOrgCreatedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgCreatedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventOrgCreatedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventOrgCreatedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgCreatedCloudEvent build() { + return new EventStreamCloudEventOrgCreatedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedCloudEventTypeEnum.java new file mode 100644 index 000000000..051a551e5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedCloudEventTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgCreatedCloudEventTypeEnum { + public static final EventStreamCloudEventOrgCreatedCloudEventTypeEnum ORGANIZATION_CREATED = + new EventStreamCloudEventOrgCreatedCloudEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgCreatedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgCreatedCloudEventTypeEnum + && this.string.equals(((EventStreamCloudEventOrgCreatedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_CREATED: + return visitor.visitOrganizationCreated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgCreatedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "organization.created": + return ORGANIZATION_CREATED; + default: + return new EventStreamCloudEventOrgCreatedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_CREATED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationCreated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedData.java new file mode 100644 index 000000000..c9020f10d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgCreatedData.Builder.class) +public final class EventStreamCloudEventOrgCreatedData { + private final EventStreamCloudEventOrgCreatedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgCreatedData( + EventStreamCloudEventOrgCreatedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventOrgCreatedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgCreatedData + && equalTo((EventStreamCloudEventOrgCreatedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgCreatedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventOrgCreatedObject object); + + Builder from(EventStreamCloudEventOrgCreatedData other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgCreatedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventOrgCreatedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgCreatedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventOrgCreatedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgCreatedData build() { + return new EventStreamCloudEventOrgCreatedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObject.java new file mode 100644 index 000000000..5e1d4223e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObject.java @@ -0,0 +1,281 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgCreatedObject.Builder.class) +public final class EventStreamCloudEventOrgCreatedObject { + private final Optional name; + + private final String id; + + private final Optional displayName; + + private final Optional> metadata; + + private final Optional branding; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgCreatedObject( + Optional name, + String id, + Optional displayName, + Optional> metadata, + Optional branding, + Map additionalProperties) { + this.name = name; + this.id = id; + this.displayName = displayName; + this.metadata = metadata; + this.branding = branding; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return If set, the name that will be displayed to end-users for this organization in any interaction with them. + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + @JsonProperty("metadata") + public Optional> getMetadata() { + return metadata; + } + + @JsonProperty("branding") + public Optional getBranding() { + return branding; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgCreatedObject + && equalTo((EventStreamCloudEventOrgCreatedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgCreatedObject other) { + return name.equals(other.name) + && id.equals(other.id) + && displayName.equals(other.displayName) + && metadata.equals(other.metadata) + && branding.equals(other.branding); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id, this.displayName, this.metadata, this.branding); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

ID of the organization.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgCreatedObject other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgCreatedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

If set, the name that will be displayed to end-users for this organization in any interaction with them.

+ */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + _FinalStage metadata(Optional> metadata); + + _FinalStage metadata(Map metadata); + + _FinalStage branding(Optional branding); + + _FinalStage branding(EventStreamCloudEventOrgCreatedObjectBranding branding); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional branding = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgCreatedObject other) { + name(other.getName()); + id(other.getId()); + displayName(other.getDisplayName()); + metadata(other.getMetadata()); + branding(other.getBranding()); + return this; + } + + /** + *

ID of the organization.

+ *

ID of the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage branding(EventStreamCloudEventOrgCreatedObjectBranding branding) { + this.branding = Optional.ofNullable(branding); + return this; + } + + @java.lang.Override + @JsonSetter(value = "branding", nulls = Nulls.SKIP) + public _FinalStage branding(Optional branding) { + this.branding = branding; + return this; + } + + @java.lang.Override + public _FinalStage metadata(Map metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional> metadata) { + this.metadata = metadata; + return this; + } + + /** + *

If set, the name that will be displayed to end-users for this organization in any interaction with them.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

If set, the name that will be displayed to end-users for this organization in any interaction with them.

+ */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgCreatedObject build() { + return new EventStreamCloudEventOrgCreatedObject( + name, id, displayName, metadata, branding, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObjectBranding.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObjectBranding.java new file mode 100644 index 000000000..0875091b5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObjectBranding.java @@ -0,0 +1,137 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgCreatedObjectBranding.Builder.class) +public final class EventStreamCloudEventOrgCreatedObjectBranding { + private final Optional logoUrl; + + private final Optional colors; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgCreatedObjectBranding( + Optional logoUrl, + Optional colors, + Map additionalProperties) { + this.logoUrl = logoUrl; + this.colors = colors; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of logo to display on login page. + */ + @JsonProperty("logo_url") + public Optional getLogoUrl() { + return logoUrl; + } + + @JsonProperty("colors") + public Optional getColors() { + return colors; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgCreatedObjectBranding + && equalTo((EventStreamCloudEventOrgCreatedObjectBranding) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgCreatedObjectBranding other) { + return logoUrl.equals(other.logoUrl) && colors.equals(other.colors); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.logoUrl, this.colors); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional logoUrl = Optional.empty(); + + private Optional colors = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventOrgCreatedObjectBranding other) { + logoUrl(other.getLogoUrl()); + colors(other.getColors()); + return this; + } + + /** + *

URL of logo to display on login page.

+ */ + @JsonSetter(value = "logo_url", nulls = Nulls.SKIP) + public Builder logoUrl(Optional logoUrl) { + this.logoUrl = logoUrl; + return this; + } + + public Builder logoUrl(String logoUrl) { + this.logoUrl = Optional.ofNullable(logoUrl); + return this; + } + + @JsonSetter(value = "colors", nulls = Nulls.SKIP) + public Builder colors(Optional colors) { + this.colors = colors; + return this; + } + + public Builder colors(EventStreamCloudEventOrgCreatedObjectBrandingColors colors) { + this.colors = Optional.ofNullable(colors); + return this; + } + + public EventStreamCloudEventOrgCreatedObjectBranding build() { + return new EventStreamCloudEventOrgCreatedObjectBranding(logoUrl, colors, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObjectBrandingColors.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObjectBrandingColors.java new file mode 100644 index 000000000..54c10654f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObjectBrandingColors.java @@ -0,0 +1,142 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgCreatedObjectBrandingColors.Builder.class) +public final class EventStreamCloudEventOrgCreatedObjectBrandingColors { + private final Optional primary; + + private final Optional pageBackground; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgCreatedObjectBrandingColors( + Optional primary, Optional pageBackground, Map additionalProperties) { + this.primary = primary; + this.pageBackground = pageBackground; + this.additionalProperties = additionalProperties; + } + + /** + * @return HEX Color for primary elements. + */ + @JsonProperty("primary") + public Optional getPrimary() { + return primary; + } + + /** + * @return HEX Color for background. + */ + @JsonProperty("page_background") + public Optional getPageBackground() { + return pageBackground; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgCreatedObjectBrandingColors + && equalTo((EventStreamCloudEventOrgCreatedObjectBrandingColors) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgCreatedObjectBrandingColors other) { + return primary.equals(other.primary) && pageBackground.equals(other.pageBackground); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.primary, this.pageBackground); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional primary = Optional.empty(); + + private Optional pageBackground = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventOrgCreatedObjectBrandingColors other) { + primary(other.getPrimary()); + pageBackground(other.getPageBackground()); + return this; + } + + /** + *

HEX Color for primary elements.

+ */ + @JsonSetter(value = "primary", nulls = Nulls.SKIP) + public Builder primary(Optional primary) { + this.primary = primary; + return this; + } + + public Builder primary(String primary) { + this.primary = Optional.ofNullable(primary); + return this; + } + + /** + *

HEX Color for background.

+ */ + @JsonSetter(value = "page_background", nulls = Nulls.SKIP) + public Builder pageBackground(Optional pageBackground) { + this.pageBackground = pageBackground; + return this; + } + + public Builder pageBackground(String pageBackground) { + this.pageBackground = Optional.ofNullable(pageBackground); + return this; + } + + public EventStreamCloudEventOrgCreatedObjectBrandingColors build() { + return new EventStreamCloudEventOrgCreatedObjectBrandingColors( + primary, pageBackground, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedTypeEnum.java new file mode 100644 index 000000000..4d9de340f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgCreatedTypeEnum { + public static final EventStreamCloudEventOrgCreatedTypeEnum ORGANIZATION_CREATED = + new EventStreamCloudEventOrgCreatedTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgCreatedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgCreatedTypeEnum + && this.string.equals(((EventStreamCloudEventOrgCreatedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_CREATED: + return visitor.visitOrganizationCreated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgCreatedTypeEnum valueOf(String value) { + switch (value) { + case "organization.created": + return ORGANIZATION_CREATED; + default: + return new EventStreamCloudEventOrgCreatedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_CREATED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationCreated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeleted.java new file mode 100644 index 000000000..f0444b0ee --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeleted.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgDeleted.Builder.class) +public final class EventStreamCloudEventOrgDeleted { + private final String offset; + + private final EventStreamCloudEventOrgDeletedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgDeleted( + String offset, EventStreamCloudEventOrgDeletedCloudEvent event, Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventOrgDeletedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgDeleted && equalTo((EventStreamCloudEventOrgDeleted) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgDeleted other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOrgDeleted other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventOrgDeletedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventOrgDeleted build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventOrgDeletedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgDeleted other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventOrgDeletedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgDeleted build() { + return new EventStreamCloudEventOrgDeleted(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedCloudEvent.java new file mode 100644 index 000000000..ff7384e5c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgDeletedCloudEvent.Builder.class) +public final class EventStreamCloudEventOrgDeletedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventOrgDeletedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventOrgDeletedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgDeletedCloudEvent( + String specversion, + EventStreamCloudEventOrgDeletedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventOrgDeletedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgDeletedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventOrgDeletedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgDeletedCloudEvent + && equalTo((EventStreamCloudEventOrgDeletedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgDeletedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventOrgDeletedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventOrgDeletedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventOrgDeletedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventOrgDeletedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventOrgDeletedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventOrgDeletedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgDeletedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventOrgDeletedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventOrgDeletedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgDeletedCloudEvent build() { + return new EventStreamCloudEventOrgDeletedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedCloudEventTypeEnum.java new file mode 100644 index 000000000..9ae80b6d4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedCloudEventTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgDeletedCloudEventTypeEnum { + public static final EventStreamCloudEventOrgDeletedCloudEventTypeEnum ORGANIZATION_DELETED = + new EventStreamCloudEventOrgDeletedCloudEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgDeletedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgDeletedCloudEventTypeEnum + && this.string.equals(((EventStreamCloudEventOrgDeletedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_DELETED: + return visitor.visitOrganizationDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgDeletedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "organization.deleted": + return ORGANIZATION_DELETED; + default: + return new EventStreamCloudEventOrgDeletedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedData.java new file mode 100644 index 000000000..0eb937bf6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgDeletedData.Builder.class) +public final class EventStreamCloudEventOrgDeletedData { + private final EventStreamCloudEventOrgDeletedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgDeletedData( + EventStreamCloudEventOrgDeletedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventOrgDeletedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgDeletedData + && equalTo((EventStreamCloudEventOrgDeletedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgDeletedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventOrgDeletedObject object); + + Builder from(EventStreamCloudEventOrgDeletedData other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgDeletedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventOrgDeletedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgDeletedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventOrgDeletedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgDeletedData build() { + return new EventStreamCloudEventOrgDeletedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedObject.java new file mode 100644 index 000000000..5fcdbfef3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedObject.java @@ -0,0 +1,250 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgDeletedObject.Builder.class) +public final class EventStreamCloudEventOrgDeletedObject { + private final Optional name; + + private final String id; + + private final Optional displayName; + + private final Optional> metadata; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgDeletedObject( + Optional name, + String id, + Optional displayName, + Optional> metadata, + Map additionalProperties) { + this.name = name; + this.id = id; + this.displayName = displayName; + this.metadata = metadata; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return If set, the name that will be displayed to end-users for this organization in any interaction with them. + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + @JsonProperty("metadata") + public Optional> getMetadata() { + return metadata; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgDeletedObject + && equalTo((EventStreamCloudEventOrgDeletedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgDeletedObject other) { + return name.equals(other.name) + && id.equals(other.id) + && displayName.equals(other.displayName) + && metadata.equals(other.metadata); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id, this.displayName, this.metadata); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

ID of the organization.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgDeletedObject other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgDeletedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

If set, the name that will be displayed to end-users for this organization in any interaction with them.

+ */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + _FinalStage metadata(Optional> metadata); + + _FinalStage metadata(Map metadata); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional> metadata = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgDeletedObject other) { + name(other.getName()); + id(other.getId()); + displayName(other.getDisplayName()); + metadata(other.getMetadata()); + return this; + } + + /** + *

ID of the organization.

+ *

ID of the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage metadata(Map metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional> metadata) { + this.metadata = metadata; + return this; + } + + /** + *

If set, the name that will be displayed to end-users for this organization in any interaction with them.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

If set, the name that will be displayed to end-users for this organization in any interaction with them.

+ */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgDeletedObject build() { + return new EventStreamCloudEventOrgDeletedObject(name, id, displayName, metadata, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedTypeEnum.java new file mode 100644 index 000000000..bac451bce --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgDeletedTypeEnum { + public static final EventStreamCloudEventOrgDeletedTypeEnum ORGANIZATION_DELETED = + new EventStreamCloudEventOrgDeletedTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgDeletedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgDeletedTypeEnum + && this.string.equals(((EventStreamCloudEventOrgDeletedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_DELETED: + return visitor.visitOrganizationDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgDeletedTypeEnum valueOf(String value) { + switch (value) { + case "organization.deleted": + return ORGANIZATION_DELETED; + default: + return new EventStreamCloudEventOrgDeletedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssigned.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssigned.java new file mode 100644 index 000000000..fc22b3ce8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssigned.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssigned.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssigned { + private final String offset; + + private final EventStreamCloudEventOrgGroupRoleAssignedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssigned( + String offset, + EventStreamCloudEventOrgGroupRoleAssignedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventOrgGroupRoleAssignedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssigned + && equalTo((EventStreamCloudEventOrgGroupRoleAssigned) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssigned other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOrgGroupRoleAssigned other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventOrgGroupRoleAssignedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssigned build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventOrgGroupRoleAssignedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssigned other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventOrgGroupRoleAssignedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssigned build() { + return new EventStreamCloudEventOrgGroupRoleAssigned(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedCloudEvent.java new file mode 100644 index 000000000..0e19d0dc6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedCloudEvent.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventOrgGroupRoleAssignedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedCloudEvent( + String specversion, + EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventOrgGroupRoleAssignedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventOrgGroupRoleAssignedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedCloudEvent + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventOrgGroupRoleAssignedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventOrgGroupRoleAssignedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventOrgGroupRoleAssignedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedCloudEvent build() { + return new EventStreamCloudEventOrgGroupRoleAssignedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum.java new file mode 100644 index 000000000..941b9b918 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum { + public static final EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = + new EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum( + Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_GROUP_ROLE_ASSIGNED: + return visitor.visitOrganizationGroupRoleAssigned(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "organization.group.role.assigned": + return ORGANIZATION_GROUP_ROLE_ASSIGNED; + default: + return new EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_GROUP_ROLE_ASSIGNED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationGroupRoleAssigned(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedData.java new file mode 100644 index 000000000..de947ab2f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedData.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedData { + private final EventStreamCloudEventOrgGroupRoleAssignedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedData( + EventStreamCloudEventOrgGroupRoleAssignedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventOrgGroupRoleAssignedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedData + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObject object); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedData other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventOrgGroupRoleAssignedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedData build() { + return new EventStreamCloudEventOrgGroupRoleAssignedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObject.java new file mode 100644 index 000000000..c8c3cd959 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObject.java @@ -0,0 +1,207 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedObject.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedObject { + private final EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization organization; + + private final EventStreamCloudEventOrgGroupRoleAssignedObjectRole role; + + private final EventStreamCloudEventOrgGroupRoleAssignedObjectGroup group; + + private final OffsetDateTime createdAt; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedObject( + EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization organization, + EventStreamCloudEventOrgGroupRoleAssignedObjectRole role, + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup group, + OffsetDateTime createdAt, + Map additionalProperties) { + this.organization = organization; + this.role = role; + this.group = group; + this.createdAt = createdAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("role") + public EventStreamCloudEventOrgGroupRoleAssignedObjectRole getRole() { + return role; + } + + @JsonProperty("group") + public EventStreamCloudEventOrgGroupRoleAssignedObjectGroup getGroup() { + return group; + } + + /** + * @return The time at which the role was assigned to the group in the organization. + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedObject + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedObject other) { + return organization.equals(other.organization) + && role.equals(other.role) + && group.equals(other.group) + && createdAt.equals(other.createdAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.role, this.group, this.createdAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + RoleStage organization(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedObject other); + } + + public interface RoleStage { + GroupStage role(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObjectRole role); + } + + public interface GroupStage { + CreatedAtStage group(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObjectGroup group); + } + + public interface CreatedAtStage { + /** + *

The time at which the role was assigned to the group in the organization.

+ */ + _FinalStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, RoleStage, GroupStage, CreatedAtStage, _FinalStage { + private EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization organization; + + private EventStreamCloudEventOrgGroupRoleAssignedObjectRole role; + + private EventStreamCloudEventOrgGroupRoleAssignedObjectGroup group; + + private OffsetDateTime createdAt; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedObject other) { + organization(other.getOrganization()); + role(other.getRole()); + group(other.getGroup()); + createdAt(other.getCreatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public RoleStage organization( + @NotNull EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("role") + public GroupStage role(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObjectRole role) { + this.role = Objects.requireNonNull(role, "role must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("group") + public CreatedAtStage group(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObjectGroup group) { + this.group = Objects.requireNonNull(group, "group must not be null"); + return this; + } + + /** + *

The time at which the role was assigned to the group in the organization.

+ *

The time at which the role was assigned to the group in the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public _FinalStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedObject build() { + return new EventStreamCloudEventOrgGroupRoleAssignedObject( + organization, role, group, createdAt, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup.java new file mode 100644 index 000000000..3c4810ed9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventOrgGroupRoleAssignedObjectGroup.Deserializer.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedObjectGroup { + private final Object value; + + private final int type; + + private EventStreamCloudEventOrgGroupRoleAssignedObjectGroup(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedObjectGroup + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedObjectGroup) other); + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventOrgGroupRoleAssignedObjectGroup of( + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0 value) { + return new EventStreamCloudEventOrgGroupRoleAssignedObjectGroup(value, 0); + } + + public static EventStreamCloudEventOrgGroupRoleAssignedObjectGroup of( + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1 value) { + return new EventStreamCloudEventOrgGroupRoleAssignedObjectGroup(value, 1); + } + + public static EventStreamCloudEventOrgGroupRoleAssignedObjectGroup of( + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2 value) { + return new EventStreamCloudEventOrgGroupRoleAssignedObjectGroup(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0 value); + + T visit(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1 value); + + T visit(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup.class); + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedObjectGroup deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0.java new file mode 100644 index 000000000..f6400b15f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0.java @@ -0,0 +1,237 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0( + String id, + Optional externalId, + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0 + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0 other); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

The connection ID associated with the group.

+ */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The connection ID associated with the group.

+ *

The connection ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0 build() { + return new EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0( + id, externalId, type, connectionId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum.java new file mode 100644 index 000000000..dc33ac6d8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum { + public static final EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum CONNECTION = + new EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1.java new file mode 100644 index 000000000..e23039f89 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1.java @@ -0,0 +1,237 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1( + String id, + Optional externalId, + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1 + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1 other); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

The organization ID associated with the group.

+ */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The organization ID associated with the group.

+ *

The organization ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1 build() { + return new EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1( + id, externalId, type, organizationId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum.java new file mode 100644 index 000000000..100b9a068 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum { + public static final EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum ORGANIZATION = + new EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2.java new file mode 100644 index 000000000..994cc95f8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2.java @@ -0,0 +1,200 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2( + String id, + Optional externalId, + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2 + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2 other) { + return id.equals(other.id) && externalId.equals(other.externalId) && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2 other); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, _FinalStage { + private String id; + + private EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2 build() { + return new EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2( + id, externalId, type, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum.java new file mode 100644 index 000000000..226634285 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum { + public static final EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum TENANT = + new EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization.java new file mode 100644 index 000000000..bdfd5d157 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization.java @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

ID of the organization.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization other) { + id(other.getId()); + return this; + } + + /** + *

ID of the organization.

+ *

ID of the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization build() { + return new EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization(id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectRole.java new file mode 100644 index 000000000..9e4e16fff --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectRole.java @@ -0,0 +1,164 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedObjectRole.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedObjectRole { + private final String id; + + private final String name; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedObjectRole( + String id, String name, Map additionalProperties) { + this.id = id; + this.name = name; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the role. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the role. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedObjectRole + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedObjectRole) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedObjectRole other) { + return id.equals(other.id) && name.equals(other.name); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The ID of the role.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectRole other); + } + + public interface NameStage { + /** + *

The name of the role.

+ */ + _FinalStage name(@NotNull String name); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedObjectRole build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, _FinalStage { + private String id; + + private String name; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectRole other) { + id(other.getId()); + name(other.getName()); + return this; + } + + /** + *

The ID of the role.

+ *

The ID of the role.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the role.

+ *

The name of the role.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedObjectRole build() { + return new EventStreamCloudEventOrgGroupRoleAssignedObjectRole(id, name, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedTypeEnum.java new file mode 100644 index 000000000..2fe913b9b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgGroupRoleAssignedTypeEnum { + public static final EventStreamCloudEventOrgGroupRoleAssignedTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = + new EventStreamCloudEventOrgGroupRoleAssignedTypeEnum( + Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleAssignedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgGroupRoleAssignedTypeEnum + && this.string.equals(((EventStreamCloudEventOrgGroupRoleAssignedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_GROUP_ROLE_ASSIGNED: + return visitor.visitOrganizationGroupRoleAssigned(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleAssignedTypeEnum valueOf(String value) { + switch (value) { + case "organization.group.role.assigned": + return ORGANIZATION_GROUP_ROLE_ASSIGNED; + default: + return new EventStreamCloudEventOrgGroupRoleAssignedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_GROUP_ROLE_ASSIGNED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationGroupRoleAssigned(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeleted.java new file mode 100644 index 000000000..73d03e057 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeleted.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeleted.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeleted { + private final String offset; + + private final EventStreamCloudEventOrgGroupRoleDeletedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeleted( + String offset, + EventStreamCloudEventOrgGroupRoleDeletedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventOrgGroupRoleDeletedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeleted + && equalTo((EventStreamCloudEventOrgGroupRoleDeleted) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeleted other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOrgGroupRoleDeleted other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventOrgGroupRoleDeletedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeleted build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventOrgGroupRoleDeletedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeleted other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventOrgGroupRoleDeletedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeleted build() { + return new EventStreamCloudEventOrgGroupRoleDeleted(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedCloudEvent.java new file mode 100644 index 000000000..f506c84e6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedCloudEvent.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventOrgGroupRoleDeletedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedCloudEvent( + String specversion, + EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventOrgGroupRoleDeletedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventOrgGroupRoleDeletedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedCloudEvent + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventOrgGroupRoleDeletedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventOrgGroupRoleDeletedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventOrgGroupRoleDeletedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedCloudEvent build() { + return new EventStreamCloudEventOrgGroupRoleDeletedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum.java new file mode 100644 index 000000000..6e27c714e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum { + public static final EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum ORGANIZATION_GROUP_ROLE_DELETED = + new EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum( + Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_GROUP_ROLE_DELETED: + return visitor.visitOrganizationGroupRoleDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "organization.group.role.deleted": + return ORGANIZATION_GROUP_ROLE_DELETED; + default: + return new EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_GROUP_ROLE_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationGroupRoleDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedData.java new file mode 100644 index 000000000..8583bcfac --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedData.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedData { + private final EventStreamCloudEventOrgGroupRoleDeletedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedData( + EventStreamCloudEventOrgGroupRoleDeletedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventOrgGroupRoleDeletedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedData + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObject object); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedData other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventOrgGroupRoleDeletedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedData build() { + return new EventStreamCloudEventOrgGroupRoleDeletedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObject.java new file mode 100644 index 000000000..a73b75972 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObject.java @@ -0,0 +1,207 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedObject.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedObject { + private final EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization organization; + + private final EventStreamCloudEventOrgGroupRoleDeletedObjectRole role; + + private final EventStreamCloudEventOrgGroupRoleDeletedObjectGroup group; + + private final OffsetDateTime deletedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedObject( + EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization organization, + EventStreamCloudEventOrgGroupRoleDeletedObjectRole role, + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup group, + OffsetDateTime deletedAt, + Map additionalProperties) { + this.organization = organization; + this.role = role; + this.group = group; + this.deletedAt = deletedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("role") + public EventStreamCloudEventOrgGroupRoleDeletedObjectRole getRole() { + return role; + } + + @JsonProperty("group") + public EventStreamCloudEventOrgGroupRoleDeletedObjectGroup getGroup() { + return group; + } + + /** + * @return The time at which the role was removed from the group in the organization. + */ + @JsonProperty("deleted_at") + public OffsetDateTime getDeletedAt() { + return deletedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedObject + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedObject other) { + return organization.equals(other.organization) + && role.equals(other.role) + && group.equals(other.group) + && deletedAt.equals(other.deletedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.role, this.group, this.deletedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + RoleStage organization(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedObject other); + } + + public interface RoleStage { + GroupStage role(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObjectRole role); + } + + public interface GroupStage { + DeletedAtStage group(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObjectGroup group); + } + + public interface DeletedAtStage { + /** + *

The time at which the role was removed from the group in the organization.

+ */ + _FinalStage deletedAt(@NotNull OffsetDateTime deletedAt); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, RoleStage, GroupStage, DeletedAtStage, _FinalStage { + private EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization organization; + + private EventStreamCloudEventOrgGroupRoleDeletedObjectRole role; + + private EventStreamCloudEventOrgGroupRoleDeletedObjectGroup group; + + private OffsetDateTime deletedAt; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedObject other) { + organization(other.getOrganization()); + role(other.getRole()); + group(other.getGroup()); + deletedAt(other.getDeletedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public RoleStage organization( + @NotNull EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("role") + public GroupStage role(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObjectRole role) { + this.role = Objects.requireNonNull(role, "role must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("group") + public DeletedAtStage group(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObjectGroup group) { + this.group = Objects.requireNonNull(group, "group must not be null"); + return this; + } + + /** + *

The time at which the role was removed from the group in the organization.

+ *

The time at which the role was removed from the group in the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("deleted_at") + public _FinalStage deletedAt(@NotNull OffsetDateTime deletedAt) { + this.deletedAt = Objects.requireNonNull(deletedAt, "deletedAt must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedObject build() { + return new EventStreamCloudEventOrgGroupRoleDeletedObject( + organization, role, group, deletedAt, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup.java new file mode 100644 index 000000000..5f39dfa2e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventOrgGroupRoleDeletedObjectGroup.Deserializer.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedObjectGroup { + private final Object value; + + private final int type; + + private EventStreamCloudEventOrgGroupRoleDeletedObjectGroup(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedObjectGroup + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedObjectGroup) other); + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventOrgGroupRoleDeletedObjectGroup of( + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0 value) { + return new EventStreamCloudEventOrgGroupRoleDeletedObjectGroup(value, 0); + } + + public static EventStreamCloudEventOrgGroupRoleDeletedObjectGroup of( + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1 value) { + return new EventStreamCloudEventOrgGroupRoleDeletedObjectGroup(value, 1); + } + + public static EventStreamCloudEventOrgGroupRoleDeletedObjectGroup of( + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2 value) { + return new EventStreamCloudEventOrgGroupRoleDeletedObjectGroup(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0 value); + + T visit(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1 value); + + T visit(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup.class); + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedObjectGroup deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0.java new file mode 100644 index 000000000..3ba361260 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0.java @@ -0,0 +1,237 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0( + String id, + Optional externalId, + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0 + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0 other); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

The connection ID associated with the group.

+ */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The connection ID associated with the group.

+ *

The connection ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0 build() { + return new EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0( + id, externalId, type, connectionId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum.java new file mode 100644 index 000000000..62695e583 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum { + public static final EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum CONNECTION = + new EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1.java new file mode 100644 index 000000000..c8c4ed2d5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1.java @@ -0,0 +1,237 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1( + String id, + Optional externalId, + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1 + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1 other); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

The organization ID associated with the group.

+ */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The organization ID associated with the group.

+ *

The organization ID associated with the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1 build() { + return new EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1( + id, externalId, type, organizationId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum.java new file mode 100644 index 000000000..2cb26d40d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum { + public static final EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum ORGANIZATION = + new EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2.java new file mode 100644 index 000000000..9a486699b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2.java @@ -0,0 +1,199 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2( + String id, + Optional externalId, + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2 + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2 other) { + return id.equals(other.id) && externalId.equals(other.externalId) && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The unique identifier for the group.

+ */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2 other); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The external identifier for the group.

+ */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, _FinalStage { + private String id; + + private EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + return this; + } + + /** + *

The unique identifier for the group.

+ *

The unique identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The external identifier for the group.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

The external identifier for the group.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2 build() { + return new EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2(id, externalId, type, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum.java new file mode 100644 index 000000000..e88783fe9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum { + public static final EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum TENANT = + new EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization.java new file mode 100644 index 000000000..28dfa4838 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization.java @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

ID of the organization.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization other) { + id(other.getId()); + return this; + } + + /** + *

ID of the organization.

+ *

ID of the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization build() { + return new EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization(id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectRole.java new file mode 100644 index 000000000..9a0b79316 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectRole.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedObjectRole.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedObjectRole { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedObjectRole(String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the role. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedObjectRole + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedObjectRole) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedObjectRole other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The ID of the role.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectRole other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedObjectRole build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectRole other) { + id(other.getId()); + return this; + } + + /** + *

The ID of the role.

+ *

The ID of the role.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedObjectRole build() { + return new EventStreamCloudEventOrgGroupRoleDeletedObjectRole(id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedTypeEnum.java new file mode 100644 index 000000000..fa9893dbe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgGroupRoleDeletedTypeEnum { + public static final EventStreamCloudEventOrgGroupRoleDeletedTypeEnum ORGANIZATION_GROUP_ROLE_DELETED = + new EventStreamCloudEventOrgGroupRoleDeletedTypeEnum( + Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleDeletedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgGroupRoleDeletedTypeEnum + && this.string.equals(((EventStreamCloudEventOrgGroupRoleDeletedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_GROUP_ROLE_DELETED: + return visitor.visitOrganizationGroupRoleDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleDeletedTypeEnum valueOf(String value) { + switch (value) { + case "organization.group.role.deleted": + return ORGANIZATION_GROUP_ROLE_DELETED; + default: + return new EventStreamCloudEventOrgGroupRoleDeletedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_GROUP_ROLE_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationGroupRoleDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAdded.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAdded.java new file mode 100644 index 000000000..306d0aa64 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAdded.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberAdded.Builder.class) +public final class EventStreamCloudEventOrgMemberAdded { + private final String offset; + + private final EventStreamCloudEventOrgMemberAddedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberAdded( + String offset, + EventStreamCloudEventOrgMemberAddedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventOrgMemberAddedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberAdded + && equalTo((EventStreamCloudEventOrgMemberAdded) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberAdded other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOrgMemberAdded other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventOrgMemberAddedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberAdded build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventOrgMemberAddedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberAdded other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventOrgMemberAddedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberAdded build() { + return new EventStreamCloudEventOrgMemberAdded(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedCloudEvent.java new file mode 100644 index 000000000..6de1e7615 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberAddedCloudEvent.Builder.class) +public final class EventStreamCloudEventOrgMemberAddedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventOrgMemberAddedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberAddedCloudEvent( + String specversion, + EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventOrgMemberAddedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventOrgMemberAddedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberAddedCloudEvent + && equalTo((EventStreamCloudEventOrgMemberAddedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberAddedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventOrgMemberAddedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventOrgMemberAddedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberAddedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventOrgMemberAddedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberAddedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventOrgMemberAddedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberAddedCloudEvent build() { + return new EventStreamCloudEventOrgMemberAddedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum.java new file mode 100644 index 000000000..0a50260d5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum { + public static final EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum ORGANIZATION_MEMBER_ADDED = + new EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum( + Value.ORGANIZATION_MEMBER_ADDED, "organization.member.added"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum + && this.string.equals(((EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_MEMBER_ADDED: + return visitor.visitOrganizationMemberAdded(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "organization.member.added": + return ORGANIZATION_MEMBER_ADDED; + default: + return new EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_MEMBER_ADDED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationMemberAdded(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedData.java new file mode 100644 index 000000000..727826740 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberAddedData.Builder.class) +public final class EventStreamCloudEventOrgMemberAddedData { + private final EventStreamCloudEventOrgMemberAddedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberAddedData( + EventStreamCloudEventOrgMemberAddedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventOrgMemberAddedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberAddedData + && equalTo((EventStreamCloudEventOrgMemberAddedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberAddedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventOrgMemberAddedObject object); + + Builder from(EventStreamCloudEventOrgMemberAddedData other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberAddedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventOrgMemberAddedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberAddedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventOrgMemberAddedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberAddedData build() { + return new EventStreamCloudEventOrgMemberAddedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObject.java new file mode 100644 index 000000000..f5c115b9a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObject.java @@ -0,0 +1,144 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberAddedObject.Builder.class) +public final class EventStreamCloudEventOrgMemberAddedObject { + private final EventStreamCloudEventOrgMemberAddedObjectOrganization organization; + + private final EventStreamCloudEventOrgMemberAddedObjectUser user; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberAddedObject( + EventStreamCloudEventOrgMemberAddedObjectOrganization organization, + EventStreamCloudEventOrgMemberAddedObjectUser user, + Map additionalProperties) { + this.organization = organization; + this.user = user; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgMemberAddedObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("user") + public EventStreamCloudEventOrgMemberAddedObjectUser getUser() { + return user; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberAddedObject + && equalTo((EventStreamCloudEventOrgMemberAddedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberAddedObject other) { + return organization.equals(other.organization) && user.equals(other.user); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.user); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + UserStage organization(@NotNull EventStreamCloudEventOrgMemberAddedObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgMemberAddedObject other); + } + + public interface UserStage { + _FinalStage user(@NotNull EventStreamCloudEventOrgMemberAddedObjectUser user); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberAddedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, UserStage, _FinalStage { + private EventStreamCloudEventOrgMemberAddedObjectOrganization organization; + + private EventStreamCloudEventOrgMemberAddedObjectUser user; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberAddedObject other) { + organization(other.getOrganization()); + user(other.getUser()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public UserStage organization(@NotNull EventStreamCloudEventOrgMemberAddedObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user") + public _FinalStage user(@NotNull EventStreamCloudEventOrgMemberAddedObjectUser user) { + this.user = Objects.requireNonNull(user, "user must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberAddedObject build() { + return new EventStreamCloudEventOrgMemberAddedObject(organization, user, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectOrganization.java new file mode 100644 index 000000000..ab4586584 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectOrganization.java @@ -0,0 +1,174 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberAddedObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgMemberAddedObjectOrganization { + private final Optional name; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberAddedObjectOrganization( + Optional name, String id, Map additionalProperties) { + this.name = name; + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberAddedObjectOrganization + && equalTo((EventStreamCloudEventOrgMemberAddedObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberAddedObjectOrganization other) { + return name.equals(other.name) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

ID of the organization.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgMemberAddedObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberAddedObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberAddedObjectOrganization other) { + name(other.getName()); + id(other.getId()); + return this; + } + + /** + *

ID of the organization.

+ *

ID of the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberAddedObjectOrganization build() { + return new EventStreamCloudEventOrgMemberAddedObjectOrganization(name, id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectUser.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectUser.java new file mode 100644 index 000000000..efede79ad --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectUser.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberAddedObjectUser.Builder.class) +public final class EventStreamCloudEventOrgMemberAddedObjectUser { + private final String userId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberAddedObjectUser(String userId, Map additionalProperties) { + this.userId = userId; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberAddedObjectUser + && equalTo((EventStreamCloudEventOrgMemberAddedObjectUser) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberAddedObjectUser other) { + return userId.equals(other.userId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.userId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

ID of the user which can be used when interacting with other APIs.

+ */ + _FinalStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventOrgMemberAddedObjectUser other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberAddedObjectUser build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, _FinalStage { + private String userId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberAddedObjectUser other) { + userId(other.getUserId()); + return this; + } + + /** + *

ID of the user which can be used when interacting with other APIs.

+ *

ID of the user which can be used when interacting with other APIs.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public _FinalStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberAddedObjectUser build() { + return new EventStreamCloudEventOrgMemberAddedObjectUser(userId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedTypeEnum.java new file mode 100644 index 000000000..ba72d1693 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgMemberAddedTypeEnum { + public static final EventStreamCloudEventOrgMemberAddedTypeEnum ORGANIZATION_MEMBER_ADDED = + new EventStreamCloudEventOrgMemberAddedTypeEnum( + Value.ORGANIZATION_MEMBER_ADDED, "organization.member.added"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgMemberAddedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgMemberAddedTypeEnum + && this.string.equals(((EventStreamCloudEventOrgMemberAddedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_MEMBER_ADDED: + return visitor.visitOrganizationMemberAdded(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgMemberAddedTypeEnum valueOf(String value) { + switch (value) { + case "organization.member.added": + return ORGANIZATION_MEMBER_ADDED; + default: + return new EventStreamCloudEventOrgMemberAddedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_MEMBER_ADDED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationMemberAdded(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeleted.java new file mode 100644 index 000000000..b2f6fef24 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeleted.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberDeleted.Builder.class) +public final class EventStreamCloudEventOrgMemberDeleted { + private final String offset; + + private final EventStreamCloudEventOrgMemberDeletedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberDeleted( + String offset, + EventStreamCloudEventOrgMemberDeletedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventOrgMemberDeletedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberDeleted + && equalTo((EventStreamCloudEventOrgMemberDeleted) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberDeleted other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOrgMemberDeleted other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventOrgMemberDeletedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberDeleted build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventOrgMemberDeletedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberDeleted other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventOrgMemberDeletedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberDeleted build() { + return new EventStreamCloudEventOrgMemberDeleted(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedCloudEvent.java new file mode 100644 index 000000000..d9a7700ff --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberDeletedCloudEvent.Builder.class) +public final class EventStreamCloudEventOrgMemberDeletedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventOrgMemberDeletedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberDeletedCloudEvent( + String specversion, + EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventOrgMemberDeletedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventOrgMemberDeletedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberDeletedCloudEvent + && equalTo((EventStreamCloudEventOrgMemberDeletedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberDeletedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventOrgMemberDeletedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventOrgMemberDeletedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberDeletedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventOrgMemberDeletedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberDeletedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventOrgMemberDeletedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberDeletedCloudEvent build() { + return new EventStreamCloudEventOrgMemberDeletedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum.java new file mode 100644 index 000000000..3a53d2c91 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum { + public static final EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum ORGANIZATION_MEMBER_DELETED = + new EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum( + Value.ORGANIZATION_MEMBER_DELETED, "organization.member.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_MEMBER_DELETED: + return visitor.visitOrganizationMemberDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "organization.member.deleted": + return ORGANIZATION_MEMBER_DELETED; + default: + return new EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_MEMBER_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationMemberDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedData.java new file mode 100644 index 000000000..78bd54862 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberDeletedData.Builder.class) +public final class EventStreamCloudEventOrgMemberDeletedData { + private final EventStreamCloudEventOrgMemberDeletedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberDeletedData( + EventStreamCloudEventOrgMemberDeletedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventOrgMemberDeletedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberDeletedData + && equalTo((EventStreamCloudEventOrgMemberDeletedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberDeletedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventOrgMemberDeletedObject object); + + Builder from(EventStreamCloudEventOrgMemberDeletedData other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberDeletedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventOrgMemberDeletedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberDeletedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventOrgMemberDeletedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberDeletedData build() { + return new EventStreamCloudEventOrgMemberDeletedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObject.java new file mode 100644 index 000000000..df9ffdfd7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObject.java @@ -0,0 +1,144 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberDeletedObject.Builder.class) +public final class EventStreamCloudEventOrgMemberDeletedObject { + private final EventStreamCloudEventOrgMemberDeletedObjectOrganization organization; + + private final EventStreamCloudEventOrgMemberDeletedObjectUser user; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberDeletedObject( + EventStreamCloudEventOrgMemberDeletedObjectOrganization organization, + EventStreamCloudEventOrgMemberDeletedObjectUser user, + Map additionalProperties) { + this.organization = organization; + this.user = user; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgMemberDeletedObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("user") + public EventStreamCloudEventOrgMemberDeletedObjectUser getUser() { + return user; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberDeletedObject + && equalTo((EventStreamCloudEventOrgMemberDeletedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberDeletedObject other) { + return organization.equals(other.organization) && user.equals(other.user); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.user); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + UserStage organization(@NotNull EventStreamCloudEventOrgMemberDeletedObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgMemberDeletedObject other); + } + + public interface UserStage { + _FinalStage user(@NotNull EventStreamCloudEventOrgMemberDeletedObjectUser user); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberDeletedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, UserStage, _FinalStage { + private EventStreamCloudEventOrgMemberDeletedObjectOrganization organization; + + private EventStreamCloudEventOrgMemberDeletedObjectUser user; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberDeletedObject other) { + organization(other.getOrganization()); + user(other.getUser()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public UserStage organization(@NotNull EventStreamCloudEventOrgMemberDeletedObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user") + public _FinalStage user(@NotNull EventStreamCloudEventOrgMemberDeletedObjectUser user) { + this.user = Objects.requireNonNull(user, "user must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberDeletedObject build() { + return new EventStreamCloudEventOrgMemberDeletedObject(organization, user, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectOrganization.java new file mode 100644 index 000000000..7dbc8e81f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectOrganization.java @@ -0,0 +1,174 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberDeletedObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgMemberDeletedObjectOrganization { + private final Optional name; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberDeletedObjectOrganization( + Optional name, String id, Map additionalProperties) { + this.name = name; + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberDeletedObjectOrganization + && equalTo((EventStreamCloudEventOrgMemberDeletedObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberDeletedObjectOrganization other) { + return name.equals(other.name) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

ID of the organization.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgMemberDeletedObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberDeletedObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberDeletedObjectOrganization other) { + name(other.getName()); + id(other.getId()); + return this; + } + + /** + *

ID of the organization.

+ *

ID of the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberDeletedObjectOrganization build() { + return new EventStreamCloudEventOrgMemberDeletedObjectOrganization(name, id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectUser.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectUser.java new file mode 100644 index 000000000..0f5fee043 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectUser.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberDeletedObjectUser.Builder.class) +public final class EventStreamCloudEventOrgMemberDeletedObjectUser { + private final String userId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberDeletedObjectUser(String userId, Map additionalProperties) { + this.userId = userId; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberDeletedObjectUser + && equalTo((EventStreamCloudEventOrgMemberDeletedObjectUser) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberDeletedObjectUser other) { + return userId.equals(other.userId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.userId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

ID of the user which can be used when interacting with other APIs.

+ */ + _FinalStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventOrgMemberDeletedObjectUser other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberDeletedObjectUser build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, _FinalStage { + private String userId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberDeletedObjectUser other) { + userId(other.getUserId()); + return this; + } + + /** + *

ID of the user which can be used when interacting with other APIs.

+ *

ID of the user which can be used when interacting with other APIs.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public _FinalStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberDeletedObjectUser build() { + return new EventStreamCloudEventOrgMemberDeletedObjectUser(userId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedTypeEnum.java new file mode 100644 index 000000000..e47b59768 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgMemberDeletedTypeEnum { + public static final EventStreamCloudEventOrgMemberDeletedTypeEnum ORGANIZATION_MEMBER_DELETED = + new EventStreamCloudEventOrgMemberDeletedTypeEnum( + Value.ORGANIZATION_MEMBER_DELETED, "organization.member.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgMemberDeletedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgMemberDeletedTypeEnum + && this.string.equals(((EventStreamCloudEventOrgMemberDeletedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_MEMBER_DELETED: + return visitor.visitOrganizationMemberDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgMemberDeletedTypeEnum valueOf(String value) { + switch (value) { + case "organization.member.deleted": + return ORGANIZATION_MEMBER_DELETED; + default: + return new EventStreamCloudEventOrgMemberDeletedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_MEMBER_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationMemberDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssigned.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssigned.java new file mode 100644 index 000000000..983909ceb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssigned.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleAssigned.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleAssigned { + private final String offset; + + private final EventStreamCloudEventOrgMemberRoleAssignedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleAssigned( + String offset, + EventStreamCloudEventOrgMemberRoleAssignedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventOrgMemberRoleAssignedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleAssigned + && equalTo((EventStreamCloudEventOrgMemberRoleAssigned) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleAssigned other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOrgMemberRoleAssigned other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventOrgMemberRoleAssignedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleAssigned build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventOrgMemberRoleAssignedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleAssigned other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventOrgMemberRoleAssignedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleAssigned build() { + return new EventStreamCloudEventOrgMemberRoleAssigned(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedCloudEvent.java new file mode 100644 index 000000000..35765efa1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleAssignedCloudEvent.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleAssignedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventOrgMemberRoleAssignedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleAssignedCloudEvent( + String specversion, + EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventOrgMemberRoleAssignedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventOrgMemberRoleAssignedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleAssignedCloudEvent + && equalTo((EventStreamCloudEventOrgMemberRoleAssignedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleAssignedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventOrgMemberRoleAssignedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventOrgMemberRoleAssignedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleAssignedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventOrgMemberRoleAssignedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleAssignedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventOrgMemberRoleAssignedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleAssignedCloudEvent build() { + return new EventStreamCloudEventOrgMemberRoleAssignedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum.java new file mode 100644 index 000000000..e0351ee76 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum { + public static final EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = + new EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum( + Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_MEMBER_ROLE_ASSIGNED: + return visitor.visitOrganizationMemberRoleAssigned(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "organization.member.role.assigned": + return ORGANIZATION_MEMBER_ROLE_ASSIGNED; + default: + return new EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_MEMBER_ROLE_ASSIGNED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationMemberRoleAssigned(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedData.java new file mode 100644 index 000000000..28fa3c7ea --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleAssignedData.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleAssignedData { + private final EventStreamCloudEventOrgMemberRoleAssignedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleAssignedData( + EventStreamCloudEventOrgMemberRoleAssignedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventOrgMemberRoleAssignedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleAssignedData + && equalTo((EventStreamCloudEventOrgMemberRoleAssignedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleAssignedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventOrgMemberRoleAssignedObject object); + + Builder from(EventStreamCloudEventOrgMemberRoleAssignedData other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleAssignedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventOrgMemberRoleAssignedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleAssignedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventOrgMemberRoleAssignedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleAssignedData build() { + return new EventStreamCloudEventOrgMemberRoleAssignedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObject.java new file mode 100644 index 000000000..1aa233621 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObject.java @@ -0,0 +1,168 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleAssignedObject.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleAssignedObject { + private final EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization organization; + + private final EventStreamCloudEventOrgMemberRoleAssignedObjectUser user; + + private final EventStreamCloudEventOrgMemberRoleAssignedObjectRole role; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleAssignedObject( + EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization organization, + EventStreamCloudEventOrgMemberRoleAssignedObjectUser user, + EventStreamCloudEventOrgMemberRoleAssignedObjectRole role, + Map additionalProperties) { + this.organization = organization; + this.user = user; + this.role = role; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("user") + public EventStreamCloudEventOrgMemberRoleAssignedObjectUser getUser() { + return user; + } + + @JsonProperty("role") + public EventStreamCloudEventOrgMemberRoleAssignedObjectRole getRole() { + return role; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleAssignedObject + && equalTo((EventStreamCloudEventOrgMemberRoleAssignedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleAssignedObject other) { + return organization.equals(other.organization) && user.equals(other.user) && role.equals(other.role); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.user, this.role); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + UserStage organization(@NotNull EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgMemberRoleAssignedObject other); + } + + public interface UserStage { + RoleStage user(@NotNull EventStreamCloudEventOrgMemberRoleAssignedObjectUser user); + } + + public interface RoleStage { + _FinalStage role(@NotNull EventStreamCloudEventOrgMemberRoleAssignedObjectRole role); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleAssignedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, UserStage, RoleStage, _FinalStage { + private EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization organization; + + private EventStreamCloudEventOrgMemberRoleAssignedObjectUser user; + + private EventStreamCloudEventOrgMemberRoleAssignedObjectRole role; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleAssignedObject other) { + organization(other.getOrganization()); + user(other.getUser()); + role(other.getRole()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public UserStage organization( + @NotNull EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user") + public RoleStage user(@NotNull EventStreamCloudEventOrgMemberRoleAssignedObjectUser user) { + this.user = Objects.requireNonNull(user, "user must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("role") + public _FinalStage role(@NotNull EventStreamCloudEventOrgMemberRoleAssignedObjectRole role) { + this.role = Objects.requireNonNull(role, "role must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleAssignedObject build() { + return new EventStreamCloudEventOrgMemberRoleAssignedObject(organization, user, role, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization.java new file mode 100644 index 000000000..327291568 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization.java @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization + && equalTo((EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

ID of the organization.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization other) { + id(other.getId()); + return this; + } + + /** + *

ID of the organization.

+ *

ID of the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization build() { + return new EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization(id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectRole.java new file mode 100644 index 000000000..824b0bffe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectRole.java @@ -0,0 +1,164 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleAssignedObjectRole.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleAssignedObjectRole { + private final String id; + + private final String name; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleAssignedObjectRole( + String id, String name, Map additionalProperties) { + this.id = id; + this.name = name; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the role. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the role. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleAssignedObjectRole + && equalTo((EventStreamCloudEventOrgMemberRoleAssignedObjectRole) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleAssignedObjectRole other) { + return id.equals(other.id) && name.equals(other.name); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The ID of the role.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgMemberRoleAssignedObjectRole other); + } + + public interface NameStage { + /** + *

The name of the role.

+ */ + _FinalStage name(@NotNull String name); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleAssignedObjectRole build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, _FinalStage { + private String id; + + private String name; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleAssignedObjectRole other) { + id(other.getId()); + name(other.getName()); + return this; + } + + /** + *

The ID of the role.

+ *

The ID of the role.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the role.

+ *

The name of the role.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleAssignedObjectRole build() { + return new EventStreamCloudEventOrgMemberRoleAssignedObjectRole(id, name, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectUser.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectUser.java new file mode 100644 index 000000000..09cbffc52 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectUser.java @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleAssignedObjectUser.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleAssignedObjectUser { + private final String userId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleAssignedObjectUser( + String userId, Map additionalProperties) { + this.userId = userId; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleAssignedObjectUser + && equalTo((EventStreamCloudEventOrgMemberRoleAssignedObjectUser) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleAssignedObjectUser other) { + return userId.equals(other.userId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.userId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

ID of the user which can be used when interacting with other APIs.

+ */ + _FinalStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventOrgMemberRoleAssignedObjectUser other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleAssignedObjectUser build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, _FinalStage { + private String userId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleAssignedObjectUser other) { + userId(other.getUserId()); + return this; + } + + /** + *

ID of the user which can be used when interacting with other APIs.

+ *

ID of the user which can be used when interacting with other APIs.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public _FinalStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleAssignedObjectUser build() { + return new EventStreamCloudEventOrgMemberRoleAssignedObjectUser(userId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedTypeEnum.java new file mode 100644 index 000000000..032dd2172 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgMemberRoleAssignedTypeEnum { + public static final EventStreamCloudEventOrgMemberRoleAssignedTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = + new EventStreamCloudEventOrgMemberRoleAssignedTypeEnum( + Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgMemberRoleAssignedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgMemberRoleAssignedTypeEnum + && this.string.equals(((EventStreamCloudEventOrgMemberRoleAssignedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_MEMBER_ROLE_ASSIGNED: + return visitor.visitOrganizationMemberRoleAssigned(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgMemberRoleAssignedTypeEnum valueOf(String value) { + switch (value) { + case "organization.member.role.assigned": + return ORGANIZATION_MEMBER_ROLE_ASSIGNED; + default: + return new EventStreamCloudEventOrgMemberRoleAssignedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_MEMBER_ROLE_ASSIGNED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationMemberRoleAssigned(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeleted.java new file mode 100644 index 000000000..2d04003bd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeleted.java @@ -0,0 +1,155 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleDeleted.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleDeleted { + private final String offset; + + private final EventStreamCloudEventOrgMemberRoleDeletedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleDeleted( + String offset, + EventStreamCloudEventOrgMemberRoleDeletedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventOrgMemberRoleDeletedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleDeleted + && equalTo((EventStreamCloudEventOrgMemberRoleDeleted) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleDeleted other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOrgMemberRoleDeleted other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventOrgMemberRoleDeletedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleDeleted build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventOrgMemberRoleDeletedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleDeleted other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventOrgMemberRoleDeletedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleDeleted build() { + return new EventStreamCloudEventOrgMemberRoleDeleted(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedCloudEvent.java new file mode 100644 index 000000000..2d7320160 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleDeletedCloudEvent.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleDeletedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventOrgMemberRoleDeletedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleDeletedCloudEvent( + String specversion, + EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventOrgMemberRoleDeletedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventOrgMemberRoleDeletedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleDeletedCloudEvent + && equalTo((EventStreamCloudEventOrgMemberRoleDeletedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleDeletedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventOrgMemberRoleDeletedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventOrgMemberRoleDeletedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleDeletedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventOrgMemberRoleDeletedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleDeletedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventOrgMemberRoleDeletedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleDeletedCloudEvent build() { + return new EventStreamCloudEventOrgMemberRoleDeletedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum.java new file mode 100644 index 000000000..c09bb73cd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum { + public static final EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum ORGANIZATION_MEMBER_ROLE_DELETED = + new EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum( + Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_MEMBER_ROLE_DELETED: + return visitor.visitOrganizationMemberRoleDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "organization.member.role.deleted": + return ORGANIZATION_MEMBER_ROLE_DELETED; + default: + return new EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_MEMBER_ROLE_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationMemberRoleDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedData.java new file mode 100644 index 000000000..25c76b531 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleDeletedData.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleDeletedData { + private final EventStreamCloudEventOrgMemberRoleDeletedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleDeletedData( + EventStreamCloudEventOrgMemberRoleDeletedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventOrgMemberRoleDeletedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleDeletedData + && equalTo((EventStreamCloudEventOrgMemberRoleDeletedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleDeletedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventOrgMemberRoleDeletedObject object); + + Builder from(EventStreamCloudEventOrgMemberRoleDeletedData other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleDeletedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventOrgMemberRoleDeletedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleDeletedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventOrgMemberRoleDeletedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleDeletedData build() { + return new EventStreamCloudEventOrgMemberRoleDeletedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObject.java new file mode 100644 index 000000000..a514913a6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObject.java @@ -0,0 +1,168 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleDeletedObject.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleDeletedObject { + private final EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization organization; + + private final EventStreamCloudEventOrgMemberRoleDeletedObjectUser user; + + private final EventStreamCloudEventOrgMemberRoleDeletedObjectRole role; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleDeletedObject( + EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization organization, + EventStreamCloudEventOrgMemberRoleDeletedObjectUser user, + EventStreamCloudEventOrgMemberRoleDeletedObjectRole role, + Map additionalProperties) { + this.organization = organization; + this.user = user; + this.role = role; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("user") + public EventStreamCloudEventOrgMemberRoleDeletedObjectUser getUser() { + return user; + } + + @JsonProperty("role") + public EventStreamCloudEventOrgMemberRoleDeletedObjectRole getRole() { + return role; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleDeletedObject + && equalTo((EventStreamCloudEventOrgMemberRoleDeletedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleDeletedObject other) { + return organization.equals(other.organization) && user.equals(other.user) && role.equals(other.role); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.user, this.role); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + UserStage organization(@NotNull EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgMemberRoleDeletedObject other); + } + + public interface UserStage { + RoleStage user(@NotNull EventStreamCloudEventOrgMemberRoleDeletedObjectUser user); + } + + public interface RoleStage { + _FinalStage role(@NotNull EventStreamCloudEventOrgMemberRoleDeletedObjectRole role); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleDeletedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, UserStage, RoleStage, _FinalStage { + private EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization organization; + + private EventStreamCloudEventOrgMemberRoleDeletedObjectUser user; + + private EventStreamCloudEventOrgMemberRoleDeletedObjectRole role; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleDeletedObject other) { + organization(other.getOrganization()); + user(other.getUser()); + role(other.getRole()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public UserStage organization( + @NotNull EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user") + public RoleStage user(@NotNull EventStreamCloudEventOrgMemberRoleDeletedObjectUser user) { + this.user = Objects.requireNonNull(user, "user must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("role") + public _FinalStage role(@NotNull EventStreamCloudEventOrgMemberRoleDeletedObjectRole role) { + this.role = Objects.requireNonNull(role, "role must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleDeletedObject build() { + return new EventStreamCloudEventOrgMemberRoleDeletedObject(organization, user, role, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization.java new file mode 100644 index 000000000..d6f7a56eb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization.java @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization + && equalTo((EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

ID of the organization.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization other) { + id(other.getId()); + return this; + } + + /** + *

ID of the organization.

+ *

ID of the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization build() { + return new EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization(id, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectRole.java new file mode 100644 index 000000000..bcf322e64 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectRole.java @@ -0,0 +1,164 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleDeletedObjectRole.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleDeletedObjectRole { + private final String id; + + private final String name; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleDeletedObjectRole( + String id, String name, Map additionalProperties) { + this.id = id; + this.name = name; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the role. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the role. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleDeletedObjectRole + && equalTo((EventStreamCloudEventOrgMemberRoleDeletedObjectRole) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleDeletedObjectRole other) { + return id.equals(other.id) && name.equals(other.name); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

The ID of the role.

+ */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgMemberRoleDeletedObjectRole other); + } + + public interface NameStage { + /** + *

The name of the role.

+ */ + _FinalStage name(@NotNull String name); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleDeletedObjectRole build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, _FinalStage { + private String id; + + private String name; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleDeletedObjectRole other) { + id(other.getId()); + name(other.getName()); + return this; + } + + /** + *

The ID of the role.

+ *

The ID of the role.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

The name of the role.

+ *

The name of the role.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleDeletedObjectRole build() { + return new EventStreamCloudEventOrgMemberRoleDeletedObjectRole(id, name, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectUser.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectUser.java new file mode 100644 index 000000000..493ccfef8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectUser.java @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleDeletedObjectUser.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleDeletedObjectUser { + private final String userId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleDeletedObjectUser( + String userId, Map additionalProperties) { + this.userId = userId; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleDeletedObjectUser + && equalTo((EventStreamCloudEventOrgMemberRoleDeletedObjectUser) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleDeletedObjectUser other) { + return userId.equals(other.userId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.userId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

ID of the user which can be used when interacting with other APIs.

+ */ + _FinalStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventOrgMemberRoleDeletedObjectUser other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleDeletedObjectUser build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, _FinalStage { + private String userId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleDeletedObjectUser other) { + userId(other.getUserId()); + return this; + } + + /** + *

ID of the user which can be used when interacting with other APIs.

+ *

ID of the user which can be used when interacting with other APIs.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public _FinalStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleDeletedObjectUser build() { + return new EventStreamCloudEventOrgMemberRoleDeletedObjectUser(userId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedTypeEnum.java new file mode 100644 index 000000000..6b0e8b553 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedTypeEnum.java @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgMemberRoleDeletedTypeEnum { + public static final EventStreamCloudEventOrgMemberRoleDeletedTypeEnum ORGANIZATION_MEMBER_ROLE_DELETED = + new EventStreamCloudEventOrgMemberRoleDeletedTypeEnum( + Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgMemberRoleDeletedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgMemberRoleDeletedTypeEnum + && this.string.equals(((EventStreamCloudEventOrgMemberRoleDeletedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_MEMBER_ROLE_DELETED: + return visitor.visitOrganizationMemberRoleDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgMemberRoleDeletedTypeEnum valueOf(String value) { + switch (value) { + case "organization.member.role.deleted": + return ORGANIZATION_MEMBER_ROLE_DELETED; + default: + return new EventStreamCloudEventOrgMemberRoleDeletedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_MEMBER_ROLE_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationMemberRoleDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdated.java new file mode 100644 index 000000000..122184a58 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdated.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgUpdated.Builder.class) +public final class EventStreamCloudEventOrgUpdated { + private final String offset; + + private final EventStreamCloudEventOrgUpdatedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgUpdated( + String offset, EventStreamCloudEventOrgUpdatedCloudEvent event, Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventOrgUpdatedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgUpdated && equalTo((EventStreamCloudEventOrgUpdated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgUpdated other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventOrgUpdated other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventOrgUpdatedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventOrgUpdated build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventOrgUpdatedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgUpdated other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventOrgUpdatedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgUpdated build() { + return new EventStreamCloudEventOrgUpdated(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedCloudEvent.java new file mode 100644 index 000000000..ec5ebb95c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgUpdatedCloudEvent.Builder.class) +public final class EventStreamCloudEventOrgUpdatedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventOrgUpdatedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventOrgUpdatedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgUpdatedCloudEvent( + String specversion, + EventStreamCloudEventOrgUpdatedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventOrgUpdatedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgUpdatedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventOrgUpdatedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgUpdatedCloudEvent + && equalTo((EventStreamCloudEventOrgUpdatedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgUpdatedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventOrgUpdatedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventOrgUpdatedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventOrgUpdatedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventOrgUpdatedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventOrgUpdatedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventOrgUpdatedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgUpdatedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventOrgUpdatedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventOrgUpdatedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgUpdatedCloudEvent build() { + return new EventStreamCloudEventOrgUpdatedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedCloudEventTypeEnum.java new file mode 100644 index 000000000..e4453fd2b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedCloudEventTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgUpdatedCloudEventTypeEnum { + public static final EventStreamCloudEventOrgUpdatedCloudEventTypeEnum ORGANIZATION_UPDATED = + new EventStreamCloudEventOrgUpdatedCloudEventTypeEnum(Value.ORGANIZATION_UPDATED, "organization.updated"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgUpdatedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgUpdatedCloudEventTypeEnum + && this.string.equals(((EventStreamCloudEventOrgUpdatedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_UPDATED: + return visitor.visitOrganizationUpdated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgUpdatedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "organization.updated": + return ORGANIZATION_UPDATED; + default: + return new EventStreamCloudEventOrgUpdatedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_UPDATED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationUpdated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedData.java new file mode 100644 index 000000000..9e0185eb2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgUpdatedData.Builder.class) +public final class EventStreamCloudEventOrgUpdatedData { + private final EventStreamCloudEventOrgUpdatedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgUpdatedData( + EventStreamCloudEventOrgUpdatedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventOrgUpdatedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgUpdatedData + && equalTo((EventStreamCloudEventOrgUpdatedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgUpdatedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventOrgUpdatedObject object); + + Builder from(EventStreamCloudEventOrgUpdatedData other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgUpdatedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventOrgUpdatedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgUpdatedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventOrgUpdatedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgUpdatedData build() { + return new EventStreamCloudEventOrgUpdatedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObject.java new file mode 100644 index 000000000..537970b76 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObject.java @@ -0,0 +1,281 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgUpdatedObject.Builder.class) +public final class EventStreamCloudEventOrgUpdatedObject { + private final Optional name; + + private final String id; + + private final Optional displayName; + + private final Optional> metadata; + + private final Optional branding; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgUpdatedObject( + Optional name, + String id, + Optional displayName, + Optional> metadata, + Optional branding, + Map additionalProperties) { + this.name = name; + this.id = id; + this.displayName = displayName; + this.metadata = metadata; + this.branding = branding; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return If set, the name that will be displayed to end-users for this organization in any interaction with them. + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + @JsonProperty("metadata") + public Optional> getMetadata() { + return metadata; + } + + @JsonProperty("branding") + public Optional getBranding() { + return branding; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgUpdatedObject + && equalTo((EventStreamCloudEventOrgUpdatedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgUpdatedObject other) { + return name.equals(other.name) + && id.equals(other.id) + && displayName.equals(other.displayName) + && metadata.equals(other.metadata) + && branding.equals(other.branding); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id, this.displayName, this.metadata, this.branding); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

ID of the organization.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgUpdatedObject other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgUpdatedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

If set, the name that will be displayed to end-users for this organization in any interaction with them.

+ */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + _FinalStage metadata(Optional> metadata); + + _FinalStage metadata(Map metadata); + + _FinalStage branding(Optional branding); + + _FinalStage branding(EventStreamCloudEventOrgUpdatedObjectBranding branding); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional branding = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgUpdatedObject other) { + name(other.getName()); + id(other.getId()); + displayName(other.getDisplayName()); + metadata(other.getMetadata()); + branding(other.getBranding()); + return this; + } + + /** + *

ID of the organization.

+ *

ID of the organization.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage branding(EventStreamCloudEventOrgUpdatedObjectBranding branding) { + this.branding = Optional.ofNullable(branding); + return this; + } + + @java.lang.Override + @JsonSetter(value = "branding", nulls = Nulls.SKIP) + public _FinalStage branding(Optional branding) { + this.branding = branding; + return this; + } + + @java.lang.Override + public _FinalStage metadata(Map metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional> metadata) { + this.metadata = metadata; + return this; + } + + /** + *

If set, the name that will be displayed to end-users for this organization in any interaction with them.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

If set, the name that will be displayed to end-users for this organization in any interaction with them.

+ */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

+ */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgUpdatedObject build() { + return new EventStreamCloudEventOrgUpdatedObject( + name, id, displayName, metadata, branding, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObjectBranding.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObjectBranding.java new file mode 100644 index 000000000..18d7ecfb3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObjectBranding.java @@ -0,0 +1,137 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgUpdatedObjectBranding.Builder.class) +public final class EventStreamCloudEventOrgUpdatedObjectBranding { + private final Optional logoUrl; + + private final Optional colors; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgUpdatedObjectBranding( + Optional logoUrl, + Optional colors, + Map additionalProperties) { + this.logoUrl = logoUrl; + this.colors = colors; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of logo to display on login page. + */ + @JsonProperty("logo_url") + public Optional getLogoUrl() { + return logoUrl; + } + + @JsonProperty("colors") + public Optional getColors() { + return colors; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgUpdatedObjectBranding + && equalTo((EventStreamCloudEventOrgUpdatedObjectBranding) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgUpdatedObjectBranding other) { + return logoUrl.equals(other.logoUrl) && colors.equals(other.colors); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.logoUrl, this.colors); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional logoUrl = Optional.empty(); + + private Optional colors = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventOrgUpdatedObjectBranding other) { + logoUrl(other.getLogoUrl()); + colors(other.getColors()); + return this; + } + + /** + *

URL of logo to display on login page.

+ */ + @JsonSetter(value = "logo_url", nulls = Nulls.SKIP) + public Builder logoUrl(Optional logoUrl) { + this.logoUrl = logoUrl; + return this; + } + + public Builder logoUrl(String logoUrl) { + this.logoUrl = Optional.ofNullable(logoUrl); + return this; + } + + @JsonSetter(value = "colors", nulls = Nulls.SKIP) + public Builder colors(Optional colors) { + this.colors = colors; + return this; + } + + public Builder colors(EventStreamCloudEventOrgUpdatedObjectBrandingColors colors) { + this.colors = Optional.ofNullable(colors); + return this; + } + + public EventStreamCloudEventOrgUpdatedObjectBranding build() { + return new EventStreamCloudEventOrgUpdatedObjectBranding(logoUrl, colors, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObjectBrandingColors.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObjectBrandingColors.java new file mode 100644 index 000000000..fe7de0c36 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObjectBrandingColors.java @@ -0,0 +1,142 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgUpdatedObjectBrandingColors.Builder.class) +public final class EventStreamCloudEventOrgUpdatedObjectBrandingColors { + private final Optional primary; + + private final Optional pageBackground; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgUpdatedObjectBrandingColors( + Optional primary, Optional pageBackground, Map additionalProperties) { + this.primary = primary; + this.pageBackground = pageBackground; + this.additionalProperties = additionalProperties; + } + + /** + * @return HEX Color for primary elements. + */ + @JsonProperty("primary") + public Optional getPrimary() { + return primary; + } + + /** + * @return HEX Color for background. + */ + @JsonProperty("page_background") + public Optional getPageBackground() { + return pageBackground; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgUpdatedObjectBrandingColors + && equalTo((EventStreamCloudEventOrgUpdatedObjectBrandingColors) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgUpdatedObjectBrandingColors other) { + return primary.equals(other.primary) && pageBackground.equals(other.pageBackground); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.primary, this.pageBackground); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional primary = Optional.empty(); + + private Optional pageBackground = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventOrgUpdatedObjectBrandingColors other) { + primary(other.getPrimary()); + pageBackground(other.getPageBackground()); + return this; + } + + /** + *

HEX Color for primary elements.

+ */ + @JsonSetter(value = "primary", nulls = Nulls.SKIP) + public Builder primary(Optional primary) { + this.primary = primary; + return this; + } + + public Builder primary(String primary) { + this.primary = Optional.ofNullable(primary); + return this; + } + + /** + *

HEX Color for background.

+ */ + @JsonSetter(value = "page_background", nulls = Nulls.SKIP) + public Builder pageBackground(Optional pageBackground) { + this.pageBackground = pageBackground; + return this; + } + + public Builder pageBackground(String pageBackground) { + this.pageBackground = Optional.ofNullable(pageBackground); + return this; + } + + public EventStreamCloudEventOrgUpdatedObjectBrandingColors build() { + return new EventStreamCloudEventOrgUpdatedObjectBrandingColors( + primary, pageBackground, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedTypeEnum.java new file mode 100644 index 000000000..626cd989b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventOrgUpdatedTypeEnum { + public static final EventStreamCloudEventOrgUpdatedTypeEnum ORGANIZATION_UPDATED = + new EventStreamCloudEventOrgUpdatedTypeEnum(Value.ORGANIZATION_UPDATED, "organization.updated"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgUpdatedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventOrgUpdatedTypeEnum + && this.string.equals(((EventStreamCloudEventOrgUpdatedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION_UPDATED: + return visitor.visitOrganizationUpdated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgUpdatedTypeEnum valueOf(String value) { + switch (value) { + case "organization.updated": + return ORGANIZATION_UPDATED; + default: + return new EventStreamCloudEventOrgUpdatedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION_UPDATED, + + UNKNOWN + } + + public interface Visitor { + T visitOrganizationUpdated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreated.java new file mode 100644 index 000000000..974f9989c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreated.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreated.Builder.class) +public final class EventStreamCloudEventUserCreated { + private final String offset; + + private final EventStreamCloudEventUserCreatedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreated( + String offset, EventStreamCloudEventUserCreatedCloudEvent event, Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventUserCreatedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreated && equalTo((EventStreamCloudEventUserCreated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreated other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventUserCreated other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventUserCreatedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreated build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventUserCreatedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreated other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventUserCreatedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreated build() { + return new EventStreamCloudEventUserCreated(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedCloudEvent.java new file mode 100644 index 000000000..031beeb56 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedCloudEvent.Builder.class) +public final class EventStreamCloudEventUserCreatedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventUserCreatedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventUserCreatedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedCloudEvent( + String specversion, + EventStreamCloudEventUserCreatedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventUserCreatedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventUserCreatedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventUserCreatedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedCloudEvent + && equalTo((EventStreamCloudEventUserCreatedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventUserCreatedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventUserCreatedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventUserCreatedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventUserCreatedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventUserCreatedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventUserCreatedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventUserCreatedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedCloudEvent build() { + return new EventStreamCloudEventUserCreatedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedCloudEventTypeEnum.java new file mode 100644 index 000000000..db3351eba --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedCloudEventTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserCreatedCloudEventTypeEnum { + public static final EventStreamCloudEventUserCreatedCloudEventTypeEnum USER_CREATED = + new EventStreamCloudEventUserCreatedCloudEventTypeEnum(Value.USER_CREATED, "user.created"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserCreatedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserCreatedCloudEventTypeEnum + && this.string.equals(((EventStreamCloudEventUserCreatedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USER_CREATED: + return visitor.visitUserCreated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserCreatedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "user.created": + return USER_CREATED; + default: + return new EventStreamCloudEventUserCreatedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + USER_CREATED, + + UNKNOWN + } + + public interface Visitor { + T visitUserCreated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedData.java new file mode 100644 index 000000000..99ab1cda8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedData.Builder.class) +public final class EventStreamCloudEventUserCreatedData { + private final EventStreamCloudEventUserCreatedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedData( + EventStreamCloudEventUserCreatedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventUserCreatedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedData + && equalTo((EventStreamCloudEventUserCreatedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventUserCreatedObject object); + + Builder from(EventStreamCloudEventUserCreatedData other); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventUserCreatedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventUserCreatedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedData build() { + return new EventStreamCloudEventUserCreatedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObject.java new file mode 100644 index 000000000..d5a0195d0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObject.java @@ -0,0 +1,1015 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedObject.Builder.class) +public final class EventStreamCloudEventUserCreatedObject { + private final String userId; + + private final Optional email; + + private final Optional emailVerified; + + private final Optional username; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final List identities; + + private final Optional> appMetadata; + + private final Optional> userMetadata; + + private final Optional picture; + + private final Optional name; + + private final Optional nickname; + + private final Optional> multifactor; + + private final Optional lastIp; + + private final Optional lastLogin; + + private final Optional loginsCount; + + private final Optional blocked; + + private final Optional givenName; + + private final Optional familyName; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedObject( + String userId, + Optional email, + Optional emailVerified, + Optional username, + Optional phoneNumber, + Optional phoneVerified, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + List identities, + Optional> appMetadata, + Optional> userMetadata, + Optional picture, + Optional name, + Optional nickname, + Optional> multifactor, + Optional lastIp, + Optional lastLogin, + Optional loginsCount, + Optional blocked, + Optional givenName, + Optional familyName, + Map additionalProperties) { + this.userId = userId; + this.email = email; + this.emailVerified = emailVerified; + this.username = username; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.identities = identities; + this.appMetadata = appMetadata; + this.userMetadata = userMetadata; + this.picture = picture; + this.name = name; + this.nickname = nickname; + this.multifactor = multifactor; + this.lastIp = lastIp; + this.lastLogin = lastLogin; + this.loginsCount = loginsCount; + this.blocked = blocked; + this.givenName = givenName; + this.familyName = familyName; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + /** + * @return Array of user identity objects when accounts are linked. + */ + @JsonProperty("identities") + public List getIdentities() { + return identities; + } + + @JsonProperty("app_metadata") + public Optional> getAppMetadata() { + return appMetadata; + } + + @JsonProperty("user_metadata") + public Optional> getUserMetadata() { + return userMetadata; + } + + /** + * @return URL to picture, photo, or avatar of this user. + */ + @JsonProperty("picture") + public Optional getPicture() { + return picture; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Preferred nickname or alias of this user. + */ + @JsonProperty("nickname") + public Optional getNickname() { + return nickname; + } + + /** + * @return List of multi-factor authentication providers with which this user has enrolled. + */ + @JsonProperty("multifactor") + public Optional> getMultifactor() { + return multifactor; + } + + /** + * @return Last IP address from which this user logged in. + */ + @JsonProperty("last_ip") + public Optional getLastIp() { + return lastIp; + } + + /** + * @return Last date and time this user logged in (ISO_8601 format). + */ + @JsonProperty("last_login") + public Optional getLastLogin() { + return lastLogin; + } + + /** + * @return Total number of logins this user has performed. + */ + @JsonProperty("logins_count") + public Optional getLoginsCount() { + return loginsCount; + } + + /** + * @return Whether this user was blocked by an administrator (true) or is not (false). + */ + @JsonProperty("blocked") + public Optional getBlocked() { + return blocked; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObject + && equalTo((EventStreamCloudEventUserCreatedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObject other) { + return userId.equals(other.userId) + && email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && username.equals(other.username) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) + && identities.equals(other.identities) + && appMetadata.equals(other.appMetadata) + && userMetadata.equals(other.userMetadata) + && picture.equals(other.picture) + && name.equals(other.name) + && nickname.equals(other.nickname) + && multifactor.equals(other.multifactor) + && lastIp.equals(other.lastIp) + && lastLogin.equals(other.lastLogin) + && loginsCount.equals(other.loginsCount) + && blocked.equals(other.blocked) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.userId, + this.email, + this.emailVerified, + this.username, + this.phoneNumber, + this.phoneVerified, + this.createdAt, + this.updatedAt, + this.identities, + this.appMetadata, + this.userMetadata, + this.picture, + this.name, + this.nickname, + this.multifactor, + this.lastIp, + this.lastLogin, + this.loginsCount, + this.blocked, + this.givenName, + this.familyName); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

ID of the user which can be used when interacting with other APIs.

+ */ + CreatedAtStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventUserCreatedObject other); + } + + public interface CreatedAtStage { + /** + *

Date and time when this entity was created (ISO_8601 format).

+ */ + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

Email address of this user.

+ */ + _FinalStage email(Optional email); + + _FinalStage email(String email); + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + _FinalStage emailVerified(Optional emailVerified); + + _FinalStage emailVerified(Boolean emailVerified); + + /** + *

Username of this user.

+ */ + _FinalStage username(Optional username); + + _FinalStage username(String username); + + /** + *

Phone number of this user.

+ */ + _FinalStage phoneNumber(Optional phoneNumber); + + _FinalStage phoneNumber(String phoneNumber); + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + _FinalStage phoneVerified(Optional phoneVerified); + + _FinalStage phoneVerified(Boolean phoneVerified); + + /** + *

Array of user identity objects when accounts are linked.

+ */ + _FinalStage identities(List identities); + + _FinalStage addIdentities(EventStreamCloudEventUserCreatedObjectIdentitiesItem identities); + + _FinalStage addAllIdentities(List identities); + + _FinalStage appMetadata(Optional> appMetadata); + + _FinalStage appMetadata(Map appMetadata); + + _FinalStage userMetadata(Optional> userMetadata); + + _FinalStage userMetadata(Map userMetadata); + + /** + *

URL to picture, photo, or avatar of this user.

+ */ + _FinalStage picture(Optional picture); + + _FinalStage picture(String picture); + + /** + *

Name of this user.

+ */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

Preferred nickname or alias of this user.

+ */ + _FinalStage nickname(Optional nickname); + + _FinalStage nickname(String nickname); + + /** + *

List of multi-factor authentication providers with which this user has enrolled.

+ */ + _FinalStage multifactor(Optional> multifactor); + + _FinalStage multifactor(List multifactor); + + /** + *

Last IP address from which this user logged in.

+ */ + _FinalStage lastIp(Optional lastIp); + + _FinalStage lastIp(String lastIp); + + /** + *

Last date and time this user logged in (ISO_8601 format).

+ */ + _FinalStage lastLogin(Optional lastLogin); + + _FinalStage lastLogin(OffsetDateTime lastLogin); + + /** + *

Total number of logins this user has performed.

+ */ + _FinalStage loginsCount(Optional loginsCount); + + _FinalStage loginsCount(Integer loginsCount); + + /** + *

Whether this user was blocked by an administrator (true) or is not (false).

+ */ + _FinalStage blocked(Optional blocked); + + _FinalStage blocked(Boolean blocked); + + /** + *

Given name/first name/forename of this user.

+ */ + _FinalStage givenName(Optional givenName); + + _FinalStage givenName(String givenName); + + /** + *

Family name/last name/surname of this user.

+ */ + _FinalStage familyName(Optional familyName); + + _FinalStage familyName(String familyName); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String userId; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional familyName = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional blocked = Optional.empty(); + + private Optional loginsCount = Optional.empty(); + + private Optional lastLogin = Optional.empty(); + + private Optional lastIp = Optional.empty(); + + private Optional> multifactor = Optional.empty(); + + private Optional nickname = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional picture = Optional.empty(); + + private Optional> userMetadata = Optional.empty(); + + private Optional> appMetadata = Optional.empty(); + + private List identities = new ArrayList<>(); + + private Optional phoneVerified = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional email = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedObject other) { + userId(other.getUserId()); + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + username(other.getUsername()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + identities(other.getIdentities()); + appMetadata(other.getAppMetadata()); + userMetadata(other.getUserMetadata()); + picture(other.getPicture()); + name(other.getName()); + nickname(other.getNickname()); + multifactor(other.getMultifactor()); + lastIp(other.getLastIp()); + lastLogin(other.getLastLogin()); + loginsCount(other.getLoginsCount()); + blocked(other.getBlocked()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + return this; + } + + /** + *

ID of the user which can be used when interacting with other APIs.

+ *

ID of the user which can be used when interacting with other APIs.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public CreatedAtStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + /** + *

Date and time when this entity was created (ISO_8601 format).

+ *

Date and time when this entity was created (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public _FinalStage familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + /** + *

Given name/first name/forename of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public _FinalStage givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + /** + *

Whether this user was blocked by an administrator (true) or is not (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage blocked(Boolean blocked) { + this.blocked = Optional.ofNullable(blocked); + return this; + } + + /** + *

Whether this user was blocked by an administrator (true) or is not (false).

+ */ + @java.lang.Override + @JsonSetter(value = "blocked", nulls = Nulls.SKIP) + public _FinalStage blocked(Optional blocked) { + this.blocked = blocked; + return this; + } + + /** + *

Total number of logins this user has performed.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage loginsCount(Integer loginsCount) { + this.loginsCount = Optional.ofNullable(loginsCount); + return this; + } + + /** + *

Total number of logins this user has performed.

+ */ + @java.lang.Override + @JsonSetter(value = "logins_count", nulls = Nulls.SKIP) + public _FinalStage loginsCount(Optional loginsCount) { + this.loginsCount = loginsCount; + return this; + } + + /** + *

Last date and time this user logged in (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastLogin(OffsetDateTime lastLogin) { + this.lastLogin = Optional.ofNullable(lastLogin); + return this; + } + + /** + *

Last date and time this user logged in (ISO_8601 format).

+ */ + @java.lang.Override + @JsonSetter(value = "last_login", nulls = Nulls.SKIP) + public _FinalStage lastLogin(Optional lastLogin) { + this.lastLogin = lastLogin; + return this; + } + + /** + *

Last IP address from which this user logged in.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastIp(String lastIp) { + this.lastIp = Optional.ofNullable(lastIp); + return this; + } + + /** + *

Last IP address from which this user logged in.

+ */ + @java.lang.Override + @JsonSetter(value = "last_ip", nulls = Nulls.SKIP) + public _FinalStage lastIp(Optional lastIp) { + this.lastIp = lastIp; + return this; + } + + /** + *

List of multi-factor authentication providers with which this user has enrolled.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage multifactor(List multifactor) { + this.multifactor = Optional.ofNullable(multifactor); + return this; + } + + /** + *

List of multi-factor authentication providers with which this user has enrolled.

+ */ + @java.lang.Override + @JsonSetter(value = "multifactor", nulls = Nulls.SKIP) + public _FinalStage multifactor(Optional> multifactor) { + this.multifactor = multifactor; + return this; + } + + /** + *

Preferred nickname or alias of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nickname(String nickname) { + this.nickname = Optional.ofNullable(nickname); + return this; + } + + /** + *

Preferred nickname or alias of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "nickname", nulls = Nulls.SKIP) + public _FinalStage nickname(Optional nickname) { + this.nickname = nickname; + return this; + } + + /** + *

Name of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Name of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + /** + *

URL to picture, photo, or avatar of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage picture(String picture) { + this.picture = Optional.ofNullable(picture); + return this; + } + + /** + *

URL to picture, photo, or avatar of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "picture", nulls = Nulls.SKIP) + public _FinalStage picture(Optional picture) { + this.picture = picture; + return this; + } + + @java.lang.Override + public _FinalStage userMetadata(Map userMetadata) { + this.userMetadata = Optional.ofNullable(userMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) + public _FinalStage userMetadata(Optional> userMetadata) { + this.userMetadata = userMetadata; + return this; + } + + @java.lang.Override + public _FinalStage appMetadata(Map appMetadata) { + this.appMetadata = Optional.ofNullable(appMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) + public _FinalStage appMetadata(Optional> appMetadata) { + this.appMetadata = appMetadata; + return this; + } + + /** + *

Array of user identity objects when accounts are linked.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdentities(List identities) { + if (identities != null) { + this.identities.addAll(identities); + } + return this; + } + + /** + *

Array of user identity objects when accounts are linked.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdentities(EventStreamCloudEventUserCreatedObjectIdentitiesItem identities) { + this.identities.add(identities); + return this; + } + + /** + *

Array of user identity objects when accounts are linked.

+ */ + @java.lang.Override + @JsonSetter(value = "identities", nulls = Nulls.SKIP) + public _FinalStage identities(List identities) { + this.identities.clear(); + if (identities != null) { + this.identities.addAll(identities); + } + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @java.lang.Override + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public _FinalStage phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + /** + *

Phone number of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Phone number of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public _FinalStage phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + *

Username of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Username of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public _FinalStage username(Optional username) { + this.username = username; + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @java.lang.Override + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public _FinalStage emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + /** + *

Email address of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Email address of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public _FinalStage email(Optional email) { + this.email = email; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedObject build() { + return new EventStreamCloudEventUserCreatedObject( + userId, + email, + emailVerified, + username, + phoneNumber, + phoneVerified, + createdAt, + updatedAt, + identities, + appMetadata, + userMetadata, + picture, + name, + nickname, + multifactor, + lastIp, + lastLogin, + loginsCount, + blocked, + givenName, + familyName, + additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItem.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItem.java new file mode 100644 index 000000000..04ef0a9d5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItem.java @@ -0,0 +1,174 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserCreatedObjectIdentitiesItem.Deserializer.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItem { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItem(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise) this.value); + } else if (this.type == 3) { + return visitor.visit((EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless) this.value); + } else if (this.type == 4) { + return visitor.visit((EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItem + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItem) other); + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItem other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItem of( + EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItem(value, 0); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItem of( + EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItem(value, 1); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItem of( + EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItem(value, 2); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItem of( + EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItem(value, 3); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItem of( + EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItem(value, 4); + } + + public interface Visitor { + T visit(EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom value); + + T visit(EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase value); + + T visit(EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise value); + + T visit(EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless value); + + T visit(EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserCreatedObjectIdentitiesItem.class); + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedObjectIdentitiesItem deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom.java new file mode 100644 index 000000000..e7ce2b54a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom.java @@ -0,0 +1,244 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom.Builder.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom { + private final String connection; + + private final EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom( + String connection, + EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId userId, + Optional profileData, + EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData(EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId userId; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId(@NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom build() { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData.java new file mode 100644 index 000000000..ba9ca8aa7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData.Builder.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData build() { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum.java new file mode 100644 index 000000000..6f382b62f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum { + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum CUSTOM = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum(Value.CUSTOM, "custom"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CUSTOM: + return visitor.visitCustom(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum valueOf(String value) { + switch (value) { + case "custom": + return CUSTOM; + default: + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomProviderEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CUSTOM, + + UNKNOWN + } + + public interface Visitor { + T visitCustom(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId.java new file mode 100644 index 000000000..7c5742874 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId.Deserializer.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId of(String value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId(value, 0); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId of(int value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedObjectIdentitiesItemCustomUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase.java new file mode 100644 index 000000000..452e5bf53 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase.java @@ -0,0 +1,245 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase.Builder.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase { + private final String connection; + + private final EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase( + String connection, + EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId userId, + Optional profileData, + EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData(EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId userId; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase build() { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData.java new file mode 100644 index 000000000..c5a7eb90a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData.Builder.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData build() { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum.java new file mode 100644 index 000000000..bbf0c5ead --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum.java @@ -0,0 +1,78 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum { + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum AUTH0 = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum(Value.AUTH0, "auth0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AUTH0: + return visitor.visitAuth0(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum valueOf(String value) { + switch (value) { + case "auth0": + return AUTH0; + default: + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTH0, + + UNKNOWN + } + + public interface Visitor { + T visitAuth0(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId.java new file mode 100644 index 000000000..ce750f193 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId.Deserializer.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId of(String value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId(value, 0); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId of(int value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabaseUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise.java new file mode 100644 index 000000000..61f365544 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise.java @@ -0,0 +1,245 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise.Builder.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise { + private final String connection; + + private final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise( + String connection, + EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId userId, + Optional profileData, + EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData(EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId userId; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise build() { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData.java new file mode 100644 index 000000000..db3e5c624 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData.Builder.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData build() { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum.java new file mode 100644 index 000000000..0c6e69fdf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum.java @@ -0,0 +1,192 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum { + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum AD = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum(Value.AD, "ad"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum PINGFEDERATE = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum( + Value.PINGFEDERATE, "pingfederate"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum OKTA = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum(Value.OKTA, "okta"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum SAMLP = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum(Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum WAAD = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum(Value.WAAD, "waad"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum OFFICE365 = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum( + Value.OFFICE365, "office365"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum SHAREPOINT = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum( + Value.SHAREPOINT, "sharepoint"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum IP = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum(Value.IP, "ip"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum ADFS = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum(Value.ADFS, "adfs"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum OIDC = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum(Value.OIDC, "oidc"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum GOOGLE_APPS = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum( + Value.GOOGLE_APPS, "google-apps"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AD: + return visitor.visitAd(); + case PINGFEDERATE: + return visitor.visitPingfederate(); + case OKTA: + return visitor.visitOkta(); + case SAMLP: + return visitor.visitSamlp(); + case WAAD: + return visitor.visitWaad(); + case OFFICE365: + return visitor.visitOffice365(); + case SHAREPOINT: + return visitor.visitSharepoint(); + case IP: + return visitor.visitIp(); + case ADFS: + return visitor.visitAdfs(); + case OIDC: + return visitor.visitOidc(); + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum valueOf(String value) { + switch (value) { + case "ad": + return AD; + case "pingfederate": + return PINGFEDERATE; + case "okta": + return OKTA; + case "samlp": + return SAMLP; + case "waad": + return WAAD; + case "office365": + return OFFICE365; + case "sharepoint": + return SHAREPOINT; + case "ip": + return IP; + case "adfs": + return ADFS; + case "oidc": + return OIDC; + case "google-apps": + return GOOGLE_APPS; + default: + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AD, + + ADFS, + + GOOGLE_APPS, + + IP, + + OFFICE365, + + OIDC, + + OKTA, + + PINGFEDERATE, + + SAMLP, + + SHAREPOINT, + + WAAD, + + UNKNOWN + } + + public interface Visitor { + T visitAd(); + + T visitAdfs(); + + T visitGoogleApps(); + + T visitIp(); + + T visitOffice365(); + + T visitOidc(); + + T visitOkta(); + + T visitPingfederate(); + + T visitSamlp(); + + T visitSharepoint(); + + T visitWaad(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId.java new file mode 100644 index 000000000..5706d6569 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId.Deserializer.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId of(String value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId(value, 0); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId of(int value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpriseUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless.java new file mode 100644 index 000000000..0d4478c21 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless.java @@ -0,0 +1,246 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless.Builder.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless { + private final String connection; + + private final EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless( + String connection, + EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId userId, + Optional profileData, + EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData( + EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId userId; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless build() { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData.java new file mode 100644 index 000000000..a74ceb931 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData.Builder.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData build() { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum.java new file mode 100644 index 000000000..12a4519ad --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum.java @@ -0,0 +1,89 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum { + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum EMAIL = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum(Value.EMAIL, "email"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum SMS = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum(Value.SMS, "sms"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case EMAIL: + return visitor.visitEmail(); + case SMS: + return visitor.visitSms(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum valueOf(String value) { + switch (value) { + case "email": + return EMAIL; + case "sms": + return SMS; + default: + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + EMAIL, + + SMS, + + UNKNOWN + } + + public interface Visitor { + T visitEmail(); + + T visitSms(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId.java new file mode 100644 index 000000000..4804aa800 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId.Deserializer.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId of(String value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId(value, 0); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId of(int value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordlessUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial.java new file mode 100644 index 000000000..a4e40b736 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial.java @@ -0,0 +1,244 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial.Builder.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial { + private final String connection; + + private final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial( + String connection, + EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId userId, + Optional profileData, + EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData(EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId userId; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId(@NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial build() { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData.java new file mode 100644 index 000000000..a272d27f5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData.Builder.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData build() { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum.java new file mode 100644 index 000000000..ebd1d657c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum.java @@ -0,0 +1,503 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum { + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum BAIDU = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.BAIDU, "baidu"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum DWOLLA = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.DWOLLA, "dwolla"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum AUTH0OIDC = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum PLANNINGCENTER = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum( + Value.PLANNINGCENTER, "planningcenter"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum BITLY = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.BITLY, "bitly"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum PAYPAL_SANDBOX = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum( + Value.PAYPAL_SANDBOX, "paypal-sandbox"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum DROPBOX = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.DROPBOX, "dropbox"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum GOOGLE_OAUTH2 = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum( + Value.GOOGLE_OAUTH2, "google-oauth2"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum VKONTAKTE = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.VKONTAKTE, "vkontakte"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum WORDPRESS = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.WORDPRESS, "wordpress"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum EXACT = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.EXACT, "exact"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum INSTAGRAM = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.INSTAGRAM, "instagram"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum FITBIT = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.FITBIT, "fitbit"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum THIRTYSEVENSIGNALS = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum( + Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum EVERNOTE = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.EVERNOTE, "evernote"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum SHOPIFY = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.SHOPIFY, "shopify"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum SALESFORCE_SANDBOX = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum SALESFORCE_COMMUNITY = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE_COMMUNITY, "salesforce-community"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum FACEBOOK = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.FACEBOOK, "facebook"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum DACCOUNT = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.DACCOUNT, "daccount"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum SOUNDCLOUD = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.SOUNDCLOUD, "soundcloud"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum APPLE = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.APPLE, "apple"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum EVERNOTE_SANDBOX = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum( + Value.EVERNOTE_SANDBOX, "evernote-sandbox"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum OAUTH2 = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.OAUTH2, "oauth2"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum OAUTH1 = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.OAUTH1, "oauth1"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum AMAZON = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.AMAZON, "amazon"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum LINE = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.LINE, "line"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum BOX = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.BOX, "box"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum UNTAPPED = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.UNTAPPED, "untapped"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum GITHUB = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.GITHUB, "github"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum SALESFORCE = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.SALESFORCE, "salesforce"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum BITBUCKET = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.BITBUCKET, "bitbucket"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum YAHOO = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.YAHOO, "yahoo"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum WEIBO = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.WEIBO, "weibo"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum PAYPAL = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.PAYPAL, "paypal"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum LINKEDIN = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.LINKEDIN, "linkedin"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum WINDOWSLIVE = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum( + Value.WINDOWSLIVE, "windowslive"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum YANDEX = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.YANDEX, "yandex"); + + public static final EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum TWITTER = + new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.TWITTER, "twitter"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BAIDU: + return visitor.visitBaidu(); + case DWOLLA: + return visitor.visitDwolla(); + case AUTH0OIDC: + return visitor.visitAuth0Oidc(); + case PLANNINGCENTER: + return visitor.visitPlanningcenter(); + case BITLY: + return visitor.visitBitly(); + case PAYPAL_SANDBOX: + return visitor.visitPaypalSandbox(); + case DROPBOX: + return visitor.visitDropbox(); + case GOOGLE_OAUTH2: + return visitor.visitGoogleOauth2(); + case VKONTAKTE: + return visitor.visitVkontakte(); + case WORDPRESS: + return visitor.visitWordpress(); + case EXACT: + return visitor.visitExact(); + case INSTAGRAM: + return visitor.visitInstagram(); + case FITBIT: + return visitor.visitFitbit(); + case THIRTYSEVENSIGNALS: + return visitor.visitThirtysevensignals(); + case EVERNOTE: + return visitor.visitEvernote(); + case SHOPIFY: + return visitor.visitShopify(); + case SALESFORCE_SANDBOX: + return visitor.visitSalesforceSandbox(); + case SALESFORCE_COMMUNITY: + return visitor.visitSalesforceCommunity(); + case FACEBOOK: + return visitor.visitFacebook(); + case DACCOUNT: + return visitor.visitDaccount(); + case SOUNDCLOUD: + return visitor.visitSoundcloud(); + case APPLE: + return visitor.visitApple(); + case EVERNOTE_SANDBOX: + return visitor.visitEvernoteSandbox(); + case OAUTH2: + return visitor.visitOauth2(); + case OAUTH1: + return visitor.visitOauth1(); + case AMAZON: + return visitor.visitAmazon(); + case LINE: + return visitor.visitLine(); + case BOX: + return visitor.visitBox(); + case UNTAPPED: + return visitor.visitUntapped(); + case GITHUB: + return visitor.visitGithub(); + case SALESFORCE: + return visitor.visitSalesforce(); + case BITBUCKET: + return visitor.visitBitbucket(); + case YAHOO: + return visitor.visitYahoo(); + case WEIBO: + return visitor.visitWeibo(); + case PAYPAL: + return visitor.visitPaypal(); + case LINKEDIN: + return visitor.visitLinkedin(); + case WINDOWSLIVE: + return visitor.visitWindowslive(); + case YANDEX: + return visitor.visitYandex(); + case TWITTER: + return visitor.visitTwitter(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum valueOf(String value) { + switch (value) { + case "baidu": + return BAIDU; + case "dwolla": + return DWOLLA; + case "auth0-oidc": + return AUTH0OIDC; + case "planningcenter": + return PLANNINGCENTER; + case "bitly": + return BITLY; + case "paypal-sandbox": + return PAYPAL_SANDBOX; + case "dropbox": + return DROPBOX; + case "google-oauth2": + return GOOGLE_OAUTH2; + case "vkontakte": + return VKONTAKTE; + case "wordpress": + return WORDPRESS; + case "exact": + return EXACT; + case "instagram": + return INSTAGRAM; + case "fitbit": + return FITBIT; + case "thirtysevensignals": + return THIRTYSEVENSIGNALS; + case "evernote": + return EVERNOTE; + case "shopify": + return SHOPIFY; + case "salesforce-sandbox": + return SALESFORCE_SANDBOX; + case "salesforce-community": + return SALESFORCE_COMMUNITY; + case "facebook": + return FACEBOOK; + case "daccount": + return DACCOUNT; + case "soundcloud": + return SOUNDCLOUD; + case "apple": + return APPLE; + case "evernote-sandbox": + return EVERNOTE_SANDBOX; + case "oauth2": + return OAUTH2; + case "oauth1": + return OAUTH1; + case "amazon": + return AMAZON; + case "line": + return LINE; + case "box": + return BOX; + case "untapped": + return UNTAPPED; + case "github": + return GITHUB; + case "salesforce": + return SALESFORCE; + case "bitbucket": + return BITBUCKET; + case "yahoo": + return YAHOO; + case "weibo": + return WEIBO; + case "paypal": + return PAYPAL; + case "linkedin": + return LINKEDIN; + case "windowslive": + return WINDOWSLIVE; + case "yandex": + return YANDEX; + case "twitter": + return TWITTER; + default: + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialProviderEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AMAZON, + + APPLE, + + DROPBOX, + + BITBUCKET, + + AUTH0OIDC, + + BAIDU, + + BITLY, + + BOX, + + DACCOUNT, + + DWOLLA, + + EVERNOTE_SANDBOX, + + EVERNOTE, + + EXACT, + + FACEBOOK, + + FITBIT, + + GITHUB, + + GOOGLE_OAUTH2, + + INSTAGRAM, + + LINE, + + LINKEDIN, + + OAUTH1, + + OAUTH2, + + PAYPAL, + + PAYPAL_SANDBOX, + + PLANNINGCENTER, + + SALESFORCE_COMMUNITY, + + SALESFORCE_SANDBOX, + + SALESFORCE, + + SHOPIFY, + + SOUNDCLOUD, + + THIRTYSEVENSIGNALS, + + TWITTER, + + UNTAPPED, + + VKONTAKTE, + + WEIBO, + + WINDOWSLIVE, + + WORDPRESS, + + YAHOO, + + YANDEX, + + UNKNOWN + } + + public interface Visitor { + T visitAmazon(); + + T visitApple(); + + T visitDropbox(); + + T visitBitbucket(); + + T visitAuth0Oidc(); + + T visitBaidu(); + + T visitBitly(); + + T visitBox(); + + T visitDaccount(); + + T visitDwolla(); + + T visitEvernoteSandbox(); + + T visitEvernote(); + + T visitExact(); + + T visitFacebook(); + + T visitFitbit(); + + T visitGithub(); + + T visitGoogleOauth2(); + + T visitInstagram(); + + T visitLine(); + + T visitLinkedin(); + + T visitOauth1(); + + T visitOauth2(); + + T visitPaypal(); + + T visitPaypalSandbox(); + + T visitPlanningcenter(); + + T visitSalesforceCommunity(); + + T visitSalesforceSandbox(); + + T visitSalesforce(); + + T visitShopify(); + + T visitSoundcloud(); + + T visitThirtysevensignals(); + + T visitTwitter(); + + T visitUntapped(); + + T visitVkontakte(); + + T visitWeibo(); + + T visitWindowslive(); + + T visitWordpress(); + + T visitYahoo(); + + T visitYandex(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId.java new file mode 100644 index 000000000..2813a8072 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId.Deserializer.class) +public final class EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId + && equalTo((EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId of(String value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId(value, 0); + } + + public static EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId of(int value) { + return new EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedObjectIdentitiesItemSocialUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedTypeEnum.java new file mode 100644 index 000000000..5c57d0764 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserCreatedTypeEnum { + public static final EventStreamCloudEventUserCreatedTypeEnum USER_CREATED = + new EventStreamCloudEventUserCreatedTypeEnum(Value.USER_CREATED, "user.created"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserCreatedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserCreatedTypeEnum + && this.string.equals(((EventStreamCloudEventUserCreatedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USER_CREATED: + return visitor.visitUserCreated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserCreatedTypeEnum valueOf(String value) { + switch (value) { + case "user.created": + return USER_CREATED; + default: + return new EventStreamCloudEventUserCreatedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + USER_CREATED, + + UNKNOWN + } + + public interface Visitor { + T visitUserCreated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeleted.java new file mode 100644 index 000000000..47b8950fc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeleted.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeleted.Builder.class) +public final class EventStreamCloudEventUserDeleted { + private final String offset; + + private final EventStreamCloudEventUserDeletedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeleted( + String offset, EventStreamCloudEventUserDeletedCloudEvent event, Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventUserDeletedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeleted && equalTo((EventStreamCloudEventUserDeleted) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeleted other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventUserDeleted other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventUserDeletedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeleted build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventUserDeletedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeleted other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventUserDeletedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeleted build() { + return new EventStreamCloudEventUserDeleted(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedCloudEvent.java new file mode 100644 index 000000000..970649366 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedCloudEvent.Builder.class) +public final class EventStreamCloudEventUserDeletedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventUserDeletedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventUserDeletedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedCloudEvent( + String specversion, + EventStreamCloudEventUserDeletedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventUserDeletedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventUserDeletedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventUserDeletedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedCloudEvent + && equalTo((EventStreamCloudEventUserDeletedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventUserDeletedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventUserDeletedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventUserDeletedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventUserDeletedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventUserDeletedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventUserDeletedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventUserDeletedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedCloudEvent build() { + return new EventStreamCloudEventUserDeletedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedCloudEventTypeEnum.java new file mode 100644 index 000000000..2529ef4d1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedCloudEventTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserDeletedCloudEventTypeEnum { + public static final EventStreamCloudEventUserDeletedCloudEventTypeEnum USER_DELETED = + new EventStreamCloudEventUserDeletedCloudEventTypeEnum(Value.USER_DELETED, "user.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserDeletedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserDeletedCloudEventTypeEnum + && this.string.equals(((EventStreamCloudEventUserDeletedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USER_DELETED: + return visitor.visitUserDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserDeletedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "user.deleted": + return USER_DELETED; + default: + return new EventStreamCloudEventUserDeletedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + USER_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitUserDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedData.java new file mode 100644 index 000000000..28127ece6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedData.Builder.class) +public final class EventStreamCloudEventUserDeletedData { + private final EventStreamCloudEventUserDeletedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedData( + EventStreamCloudEventUserDeletedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventUserDeletedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedData + && equalTo((EventStreamCloudEventUserDeletedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventUserDeletedObject object); + + Builder from(EventStreamCloudEventUserDeletedData other); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventUserDeletedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventUserDeletedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedData build() { + return new EventStreamCloudEventUserDeletedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObject.java new file mode 100644 index 000000000..e5238cc00 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObject.java @@ -0,0 +1,1053 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedObject.Builder.class) +public final class EventStreamCloudEventUserDeletedObject { + private final String userId; + + private final Optional email; + + private final Optional emailVerified; + + private final Optional username; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final List identities; + + private final Optional> appMetadata; + + private final Optional> userMetadata; + + private final Optional picture; + + private final Optional name; + + private final Optional nickname; + + private final Optional> multifactor; + + private final Optional lastIp; + + private final Optional lastLogin; + + private final Optional loginsCount; + + private final Optional blocked; + + private final Optional givenName; + + private final Optional familyName; + + private final OffsetDateTime deletedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedObject( + String userId, + Optional email, + Optional emailVerified, + Optional username, + Optional phoneNumber, + Optional phoneVerified, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + List identities, + Optional> appMetadata, + Optional> userMetadata, + Optional picture, + Optional name, + Optional nickname, + Optional> multifactor, + Optional lastIp, + Optional lastLogin, + Optional loginsCount, + Optional blocked, + Optional givenName, + Optional familyName, + OffsetDateTime deletedAt, + Map additionalProperties) { + this.userId = userId; + this.email = email; + this.emailVerified = emailVerified; + this.username = username; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.identities = identities; + this.appMetadata = appMetadata; + this.userMetadata = userMetadata; + this.picture = picture; + this.name = name; + this.nickname = nickname; + this.multifactor = multifactor; + this.lastIp = lastIp; + this.lastLogin = lastLogin; + this.loginsCount = loginsCount; + this.blocked = blocked; + this.givenName = givenName; + this.familyName = familyName; + this.deletedAt = deletedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + /** + * @return Array of user identity objects when accounts are linked. + */ + @JsonProperty("identities") + public List getIdentities() { + return identities; + } + + @JsonProperty("app_metadata") + public Optional> getAppMetadata() { + return appMetadata; + } + + @JsonProperty("user_metadata") + public Optional> getUserMetadata() { + return userMetadata; + } + + /** + * @return URL to picture, photo, or avatar of this user. + */ + @JsonProperty("picture") + public Optional getPicture() { + return picture; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Preferred nickname or alias of this user. + */ + @JsonProperty("nickname") + public Optional getNickname() { + return nickname; + } + + /** + * @return List of multi-factor authentication providers with which this user has enrolled. + */ + @JsonProperty("multifactor") + public Optional> getMultifactor() { + return multifactor; + } + + /** + * @return Last IP address from which this user logged in. + */ + @JsonProperty("last_ip") + public Optional getLastIp() { + return lastIp; + } + + /** + * @return Last date and time this user logged in (ISO_8601 format). + */ + @JsonProperty("last_login") + public Optional getLastLogin() { + return lastLogin; + } + + /** + * @return Total number of logins this user has performed. + */ + @JsonProperty("logins_count") + public Optional getLoginsCount() { + return loginsCount; + } + + /** + * @return Whether this user was blocked by an administrator (true) or is not (false). + */ + @JsonProperty("blocked") + public Optional getBlocked() { + return blocked; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Date and time when this entity was deleted (ISO_8601 format). + */ + @JsonProperty("deleted_at") + public OffsetDateTime getDeletedAt() { + return deletedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObject + && equalTo((EventStreamCloudEventUserDeletedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObject other) { + return userId.equals(other.userId) + && email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && username.equals(other.username) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) + && identities.equals(other.identities) + && appMetadata.equals(other.appMetadata) + && userMetadata.equals(other.userMetadata) + && picture.equals(other.picture) + && name.equals(other.name) + && nickname.equals(other.nickname) + && multifactor.equals(other.multifactor) + && lastIp.equals(other.lastIp) + && lastLogin.equals(other.lastLogin) + && loginsCount.equals(other.loginsCount) + && blocked.equals(other.blocked) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && deletedAt.equals(other.deletedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.userId, + this.email, + this.emailVerified, + this.username, + this.phoneNumber, + this.phoneVerified, + this.createdAt, + this.updatedAt, + this.identities, + this.appMetadata, + this.userMetadata, + this.picture, + this.name, + this.nickname, + this.multifactor, + this.lastIp, + this.lastLogin, + this.loginsCount, + this.blocked, + this.givenName, + this.familyName, + this.deletedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

ID of the user which can be used when interacting with other APIs.

+ */ + CreatedAtStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventUserDeletedObject other); + } + + public interface CreatedAtStage { + /** + *

Date and time when this entity was created (ISO_8601 format).

+ */ + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ */ + DeletedAtStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface DeletedAtStage { + /** + *

Date and time when this entity was deleted (ISO_8601 format).

+ */ + _FinalStage deletedAt(@NotNull OffsetDateTime deletedAt); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

Email address of this user.

+ */ + _FinalStage email(Optional email); + + _FinalStage email(String email); + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + _FinalStage emailVerified(Optional emailVerified); + + _FinalStage emailVerified(Boolean emailVerified); + + /** + *

Username of this user.

+ */ + _FinalStage username(Optional username); + + _FinalStage username(String username); + + /** + *

Phone number of this user.

+ */ + _FinalStage phoneNumber(Optional phoneNumber); + + _FinalStage phoneNumber(String phoneNumber); + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + _FinalStage phoneVerified(Optional phoneVerified); + + _FinalStage phoneVerified(Boolean phoneVerified); + + /** + *

Array of user identity objects when accounts are linked.

+ */ + _FinalStage identities(List identities); + + _FinalStage addIdentities(EventStreamCloudEventUserDeletedObjectIdentitiesItem identities); + + _FinalStage addAllIdentities(List identities); + + _FinalStage appMetadata(Optional> appMetadata); + + _FinalStage appMetadata(Map appMetadata); + + _FinalStage userMetadata(Optional> userMetadata); + + _FinalStage userMetadata(Map userMetadata); + + /** + *

URL to picture, photo, or avatar of this user.

+ */ + _FinalStage picture(Optional picture); + + _FinalStage picture(String picture); + + /** + *

Name of this user.

+ */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

Preferred nickname or alias of this user.

+ */ + _FinalStage nickname(Optional nickname); + + _FinalStage nickname(String nickname); + + /** + *

List of multi-factor authentication providers with which this user has enrolled.

+ */ + _FinalStage multifactor(Optional> multifactor); + + _FinalStage multifactor(List multifactor); + + /** + *

Last IP address from which this user logged in.

+ */ + _FinalStage lastIp(Optional lastIp); + + _FinalStage lastIp(String lastIp); + + /** + *

Last date and time this user logged in (ISO_8601 format).

+ */ + _FinalStage lastLogin(Optional lastLogin); + + _FinalStage lastLogin(OffsetDateTime lastLogin); + + /** + *

Total number of logins this user has performed.

+ */ + _FinalStage loginsCount(Optional loginsCount); + + _FinalStage loginsCount(Integer loginsCount); + + /** + *

Whether this user was blocked by an administrator (true) or is not (false).

+ */ + _FinalStage blocked(Optional blocked); + + _FinalStage blocked(Boolean blocked); + + /** + *

Given name/first name/forename of this user.

+ */ + _FinalStage givenName(Optional givenName); + + _FinalStage givenName(String givenName); + + /** + *

Family name/last name/surname of this user.

+ */ + _FinalStage familyName(Optional familyName); + + _FinalStage familyName(String familyName); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements UserIdStage, CreatedAtStage, UpdatedAtStage, DeletedAtStage, _FinalStage { + private String userId; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private OffsetDateTime deletedAt; + + private Optional familyName = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional blocked = Optional.empty(); + + private Optional loginsCount = Optional.empty(); + + private Optional lastLogin = Optional.empty(); + + private Optional lastIp = Optional.empty(); + + private Optional> multifactor = Optional.empty(); + + private Optional nickname = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional picture = Optional.empty(); + + private Optional> userMetadata = Optional.empty(); + + private Optional> appMetadata = Optional.empty(); + + private List identities = new ArrayList<>(); + + private Optional phoneVerified = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional email = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedObject other) { + userId(other.getUserId()); + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + username(other.getUsername()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + identities(other.getIdentities()); + appMetadata(other.getAppMetadata()); + userMetadata(other.getUserMetadata()); + picture(other.getPicture()); + name(other.getName()); + nickname(other.getNickname()); + multifactor(other.getMultifactor()); + lastIp(other.getLastIp()); + lastLogin(other.getLastLogin()); + loginsCount(other.getLoginsCount()); + blocked(other.getBlocked()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + deletedAt(other.getDeletedAt()); + return this; + } + + /** + *

ID of the user which can be used when interacting with other APIs.

+ *

ID of the user which can be used when interacting with other APIs.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public CreatedAtStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + /** + *

Date and time when this entity was created (ISO_8601 format).

+ *

Date and time when this entity was created (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public DeletedAtStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

Date and time when this entity was deleted (ISO_8601 format).

+ *

Date and time when this entity was deleted (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("deleted_at") + public _FinalStage deletedAt(@NotNull OffsetDateTime deletedAt) { + this.deletedAt = Objects.requireNonNull(deletedAt, "deletedAt must not be null"); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public _FinalStage familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + /** + *

Given name/first name/forename of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public _FinalStage givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + /** + *

Whether this user was blocked by an administrator (true) or is not (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage blocked(Boolean blocked) { + this.blocked = Optional.ofNullable(blocked); + return this; + } + + /** + *

Whether this user was blocked by an administrator (true) or is not (false).

+ */ + @java.lang.Override + @JsonSetter(value = "blocked", nulls = Nulls.SKIP) + public _FinalStage blocked(Optional blocked) { + this.blocked = blocked; + return this; + } + + /** + *

Total number of logins this user has performed.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage loginsCount(Integer loginsCount) { + this.loginsCount = Optional.ofNullable(loginsCount); + return this; + } + + /** + *

Total number of logins this user has performed.

+ */ + @java.lang.Override + @JsonSetter(value = "logins_count", nulls = Nulls.SKIP) + public _FinalStage loginsCount(Optional loginsCount) { + this.loginsCount = loginsCount; + return this; + } + + /** + *

Last date and time this user logged in (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastLogin(OffsetDateTime lastLogin) { + this.lastLogin = Optional.ofNullable(lastLogin); + return this; + } + + /** + *

Last date and time this user logged in (ISO_8601 format).

+ */ + @java.lang.Override + @JsonSetter(value = "last_login", nulls = Nulls.SKIP) + public _FinalStage lastLogin(Optional lastLogin) { + this.lastLogin = lastLogin; + return this; + } + + /** + *

Last IP address from which this user logged in.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastIp(String lastIp) { + this.lastIp = Optional.ofNullable(lastIp); + return this; + } + + /** + *

Last IP address from which this user logged in.

+ */ + @java.lang.Override + @JsonSetter(value = "last_ip", nulls = Nulls.SKIP) + public _FinalStage lastIp(Optional lastIp) { + this.lastIp = lastIp; + return this; + } + + /** + *

List of multi-factor authentication providers with which this user has enrolled.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage multifactor(List multifactor) { + this.multifactor = Optional.ofNullable(multifactor); + return this; + } + + /** + *

List of multi-factor authentication providers with which this user has enrolled.

+ */ + @java.lang.Override + @JsonSetter(value = "multifactor", nulls = Nulls.SKIP) + public _FinalStage multifactor(Optional> multifactor) { + this.multifactor = multifactor; + return this; + } + + /** + *

Preferred nickname or alias of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nickname(String nickname) { + this.nickname = Optional.ofNullable(nickname); + return this; + } + + /** + *

Preferred nickname or alias of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "nickname", nulls = Nulls.SKIP) + public _FinalStage nickname(Optional nickname) { + this.nickname = nickname; + return this; + } + + /** + *

Name of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Name of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + /** + *

URL to picture, photo, or avatar of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage picture(String picture) { + this.picture = Optional.ofNullable(picture); + return this; + } + + /** + *

URL to picture, photo, or avatar of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "picture", nulls = Nulls.SKIP) + public _FinalStage picture(Optional picture) { + this.picture = picture; + return this; + } + + @java.lang.Override + public _FinalStage userMetadata(Map userMetadata) { + this.userMetadata = Optional.ofNullable(userMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) + public _FinalStage userMetadata(Optional> userMetadata) { + this.userMetadata = userMetadata; + return this; + } + + @java.lang.Override + public _FinalStage appMetadata(Map appMetadata) { + this.appMetadata = Optional.ofNullable(appMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) + public _FinalStage appMetadata(Optional> appMetadata) { + this.appMetadata = appMetadata; + return this; + } + + /** + *

Array of user identity objects when accounts are linked.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdentities(List identities) { + if (identities != null) { + this.identities.addAll(identities); + } + return this; + } + + /** + *

Array of user identity objects when accounts are linked.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdentities(EventStreamCloudEventUserDeletedObjectIdentitiesItem identities) { + this.identities.add(identities); + return this; + } + + /** + *

Array of user identity objects when accounts are linked.

+ */ + @java.lang.Override + @JsonSetter(value = "identities", nulls = Nulls.SKIP) + public _FinalStage identities(List identities) { + this.identities.clear(); + if (identities != null) { + this.identities.addAll(identities); + } + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @java.lang.Override + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public _FinalStage phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + /** + *

Phone number of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Phone number of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public _FinalStage phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + *

Username of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Username of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public _FinalStage username(Optional username) { + this.username = username; + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @java.lang.Override + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public _FinalStage emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + /** + *

Email address of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Email address of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public _FinalStage email(Optional email) { + this.email = email; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedObject build() { + return new EventStreamCloudEventUserDeletedObject( + userId, + email, + emailVerified, + username, + phoneNumber, + phoneVerified, + createdAt, + updatedAt, + identities, + appMetadata, + userMetadata, + picture, + name, + nickname, + multifactor, + lastIp, + lastLogin, + loginsCount, + blocked, + givenName, + familyName, + deletedAt, + additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItem.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItem.java new file mode 100644 index 000000000..3326369f7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItem.java @@ -0,0 +1,174 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserDeletedObjectIdentitiesItem.Deserializer.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItem { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItem(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise) this.value); + } else if (this.type == 3) { + return visitor.visit((EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless) this.value); + } else if (this.type == 4) { + return visitor.visit((EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItem + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItem) other); + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItem other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItem of( + EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItem(value, 0); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItem of( + EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItem(value, 1); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItem of( + EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItem(value, 2); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItem of( + EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItem(value, 3); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItem of( + EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItem(value, 4); + } + + public interface Visitor { + T visit(EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom value); + + T visit(EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase value); + + T visit(EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise value); + + T visit(EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless value); + + T visit(EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserDeletedObjectIdentitiesItem.class); + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedObjectIdentitiesItem deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom.java new file mode 100644 index 000000000..737499538 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom.java @@ -0,0 +1,244 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom.Builder.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom { + private final String connection; + + private final EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom( + String connection, + EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId userId, + Optional profileData, + EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData(EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId userId; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId(@NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom build() { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData.java new file mode 100644 index 000000000..774fde079 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData.Builder.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData build() { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum.java new file mode 100644 index 000000000..b0bdd1bf5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum { + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum CUSTOM = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum(Value.CUSTOM, "custom"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CUSTOM: + return visitor.visitCustom(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum valueOf(String value) { + switch (value) { + case "custom": + return CUSTOM; + default: + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomProviderEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CUSTOM, + + UNKNOWN + } + + public interface Visitor { + T visitCustom(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId.java new file mode 100644 index 000000000..c145a8ef3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId.Deserializer.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId of(String value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId(value, 0); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId of(int value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedObjectIdentitiesItemCustomUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase.java new file mode 100644 index 000000000..419ccb420 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase.java @@ -0,0 +1,245 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase.Builder.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase { + private final String connection; + + private final EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase( + String connection, + EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId userId, + Optional profileData, + EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData(EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId userId; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase build() { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData.java new file mode 100644 index 000000000..f5b3f476e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData.Builder.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData build() { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum.java new file mode 100644 index 000000000..e81e19b50 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum.java @@ -0,0 +1,78 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum { + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum AUTH0 = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum(Value.AUTH0, "auth0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AUTH0: + return visitor.visitAuth0(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum valueOf(String value) { + switch (value) { + case "auth0": + return AUTH0; + default: + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTH0, + + UNKNOWN + } + + public interface Visitor { + T visitAuth0(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId.java new file mode 100644 index 000000000..5aaea8844 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId.Deserializer.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId of(String value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId(value, 0); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId of(int value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabaseUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise.java new file mode 100644 index 000000000..2a1e687ff --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise.java @@ -0,0 +1,245 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise.Builder.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise { + private final String connection; + + private final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise( + String connection, + EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId userId, + Optional profileData, + EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData(EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId userId; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise build() { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData.java new file mode 100644 index 000000000..57a7ac41a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData.Builder.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData build() { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum.java new file mode 100644 index 000000000..b42db04a5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum.java @@ -0,0 +1,192 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum { + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum AD = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum(Value.AD, "ad"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum PINGFEDERATE = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum( + Value.PINGFEDERATE, "pingfederate"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum OKTA = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum(Value.OKTA, "okta"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum SAMLP = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum(Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum WAAD = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum(Value.WAAD, "waad"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum OFFICE365 = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum( + Value.OFFICE365, "office365"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum SHAREPOINT = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum( + Value.SHAREPOINT, "sharepoint"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum IP = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum(Value.IP, "ip"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum ADFS = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum(Value.ADFS, "adfs"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum OIDC = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum(Value.OIDC, "oidc"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum GOOGLE_APPS = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum( + Value.GOOGLE_APPS, "google-apps"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AD: + return visitor.visitAd(); + case PINGFEDERATE: + return visitor.visitPingfederate(); + case OKTA: + return visitor.visitOkta(); + case SAMLP: + return visitor.visitSamlp(); + case WAAD: + return visitor.visitWaad(); + case OFFICE365: + return visitor.visitOffice365(); + case SHAREPOINT: + return visitor.visitSharepoint(); + case IP: + return visitor.visitIp(); + case ADFS: + return visitor.visitAdfs(); + case OIDC: + return visitor.visitOidc(); + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum valueOf(String value) { + switch (value) { + case "ad": + return AD; + case "pingfederate": + return PINGFEDERATE; + case "okta": + return OKTA; + case "samlp": + return SAMLP; + case "waad": + return WAAD; + case "office365": + return OFFICE365; + case "sharepoint": + return SHAREPOINT; + case "ip": + return IP; + case "adfs": + return ADFS; + case "oidc": + return OIDC; + case "google-apps": + return GOOGLE_APPS; + default: + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AD, + + ADFS, + + GOOGLE_APPS, + + IP, + + OFFICE365, + + OIDC, + + OKTA, + + PINGFEDERATE, + + SAMLP, + + SHAREPOINT, + + WAAD, + + UNKNOWN + } + + public interface Visitor { + T visitAd(); + + T visitAdfs(); + + T visitGoogleApps(); + + T visitIp(); + + T visitOffice365(); + + T visitOidc(); + + T visitOkta(); + + T visitPingfederate(); + + T visitSamlp(); + + T visitSharepoint(); + + T visitWaad(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId.java new file mode 100644 index 000000000..868d888df --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId.Deserializer.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId of(String value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId(value, 0); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId of(int value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpriseUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless.java new file mode 100644 index 000000000..08e53fef7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless.java @@ -0,0 +1,246 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless.Builder.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless { + private final String connection; + + private final EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless( + String connection, + EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId userId, + Optional profileData, + EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData( + EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId userId; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless build() { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData.java new file mode 100644 index 000000000..7e1ebef95 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData.Builder.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData build() { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum.java new file mode 100644 index 000000000..a102caecf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum.java @@ -0,0 +1,89 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum { + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum EMAIL = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum(Value.EMAIL, "email"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum SMS = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum(Value.SMS, "sms"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case EMAIL: + return visitor.visitEmail(); + case SMS: + return visitor.visitSms(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum valueOf(String value) { + switch (value) { + case "email": + return EMAIL; + case "sms": + return SMS; + default: + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + EMAIL, + + SMS, + + UNKNOWN + } + + public interface Visitor { + T visitEmail(); + + T visitSms(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId.java new file mode 100644 index 000000000..6da78b96a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId.Deserializer.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId of(String value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId(value, 0); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId of(int value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial.java new file mode 100644 index 000000000..8befc3811 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial.java @@ -0,0 +1,244 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial.Builder.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial { + private final String connection; + + private final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial( + String connection, + EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId userId, + Optional profileData, + EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData(EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId userId; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId(@NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial build() { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData.java new file mode 100644 index 000000000..2a5f916a5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData.Builder.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData build() { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum.java new file mode 100644 index 000000000..85e02f872 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum.java @@ -0,0 +1,503 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum { + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum BAIDU = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.BAIDU, "baidu"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum DWOLLA = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.DWOLLA, "dwolla"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum AUTH0OIDC = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum PLANNINGCENTER = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum( + Value.PLANNINGCENTER, "planningcenter"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum BITLY = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.BITLY, "bitly"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum PAYPAL_SANDBOX = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum( + Value.PAYPAL_SANDBOX, "paypal-sandbox"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum DROPBOX = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.DROPBOX, "dropbox"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum GOOGLE_OAUTH2 = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum( + Value.GOOGLE_OAUTH2, "google-oauth2"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum VKONTAKTE = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.VKONTAKTE, "vkontakte"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum WORDPRESS = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.WORDPRESS, "wordpress"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum EXACT = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.EXACT, "exact"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum INSTAGRAM = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.INSTAGRAM, "instagram"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum FITBIT = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.FITBIT, "fitbit"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum THIRTYSEVENSIGNALS = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum( + Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum EVERNOTE = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.EVERNOTE, "evernote"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum SHOPIFY = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.SHOPIFY, "shopify"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum SALESFORCE_SANDBOX = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum SALESFORCE_COMMUNITY = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE_COMMUNITY, "salesforce-community"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum FACEBOOK = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.FACEBOOK, "facebook"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum DACCOUNT = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.DACCOUNT, "daccount"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum SOUNDCLOUD = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.SOUNDCLOUD, "soundcloud"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum APPLE = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.APPLE, "apple"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum EVERNOTE_SANDBOX = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum( + Value.EVERNOTE_SANDBOX, "evernote-sandbox"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum OAUTH2 = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.OAUTH2, "oauth2"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum OAUTH1 = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.OAUTH1, "oauth1"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum AMAZON = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.AMAZON, "amazon"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum LINE = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.LINE, "line"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum BOX = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.BOX, "box"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum UNTAPPED = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.UNTAPPED, "untapped"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum GITHUB = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.GITHUB, "github"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum SALESFORCE = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.SALESFORCE, "salesforce"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum BITBUCKET = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.BITBUCKET, "bitbucket"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum YAHOO = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.YAHOO, "yahoo"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum WEIBO = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.WEIBO, "weibo"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum PAYPAL = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.PAYPAL, "paypal"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum LINKEDIN = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.LINKEDIN, "linkedin"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum WINDOWSLIVE = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum( + Value.WINDOWSLIVE, "windowslive"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum YANDEX = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.YANDEX, "yandex"); + + public static final EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum TWITTER = + new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.TWITTER, "twitter"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BAIDU: + return visitor.visitBaidu(); + case DWOLLA: + return visitor.visitDwolla(); + case AUTH0OIDC: + return visitor.visitAuth0Oidc(); + case PLANNINGCENTER: + return visitor.visitPlanningcenter(); + case BITLY: + return visitor.visitBitly(); + case PAYPAL_SANDBOX: + return visitor.visitPaypalSandbox(); + case DROPBOX: + return visitor.visitDropbox(); + case GOOGLE_OAUTH2: + return visitor.visitGoogleOauth2(); + case VKONTAKTE: + return visitor.visitVkontakte(); + case WORDPRESS: + return visitor.visitWordpress(); + case EXACT: + return visitor.visitExact(); + case INSTAGRAM: + return visitor.visitInstagram(); + case FITBIT: + return visitor.visitFitbit(); + case THIRTYSEVENSIGNALS: + return visitor.visitThirtysevensignals(); + case EVERNOTE: + return visitor.visitEvernote(); + case SHOPIFY: + return visitor.visitShopify(); + case SALESFORCE_SANDBOX: + return visitor.visitSalesforceSandbox(); + case SALESFORCE_COMMUNITY: + return visitor.visitSalesforceCommunity(); + case FACEBOOK: + return visitor.visitFacebook(); + case DACCOUNT: + return visitor.visitDaccount(); + case SOUNDCLOUD: + return visitor.visitSoundcloud(); + case APPLE: + return visitor.visitApple(); + case EVERNOTE_SANDBOX: + return visitor.visitEvernoteSandbox(); + case OAUTH2: + return visitor.visitOauth2(); + case OAUTH1: + return visitor.visitOauth1(); + case AMAZON: + return visitor.visitAmazon(); + case LINE: + return visitor.visitLine(); + case BOX: + return visitor.visitBox(); + case UNTAPPED: + return visitor.visitUntapped(); + case GITHUB: + return visitor.visitGithub(); + case SALESFORCE: + return visitor.visitSalesforce(); + case BITBUCKET: + return visitor.visitBitbucket(); + case YAHOO: + return visitor.visitYahoo(); + case WEIBO: + return visitor.visitWeibo(); + case PAYPAL: + return visitor.visitPaypal(); + case LINKEDIN: + return visitor.visitLinkedin(); + case WINDOWSLIVE: + return visitor.visitWindowslive(); + case YANDEX: + return visitor.visitYandex(); + case TWITTER: + return visitor.visitTwitter(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum valueOf(String value) { + switch (value) { + case "baidu": + return BAIDU; + case "dwolla": + return DWOLLA; + case "auth0-oidc": + return AUTH0OIDC; + case "planningcenter": + return PLANNINGCENTER; + case "bitly": + return BITLY; + case "paypal-sandbox": + return PAYPAL_SANDBOX; + case "dropbox": + return DROPBOX; + case "google-oauth2": + return GOOGLE_OAUTH2; + case "vkontakte": + return VKONTAKTE; + case "wordpress": + return WORDPRESS; + case "exact": + return EXACT; + case "instagram": + return INSTAGRAM; + case "fitbit": + return FITBIT; + case "thirtysevensignals": + return THIRTYSEVENSIGNALS; + case "evernote": + return EVERNOTE; + case "shopify": + return SHOPIFY; + case "salesforce-sandbox": + return SALESFORCE_SANDBOX; + case "salesforce-community": + return SALESFORCE_COMMUNITY; + case "facebook": + return FACEBOOK; + case "daccount": + return DACCOUNT; + case "soundcloud": + return SOUNDCLOUD; + case "apple": + return APPLE; + case "evernote-sandbox": + return EVERNOTE_SANDBOX; + case "oauth2": + return OAUTH2; + case "oauth1": + return OAUTH1; + case "amazon": + return AMAZON; + case "line": + return LINE; + case "box": + return BOX; + case "untapped": + return UNTAPPED; + case "github": + return GITHUB; + case "salesforce": + return SALESFORCE; + case "bitbucket": + return BITBUCKET; + case "yahoo": + return YAHOO; + case "weibo": + return WEIBO; + case "paypal": + return PAYPAL; + case "linkedin": + return LINKEDIN; + case "windowslive": + return WINDOWSLIVE; + case "yandex": + return YANDEX; + case "twitter": + return TWITTER; + default: + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialProviderEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AMAZON, + + APPLE, + + DROPBOX, + + BITBUCKET, + + AUTH0OIDC, + + BAIDU, + + BITLY, + + BOX, + + DACCOUNT, + + DWOLLA, + + EVERNOTE_SANDBOX, + + EVERNOTE, + + EXACT, + + FACEBOOK, + + FITBIT, + + GITHUB, + + GOOGLE_OAUTH2, + + INSTAGRAM, + + LINE, + + LINKEDIN, + + OAUTH1, + + OAUTH2, + + PAYPAL, + + PAYPAL_SANDBOX, + + PLANNINGCENTER, + + SALESFORCE_COMMUNITY, + + SALESFORCE_SANDBOX, + + SALESFORCE, + + SHOPIFY, + + SOUNDCLOUD, + + THIRTYSEVENSIGNALS, + + TWITTER, + + UNTAPPED, + + VKONTAKTE, + + WEIBO, + + WINDOWSLIVE, + + WORDPRESS, + + YAHOO, + + YANDEX, + + UNKNOWN + } + + public interface Visitor { + T visitAmazon(); + + T visitApple(); + + T visitDropbox(); + + T visitBitbucket(); + + T visitAuth0Oidc(); + + T visitBaidu(); + + T visitBitly(); + + T visitBox(); + + T visitDaccount(); + + T visitDwolla(); + + T visitEvernoteSandbox(); + + T visitEvernote(); + + T visitExact(); + + T visitFacebook(); + + T visitFitbit(); + + T visitGithub(); + + T visitGoogleOauth2(); + + T visitInstagram(); + + T visitLine(); + + T visitLinkedin(); + + T visitOauth1(); + + T visitOauth2(); + + T visitPaypal(); + + T visitPaypalSandbox(); + + T visitPlanningcenter(); + + T visitSalesforceCommunity(); + + T visitSalesforceSandbox(); + + T visitSalesforce(); + + T visitShopify(); + + T visitSoundcloud(); + + T visitThirtysevensignals(); + + T visitTwitter(); + + T visitUntapped(); + + T visitVkontakte(); + + T visitWeibo(); + + T visitWindowslive(); + + T visitWordpress(); + + T visitYahoo(); + + T visitYandex(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId.java new file mode 100644 index 000000000..bdf263e7e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId.Deserializer.class) +public final class EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId + && equalTo((EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId of(String value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId(value, 0); + } + + public static EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId of(int value) { + return new EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedObjectIdentitiesItemSocialUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedTypeEnum.java new file mode 100644 index 000000000..af7b91171 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserDeletedTypeEnum { + public static final EventStreamCloudEventUserDeletedTypeEnum USER_DELETED = + new EventStreamCloudEventUserDeletedTypeEnum(Value.USER_DELETED, "user.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserDeletedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserDeletedTypeEnum + && this.string.equals(((EventStreamCloudEventUserDeletedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USER_DELETED: + return visitor.visitUserDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserDeletedTypeEnum valueOf(String value) { + switch (value) { + case "user.deleted": + return USER_DELETED; + default: + return new EventStreamCloudEventUserDeletedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + USER_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitUserDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdated.java new file mode 100644 index 000000000..6a0b741ef --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdated.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdated.Builder.class) +public final class EventStreamCloudEventUserUpdated { + private final String offset; + + private final EventStreamCloudEventUserUpdatedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdated( + String offset, EventStreamCloudEventUserUpdatedCloudEvent event, Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventUserUpdatedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdated && equalTo((EventStreamCloudEventUserUpdated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdated other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventUserUpdated other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventUserUpdatedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdated build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventUserUpdatedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdated other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ *

Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventUserUpdatedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdated build() { + return new EventStreamCloudEventUserUpdated(offset, event, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedCloudEvent.java new file mode 100644 index 000000000..74d7dbe60 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedCloudEvent.Builder.class) +public final class EventStreamCloudEventUserUpdatedCloudEvent { + private final String specversion; + + private final EventStreamCloudEventUserUpdatedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventUserUpdatedData data; + + private final String a0Tenant; + + private final String a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedCloudEvent( + String specversion, + EventStreamCloudEventUserUpdatedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventUserUpdatedData data, + String a0Tenant, + String a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + /** + * @return The version of the CloudEvents specification which the event uses. + */ + @JsonProperty("specversion") + public String getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventUserUpdatedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventUserUpdatedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + */ + @JsonProperty("a0stream") + public String getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedCloudEvent + && equalTo((EventStreamCloudEventUserUpdatedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + /** + *

The version of the CloudEvents specification which the event uses.

+ */ + TypeStage specversion(@NotNull String specversion); + + Builder from(EventStreamCloudEventUserUpdatedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventUserUpdatedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

A unique identifier for the event.

+ */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventUserUpdatedData data); + } + + public interface A0TenantStage { + /** + *

The auth0 tenant ID to which the event is associated.

+ */ + A0StreamStage a0Tenant(@NotNull String a0Tenant); + } + + public interface A0StreamStage { + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ */ + _FinalStage a0Stream(@NotNull String a0Stream); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + A0StreamStage, + _FinalStage { + private String specversion; + + private EventStreamCloudEventUserUpdatedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventUserUpdatedData data; + + private String a0Tenant; + + private String a0Stream; + + private Optional a0Purpose = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + /** + *

The version of the CloudEvents specification which the event uses.

+ *

The version of the CloudEvents specification which the event uses.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull String specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventUserUpdatedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ *

The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

A unique identifier for the event.

+ *

A unique identifier for the event.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

An ISO-8601 timestamp indicating when the event physically occurred.

+ *

An ISO-8601 timestamp indicating when the event physically occurred.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventUserUpdatedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

The auth0 tenant ID to which the event is associated.

+ *

The auth0 tenant ID to which the event is associated.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + /** + *

The auth0 event stream ID of the stream the event was delivered on.

+ *

The auth0 event stream ID of the stream the event was delivered on.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0stream") + public _FinalStage a0Stream(@NotNull String a0Stream) { + this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedCloudEvent build() { + return new EventStreamCloudEventUserUpdatedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedCloudEventTypeEnum.java new file mode 100644 index 000000000..55d7632a9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedCloudEventTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserUpdatedCloudEventTypeEnum { + public static final EventStreamCloudEventUserUpdatedCloudEventTypeEnum USER_UPDATED = + new EventStreamCloudEventUserUpdatedCloudEventTypeEnum(Value.USER_UPDATED, "user.updated"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserUpdatedCloudEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserUpdatedCloudEventTypeEnum + && this.string.equals(((EventStreamCloudEventUserUpdatedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USER_UPDATED: + return visitor.visitUserUpdated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserUpdatedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "user.updated": + return USER_UPDATED; + default: + return new EventStreamCloudEventUserUpdatedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + USER_UPDATED, + + UNKNOWN + } + + public interface Visitor { + T visitUserUpdated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedData.java new file mode 100644 index 000000000..652ed0ef9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedData.java @@ -0,0 +1,152 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedData.Builder.class) +public final class EventStreamCloudEventUserUpdatedData { + private final EventStreamCloudEventUserUpdatedObject object; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedData( + EventStreamCloudEventUserUpdatedObject object, + Optional context, + Map additionalProperties) { + this.object = object; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventUserUpdatedObject getObject() { + return object; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedData + && equalTo((EventStreamCloudEventUserUpdatedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedData other) { + return object.equals(other.object) && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventUserUpdatedObject object); + + Builder from(EventStreamCloudEventUserUpdatedData other); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventUserUpdatedObject object; + + private Optional context = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedData other) { + object(other.getObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventUserUpdatedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedData build() { + return new EventStreamCloudEventUserUpdatedData(object, context, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObject.java new file mode 100644 index 000000000..b13a9f466 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObject.java @@ -0,0 +1,1015 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedObject.Builder.class) +public final class EventStreamCloudEventUserUpdatedObject { + private final String userId; + + private final Optional email; + + private final Optional emailVerified; + + private final Optional username; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final List identities; + + private final Optional> appMetadata; + + private final Optional> userMetadata; + + private final Optional picture; + + private final Optional name; + + private final Optional nickname; + + private final Optional> multifactor; + + private final Optional lastIp; + + private final Optional lastLogin; + + private final Optional loginsCount; + + private final Optional blocked; + + private final Optional givenName; + + private final Optional familyName; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedObject( + String userId, + Optional email, + Optional emailVerified, + Optional username, + Optional phoneNumber, + Optional phoneVerified, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + List identities, + Optional> appMetadata, + Optional> userMetadata, + Optional picture, + Optional name, + Optional nickname, + Optional> multifactor, + Optional lastIp, + Optional lastLogin, + Optional loginsCount, + Optional blocked, + Optional givenName, + Optional familyName, + Map additionalProperties) { + this.userId = userId; + this.email = email; + this.emailVerified = emailVerified; + this.username = username; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.identities = identities; + this.appMetadata = appMetadata; + this.userMetadata = userMetadata; + this.picture = picture; + this.name = name; + this.nickname = nickname; + this.multifactor = multifactor; + this.lastIp = lastIp; + this.lastLogin = lastLogin; + this.loginsCount = loginsCount; + this.blocked = blocked; + this.givenName = givenName; + this.familyName = familyName; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + /** + * @return Array of user identity objects when accounts are linked. + */ + @JsonProperty("identities") + public List getIdentities() { + return identities; + } + + @JsonProperty("app_metadata") + public Optional> getAppMetadata() { + return appMetadata; + } + + @JsonProperty("user_metadata") + public Optional> getUserMetadata() { + return userMetadata; + } + + /** + * @return URL to picture, photo, or avatar of this user. + */ + @JsonProperty("picture") + public Optional getPicture() { + return picture; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Preferred nickname or alias of this user. + */ + @JsonProperty("nickname") + public Optional getNickname() { + return nickname; + } + + /** + * @return List of multi-factor authentication providers with which this user has enrolled. + */ + @JsonProperty("multifactor") + public Optional> getMultifactor() { + return multifactor; + } + + /** + * @return Last IP address from which this user logged in. + */ + @JsonProperty("last_ip") + public Optional getLastIp() { + return lastIp; + } + + /** + * @return Last date and time this user logged in (ISO_8601 format). + */ + @JsonProperty("last_login") + public Optional getLastLogin() { + return lastLogin; + } + + /** + * @return Total number of logins this user has performed. + */ + @JsonProperty("logins_count") + public Optional getLoginsCount() { + return loginsCount; + } + + /** + * @return Whether this user was blocked by an administrator (true) or is not (false). + */ + @JsonProperty("blocked") + public Optional getBlocked() { + return blocked; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObject + && equalTo((EventStreamCloudEventUserUpdatedObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObject other) { + return userId.equals(other.userId) + && email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && username.equals(other.username) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) + && identities.equals(other.identities) + && appMetadata.equals(other.appMetadata) + && userMetadata.equals(other.userMetadata) + && picture.equals(other.picture) + && name.equals(other.name) + && nickname.equals(other.nickname) + && multifactor.equals(other.multifactor) + && lastIp.equals(other.lastIp) + && lastLogin.equals(other.lastLogin) + && loginsCount.equals(other.loginsCount) + && blocked.equals(other.blocked) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.userId, + this.email, + this.emailVerified, + this.username, + this.phoneNumber, + this.phoneVerified, + this.createdAt, + this.updatedAt, + this.identities, + this.appMetadata, + this.userMetadata, + this.picture, + this.name, + this.nickname, + this.multifactor, + this.lastIp, + this.lastLogin, + this.loginsCount, + this.blocked, + this.givenName, + this.familyName); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

ID of the user which can be used when interacting with other APIs.

+ */ + CreatedAtStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventUserUpdatedObject other); + } + + public interface CreatedAtStage { + /** + *

Date and time when this entity was created (ISO_8601 format).

+ */ + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

Email address of this user.

+ */ + _FinalStage email(Optional email); + + _FinalStage email(String email); + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + _FinalStage emailVerified(Optional emailVerified); + + _FinalStage emailVerified(Boolean emailVerified); + + /** + *

Username of this user.

+ */ + _FinalStage username(Optional username); + + _FinalStage username(String username); + + /** + *

Phone number of this user.

+ */ + _FinalStage phoneNumber(Optional phoneNumber); + + _FinalStage phoneNumber(String phoneNumber); + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + _FinalStage phoneVerified(Optional phoneVerified); + + _FinalStage phoneVerified(Boolean phoneVerified); + + /** + *

Array of user identity objects when accounts are linked.

+ */ + _FinalStage identities(List identities); + + _FinalStage addIdentities(EventStreamCloudEventUserUpdatedObjectIdentitiesItem identities); + + _FinalStage addAllIdentities(List identities); + + _FinalStage appMetadata(Optional> appMetadata); + + _FinalStage appMetadata(Map appMetadata); + + _FinalStage userMetadata(Optional> userMetadata); + + _FinalStage userMetadata(Map userMetadata); + + /** + *

URL to picture, photo, or avatar of this user.

+ */ + _FinalStage picture(Optional picture); + + _FinalStage picture(String picture); + + /** + *

Name of this user.

+ */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

Preferred nickname or alias of this user.

+ */ + _FinalStage nickname(Optional nickname); + + _FinalStage nickname(String nickname); + + /** + *

List of multi-factor authentication providers with which this user has enrolled.

+ */ + _FinalStage multifactor(Optional> multifactor); + + _FinalStage multifactor(List multifactor); + + /** + *

Last IP address from which this user logged in.

+ */ + _FinalStage lastIp(Optional lastIp); + + _FinalStage lastIp(String lastIp); + + /** + *

Last date and time this user logged in (ISO_8601 format).

+ */ + _FinalStage lastLogin(Optional lastLogin); + + _FinalStage lastLogin(OffsetDateTime lastLogin); + + /** + *

Total number of logins this user has performed.

+ */ + _FinalStage loginsCount(Optional loginsCount); + + _FinalStage loginsCount(Integer loginsCount); + + /** + *

Whether this user was blocked by an administrator (true) or is not (false).

+ */ + _FinalStage blocked(Optional blocked); + + _FinalStage blocked(Boolean blocked); + + /** + *

Given name/first name/forename of this user.

+ */ + _FinalStage givenName(Optional givenName); + + _FinalStage givenName(String givenName); + + /** + *

Family name/last name/surname of this user.

+ */ + _FinalStage familyName(Optional familyName); + + _FinalStage familyName(String familyName); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String userId; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional familyName = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional blocked = Optional.empty(); + + private Optional loginsCount = Optional.empty(); + + private Optional lastLogin = Optional.empty(); + + private Optional lastIp = Optional.empty(); + + private Optional> multifactor = Optional.empty(); + + private Optional nickname = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional picture = Optional.empty(); + + private Optional> userMetadata = Optional.empty(); + + private Optional> appMetadata = Optional.empty(); + + private List identities = new ArrayList<>(); + + private Optional phoneVerified = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional email = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedObject other) { + userId(other.getUserId()); + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + username(other.getUsername()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + identities(other.getIdentities()); + appMetadata(other.getAppMetadata()); + userMetadata(other.getUserMetadata()); + picture(other.getPicture()); + name(other.getName()); + nickname(other.getNickname()); + multifactor(other.getMultifactor()); + lastIp(other.getLastIp()); + lastLogin(other.getLastLogin()); + loginsCount(other.getLoginsCount()); + blocked(other.getBlocked()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + return this; + } + + /** + *

ID of the user which can be used when interacting with other APIs.

+ *

ID of the user which can be used when interacting with other APIs.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public CreatedAtStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + /** + *

Date and time when this entity was created (ISO_8601 format).

+ *

Date and time when this entity was created (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + /** + *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ *

Date and time when this entity was last updated/modified (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public _FinalStage familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + /** + *

Given name/first name/forename of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public _FinalStage givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + /** + *

Whether this user was blocked by an administrator (true) or is not (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage blocked(Boolean blocked) { + this.blocked = Optional.ofNullable(blocked); + return this; + } + + /** + *

Whether this user was blocked by an administrator (true) or is not (false).

+ */ + @java.lang.Override + @JsonSetter(value = "blocked", nulls = Nulls.SKIP) + public _FinalStage blocked(Optional blocked) { + this.blocked = blocked; + return this; + } + + /** + *

Total number of logins this user has performed.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage loginsCount(Integer loginsCount) { + this.loginsCount = Optional.ofNullable(loginsCount); + return this; + } + + /** + *

Total number of logins this user has performed.

+ */ + @java.lang.Override + @JsonSetter(value = "logins_count", nulls = Nulls.SKIP) + public _FinalStage loginsCount(Optional loginsCount) { + this.loginsCount = loginsCount; + return this; + } + + /** + *

Last date and time this user logged in (ISO_8601 format).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastLogin(OffsetDateTime lastLogin) { + this.lastLogin = Optional.ofNullable(lastLogin); + return this; + } + + /** + *

Last date and time this user logged in (ISO_8601 format).

+ */ + @java.lang.Override + @JsonSetter(value = "last_login", nulls = Nulls.SKIP) + public _FinalStage lastLogin(Optional lastLogin) { + this.lastLogin = lastLogin; + return this; + } + + /** + *

Last IP address from which this user logged in.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastIp(String lastIp) { + this.lastIp = Optional.ofNullable(lastIp); + return this; + } + + /** + *

Last IP address from which this user logged in.

+ */ + @java.lang.Override + @JsonSetter(value = "last_ip", nulls = Nulls.SKIP) + public _FinalStage lastIp(Optional lastIp) { + this.lastIp = lastIp; + return this; + } + + /** + *

List of multi-factor authentication providers with which this user has enrolled.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage multifactor(List multifactor) { + this.multifactor = Optional.ofNullable(multifactor); + return this; + } + + /** + *

List of multi-factor authentication providers with which this user has enrolled.

+ */ + @java.lang.Override + @JsonSetter(value = "multifactor", nulls = Nulls.SKIP) + public _FinalStage multifactor(Optional> multifactor) { + this.multifactor = multifactor; + return this; + } + + /** + *

Preferred nickname or alias of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nickname(String nickname) { + this.nickname = Optional.ofNullable(nickname); + return this; + } + + /** + *

Preferred nickname or alias of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "nickname", nulls = Nulls.SKIP) + public _FinalStage nickname(Optional nickname) { + this.nickname = nickname; + return this; + } + + /** + *

Name of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Name of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + /** + *

URL to picture, photo, or avatar of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage picture(String picture) { + this.picture = Optional.ofNullable(picture); + return this; + } + + /** + *

URL to picture, photo, or avatar of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "picture", nulls = Nulls.SKIP) + public _FinalStage picture(Optional picture) { + this.picture = picture; + return this; + } + + @java.lang.Override + public _FinalStage userMetadata(Map userMetadata) { + this.userMetadata = Optional.ofNullable(userMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) + public _FinalStage userMetadata(Optional> userMetadata) { + this.userMetadata = userMetadata; + return this; + } + + @java.lang.Override + public _FinalStage appMetadata(Map appMetadata) { + this.appMetadata = Optional.ofNullable(appMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) + public _FinalStage appMetadata(Optional> appMetadata) { + this.appMetadata = appMetadata; + return this; + } + + /** + *

Array of user identity objects when accounts are linked.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdentities(List identities) { + if (identities != null) { + this.identities.addAll(identities); + } + return this; + } + + /** + *

Array of user identity objects when accounts are linked.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdentities(EventStreamCloudEventUserUpdatedObjectIdentitiesItem identities) { + this.identities.add(identities); + return this; + } + + /** + *

Array of user identity objects when accounts are linked.

+ */ + @java.lang.Override + @JsonSetter(value = "identities", nulls = Nulls.SKIP) + public _FinalStage identities(List identities) { + this.identities.clear(); + if (identities != null) { + this.identities.addAll(identities); + } + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @java.lang.Override + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public _FinalStage phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + /** + *

Phone number of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Phone number of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public _FinalStage phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + *

Username of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Username of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public _FinalStage username(Optional username) { + this.username = username; + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @java.lang.Override + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public _FinalStage emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + /** + *

Email address of this user.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Email address of this user.

+ */ + @java.lang.Override + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public _FinalStage email(Optional email) { + this.email = email; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedObject build() { + return new EventStreamCloudEventUserUpdatedObject( + userId, + email, + emailVerified, + username, + phoneNumber, + phoneVerified, + createdAt, + updatedAt, + identities, + appMetadata, + userMetadata, + picture, + name, + nickname, + multifactor, + lastIp, + lastLogin, + loginsCount, + blocked, + givenName, + familyName, + additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItem.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItem.java new file mode 100644 index 000000000..ca95c9e69 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItem.java @@ -0,0 +1,174 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserUpdatedObjectIdentitiesItem.Deserializer.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItem { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItem(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise) this.value); + } else if (this.type == 3) { + return visitor.visit((EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless) this.value); + } else if (this.type == 4) { + return visitor.visit((EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItem + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItem) other); + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItem other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItem of( + EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItem(value, 0); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItem of( + EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItem(value, 1); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItem of( + EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItem(value, 2); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItem of( + EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItem(value, 3); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItem of( + EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItem(value, 4); + } + + public interface Visitor { + T visit(EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom value); + + T visit(EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase value); + + T visit(EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise value); + + T visit(EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless value); + + T visit(EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserUpdatedObjectIdentitiesItem.class); + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedObjectIdentitiesItem deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom.java new file mode 100644 index 000000000..129e8c3a1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom.java @@ -0,0 +1,244 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom.Builder.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom { + private final String connection; + + private final EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom( + String connection, + EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId userId, + Optional profileData, + EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData(EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId userId; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId(@NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom build() { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData.java new file mode 100644 index 000000000..43a9a628d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData.Builder.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData build() { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum.java new file mode 100644 index 000000000..6e176dd48 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum { + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum CUSTOM = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum(Value.CUSTOM, "custom"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CUSTOM: + return visitor.visitCustom(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum valueOf(String value) { + switch (value) { + case "custom": + return CUSTOM; + default: + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomProviderEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CUSTOM, + + UNKNOWN + } + + public interface Visitor { + T visitCustom(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId.java new file mode 100644 index 000000000..957808189 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId.Deserializer.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId of(String value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId(value, 0); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId of(int value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustomUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase.java new file mode 100644 index 000000000..e8151f7cb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase.java @@ -0,0 +1,245 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase.Builder.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase { + private final String connection; + + private final EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase( + String connection, + EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId userId, + Optional profileData, + EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData(EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId userId; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase build() { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData.java new file mode 100644 index 000000000..5b591667e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData.Builder.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData build() { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum.java new file mode 100644 index 000000000..b846143d1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum.java @@ -0,0 +1,78 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum { + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum AUTH0 = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum(Value.AUTH0, "auth0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AUTH0: + return visitor.visitAuth0(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum valueOf(String value) { + switch (value) { + case "auth0": + return AUTH0; + default: + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTH0, + + UNKNOWN + } + + public interface Visitor { + T visitAuth0(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId.java new file mode 100644 index 000000000..d674fced1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId.Deserializer.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId of(String value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId(value, 0); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId of(int value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabaseUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise.java new file mode 100644 index 000000000..f6e0423a0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise.java @@ -0,0 +1,245 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise.Builder.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise { + private final String connection; + + private final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise( + String connection, + EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId userId, + Optional profileData, + EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData(EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId userId; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise build() { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData.java new file mode 100644 index 000000000..6c72a69c1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData.Builder.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData build() { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum.java new file mode 100644 index 000000000..47dd59185 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum.java @@ -0,0 +1,192 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum { + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum AD = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum(Value.AD, "ad"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum PINGFEDERATE = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum( + Value.PINGFEDERATE, "pingfederate"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum OKTA = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum(Value.OKTA, "okta"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum SAMLP = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum(Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum WAAD = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum(Value.WAAD, "waad"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum OFFICE365 = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum( + Value.OFFICE365, "office365"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum SHAREPOINT = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum( + Value.SHAREPOINT, "sharepoint"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum IP = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum(Value.IP, "ip"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum ADFS = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum(Value.ADFS, "adfs"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum OIDC = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum(Value.OIDC, "oidc"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum GOOGLE_APPS = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum( + Value.GOOGLE_APPS, "google-apps"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AD: + return visitor.visitAd(); + case PINGFEDERATE: + return visitor.visitPingfederate(); + case OKTA: + return visitor.visitOkta(); + case SAMLP: + return visitor.visitSamlp(); + case WAAD: + return visitor.visitWaad(); + case OFFICE365: + return visitor.visitOffice365(); + case SHAREPOINT: + return visitor.visitSharepoint(); + case IP: + return visitor.visitIp(); + case ADFS: + return visitor.visitAdfs(); + case OIDC: + return visitor.visitOidc(); + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum valueOf(String value) { + switch (value) { + case "ad": + return AD; + case "pingfederate": + return PINGFEDERATE; + case "okta": + return OKTA; + case "samlp": + return SAMLP; + case "waad": + return WAAD; + case "office365": + return OFFICE365; + case "sharepoint": + return SHAREPOINT; + case "ip": + return IP; + case "adfs": + return ADFS; + case "oidc": + return OIDC; + case "google-apps": + return GOOGLE_APPS; + default: + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AD, + + ADFS, + + GOOGLE_APPS, + + IP, + + OFFICE365, + + OIDC, + + OKTA, + + PINGFEDERATE, + + SAMLP, + + SHAREPOINT, + + WAAD, + + UNKNOWN + } + + public interface Visitor { + T visitAd(); + + T visitAdfs(); + + T visitGoogleApps(); + + T visitIp(); + + T visitOffice365(); + + T visitOidc(); + + T visitOkta(); + + T visitPingfederate(); + + T visitSamlp(); + + T visitSharepoint(); + + T visitWaad(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId.java new file mode 100644 index 000000000..940f2cfe7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId.Deserializer.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId of(String value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId(value, 0); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId of(int value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpriseUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless.java new file mode 100644 index 000000000..ebd5f8777 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless.java @@ -0,0 +1,246 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless.Builder.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless { + private final String connection; + + private final EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless( + String connection, + EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId userId, + Optional profileData, + EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData( + EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId userId; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless build() { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData.java new file mode 100644 index 000000000..8ce89175c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData.Builder.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData build() { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum.java new file mode 100644 index 000000000..343bb7cc2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum.java @@ -0,0 +1,89 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum { + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum EMAIL = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum(Value.EMAIL, "email"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum SMS = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum(Value.SMS, "sms"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case EMAIL: + return visitor.visitEmail(); + case SMS: + return visitor.visitSms(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum valueOf(String value) { + switch (value) { + case "email": + return EMAIL; + case "sms": + return SMS; + default: + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + EMAIL, + + SMS, + + UNKNOWN + } + + public interface Visitor { + T visitEmail(); + + T visitSms(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId.java new file mode 100644 index 000000000..7a4c0b71f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId.Deserializer.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId of(String value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId(value, 0); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId of(int value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordlessUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial.java new file mode 100644 index 000000000..f1fad1313 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial.java @@ -0,0 +1,244 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial.Builder.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial { + private final String connection; + + private final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial( + String connection, + EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId userId, + Optional profileData, + EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

Name of the connection containing this identity.

+ */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData(EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId userId; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

Name of the connection containing this identity.

+ *

Name of the connection containing this identity.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId(@NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial build() { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial( + connection, userId, profileData, provider, isSocial, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData.java new file mode 100644 index 000000000..4abb049fc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData.java @@ -0,0 +1,341 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData.Builder.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

Email address of this user.

+ */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

Whether this email address is verified (true) or unverified (false).

+ */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

Name of this user.

+ */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

Username of this user.

+ */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

Given name/first name/forename of this user.

+ */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

Family name/last name/surname of this user.

+ */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

Phone number of this user.

+ */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

Whether this phone number has been verified (true) or not (false).

+ */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData build() { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum.java new file mode 100644 index 000000000..d8369be99 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum.java @@ -0,0 +1,503 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum { + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum BAIDU = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.BAIDU, "baidu"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum DWOLLA = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.DWOLLA, "dwolla"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum AUTH0OIDC = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum PLANNINGCENTER = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum( + Value.PLANNINGCENTER, "planningcenter"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum BITLY = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.BITLY, "bitly"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum PAYPAL_SANDBOX = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum( + Value.PAYPAL_SANDBOX, "paypal-sandbox"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum DROPBOX = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.DROPBOX, "dropbox"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum GOOGLE_OAUTH2 = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum( + Value.GOOGLE_OAUTH2, "google-oauth2"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum VKONTAKTE = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.VKONTAKTE, "vkontakte"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum WORDPRESS = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.WORDPRESS, "wordpress"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum EXACT = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.EXACT, "exact"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum INSTAGRAM = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.INSTAGRAM, "instagram"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum FITBIT = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.FITBIT, "fitbit"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum THIRTYSEVENSIGNALS = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum( + Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum EVERNOTE = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.EVERNOTE, "evernote"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum SHOPIFY = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.SHOPIFY, "shopify"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum SALESFORCE_SANDBOX = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum SALESFORCE_COMMUNITY = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE_COMMUNITY, "salesforce-community"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum FACEBOOK = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.FACEBOOK, "facebook"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum DACCOUNT = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.DACCOUNT, "daccount"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum SOUNDCLOUD = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.SOUNDCLOUD, "soundcloud"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum APPLE = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.APPLE, "apple"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum EVERNOTE_SANDBOX = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum( + Value.EVERNOTE_SANDBOX, "evernote-sandbox"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum OAUTH2 = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.OAUTH2, "oauth2"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum OAUTH1 = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.OAUTH1, "oauth1"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum AMAZON = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.AMAZON, "amazon"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum LINE = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.LINE, "line"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum BOX = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.BOX, "box"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum UNTAPPED = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.UNTAPPED, "untapped"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum GITHUB = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.GITHUB, "github"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum SALESFORCE = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.SALESFORCE, "salesforce"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum BITBUCKET = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.BITBUCKET, "bitbucket"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum YAHOO = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.YAHOO, "yahoo"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum WEIBO = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.WEIBO, "weibo"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum PAYPAL = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.PAYPAL, "paypal"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum LINKEDIN = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.LINKEDIN, "linkedin"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum WINDOWSLIVE = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum( + Value.WINDOWSLIVE, "windowslive"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum YANDEX = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.YANDEX, "yandex"); + + public static final EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum TWITTER = + new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.TWITTER, "twitter"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BAIDU: + return visitor.visitBaidu(); + case DWOLLA: + return visitor.visitDwolla(); + case AUTH0OIDC: + return visitor.visitAuth0Oidc(); + case PLANNINGCENTER: + return visitor.visitPlanningcenter(); + case BITLY: + return visitor.visitBitly(); + case PAYPAL_SANDBOX: + return visitor.visitPaypalSandbox(); + case DROPBOX: + return visitor.visitDropbox(); + case GOOGLE_OAUTH2: + return visitor.visitGoogleOauth2(); + case VKONTAKTE: + return visitor.visitVkontakte(); + case WORDPRESS: + return visitor.visitWordpress(); + case EXACT: + return visitor.visitExact(); + case INSTAGRAM: + return visitor.visitInstagram(); + case FITBIT: + return visitor.visitFitbit(); + case THIRTYSEVENSIGNALS: + return visitor.visitThirtysevensignals(); + case EVERNOTE: + return visitor.visitEvernote(); + case SHOPIFY: + return visitor.visitShopify(); + case SALESFORCE_SANDBOX: + return visitor.visitSalesforceSandbox(); + case SALESFORCE_COMMUNITY: + return visitor.visitSalesforceCommunity(); + case FACEBOOK: + return visitor.visitFacebook(); + case DACCOUNT: + return visitor.visitDaccount(); + case SOUNDCLOUD: + return visitor.visitSoundcloud(); + case APPLE: + return visitor.visitApple(); + case EVERNOTE_SANDBOX: + return visitor.visitEvernoteSandbox(); + case OAUTH2: + return visitor.visitOauth2(); + case OAUTH1: + return visitor.visitOauth1(); + case AMAZON: + return visitor.visitAmazon(); + case LINE: + return visitor.visitLine(); + case BOX: + return visitor.visitBox(); + case UNTAPPED: + return visitor.visitUntapped(); + case GITHUB: + return visitor.visitGithub(); + case SALESFORCE: + return visitor.visitSalesforce(); + case BITBUCKET: + return visitor.visitBitbucket(); + case YAHOO: + return visitor.visitYahoo(); + case WEIBO: + return visitor.visitWeibo(); + case PAYPAL: + return visitor.visitPaypal(); + case LINKEDIN: + return visitor.visitLinkedin(); + case WINDOWSLIVE: + return visitor.visitWindowslive(); + case YANDEX: + return visitor.visitYandex(); + case TWITTER: + return visitor.visitTwitter(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum valueOf(String value) { + switch (value) { + case "baidu": + return BAIDU; + case "dwolla": + return DWOLLA; + case "auth0-oidc": + return AUTH0OIDC; + case "planningcenter": + return PLANNINGCENTER; + case "bitly": + return BITLY; + case "paypal-sandbox": + return PAYPAL_SANDBOX; + case "dropbox": + return DROPBOX; + case "google-oauth2": + return GOOGLE_OAUTH2; + case "vkontakte": + return VKONTAKTE; + case "wordpress": + return WORDPRESS; + case "exact": + return EXACT; + case "instagram": + return INSTAGRAM; + case "fitbit": + return FITBIT; + case "thirtysevensignals": + return THIRTYSEVENSIGNALS; + case "evernote": + return EVERNOTE; + case "shopify": + return SHOPIFY; + case "salesforce-sandbox": + return SALESFORCE_SANDBOX; + case "salesforce-community": + return SALESFORCE_COMMUNITY; + case "facebook": + return FACEBOOK; + case "daccount": + return DACCOUNT; + case "soundcloud": + return SOUNDCLOUD; + case "apple": + return APPLE; + case "evernote-sandbox": + return EVERNOTE_SANDBOX; + case "oauth2": + return OAUTH2; + case "oauth1": + return OAUTH1; + case "amazon": + return AMAZON; + case "line": + return LINE; + case "box": + return BOX; + case "untapped": + return UNTAPPED; + case "github": + return GITHUB; + case "salesforce": + return SALESFORCE; + case "bitbucket": + return BITBUCKET; + case "yahoo": + return YAHOO; + case "weibo": + return WEIBO; + case "paypal": + return PAYPAL; + case "linkedin": + return LINKEDIN; + case "windowslive": + return WINDOWSLIVE; + case "yandex": + return YANDEX; + case "twitter": + return TWITTER; + default: + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialProviderEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AMAZON, + + APPLE, + + DROPBOX, + + BITBUCKET, + + AUTH0OIDC, + + BAIDU, + + BITLY, + + BOX, + + DACCOUNT, + + DWOLLA, + + EVERNOTE_SANDBOX, + + EVERNOTE, + + EXACT, + + FACEBOOK, + + FITBIT, + + GITHUB, + + GOOGLE_OAUTH2, + + INSTAGRAM, + + LINE, + + LINKEDIN, + + OAUTH1, + + OAUTH2, + + PAYPAL, + + PAYPAL_SANDBOX, + + PLANNINGCENTER, + + SALESFORCE_COMMUNITY, + + SALESFORCE_SANDBOX, + + SALESFORCE, + + SHOPIFY, + + SOUNDCLOUD, + + THIRTYSEVENSIGNALS, + + TWITTER, + + UNTAPPED, + + VKONTAKTE, + + WEIBO, + + WINDOWSLIVE, + + WORDPRESS, + + YAHOO, + + YANDEX, + + UNKNOWN + } + + public interface Visitor { + T visitAmazon(); + + T visitApple(); + + T visitDropbox(); + + T visitBitbucket(); + + T visitAuth0Oidc(); + + T visitBaidu(); + + T visitBitly(); + + T visitBox(); + + T visitDaccount(); + + T visitDwolla(); + + T visitEvernoteSandbox(); + + T visitEvernote(); + + T visitExact(); + + T visitFacebook(); + + T visitFitbit(); + + T visitGithub(); + + T visitGoogleOauth2(); + + T visitInstagram(); + + T visitLine(); + + T visitLinkedin(); + + T visitOauth1(); + + T visitOauth2(); + + T visitPaypal(); + + T visitPaypalSandbox(); + + T visitPlanningcenter(); + + T visitSalesforceCommunity(); + + T visitSalesforceSandbox(); + + T visitSalesforce(); + + T visitShopify(); + + T visitSoundcloud(); + + T visitThirtysevensignals(); + + T visitTwitter(); + + T visitUntapped(); + + T visitVkontakte(); + + T visitWeibo(); + + T visitWindowslive(); + + T visitWordpress(); + + T visitYahoo(); + + T visitYandex(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId.java new file mode 100644 index 000000000..a80f71583 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId.Deserializer.class) +public final class EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId + && equalTo((EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId of(String value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId(value, 0); + } + + public static EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId of(int value) { + return new EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocialUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedTypeEnum.java new file mode 100644 index 000000000..e399218d4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedTypeEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventUserUpdatedTypeEnum { + public static final EventStreamCloudEventUserUpdatedTypeEnum USER_UPDATED = + new EventStreamCloudEventUserUpdatedTypeEnum(Value.USER_UPDATED, "user.updated"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserUpdatedTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamCloudEventUserUpdatedTypeEnum + && this.string.equals(((EventStreamCloudEventUserUpdatedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USER_UPDATED: + return visitor.visitUserUpdated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserUpdatedTypeEnum valueOf(String value) { + switch (value) { + case "user.updated": + return USER_UPDATED; + default: + return new EventStreamCloudEventUserUpdatedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + USER_UPDATED, + + UNKNOWN + } + + public interface Visitor { + T visitUserUpdated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java index f1ea3cdc0..4ee09102c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java @@ -10,19 +10,16 @@ public final class EventStreamDeliveryEventTypeEnum { public static final EventStreamDeliveryEventTypeEnum GROUP_DELETED = new EventStreamDeliveryEventTypeEnum(Value.GROUP_DELETED, "group.deleted"); + public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_CONNECTION_UPDATED = + new EventStreamDeliveryEventTypeEnum( + Value.ORGANIZATION_CONNECTION_UPDATED, "organization.connection.updated"); + public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_CONNECTION_ADDED = new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_CONNECTION_ADDED, "organization.connection.added"); public static final EventStreamDeliveryEventTypeEnum USER_DELETED = new EventStreamDeliveryEventTypeEnum(Value.USER_DELETED, "user.deleted"); - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_CONNECTION_UPDATED = - new EventStreamDeliveryEventTypeEnum( - Value.ORGANIZATION_CONNECTION_UPDATED, "organization.connection.updated"); - - public static final EventStreamDeliveryEventTypeEnum USER_UPDATED = - new EventStreamDeliveryEventTypeEnum(Value.USER_UPDATED, "user.updated"); - public static final EventStreamDeliveryEventTypeEnum GROUP_ROLE_DELETED = new EventStreamDeliveryEventTypeEnum(Value.GROUP_ROLE_DELETED, "group.role.deleted"); @@ -32,6 +29,9 @@ public final class EventStreamDeliveryEventTypeEnum { public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_MEMBER_DELETED = new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_MEMBER_DELETED, "organization.member.deleted"); + public static final EventStreamDeliveryEventTypeEnum USER_UPDATED = + new EventStreamDeliveryEventTypeEnum(Value.USER_UPDATED, "user.updated"); + public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_UPDATED = new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_UPDATED, "organization.updated"); @@ -45,12 +45,6 @@ public final class EventStreamDeliveryEventTypeEnum { public static final EventStreamDeliveryEventTypeEnum GROUP_CREATED = new EventStreamDeliveryEventTypeEnum(Value.GROUP_CREATED, "group.created"); - public static final EventStreamDeliveryEventTypeEnum GROUP_UPDATED = - new EventStreamDeliveryEventTypeEnum(Value.GROUP_UPDATED, "group.updated"); - - public static final EventStreamDeliveryEventTypeEnum GROUP_ROLE_ASSIGNED = - new EventStreamDeliveryEventTypeEnum(Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_CONNECTION_REMOVED = new EventStreamDeliveryEventTypeEnum( Value.ORGANIZATION_CONNECTION_REMOVED, "organization.connection.removed"); @@ -61,13 +55,11 @@ public final class EventStreamDeliveryEventTypeEnum { public static final EventStreamDeliveryEventTypeEnum GROUP_MEMBER_DELETED = new EventStreamDeliveryEventTypeEnum(Value.GROUP_MEMBER_DELETED, "group.member.deleted"); - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_GROUP_ROLE_DELETED = - new EventStreamDeliveryEventTypeEnum( - Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); + public static final EventStreamDeliveryEventTypeEnum GROUP_UPDATED = + new EventStreamDeliveryEventTypeEnum(Value.GROUP_UPDATED, "group.updated"); - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = - new EventStreamDeliveryEventTypeEnum( - Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + public static final EventStreamDeliveryEventTypeEnum GROUP_ROLE_ASSIGNED = + new EventStreamDeliveryEventTypeEnum(Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_DELETED = new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); @@ -75,6 +67,14 @@ public final class EventStreamDeliveryEventTypeEnum { public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_MEMBER_ADDED = new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_MEMBER_ADDED, "organization.member.added"); + public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_GROUP_ROLE_DELETED = + new EventStreamDeliveryEventTypeEnum( + Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); + + public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = + new EventStreamDeliveryEventTypeEnum( + Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_MEMBER_ROLE_DELETED = new EventStreamDeliveryEventTypeEnum( Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); @@ -114,20 +114,20 @@ public T visit(Visitor visitor) { switch (value) { case GROUP_DELETED: return visitor.visitGroupDeleted(); + case ORGANIZATION_CONNECTION_UPDATED: + return visitor.visitOrganizationConnectionUpdated(); case ORGANIZATION_CONNECTION_ADDED: return visitor.visitOrganizationConnectionAdded(); case USER_DELETED: return visitor.visitUserDeleted(); - case ORGANIZATION_CONNECTION_UPDATED: - return visitor.visitOrganizationConnectionUpdated(); - case USER_UPDATED: - return visitor.visitUserUpdated(); case GROUP_ROLE_DELETED: return visitor.visitGroupRoleDeleted(); case ORGANIZATION_CREATED: return visitor.visitOrganizationCreated(); case ORGANIZATION_MEMBER_DELETED: return visitor.visitOrganizationMemberDeleted(); + case USER_UPDATED: + return visitor.visitUserUpdated(); case ORGANIZATION_UPDATED: return visitor.visitOrganizationUpdated(); case GROUP_MEMBER_ADDED: @@ -136,24 +136,24 @@ public T visit(Visitor visitor) { return visitor.visitOrganizationGroupRoleAssigned(); case GROUP_CREATED: return visitor.visitGroupCreated(); - case GROUP_UPDATED: - return visitor.visitGroupUpdated(); - case GROUP_ROLE_ASSIGNED: - return visitor.visitGroupRoleAssigned(); case ORGANIZATION_CONNECTION_REMOVED: return visitor.visitOrganizationConnectionRemoved(); case USER_CREATED: return visitor.visitUserCreated(); case GROUP_MEMBER_DELETED: return visitor.visitGroupMemberDeleted(); - case ORGANIZATION_GROUP_ROLE_DELETED: - return visitor.visitOrganizationGroupRoleDeleted(); - case ORGANIZATION_MEMBER_ROLE_ASSIGNED: - return visitor.visitOrganizationMemberRoleAssigned(); + case GROUP_UPDATED: + return visitor.visitGroupUpdated(); + case GROUP_ROLE_ASSIGNED: + return visitor.visitGroupRoleAssigned(); case ORGANIZATION_DELETED: return visitor.visitOrganizationDeleted(); case ORGANIZATION_MEMBER_ADDED: return visitor.visitOrganizationMemberAdded(); + case ORGANIZATION_GROUP_ROLE_DELETED: + return visitor.visitOrganizationGroupRoleDeleted(); + case ORGANIZATION_MEMBER_ROLE_ASSIGNED: + return visitor.visitOrganizationMemberRoleAssigned(); case ORGANIZATION_MEMBER_ROLE_DELETED: return visitor.visitOrganizationMemberRoleDeleted(); case UNKNOWN: @@ -167,20 +167,20 @@ public static EventStreamDeliveryEventTypeEnum valueOf(String value) { switch (value) { case "group.deleted": return GROUP_DELETED; + case "organization.connection.updated": + return ORGANIZATION_CONNECTION_UPDATED; case "organization.connection.added": return ORGANIZATION_CONNECTION_ADDED; case "user.deleted": return USER_DELETED; - case "organization.connection.updated": - return ORGANIZATION_CONNECTION_UPDATED; - case "user.updated": - return USER_UPDATED; case "group.role.deleted": return GROUP_ROLE_DELETED; case "organization.created": return ORGANIZATION_CREATED; case "organization.member.deleted": return ORGANIZATION_MEMBER_DELETED; + case "user.updated": + return USER_UPDATED; case "organization.updated": return ORGANIZATION_UPDATED; case "group.member.added": @@ -189,24 +189,24 @@ public static EventStreamDeliveryEventTypeEnum valueOf(String value) { return ORGANIZATION_GROUP_ROLE_ASSIGNED; case "group.created": return GROUP_CREATED; - case "group.updated": - return GROUP_UPDATED; - case "group.role.assigned": - return GROUP_ROLE_ASSIGNED; case "organization.connection.removed": return ORGANIZATION_CONNECTION_REMOVED; case "user.created": return USER_CREATED; case "group.member.deleted": return GROUP_MEMBER_DELETED; - case "organization.group.role.deleted": - return ORGANIZATION_GROUP_ROLE_DELETED; - case "organization.member.role.assigned": - return ORGANIZATION_MEMBER_ROLE_ASSIGNED; + case "group.updated": + return GROUP_UPDATED; + case "group.role.assigned": + return GROUP_ROLE_ASSIGNED; case "organization.deleted": return ORGANIZATION_DELETED; case "organization.member.added": return ORGANIZATION_MEMBER_ADDED; + case "organization.group.role.deleted": + return ORGANIZATION_GROUP_ROLE_DELETED; + case "organization.member.role.assigned": + return ORGANIZATION_MEMBER_ROLE_ASSIGNED; case "organization.member.role.deleted": return ORGANIZATION_MEMBER_ROLE_DELETED; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamDestinationPatch.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamDestinationPatch.java index f764532ca..c0f79b3b1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamDestinationPatch.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamDestinationPatch.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = EventStreamDestinationPatch.Deserializer.class) @@ -82,13 +83,21 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("configuration")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookDestination.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamActionDestination.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("configuration")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamActionDestination.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeAwsRegionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeAwsRegionEnum.java index f074028bf..bcd395348 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeAwsRegionEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeAwsRegionEnum.java @@ -7,20 +7,38 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class EventStreamEventBridgeAwsRegionEnum { + public static final EventStreamEventBridgeAwsRegionEnum AP_NORTHEAST3 = + new EventStreamEventBridgeAwsRegionEnum(Value.AP_NORTHEAST3, "ap-northeast-3"); + public static final EventStreamEventBridgeAwsRegionEnum EU_SOUTH1 = new EventStreamEventBridgeAwsRegionEnum(Value.EU_SOUTH1, "eu-south-1"); - public static final EventStreamEventBridgeAwsRegionEnum AP_NORTHEAST2 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_NORTHEAST2, "ap-northeast-2"); + public static final EventStreamEventBridgeAwsRegionEnum EU_WEST1 = + new EventStreamEventBridgeAwsRegionEnum(Value.EU_WEST1, "eu-west-1"); public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST1 = new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST1, "ap-southeast-1"); + public static final EventStreamEventBridgeAwsRegionEnum US_WEST1 = + new EventStreamEventBridgeAwsRegionEnum(Value.US_WEST1, "us-west-1"); + + public static final EventStreamEventBridgeAwsRegionEnum EU_WEST2 = + new EventStreamEventBridgeAwsRegionEnum(Value.EU_WEST2, "eu-west-2"); + + public static final EventStreamEventBridgeAwsRegionEnum AP_NORTHEAST2 = + new EventStreamEventBridgeAwsRegionEnum(Value.AP_NORTHEAST2, "ap-northeast-2"); + + public static final EventStreamEventBridgeAwsRegionEnum US_GOV_WEST1 = + new EventStreamEventBridgeAwsRegionEnum(Value.US_GOV_WEST1, "us-gov-west-1"); + + public static final EventStreamEventBridgeAwsRegionEnum US_WEST2 = + new EventStreamEventBridgeAwsRegionEnum(Value.US_WEST2, "us-west-2"); + public static final EventStreamEventBridgeAwsRegionEnum EU_SOUTH2 = new EventStreamEventBridgeAwsRegionEnum(Value.EU_SOUTH2, "eu-south-2"); - public static final EventStreamEventBridgeAwsRegionEnum AP_NORTHEAST3 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_NORTHEAST3, "ap-northeast-3"); + public static final EventStreamEventBridgeAwsRegionEnum EU_WEST3 = + new EventStreamEventBridgeAwsRegionEnum(Value.EU_WEST3, "eu-west-3"); public static final EventStreamEventBridgeAwsRegionEnum AP_NORTHEAST1 = new EventStreamEventBridgeAwsRegionEnum(Value.AP_NORTHEAST1, "ap-northeast-1"); @@ -37,9 +55,6 @@ public final class EventStreamEventBridgeAwsRegionEnum { public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTH2 = new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTH2, "ap-south-2"); - public static final EventStreamEventBridgeAwsRegionEnum US_GOV_WEST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.US_GOV_WEST1, "us-gov-west-1"); - public static final EventStreamEventBridgeAwsRegionEnum CA_WEST1 = new EventStreamEventBridgeAwsRegionEnum(Value.CA_WEST1, "ca-west-1"); @@ -49,8 +64,11 @@ public final class EventStreamEventBridgeAwsRegionEnum { public static final EventStreamEventBridgeAwsRegionEnum MX_CENTRAL1 = new EventStreamEventBridgeAwsRegionEnum(Value.MX_CENTRAL1, "mx-central-1"); - public static final EventStreamEventBridgeAwsRegionEnum US_EAST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.US_EAST1, "us-east-1"); + public static final EventStreamEventBridgeAwsRegionEnum US_EAST2 = + new EventStreamEventBridgeAwsRegionEnum(Value.US_EAST2, "us-east-2"); + + public static final EventStreamEventBridgeAwsRegionEnum US_GOV_EAST1 = + new EventStreamEventBridgeAwsRegionEnum(Value.US_GOV_EAST1, "us-gov-east-1"); public static final EventStreamEventBridgeAwsRegionEnum SA_EAST1 = new EventStreamEventBridgeAwsRegionEnum(Value.SA_EAST1, "sa-east-1"); @@ -58,44 +76,38 @@ public final class EventStreamEventBridgeAwsRegionEnum { public static final EventStreamEventBridgeAwsRegionEnum AP_EAST2 = new EventStreamEventBridgeAwsRegionEnum(Value.AP_EAST2, "ap-east-2"); - public static final EventStreamEventBridgeAwsRegionEnum US_GOV_EAST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.US_GOV_EAST1, "us-gov-east-1"); - - public static final EventStreamEventBridgeAwsRegionEnum US_EAST2 = - new EventStreamEventBridgeAwsRegionEnum(Value.US_EAST2, "us-east-2"); + public static final EventStreamEventBridgeAwsRegionEnum US_EAST1 = + new EventStreamEventBridgeAwsRegionEnum(Value.US_EAST1, "us-east-1"); - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST5 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST5, "ap-southeast-5"); + public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST6 = + new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST6, "ap-southeast-6"); public static final EventStreamEventBridgeAwsRegionEnum AP_EAST1 = new EventStreamEventBridgeAwsRegionEnum(Value.AP_EAST1, "ap-east-1"); - public static final EventStreamEventBridgeAwsRegionEnum ME_CENTRAL1 = - new EventStreamEventBridgeAwsRegionEnum(Value.ME_CENTRAL1, "me-central-1"); - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST7 = new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST7, "ap-southeast-7"); - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST6 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST6, "ap-southeast-6"); - - public static final EventStreamEventBridgeAwsRegionEnum US_WEST2 = - new EventStreamEventBridgeAwsRegionEnum(Value.US_WEST2, "us-west-2"); + public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST5 = + new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST5, "ap-southeast-5"); - public static final EventStreamEventBridgeAwsRegionEnum EU_WEST3 = - new EventStreamEventBridgeAwsRegionEnum(Value.EU_WEST3, "eu-west-3"); + public static final EventStreamEventBridgeAwsRegionEnum ME_CENTRAL1 = + new EventStreamEventBridgeAwsRegionEnum(Value.ME_CENTRAL1, "me-central-1"); public static final EventStreamEventBridgeAwsRegionEnum AF_SOUTH1 = new EventStreamEventBridgeAwsRegionEnum(Value.AF_SOUTH1, "af-south-1"); - public static final EventStreamEventBridgeAwsRegionEnum EU_WEST2 = - new EventStreamEventBridgeAwsRegionEnum(Value.EU_WEST2, "eu-west-2"); + public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST3 = + new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST3, "ap-southeast-3"); + + public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST4 = + new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST4, "ap-southeast-4"); public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST2 = new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST2, "ap-southeast-2"); - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST4 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST4, "ap-southeast-4"); + public static final EventStreamEventBridgeAwsRegionEnum EU_CENTRAL2 = + new EventStreamEventBridgeAwsRegionEnum(Value.EU_CENTRAL2, "eu-central-2"); public static final EventStreamEventBridgeAwsRegionEnum EU_CENTRAL1 = new EventStreamEventBridgeAwsRegionEnum(Value.EU_CENTRAL1, "eu-central-1"); @@ -103,18 +115,6 @@ public final class EventStreamEventBridgeAwsRegionEnum { public static final EventStreamEventBridgeAwsRegionEnum IL_CENTRAL1 = new EventStreamEventBridgeAwsRegionEnum(Value.IL_CENTRAL1, "il-central-1"); - public static final EventStreamEventBridgeAwsRegionEnum US_WEST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.US_WEST1, "us-west-1"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST3 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST3, "ap-southeast-3"); - - public static final EventStreamEventBridgeAwsRegionEnum EU_CENTRAL2 = - new EventStreamEventBridgeAwsRegionEnum(Value.EU_CENTRAL2, "eu-central-2"); - - public static final EventStreamEventBridgeAwsRegionEnum EU_WEST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.EU_WEST1, "eu-west-1"); - private final Value value; private final String string; @@ -148,16 +148,28 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case AP_NORTHEAST3: + return visitor.visitApNortheast3(); case EU_SOUTH1: return visitor.visitEuSouth1(); - case AP_NORTHEAST2: - return visitor.visitApNortheast2(); + case EU_WEST1: + return visitor.visitEuWest1(); case AP_SOUTHEAST1: return visitor.visitApSoutheast1(); + case US_WEST1: + return visitor.visitUsWest1(); + case EU_WEST2: + return visitor.visitEuWest2(); + case AP_NORTHEAST2: + return visitor.visitApNortheast2(); + case US_GOV_WEST1: + return visitor.visitUsGovWest1(); + case US_WEST2: + return visitor.visitUsWest2(); case EU_SOUTH2: return visitor.visitEuSouth2(); - case AP_NORTHEAST3: - return visitor.visitApNortheast3(); + case EU_WEST3: + return visitor.visitEuWest3(); case AP_NORTHEAST1: return visitor.visitApNortheast1(); case AP_SOUTH1: @@ -168,58 +180,46 @@ public T visit(Visitor visitor) { return visitor.visitEuNorth1(); case AP_SOUTH2: return visitor.visitApSouth2(); - case US_GOV_WEST1: - return visitor.visitUsGovWest1(); case CA_WEST1: return visitor.visitCaWest1(); case ME_SOUTH1: return visitor.visitMeSouth1(); case MX_CENTRAL1: return visitor.visitMxCentral1(); - case US_EAST1: - return visitor.visitUsEast1(); + case US_EAST2: + return visitor.visitUsEast2(); + case US_GOV_EAST1: + return visitor.visitUsGovEast1(); case SA_EAST1: return visitor.visitSaEast1(); case AP_EAST2: return visitor.visitApEast2(); - case US_GOV_EAST1: - return visitor.visitUsGovEast1(); - case US_EAST2: - return visitor.visitUsEast2(); - case AP_SOUTHEAST5: - return visitor.visitApSoutheast5(); + case US_EAST1: + return visitor.visitUsEast1(); + case AP_SOUTHEAST6: + return visitor.visitApSoutheast6(); case AP_EAST1: return visitor.visitApEast1(); - case ME_CENTRAL1: - return visitor.visitMeCentral1(); case AP_SOUTHEAST7: return visitor.visitApSoutheast7(); - case AP_SOUTHEAST6: - return visitor.visitApSoutheast6(); - case US_WEST2: - return visitor.visitUsWest2(); - case EU_WEST3: - return visitor.visitEuWest3(); + case AP_SOUTHEAST5: + return visitor.visitApSoutheast5(); + case ME_CENTRAL1: + return visitor.visitMeCentral1(); case AF_SOUTH1: return visitor.visitAfSouth1(); - case EU_WEST2: - return visitor.visitEuWest2(); - case AP_SOUTHEAST2: - return visitor.visitApSoutheast2(); + case AP_SOUTHEAST3: + return visitor.visitApSoutheast3(); case AP_SOUTHEAST4: return visitor.visitApSoutheast4(); + case AP_SOUTHEAST2: + return visitor.visitApSoutheast2(); + case EU_CENTRAL2: + return visitor.visitEuCentral2(); case EU_CENTRAL1: return visitor.visitEuCentral1(); case IL_CENTRAL1: return visitor.visitIlCentral1(); - case US_WEST1: - return visitor.visitUsWest1(); - case AP_SOUTHEAST3: - return visitor.visitApSoutheast3(); - case EU_CENTRAL2: - return visitor.visitEuCentral2(); - case EU_WEST1: - return visitor.visitEuWest1(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -229,16 +229,28 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static EventStreamEventBridgeAwsRegionEnum valueOf(String value) { switch (value) { + case "ap-northeast-3": + return AP_NORTHEAST3; case "eu-south-1": return EU_SOUTH1; - case "ap-northeast-2": - return AP_NORTHEAST2; + case "eu-west-1": + return EU_WEST1; case "ap-southeast-1": return AP_SOUTHEAST1; + case "us-west-1": + return US_WEST1; + case "eu-west-2": + return EU_WEST2; + case "ap-northeast-2": + return AP_NORTHEAST2; + case "us-gov-west-1": + return US_GOV_WEST1; + case "us-west-2": + return US_WEST2; case "eu-south-2": return EU_SOUTH2; - case "ap-northeast-3": - return AP_NORTHEAST3; + case "eu-west-3": + return EU_WEST3; case "ap-northeast-1": return AP_NORTHEAST1; case "ap-south-1": @@ -249,58 +261,46 @@ public static EventStreamEventBridgeAwsRegionEnum valueOf(String value) { return EU_NORTH1; case "ap-south-2": return AP_SOUTH2; - case "us-gov-west-1": - return US_GOV_WEST1; case "ca-west-1": return CA_WEST1; case "me-south-1": return ME_SOUTH1; case "mx-central-1": return MX_CENTRAL1; - case "us-east-1": - return US_EAST1; + case "us-east-2": + return US_EAST2; + case "us-gov-east-1": + return US_GOV_EAST1; case "sa-east-1": return SA_EAST1; case "ap-east-2": return AP_EAST2; - case "us-gov-east-1": - return US_GOV_EAST1; - case "us-east-2": - return US_EAST2; - case "ap-southeast-5": - return AP_SOUTHEAST5; + case "us-east-1": + return US_EAST1; + case "ap-southeast-6": + return AP_SOUTHEAST6; case "ap-east-1": return AP_EAST1; - case "me-central-1": - return ME_CENTRAL1; case "ap-southeast-7": return AP_SOUTHEAST7; - case "ap-southeast-6": - return AP_SOUTHEAST6; - case "us-west-2": - return US_WEST2; - case "eu-west-3": - return EU_WEST3; + case "ap-southeast-5": + return AP_SOUTHEAST5; + case "me-central-1": + return ME_CENTRAL1; case "af-south-1": return AF_SOUTH1; - case "eu-west-2": - return EU_WEST2; - case "ap-southeast-2": - return AP_SOUTHEAST2; + case "ap-southeast-3": + return AP_SOUTHEAST3; case "ap-southeast-4": return AP_SOUTHEAST4; + case "ap-southeast-2": + return AP_SOUTHEAST2; + case "eu-central-2": + return EU_CENTRAL2; case "eu-central-1": return EU_CENTRAL1; case "il-central-1": return IL_CENTRAL1; - case "us-west-1": - return US_WEST1; - case "ap-southeast-3": - return AP_SOUTHEAST3; - case "eu-central-2": - return EU_CENTRAL2; - case "eu-west-1": - return EU_WEST1; default: return new EventStreamEventBridgeAwsRegionEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java index b904bd391..4e9b5203a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java @@ -10,18 +10,15 @@ public final class EventStreamEventTypeEnum { public static final EventStreamEventTypeEnum GROUP_DELETED = new EventStreamEventTypeEnum(Value.GROUP_DELETED, "group.deleted"); + public static final EventStreamEventTypeEnum ORGANIZATION_CONNECTION_UPDATED = + new EventStreamEventTypeEnum(Value.ORGANIZATION_CONNECTION_UPDATED, "organization.connection.updated"); + public static final EventStreamEventTypeEnum ORGANIZATION_CONNECTION_ADDED = new EventStreamEventTypeEnum(Value.ORGANIZATION_CONNECTION_ADDED, "organization.connection.added"); public static final EventStreamEventTypeEnum USER_DELETED = new EventStreamEventTypeEnum(Value.USER_DELETED, "user.deleted"); - public static final EventStreamEventTypeEnum ORGANIZATION_CONNECTION_UPDATED = - new EventStreamEventTypeEnum(Value.ORGANIZATION_CONNECTION_UPDATED, "organization.connection.updated"); - - public static final EventStreamEventTypeEnum USER_UPDATED = - new EventStreamEventTypeEnum(Value.USER_UPDATED, "user.updated"); - public static final EventStreamEventTypeEnum GROUP_ROLE_DELETED = new EventStreamEventTypeEnum(Value.GROUP_ROLE_DELETED, "group.role.deleted"); @@ -31,6 +28,9 @@ public final class EventStreamEventTypeEnum { public static final EventStreamEventTypeEnum ORGANIZATION_MEMBER_DELETED = new EventStreamEventTypeEnum(Value.ORGANIZATION_MEMBER_DELETED, "organization.member.deleted"); + public static final EventStreamEventTypeEnum USER_UPDATED = + new EventStreamEventTypeEnum(Value.USER_UPDATED, "user.updated"); + public static final EventStreamEventTypeEnum ORGANIZATION_UPDATED = new EventStreamEventTypeEnum(Value.ORGANIZATION_UPDATED, "organization.updated"); @@ -43,12 +43,6 @@ public final class EventStreamEventTypeEnum { public static final EventStreamEventTypeEnum GROUP_CREATED = new EventStreamEventTypeEnum(Value.GROUP_CREATED, "group.created"); - public static final EventStreamEventTypeEnum GROUP_UPDATED = - new EventStreamEventTypeEnum(Value.GROUP_UPDATED, "group.updated"); - - public static final EventStreamEventTypeEnum GROUP_ROLE_ASSIGNED = - new EventStreamEventTypeEnum(Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); - public static final EventStreamEventTypeEnum ORGANIZATION_CONNECTION_REMOVED = new EventStreamEventTypeEnum(Value.ORGANIZATION_CONNECTION_REMOVED, "organization.connection.removed"); @@ -58,11 +52,11 @@ public final class EventStreamEventTypeEnum { public static final EventStreamEventTypeEnum GROUP_MEMBER_DELETED = new EventStreamEventTypeEnum(Value.GROUP_MEMBER_DELETED, "group.member.deleted"); - public static final EventStreamEventTypeEnum ORGANIZATION_GROUP_ROLE_DELETED = - new EventStreamEventTypeEnum(Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); + public static final EventStreamEventTypeEnum GROUP_UPDATED = + new EventStreamEventTypeEnum(Value.GROUP_UPDATED, "group.updated"); - public static final EventStreamEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = - new EventStreamEventTypeEnum(Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + public static final EventStreamEventTypeEnum GROUP_ROLE_ASSIGNED = + new EventStreamEventTypeEnum(Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); public static final EventStreamEventTypeEnum ORGANIZATION_DELETED = new EventStreamEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); @@ -70,6 +64,12 @@ public final class EventStreamEventTypeEnum { public static final EventStreamEventTypeEnum ORGANIZATION_MEMBER_ADDED = new EventStreamEventTypeEnum(Value.ORGANIZATION_MEMBER_ADDED, "organization.member.added"); + public static final EventStreamEventTypeEnum ORGANIZATION_GROUP_ROLE_DELETED = + new EventStreamEventTypeEnum(Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); + + public static final EventStreamEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = + new EventStreamEventTypeEnum(Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + public static final EventStreamEventTypeEnum ORGANIZATION_MEMBER_ROLE_DELETED = new EventStreamEventTypeEnum(Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); @@ -108,20 +108,20 @@ public T visit(Visitor visitor) { switch (value) { case GROUP_DELETED: return visitor.visitGroupDeleted(); + case ORGANIZATION_CONNECTION_UPDATED: + return visitor.visitOrganizationConnectionUpdated(); case ORGANIZATION_CONNECTION_ADDED: return visitor.visitOrganizationConnectionAdded(); case USER_DELETED: return visitor.visitUserDeleted(); - case ORGANIZATION_CONNECTION_UPDATED: - return visitor.visitOrganizationConnectionUpdated(); - case USER_UPDATED: - return visitor.visitUserUpdated(); case GROUP_ROLE_DELETED: return visitor.visitGroupRoleDeleted(); case ORGANIZATION_CREATED: return visitor.visitOrganizationCreated(); case ORGANIZATION_MEMBER_DELETED: return visitor.visitOrganizationMemberDeleted(); + case USER_UPDATED: + return visitor.visitUserUpdated(); case ORGANIZATION_UPDATED: return visitor.visitOrganizationUpdated(); case GROUP_MEMBER_ADDED: @@ -130,24 +130,24 @@ public T visit(Visitor visitor) { return visitor.visitOrganizationGroupRoleAssigned(); case GROUP_CREATED: return visitor.visitGroupCreated(); - case GROUP_UPDATED: - return visitor.visitGroupUpdated(); - case GROUP_ROLE_ASSIGNED: - return visitor.visitGroupRoleAssigned(); case ORGANIZATION_CONNECTION_REMOVED: return visitor.visitOrganizationConnectionRemoved(); case USER_CREATED: return visitor.visitUserCreated(); case GROUP_MEMBER_DELETED: return visitor.visitGroupMemberDeleted(); - case ORGANIZATION_GROUP_ROLE_DELETED: - return visitor.visitOrganizationGroupRoleDeleted(); - case ORGANIZATION_MEMBER_ROLE_ASSIGNED: - return visitor.visitOrganizationMemberRoleAssigned(); + case GROUP_UPDATED: + return visitor.visitGroupUpdated(); + case GROUP_ROLE_ASSIGNED: + return visitor.visitGroupRoleAssigned(); case ORGANIZATION_DELETED: return visitor.visitOrganizationDeleted(); case ORGANIZATION_MEMBER_ADDED: return visitor.visitOrganizationMemberAdded(); + case ORGANIZATION_GROUP_ROLE_DELETED: + return visitor.visitOrganizationGroupRoleDeleted(); + case ORGANIZATION_MEMBER_ROLE_ASSIGNED: + return visitor.visitOrganizationMemberRoleAssigned(); case ORGANIZATION_MEMBER_ROLE_DELETED: return visitor.visitOrganizationMemberRoleDeleted(); case UNKNOWN: @@ -161,20 +161,20 @@ public static EventStreamEventTypeEnum valueOf(String value) { switch (value) { case "group.deleted": return GROUP_DELETED; + case "organization.connection.updated": + return ORGANIZATION_CONNECTION_UPDATED; case "organization.connection.added": return ORGANIZATION_CONNECTION_ADDED; case "user.deleted": return USER_DELETED; - case "organization.connection.updated": - return ORGANIZATION_CONNECTION_UPDATED; - case "user.updated": - return USER_UPDATED; case "group.role.deleted": return GROUP_ROLE_DELETED; case "organization.created": return ORGANIZATION_CREATED; case "organization.member.deleted": return ORGANIZATION_MEMBER_DELETED; + case "user.updated": + return USER_UPDATED; case "organization.updated": return ORGANIZATION_UPDATED; case "group.member.added": @@ -183,24 +183,24 @@ public static EventStreamEventTypeEnum valueOf(String value) { return ORGANIZATION_GROUP_ROLE_ASSIGNED; case "group.created": return GROUP_CREATED; - case "group.updated": - return GROUP_UPDATED; - case "group.role.assigned": - return GROUP_ROLE_ASSIGNED; case "organization.connection.removed": return ORGANIZATION_CONNECTION_REMOVED; case "user.created": return USER_CREATED; case "group.member.deleted": return GROUP_MEMBER_DELETED; - case "organization.group.role.deleted": - return ORGANIZATION_GROUP_ROLE_DELETED; - case "organization.member.role.assigned": - return ORGANIZATION_MEMBER_ROLE_ASSIGNED; + case "group.updated": + return GROUP_UPDATED; + case "group.role.assigned": + return GROUP_ROLE_ASSIGNED; case "organization.deleted": return ORGANIZATION_DELETED; case "organization.member.added": return ORGANIZATION_MEMBER_ADDED; + case "organization.group.role.deleted": + return ORGANIZATION_GROUP_ROLE_DELETED; + case "organization.member.role.assigned": + return ORGANIZATION_MEMBER_ROLE_ASSIGNED; case "organization.member.role.deleted": return ORGANIZATION_MEMBER_ROLE_DELETED; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeEnum.java new file mode 100644 index 000000000..d2ce6b2c6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeEnum.java @@ -0,0 +1,314 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamSubscribeEventsEventTypeEnum { + public static final EventStreamSubscribeEventsEventTypeEnum GROUP_DELETED = + new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_DELETED, "group.deleted"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_CONNECTION_UPDATED = + new EventStreamSubscribeEventsEventTypeEnum( + Value.ORGANIZATION_CONNECTION_UPDATED, "organization.connection.updated"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_CONNECTION_ADDED = + new EventStreamSubscribeEventsEventTypeEnum( + Value.ORGANIZATION_CONNECTION_ADDED, "organization.connection.added"); + + public static final EventStreamSubscribeEventsEventTypeEnum USER_DELETED = + new EventStreamSubscribeEventsEventTypeEnum(Value.USER_DELETED, "user.deleted"); + + public static final EventStreamSubscribeEventsEventTypeEnum GROUP_ROLE_DELETED = + new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_ROLE_DELETED, "group.role.deleted"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_CREATED = + new EventStreamSubscribeEventsEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_MEMBER_DELETED = + new EventStreamSubscribeEventsEventTypeEnum( + Value.ORGANIZATION_MEMBER_DELETED, "organization.member.deleted"); + + public static final EventStreamSubscribeEventsEventTypeEnum USER_UPDATED = + new EventStreamSubscribeEventsEventTypeEnum(Value.USER_UPDATED, "user.updated"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_UPDATED = + new EventStreamSubscribeEventsEventTypeEnum(Value.ORGANIZATION_UPDATED, "organization.updated"); + + public static final EventStreamSubscribeEventsEventTypeEnum GROUP_MEMBER_ADDED = + new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = + new EventStreamSubscribeEventsEventTypeEnum( + Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + + public static final EventStreamSubscribeEventsEventTypeEnum GROUP_CREATED = + new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_CREATED, "group.created"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_CONNECTION_REMOVED = + new EventStreamSubscribeEventsEventTypeEnum( + Value.ORGANIZATION_CONNECTION_REMOVED, "organization.connection.removed"); + + public static final EventStreamSubscribeEventsEventTypeEnum USER_CREATED = + new EventStreamSubscribeEventsEventTypeEnum(Value.USER_CREATED, "user.created"); + + public static final EventStreamSubscribeEventsEventTypeEnum GROUP_MEMBER_DELETED = + new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_MEMBER_DELETED, "group.member.deleted"); + + public static final EventStreamSubscribeEventsEventTypeEnum GROUP_UPDATED = + new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_UPDATED, "group.updated"); + + public static final EventStreamSubscribeEventsEventTypeEnum GROUP_ROLE_ASSIGNED = + new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_DELETED = + new EventStreamSubscribeEventsEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_MEMBER_ADDED = + new EventStreamSubscribeEventsEventTypeEnum(Value.ORGANIZATION_MEMBER_ADDED, "organization.member.added"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_GROUP_ROLE_DELETED = + new EventStreamSubscribeEventsEventTypeEnum( + Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = + new EventStreamSubscribeEventsEventTypeEnum( + Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_MEMBER_ROLE_DELETED = + new EventStreamSubscribeEventsEventTypeEnum( + Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); + + private final Value value; + + private final String string; + + EventStreamSubscribeEventsEventTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EventStreamSubscribeEventsEventTypeEnum + && this.string.equals(((EventStreamSubscribeEventsEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GROUP_DELETED: + return visitor.visitGroupDeleted(); + case ORGANIZATION_CONNECTION_UPDATED: + return visitor.visitOrganizationConnectionUpdated(); + case ORGANIZATION_CONNECTION_ADDED: + return visitor.visitOrganizationConnectionAdded(); + case USER_DELETED: + return visitor.visitUserDeleted(); + case GROUP_ROLE_DELETED: + return visitor.visitGroupRoleDeleted(); + case ORGANIZATION_CREATED: + return visitor.visitOrganizationCreated(); + case ORGANIZATION_MEMBER_DELETED: + return visitor.visitOrganizationMemberDeleted(); + case USER_UPDATED: + return visitor.visitUserUpdated(); + case ORGANIZATION_UPDATED: + return visitor.visitOrganizationUpdated(); + case GROUP_MEMBER_ADDED: + return visitor.visitGroupMemberAdded(); + case ORGANIZATION_GROUP_ROLE_ASSIGNED: + return visitor.visitOrganizationGroupRoleAssigned(); + case GROUP_CREATED: + return visitor.visitGroupCreated(); + case ORGANIZATION_CONNECTION_REMOVED: + return visitor.visitOrganizationConnectionRemoved(); + case USER_CREATED: + return visitor.visitUserCreated(); + case GROUP_MEMBER_DELETED: + return visitor.visitGroupMemberDeleted(); + case GROUP_UPDATED: + return visitor.visitGroupUpdated(); + case GROUP_ROLE_ASSIGNED: + return visitor.visitGroupRoleAssigned(); + case ORGANIZATION_DELETED: + return visitor.visitOrganizationDeleted(); + case ORGANIZATION_MEMBER_ADDED: + return visitor.visitOrganizationMemberAdded(); + case ORGANIZATION_GROUP_ROLE_DELETED: + return visitor.visitOrganizationGroupRoleDeleted(); + case ORGANIZATION_MEMBER_ROLE_ASSIGNED: + return visitor.visitOrganizationMemberRoleAssigned(); + case ORGANIZATION_MEMBER_ROLE_DELETED: + return visitor.visitOrganizationMemberRoleDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamSubscribeEventsEventTypeEnum valueOf(String value) { + switch (value) { + case "group.deleted": + return GROUP_DELETED; + case "organization.connection.updated": + return ORGANIZATION_CONNECTION_UPDATED; + case "organization.connection.added": + return ORGANIZATION_CONNECTION_ADDED; + case "user.deleted": + return USER_DELETED; + case "group.role.deleted": + return GROUP_ROLE_DELETED; + case "organization.created": + return ORGANIZATION_CREATED; + case "organization.member.deleted": + return ORGANIZATION_MEMBER_DELETED; + case "user.updated": + return USER_UPDATED; + case "organization.updated": + return ORGANIZATION_UPDATED; + case "group.member.added": + return GROUP_MEMBER_ADDED; + case "organization.group.role.assigned": + return ORGANIZATION_GROUP_ROLE_ASSIGNED; + case "group.created": + return GROUP_CREATED; + case "organization.connection.removed": + return ORGANIZATION_CONNECTION_REMOVED; + case "user.created": + return USER_CREATED; + case "group.member.deleted": + return GROUP_MEMBER_DELETED; + case "group.updated": + return GROUP_UPDATED; + case "group.role.assigned": + return GROUP_ROLE_ASSIGNED; + case "organization.deleted": + return ORGANIZATION_DELETED; + case "organization.member.added": + return ORGANIZATION_MEMBER_ADDED; + case "organization.group.role.deleted": + return ORGANIZATION_GROUP_ROLE_DELETED; + case "organization.member.role.assigned": + return ORGANIZATION_MEMBER_ROLE_ASSIGNED; + case "organization.member.role.deleted": + return ORGANIZATION_MEMBER_ROLE_DELETED; + default: + return new EventStreamSubscribeEventsEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GROUP_CREATED, + + GROUP_DELETED, + + GROUP_MEMBER_ADDED, + + GROUP_MEMBER_DELETED, + + GROUP_ROLE_ASSIGNED, + + GROUP_ROLE_DELETED, + + GROUP_UPDATED, + + ORGANIZATION_CONNECTION_ADDED, + + ORGANIZATION_CONNECTION_REMOVED, + + ORGANIZATION_CONNECTION_UPDATED, + + ORGANIZATION_CREATED, + + ORGANIZATION_DELETED, + + ORGANIZATION_GROUP_ROLE_ASSIGNED, + + ORGANIZATION_GROUP_ROLE_DELETED, + + ORGANIZATION_MEMBER_ADDED, + + ORGANIZATION_MEMBER_DELETED, + + ORGANIZATION_MEMBER_ROLE_ASSIGNED, + + ORGANIZATION_MEMBER_ROLE_DELETED, + + ORGANIZATION_UPDATED, + + USER_CREATED, + + USER_DELETED, + + USER_UPDATED, + + UNKNOWN + } + + public interface Visitor { + T visitGroupCreated(); + + T visitGroupDeleted(); + + T visitGroupMemberAdded(); + + T visitGroupMemberDeleted(); + + T visitGroupRoleAssigned(); + + T visitGroupRoleDeleted(); + + T visitGroupUpdated(); + + T visitOrganizationConnectionAdded(); + + T visitOrganizationConnectionRemoved(); + + T visitOrganizationConnectionUpdated(); + + T visitOrganizationCreated(); + + T visitOrganizationDeleted(); + + T visitOrganizationGroupRoleAssigned(); + + T visitOrganizationGroupRoleDeleted(); + + T visitOrganizationMemberAdded(); + + T visitOrganizationMemberDeleted(); + + T visitOrganizationMemberRoleAssigned(); + + T visitOrganizationMemberRoleDeleted(); + + T visitOrganizationUpdated(); + + T visitUserCreated(); + + T visitUserDeleted(); + + T visitUserUpdated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeParam.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeParam.java new file mode 100644 index 000000000..d9f6b71aa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeParam.java @@ -0,0 +1,100 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.List; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamSubscribeEventsEventTypeParam.Deserializer.class) +public final class EventStreamSubscribeEventsEventTypeParam { + private final Object value; + + private final int type; + + private EventStreamSubscribeEventsEventTypeParam(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamSubscribeEventsEventTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((List) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamSubscribeEventsEventTypeParam + && equalTo((EventStreamSubscribeEventsEventTypeParam) other); + } + + private boolean equalTo(EventStreamSubscribeEventsEventTypeParam other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamSubscribeEventsEventTypeParam of(EventStreamSubscribeEventsEventTypeEnum value) { + return new EventStreamSubscribeEventsEventTypeParam(value, 0); + } + + public static EventStreamSubscribeEventsEventTypeParam of(List value) { + return new EventStreamSubscribeEventsEventTypeParam(value, 1); + } + + public interface Visitor { + T visit(EventStreamSubscribeEventsEventTypeEnum value); + + T visit(List value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamSubscribeEventsEventTypeParam.class); + } + + @java.lang.Override + public EventStreamSubscribeEventsEventTypeParam deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamSubscribeEventsEventTypeEnum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, new TypeReference>() {})); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsResponseContent.java new file mode 100644 index 000000000..f129c61e5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsResponseContent.java @@ -0,0 +1,1522 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +public final class EventStreamSubscribeEventsResponseContent { + private final Value value; + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + private EventStreamSubscribeEventsResponseContent(Value value) { + this.value = value; + } + + public T visit(Visitor visitor) { + return value.visit(visitor); + } + + public static EventStreamSubscribeEventsResponseContent groupCreated(EventStreamCloudEventGroupCreated value) { + return new EventStreamSubscribeEventsResponseContent(new GroupCreatedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent groupDeleted(EventStreamCloudEventGroupDeleted value) { + return new EventStreamSubscribeEventsResponseContent(new GroupDeletedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent groupMemberAdded( + EventStreamCloudEventGroupMemberAdded value) { + return new EventStreamSubscribeEventsResponseContent(new GroupMemberAddedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent groupMemberDeleted( + EventStreamCloudEventGroupMemberDeleted value) { + return new EventStreamSubscribeEventsResponseContent(new GroupMemberDeletedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent groupRoleAssigned( + EventStreamCloudEventGroupRoleAssigned value) { + return new EventStreamSubscribeEventsResponseContent(new GroupRoleAssignedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent groupRoleDeleted( + EventStreamCloudEventGroupRoleDeleted value) { + return new EventStreamSubscribeEventsResponseContent(new GroupRoleDeletedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent groupUpdated(EventStreamCloudEventGroupUpdated value) { + return new EventStreamSubscribeEventsResponseContent(new GroupUpdatedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent organizationConnectionAdded( + EventStreamCloudEventOrgConnectionAdded value) { + return new EventStreamSubscribeEventsResponseContent(new OrganizationConnectionAddedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent organizationConnectionRemoved( + EventStreamCloudEventOrgConnectionRemoved value) { + return new EventStreamSubscribeEventsResponseContent(new OrganizationConnectionRemovedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent organizationConnectionUpdated( + EventStreamCloudEventOrgConnectionUpdated value) { + return new EventStreamSubscribeEventsResponseContent(new OrganizationConnectionUpdatedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent organizationCreated(EventStreamCloudEventOrgCreated value) { + return new EventStreamSubscribeEventsResponseContent(new OrganizationCreatedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent organizationDeleted(EventStreamCloudEventOrgDeleted value) { + return new EventStreamSubscribeEventsResponseContent(new OrganizationDeletedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent organizationGroupRoleAssigned( + EventStreamCloudEventOrgGroupRoleAssigned value) { + return new EventStreamSubscribeEventsResponseContent(new OrganizationGroupRoleAssignedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent organizationGroupRoleDeleted( + EventStreamCloudEventOrgGroupRoleDeleted value) { + return new EventStreamSubscribeEventsResponseContent(new OrganizationGroupRoleDeletedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent organizationMemberAdded( + EventStreamCloudEventOrgMemberAdded value) { + return new EventStreamSubscribeEventsResponseContent(new OrganizationMemberAddedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent organizationMemberDeleted( + EventStreamCloudEventOrgMemberDeleted value) { + return new EventStreamSubscribeEventsResponseContent(new OrganizationMemberDeletedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent organizationMemberRoleAssigned( + EventStreamCloudEventOrgMemberRoleAssigned value) { + return new EventStreamSubscribeEventsResponseContent(new OrganizationMemberRoleAssignedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent organizationMemberRoleDeleted( + EventStreamCloudEventOrgMemberRoleDeleted value) { + return new EventStreamSubscribeEventsResponseContent(new OrganizationMemberRoleDeletedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent organizationUpdated(EventStreamCloudEventOrgUpdated value) { + return new EventStreamSubscribeEventsResponseContent(new OrganizationUpdatedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent userCreated(EventStreamCloudEventUserCreated value) { + return new EventStreamSubscribeEventsResponseContent(new UserCreatedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent userDeleted(EventStreamCloudEventUserDeleted value) { + return new EventStreamSubscribeEventsResponseContent(new UserDeletedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent userUpdated(EventStreamCloudEventUserUpdated value) { + return new EventStreamSubscribeEventsResponseContent(new UserUpdatedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent error(EventStreamCloudEventErrorMessage value) { + return new EventStreamSubscribeEventsResponseContent(new ErrorValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent offsetOnly(EventStreamCloudEventOffsetOnlyMessage value) { + return new EventStreamSubscribeEventsResponseContent(new OffsetOnlyValue(value)); + } + + public boolean isGroupCreated() { + return value instanceof GroupCreatedValue; + } + + public boolean isGroupDeleted() { + return value instanceof GroupDeletedValue; + } + + public boolean isGroupMemberAdded() { + return value instanceof GroupMemberAddedValue; + } + + public boolean isGroupMemberDeleted() { + return value instanceof GroupMemberDeletedValue; + } + + public boolean isGroupRoleAssigned() { + return value instanceof GroupRoleAssignedValue; + } + + public boolean isGroupRoleDeleted() { + return value instanceof GroupRoleDeletedValue; + } + + public boolean isGroupUpdated() { + return value instanceof GroupUpdatedValue; + } + + public boolean isOrganizationConnectionAdded() { + return value instanceof OrganizationConnectionAddedValue; + } + + public boolean isOrganizationConnectionRemoved() { + return value instanceof OrganizationConnectionRemovedValue; + } + + public boolean isOrganizationConnectionUpdated() { + return value instanceof OrganizationConnectionUpdatedValue; + } + + public boolean isOrganizationCreated() { + return value instanceof OrganizationCreatedValue; + } + + public boolean isOrganizationDeleted() { + return value instanceof OrganizationDeletedValue; + } + + public boolean isOrganizationGroupRoleAssigned() { + return value instanceof OrganizationGroupRoleAssignedValue; + } + + public boolean isOrganizationGroupRoleDeleted() { + return value instanceof OrganizationGroupRoleDeletedValue; + } + + public boolean isOrganizationMemberAdded() { + return value instanceof OrganizationMemberAddedValue; + } + + public boolean isOrganizationMemberDeleted() { + return value instanceof OrganizationMemberDeletedValue; + } + + public boolean isOrganizationMemberRoleAssigned() { + return value instanceof OrganizationMemberRoleAssignedValue; + } + + public boolean isOrganizationMemberRoleDeleted() { + return value instanceof OrganizationMemberRoleDeletedValue; + } + + public boolean isOrganizationUpdated() { + return value instanceof OrganizationUpdatedValue; + } + + public boolean isUserCreated() { + return value instanceof UserCreatedValue; + } + + public boolean isUserDeleted() { + return value instanceof UserDeletedValue; + } + + public boolean isUserUpdated() { + return value instanceof UserUpdatedValue; + } + + public boolean isError() { + return value instanceof ErrorValue; + } + + public boolean isOffsetOnly() { + return value instanceof OffsetOnlyValue; + } + + public boolean _isUnknown() { + return value instanceof _UnknownValue; + } + + public Optional getGroupCreated() { + if (isGroupCreated()) { + return Optional.of(((GroupCreatedValue) value).value); + } + return Optional.empty(); + } + + public Optional getGroupDeleted() { + if (isGroupDeleted()) { + return Optional.of(((GroupDeletedValue) value).value); + } + return Optional.empty(); + } + + public Optional getGroupMemberAdded() { + if (isGroupMemberAdded()) { + return Optional.of(((GroupMemberAddedValue) value).value); + } + return Optional.empty(); + } + + public Optional getGroupMemberDeleted() { + if (isGroupMemberDeleted()) { + return Optional.of(((GroupMemberDeletedValue) value).value); + } + return Optional.empty(); + } + + public Optional getGroupRoleAssigned() { + if (isGroupRoleAssigned()) { + return Optional.of(((GroupRoleAssignedValue) value).value); + } + return Optional.empty(); + } + + public Optional getGroupRoleDeleted() { + if (isGroupRoleDeleted()) { + return Optional.of(((GroupRoleDeletedValue) value).value); + } + return Optional.empty(); + } + + public Optional getGroupUpdated() { + if (isGroupUpdated()) { + return Optional.of(((GroupUpdatedValue) value).value); + } + return Optional.empty(); + } + + public Optional getOrganizationConnectionAdded() { + if (isOrganizationConnectionAdded()) { + return Optional.of(((OrganizationConnectionAddedValue) value).value); + } + return Optional.empty(); + } + + public Optional getOrganizationConnectionRemoved() { + if (isOrganizationConnectionRemoved()) { + return Optional.of(((OrganizationConnectionRemovedValue) value).value); + } + return Optional.empty(); + } + + public Optional getOrganizationConnectionUpdated() { + if (isOrganizationConnectionUpdated()) { + return Optional.of(((OrganizationConnectionUpdatedValue) value).value); + } + return Optional.empty(); + } + + public Optional getOrganizationCreated() { + if (isOrganizationCreated()) { + return Optional.of(((OrganizationCreatedValue) value).value); + } + return Optional.empty(); + } + + public Optional getOrganizationDeleted() { + if (isOrganizationDeleted()) { + return Optional.of(((OrganizationDeletedValue) value).value); + } + return Optional.empty(); + } + + public Optional getOrganizationGroupRoleAssigned() { + if (isOrganizationGroupRoleAssigned()) { + return Optional.of(((OrganizationGroupRoleAssignedValue) value).value); + } + return Optional.empty(); + } + + public Optional getOrganizationGroupRoleDeleted() { + if (isOrganizationGroupRoleDeleted()) { + return Optional.of(((OrganizationGroupRoleDeletedValue) value).value); + } + return Optional.empty(); + } + + public Optional getOrganizationMemberAdded() { + if (isOrganizationMemberAdded()) { + return Optional.of(((OrganizationMemberAddedValue) value).value); + } + return Optional.empty(); + } + + public Optional getOrganizationMemberDeleted() { + if (isOrganizationMemberDeleted()) { + return Optional.of(((OrganizationMemberDeletedValue) value).value); + } + return Optional.empty(); + } + + public Optional getOrganizationMemberRoleAssigned() { + if (isOrganizationMemberRoleAssigned()) { + return Optional.of(((OrganizationMemberRoleAssignedValue) value).value); + } + return Optional.empty(); + } + + public Optional getOrganizationMemberRoleDeleted() { + if (isOrganizationMemberRoleDeleted()) { + return Optional.of(((OrganizationMemberRoleDeletedValue) value).value); + } + return Optional.empty(); + } + + public Optional getOrganizationUpdated() { + if (isOrganizationUpdated()) { + return Optional.of(((OrganizationUpdatedValue) value).value); + } + return Optional.empty(); + } + + public Optional getUserCreated() { + if (isUserCreated()) { + return Optional.of(((UserCreatedValue) value).value); + } + return Optional.empty(); + } + + public Optional getUserDeleted() { + if (isUserDeleted()) { + return Optional.of(((UserDeletedValue) value).value); + } + return Optional.empty(); + } + + public Optional getUserUpdated() { + if (isUserUpdated()) { + return Optional.of(((UserUpdatedValue) value).value); + } + return Optional.empty(); + } + + public Optional getError() { + if (isError()) { + return Optional.of(((ErrorValue) value).value); + } + return Optional.empty(); + } + + public Optional getOffsetOnly() { + if (isOffsetOnly()) { + return Optional.of(((OffsetOnlyValue) value).value); + } + return Optional.empty(); + } + + public Optional _getUnknown() { + if (_isUnknown()) { + return Optional.of(((_UnknownValue) value).value); + } + return Optional.empty(); + } + + @Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamSubscribeEventsResponseContent + && value.equals(((EventStreamSubscribeEventsResponseContent) other).value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + return value.toString(); + } + + @JsonValue + private Value getValue() { + return this.value; + } + + public interface Visitor { + T visitGroupCreated(EventStreamCloudEventGroupCreated groupCreated); + + T visitGroupDeleted(EventStreamCloudEventGroupDeleted groupDeleted); + + T visitGroupMemberAdded(EventStreamCloudEventGroupMemberAdded groupMemberAdded); + + T visitGroupMemberDeleted(EventStreamCloudEventGroupMemberDeleted groupMemberDeleted); + + T visitGroupRoleAssigned(EventStreamCloudEventGroupRoleAssigned groupRoleAssigned); + + T visitGroupRoleDeleted(EventStreamCloudEventGroupRoleDeleted groupRoleDeleted); + + T visitGroupUpdated(EventStreamCloudEventGroupUpdated groupUpdated); + + T visitOrganizationConnectionAdded(EventStreamCloudEventOrgConnectionAdded organizationConnectionAdded); + + T visitOrganizationConnectionRemoved(EventStreamCloudEventOrgConnectionRemoved organizationConnectionRemoved); + + T visitOrganizationConnectionUpdated(EventStreamCloudEventOrgConnectionUpdated organizationConnectionUpdated); + + T visitOrganizationCreated(EventStreamCloudEventOrgCreated organizationCreated); + + T visitOrganizationDeleted(EventStreamCloudEventOrgDeleted organizationDeleted); + + T visitOrganizationGroupRoleAssigned(EventStreamCloudEventOrgGroupRoleAssigned organizationGroupRoleAssigned); + + T visitOrganizationGroupRoleDeleted(EventStreamCloudEventOrgGroupRoleDeleted organizationGroupRoleDeleted); + + T visitOrganizationMemberAdded(EventStreamCloudEventOrgMemberAdded organizationMemberAdded); + + T visitOrganizationMemberDeleted(EventStreamCloudEventOrgMemberDeleted organizationMemberDeleted); + + T visitOrganizationMemberRoleAssigned( + EventStreamCloudEventOrgMemberRoleAssigned organizationMemberRoleAssigned); + + T visitOrganizationMemberRoleDeleted(EventStreamCloudEventOrgMemberRoleDeleted organizationMemberRoleDeleted); + + T visitOrganizationUpdated(EventStreamCloudEventOrgUpdated organizationUpdated); + + T visitUserCreated(EventStreamCloudEventUserCreated userCreated); + + T visitUserDeleted(EventStreamCloudEventUserDeleted userDeleted); + + T visitUserUpdated(EventStreamCloudEventUserUpdated userUpdated); + + T visitError(EventStreamCloudEventErrorMessage error); + + T visitOffsetOnly(EventStreamCloudEventOffsetOnlyMessage offsetOnly); + + T _visitUnknown(Object unknownType); + } + + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) + @JsonSubTypes({ + @JsonSubTypes.Type(GroupCreatedValue.class), + @JsonSubTypes.Type(GroupDeletedValue.class), + @JsonSubTypes.Type(GroupMemberAddedValue.class), + @JsonSubTypes.Type(GroupMemberDeletedValue.class), + @JsonSubTypes.Type(GroupRoleAssignedValue.class), + @JsonSubTypes.Type(GroupRoleDeletedValue.class), + @JsonSubTypes.Type(GroupUpdatedValue.class), + @JsonSubTypes.Type(OrganizationConnectionAddedValue.class), + @JsonSubTypes.Type(OrganizationConnectionRemovedValue.class), + @JsonSubTypes.Type(OrganizationConnectionUpdatedValue.class), + @JsonSubTypes.Type(OrganizationCreatedValue.class), + @JsonSubTypes.Type(OrganizationDeletedValue.class), + @JsonSubTypes.Type(OrganizationGroupRoleAssignedValue.class), + @JsonSubTypes.Type(OrganizationGroupRoleDeletedValue.class), + @JsonSubTypes.Type(OrganizationMemberAddedValue.class), + @JsonSubTypes.Type(OrganizationMemberDeletedValue.class), + @JsonSubTypes.Type(OrganizationMemberRoleAssignedValue.class), + @JsonSubTypes.Type(OrganizationMemberRoleDeletedValue.class), + @JsonSubTypes.Type(OrganizationUpdatedValue.class), + @JsonSubTypes.Type(UserCreatedValue.class), + @JsonSubTypes.Type(UserDeletedValue.class), + @JsonSubTypes.Type(UserUpdatedValue.class), + @JsonSubTypes.Type(ErrorValue.class), + @JsonSubTypes.Type(OffsetOnlyValue.class) + }) + @JsonIgnoreProperties(ignoreUnknown = true) + private interface Value { + T visit(Visitor visitor); + } + + @JsonTypeName("group.created") + @JsonIgnoreProperties("type") + private static final class GroupCreatedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventGroupCreated value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private GroupCreatedValue() {} + + private GroupCreatedValue(EventStreamCloudEventGroupCreated value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitGroupCreated(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GroupCreatedValue && equalTo((GroupCreatedValue) other); + } + + private boolean equalTo(GroupCreatedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("group.deleted") + @JsonIgnoreProperties("type") + private static final class GroupDeletedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventGroupDeleted value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private GroupDeletedValue() {} + + private GroupDeletedValue(EventStreamCloudEventGroupDeleted value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitGroupDeleted(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GroupDeletedValue && equalTo((GroupDeletedValue) other); + } + + private boolean equalTo(GroupDeletedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("group.member.added") + @JsonIgnoreProperties("type") + private static final class GroupMemberAddedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventGroupMemberAdded value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private GroupMemberAddedValue() {} + + private GroupMemberAddedValue(EventStreamCloudEventGroupMemberAdded value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitGroupMemberAdded(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GroupMemberAddedValue && equalTo((GroupMemberAddedValue) other); + } + + private boolean equalTo(GroupMemberAddedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("group.member.deleted") + @JsonIgnoreProperties("type") + private static final class GroupMemberDeletedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventGroupMemberDeleted value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private GroupMemberDeletedValue() {} + + private GroupMemberDeletedValue(EventStreamCloudEventGroupMemberDeleted value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitGroupMemberDeleted(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GroupMemberDeletedValue && equalTo((GroupMemberDeletedValue) other); + } + + private boolean equalTo(GroupMemberDeletedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("group.role.assigned") + @JsonIgnoreProperties("type") + private static final class GroupRoleAssignedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventGroupRoleAssigned value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private GroupRoleAssignedValue() {} + + private GroupRoleAssignedValue(EventStreamCloudEventGroupRoleAssigned value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitGroupRoleAssigned(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GroupRoleAssignedValue && equalTo((GroupRoleAssignedValue) other); + } + + private boolean equalTo(GroupRoleAssignedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("group.role.deleted") + @JsonIgnoreProperties("type") + private static final class GroupRoleDeletedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventGroupRoleDeleted value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private GroupRoleDeletedValue() {} + + private GroupRoleDeletedValue(EventStreamCloudEventGroupRoleDeleted value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitGroupRoleDeleted(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GroupRoleDeletedValue && equalTo((GroupRoleDeletedValue) other); + } + + private boolean equalTo(GroupRoleDeletedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("group.updated") + @JsonIgnoreProperties("type") + private static final class GroupUpdatedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventGroupUpdated value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private GroupUpdatedValue() {} + + private GroupUpdatedValue(EventStreamCloudEventGroupUpdated value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitGroupUpdated(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GroupUpdatedValue && equalTo((GroupUpdatedValue) other); + } + + private boolean equalTo(GroupUpdatedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("organization.connection.added") + @JsonIgnoreProperties("type") + private static final class OrganizationConnectionAddedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOrgConnectionAdded value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OrganizationConnectionAddedValue() {} + + private OrganizationConnectionAddedValue(EventStreamCloudEventOrgConnectionAdded value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOrganizationConnectionAdded(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationConnectionAddedValue + && equalTo((OrganizationConnectionAddedValue) other); + } + + private boolean equalTo(OrganizationConnectionAddedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("organization.connection.removed") + @JsonIgnoreProperties("type") + private static final class OrganizationConnectionRemovedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOrgConnectionRemoved value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OrganizationConnectionRemovedValue() {} + + private OrganizationConnectionRemovedValue(EventStreamCloudEventOrgConnectionRemoved value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOrganizationConnectionRemoved(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationConnectionRemovedValue + && equalTo((OrganizationConnectionRemovedValue) other); + } + + private boolean equalTo(OrganizationConnectionRemovedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("organization.connection.updated") + @JsonIgnoreProperties("type") + private static final class OrganizationConnectionUpdatedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOrgConnectionUpdated value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OrganizationConnectionUpdatedValue() {} + + private OrganizationConnectionUpdatedValue(EventStreamCloudEventOrgConnectionUpdated value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOrganizationConnectionUpdated(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationConnectionUpdatedValue + && equalTo((OrganizationConnectionUpdatedValue) other); + } + + private boolean equalTo(OrganizationConnectionUpdatedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("organization.created") + @JsonIgnoreProperties("type") + private static final class OrganizationCreatedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOrgCreated value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OrganizationCreatedValue() {} + + private OrganizationCreatedValue(EventStreamCloudEventOrgCreated value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOrganizationCreated(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationCreatedValue && equalTo((OrganizationCreatedValue) other); + } + + private boolean equalTo(OrganizationCreatedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("organization.deleted") + @JsonIgnoreProperties("type") + private static final class OrganizationDeletedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOrgDeleted value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OrganizationDeletedValue() {} + + private OrganizationDeletedValue(EventStreamCloudEventOrgDeleted value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOrganizationDeleted(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationDeletedValue && equalTo((OrganizationDeletedValue) other); + } + + private boolean equalTo(OrganizationDeletedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("organization.group.role.assigned") + @JsonIgnoreProperties("type") + private static final class OrganizationGroupRoleAssignedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOrgGroupRoleAssigned value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OrganizationGroupRoleAssignedValue() {} + + private OrganizationGroupRoleAssignedValue(EventStreamCloudEventOrgGroupRoleAssigned value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOrganizationGroupRoleAssigned(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationGroupRoleAssignedValue + && equalTo((OrganizationGroupRoleAssignedValue) other); + } + + private boolean equalTo(OrganizationGroupRoleAssignedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("organization.group.role.deleted") + @JsonIgnoreProperties("type") + private static final class OrganizationGroupRoleDeletedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOrgGroupRoleDeleted value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OrganizationGroupRoleDeletedValue() {} + + private OrganizationGroupRoleDeletedValue(EventStreamCloudEventOrgGroupRoleDeleted value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOrganizationGroupRoleDeleted(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationGroupRoleDeletedValue + && equalTo((OrganizationGroupRoleDeletedValue) other); + } + + private boolean equalTo(OrganizationGroupRoleDeletedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("organization.member.added") + @JsonIgnoreProperties("type") + private static final class OrganizationMemberAddedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOrgMemberAdded value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OrganizationMemberAddedValue() {} + + private OrganizationMemberAddedValue(EventStreamCloudEventOrgMemberAdded value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOrganizationMemberAdded(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationMemberAddedValue && equalTo((OrganizationMemberAddedValue) other); + } + + private boolean equalTo(OrganizationMemberAddedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("organization.member.deleted") + @JsonIgnoreProperties("type") + private static final class OrganizationMemberDeletedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOrgMemberDeleted value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OrganizationMemberDeletedValue() {} + + private OrganizationMemberDeletedValue(EventStreamCloudEventOrgMemberDeleted value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOrganizationMemberDeleted(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationMemberDeletedValue && equalTo((OrganizationMemberDeletedValue) other); + } + + private boolean equalTo(OrganizationMemberDeletedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("organization.member.role.assigned") + @JsonIgnoreProperties("type") + private static final class OrganizationMemberRoleAssignedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOrgMemberRoleAssigned value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OrganizationMemberRoleAssignedValue() {} + + private OrganizationMemberRoleAssignedValue(EventStreamCloudEventOrgMemberRoleAssigned value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOrganizationMemberRoleAssigned(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationMemberRoleAssignedValue + && equalTo((OrganizationMemberRoleAssignedValue) other); + } + + private boolean equalTo(OrganizationMemberRoleAssignedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("organization.member.role.deleted") + @JsonIgnoreProperties("type") + private static final class OrganizationMemberRoleDeletedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOrgMemberRoleDeleted value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OrganizationMemberRoleDeletedValue() {} + + private OrganizationMemberRoleDeletedValue(EventStreamCloudEventOrgMemberRoleDeleted value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOrganizationMemberRoleDeleted(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationMemberRoleDeletedValue + && equalTo((OrganizationMemberRoleDeletedValue) other); + } + + private boolean equalTo(OrganizationMemberRoleDeletedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("organization.updated") + @JsonIgnoreProperties("type") + private static final class OrganizationUpdatedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOrgUpdated value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OrganizationUpdatedValue() {} + + private OrganizationUpdatedValue(EventStreamCloudEventOrgUpdated value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOrganizationUpdated(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationUpdatedValue && equalTo((OrganizationUpdatedValue) other); + } + + private boolean equalTo(OrganizationUpdatedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("user.created") + @JsonIgnoreProperties("type") + private static final class UserCreatedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventUserCreated value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private UserCreatedValue() {} + + private UserCreatedValue(EventStreamCloudEventUserCreated value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitUserCreated(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UserCreatedValue && equalTo((UserCreatedValue) other); + } + + private boolean equalTo(UserCreatedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("user.deleted") + @JsonIgnoreProperties("type") + private static final class UserDeletedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventUserDeleted value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private UserDeletedValue() {} + + private UserDeletedValue(EventStreamCloudEventUserDeleted value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitUserDeleted(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UserDeletedValue && equalTo((UserDeletedValue) other); + } + + private boolean equalTo(UserDeletedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("user.updated") + @JsonIgnoreProperties("type") + private static final class UserUpdatedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventUserUpdated value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private UserUpdatedValue() {} + + private UserUpdatedValue(EventStreamCloudEventUserUpdated value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitUserUpdated(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UserUpdatedValue && equalTo((UserUpdatedValue) other); + } + + private boolean equalTo(UserUpdatedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("error") + @JsonIgnoreProperties("type") + private static final class ErrorValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventErrorMessage value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private ErrorValue() {} + + private ErrorValue(EventStreamCloudEventErrorMessage value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitError(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ErrorValue && equalTo((ErrorValue) other); + } + + private boolean equalTo(ErrorValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("offset-only") + @JsonIgnoreProperties("type") + private static final class OffsetOnlyValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventOffsetOnlyMessage value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private OffsetOnlyValue() {} + + private OffsetOnlyValue(EventStreamCloudEventOffsetOnlyMessage value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOffsetOnly(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OffsetOnlyValue && equalTo((OffsetOnlyValue) other); + } + + private boolean equalTo(OffsetOnlyValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonIgnoreProperties("type") + private static final class _UnknownValue implements Value { + private String type; + + @JsonValue + private Object value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private _UnknownValue(@JsonProperty("value") Object value) {} + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor._visitUnknown(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof _UnknownValue && equalTo((_UnknownValue) other); + } + + private boolean equalTo(_UnknownValue other) { + return type.equals(other.type) && value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.type, this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "type: " + type + ", value: " + value + "}"; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java index dcc6ac104..78998f84a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java @@ -10,18 +10,15 @@ public final class EventStreamTestEventTypeEnum { public static final EventStreamTestEventTypeEnum GROUP_DELETED = new EventStreamTestEventTypeEnum(Value.GROUP_DELETED, "group.deleted"); + public static final EventStreamTestEventTypeEnum ORGANIZATION_CONNECTION_UPDATED = + new EventStreamTestEventTypeEnum(Value.ORGANIZATION_CONNECTION_UPDATED, "organization.connection.updated"); + public static final EventStreamTestEventTypeEnum ORGANIZATION_CONNECTION_ADDED = new EventStreamTestEventTypeEnum(Value.ORGANIZATION_CONNECTION_ADDED, "organization.connection.added"); public static final EventStreamTestEventTypeEnum USER_DELETED = new EventStreamTestEventTypeEnum(Value.USER_DELETED, "user.deleted"); - public static final EventStreamTestEventTypeEnum ORGANIZATION_CONNECTION_UPDATED = - new EventStreamTestEventTypeEnum(Value.ORGANIZATION_CONNECTION_UPDATED, "organization.connection.updated"); - - public static final EventStreamTestEventTypeEnum USER_UPDATED = - new EventStreamTestEventTypeEnum(Value.USER_UPDATED, "user.updated"); - public static final EventStreamTestEventTypeEnum GROUP_ROLE_DELETED = new EventStreamTestEventTypeEnum(Value.GROUP_ROLE_DELETED, "group.role.deleted"); @@ -31,6 +28,9 @@ public final class EventStreamTestEventTypeEnum { public static final EventStreamTestEventTypeEnum ORGANIZATION_MEMBER_DELETED = new EventStreamTestEventTypeEnum(Value.ORGANIZATION_MEMBER_DELETED, "organization.member.deleted"); + public static final EventStreamTestEventTypeEnum USER_UPDATED = + new EventStreamTestEventTypeEnum(Value.USER_UPDATED, "user.updated"); + public static final EventStreamTestEventTypeEnum ORGANIZATION_UPDATED = new EventStreamTestEventTypeEnum(Value.ORGANIZATION_UPDATED, "organization.updated"); @@ -44,12 +44,6 @@ public final class EventStreamTestEventTypeEnum { public static final EventStreamTestEventTypeEnum GROUP_CREATED = new EventStreamTestEventTypeEnum(Value.GROUP_CREATED, "group.created"); - public static final EventStreamTestEventTypeEnum GROUP_UPDATED = - new EventStreamTestEventTypeEnum(Value.GROUP_UPDATED, "group.updated"); - - public static final EventStreamTestEventTypeEnum GROUP_ROLE_ASSIGNED = - new EventStreamTestEventTypeEnum(Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); - public static final EventStreamTestEventTypeEnum ORGANIZATION_CONNECTION_REMOVED = new EventStreamTestEventTypeEnum(Value.ORGANIZATION_CONNECTION_REMOVED, "organization.connection.removed"); @@ -59,12 +53,11 @@ public final class EventStreamTestEventTypeEnum { public static final EventStreamTestEventTypeEnum GROUP_MEMBER_DELETED = new EventStreamTestEventTypeEnum(Value.GROUP_MEMBER_DELETED, "group.member.deleted"); - public static final EventStreamTestEventTypeEnum ORGANIZATION_GROUP_ROLE_DELETED = - new EventStreamTestEventTypeEnum(Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); + public static final EventStreamTestEventTypeEnum GROUP_UPDATED = + new EventStreamTestEventTypeEnum(Value.GROUP_UPDATED, "group.updated"); - public static final EventStreamTestEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = - new EventStreamTestEventTypeEnum( - Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + public static final EventStreamTestEventTypeEnum GROUP_ROLE_ASSIGNED = + new EventStreamTestEventTypeEnum(Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); public static final EventStreamTestEventTypeEnum ORGANIZATION_DELETED = new EventStreamTestEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); @@ -72,6 +65,13 @@ public final class EventStreamTestEventTypeEnum { public static final EventStreamTestEventTypeEnum ORGANIZATION_MEMBER_ADDED = new EventStreamTestEventTypeEnum(Value.ORGANIZATION_MEMBER_ADDED, "organization.member.added"); + public static final EventStreamTestEventTypeEnum ORGANIZATION_GROUP_ROLE_DELETED = + new EventStreamTestEventTypeEnum(Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); + + public static final EventStreamTestEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = + new EventStreamTestEventTypeEnum( + Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + public static final EventStreamTestEventTypeEnum ORGANIZATION_MEMBER_ROLE_DELETED = new EventStreamTestEventTypeEnum( Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); @@ -111,20 +111,20 @@ public T visit(Visitor visitor) { switch (value) { case GROUP_DELETED: return visitor.visitGroupDeleted(); + case ORGANIZATION_CONNECTION_UPDATED: + return visitor.visitOrganizationConnectionUpdated(); case ORGANIZATION_CONNECTION_ADDED: return visitor.visitOrganizationConnectionAdded(); case USER_DELETED: return visitor.visitUserDeleted(); - case ORGANIZATION_CONNECTION_UPDATED: - return visitor.visitOrganizationConnectionUpdated(); - case USER_UPDATED: - return visitor.visitUserUpdated(); case GROUP_ROLE_DELETED: return visitor.visitGroupRoleDeleted(); case ORGANIZATION_CREATED: return visitor.visitOrganizationCreated(); case ORGANIZATION_MEMBER_DELETED: return visitor.visitOrganizationMemberDeleted(); + case USER_UPDATED: + return visitor.visitUserUpdated(); case ORGANIZATION_UPDATED: return visitor.visitOrganizationUpdated(); case GROUP_MEMBER_ADDED: @@ -133,24 +133,24 @@ public T visit(Visitor visitor) { return visitor.visitOrganizationGroupRoleAssigned(); case GROUP_CREATED: return visitor.visitGroupCreated(); - case GROUP_UPDATED: - return visitor.visitGroupUpdated(); - case GROUP_ROLE_ASSIGNED: - return visitor.visitGroupRoleAssigned(); case ORGANIZATION_CONNECTION_REMOVED: return visitor.visitOrganizationConnectionRemoved(); case USER_CREATED: return visitor.visitUserCreated(); case GROUP_MEMBER_DELETED: return visitor.visitGroupMemberDeleted(); - case ORGANIZATION_GROUP_ROLE_DELETED: - return visitor.visitOrganizationGroupRoleDeleted(); - case ORGANIZATION_MEMBER_ROLE_ASSIGNED: - return visitor.visitOrganizationMemberRoleAssigned(); + case GROUP_UPDATED: + return visitor.visitGroupUpdated(); + case GROUP_ROLE_ASSIGNED: + return visitor.visitGroupRoleAssigned(); case ORGANIZATION_DELETED: return visitor.visitOrganizationDeleted(); case ORGANIZATION_MEMBER_ADDED: return visitor.visitOrganizationMemberAdded(); + case ORGANIZATION_GROUP_ROLE_DELETED: + return visitor.visitOrganizationGroupRoleDeleted(); + case ORGANIZATION_MEMBER_ROLE_ASSIGNED: + return visitor.visitOrganizationMemberRoleAssigned(); case ORGANIZATION_MEMBER_ROLE_DELETED: return visitor.visitOrganizationMemberRoleDeleted(); case UNKNOWN: @@ -164,20 +164,20 @@ public static EventStreamTestEventTypeEnum valueOf(String value) { switch (value) { case "group.deleted": return GROUP_DELETED; + case "organization.connection.updated": + return ORGANIZATION_CONNECTION_UPDATED; case "organization.connection.added": return ORGANIZATION_CONNECTION_ADDED; case "user.deleted": return USER_DELETED; - case "organization.connection.updated": - return ORGANIZATION_CONNECTION_UPDATED; - case "user.updated": - return USER_UPDATED; case "group.role.deleted": return GROUP_ROLE_DELETED; case "organization.created": return ORGANIZATION_CREATED; case "organization.member.deleted": return ORGANIZATION_MEMBER_DELETED; + case "user.updated": + return USER_UPDATED; case "organization.updated": return ORGANIZATION_UPDATED; case "group.member.added": @@ -186,24 +186,24 @@ public static EventStreamTestEventTypeEnum valueOf(String value) { return ORGANIZATION_GROUP_ROLE_ASSIGNED; case "group.created": return GROUP_CREATED; - case "group.updated": - return GROUP_UPDATED; - case "group.role.assigned": - return GROUP_ROLE_ASSIGNED; case "organization.connection.removed": return ORGANIZATION_CONNECTION_REMOVED; case "user.created": return USER_CREATED; case "group.member.deleted": return GROUP_MEMBER_DELETED; - case "organization.group.role.deleted": - return ORGANIZATION_GROUP_ROLE_DELETED; - case "organization.member.role.assigned": - return ORGANIZATION_MEMBER_ROLE_ASSIGNED; + case "group.updated": + return GROUP_UPDATED; + case "group.role.assigned": + return GROUP_ROLE_ASSIGNED; case "organization.deleted": return ORGANIZATION_DELETED; case "organization.member.added": return ORGANIZATION_MEMBER_ADDED; + case "organization.group.role.deleted": + return ORGANIZATION_GROUP_ROLE_DELETED; + case "organization.member.role.assigned": + return ORGANIZATION_MEMBER_ROLE_ASSIGNED; case "organization.member.role.deleted": return ORGANIZATION_MEMBER_ROLE_DELETED; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookAuthorizationResponse.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookAuthorizationResponse.java index 059d7aa86..9e19a49bb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookAuthorizationResponse.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookAuthorizationResponse.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = EventStreamWebhookAuthorizationResponse.Deserializer.class) @@ -91,17 +92,27 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("method") + && ((Map) value).containsKey("username")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookBasicAuth.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookBearerAuth.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("method")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookBearerAuth.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookCustomHeaderAuth.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("method") + && ((Map) value).containsKey("header_key")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookCustomHeaderAuth.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamsCreateRequest.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamsCreateRequest.java index 3af8d30e1..032bcdbd3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamsCreateRequest.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamsCreateRequest.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = EventStreamsCreateRequest.Deserializer.class) @@ -89,18 +90,26 @@ static final class Deserializer extends StdDeserializer && ((Map) value).containsKey("destination")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateEventStreamWebHookRequestContent.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateEventStreamEventBridgeRequestContent.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("destination")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, CreateEventStreamEventBridgeRequestContent.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateEventStreamActionRequestContent.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("destination")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, CreateEventStreamActionRequestContent.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowAction.java index 35d21213e..e87c6ae84 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowAction.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowAction.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowAction.Deserializer.class) @@ -277,29 +278,53 @@ public FlowAction deserialize(JsonParser p, DeserializationContext context) thro return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0.class)); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionBigqueryInsertRows.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionBigqueryInsertRows.class)); + } catch (RuntimeException e) { + } } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionClearbit.class)); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionEmailVerifyEmail.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionEmailVerifyEmail.class)); + } catch (RuntimeException e) { + } } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlow.class)); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionGoogleSheetsAddRow.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionGoogleSheetsAddRow.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHttpSendRequest.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHttpSendRequest.class)); + } catch (RuntimeException e) { + } } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHubspot.class)); @@ -313,13 +338,25 @@ public FlowAction deserialize(JsonParser p, DeserializationContext context) thro return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJwt.class)); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionMailchimpUpsertMember.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionMailchimpUpsertMember.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionMailjetSendEmail.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionMailjetSendEmail.class)); + } catch (RuntimeException e) { + } } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionOtp.class)); @@ -333,37 +370,67 @@ public FlowAction deserialize(JsonParser p, DeserializationContext context) thro return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforce.class)); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSendgridSendEmail.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSendgridSendEmail.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSlackPostMessage.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSlackPostMessage.class)); + } catch (RuntimeException e) { + } } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripe.class)); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionTelegramSendMessage.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionTelegramSendMessage.class)); + } catch (RuntimeException e) { + } } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionTwilio.class)); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionWhatsappSendMessage.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionWhatsappSendMessage.class)); + } catch (RuntimeException e) { + } } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionXml.class)); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionZapierTriggerWebhook.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionZapierTriggerWebhook.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaign.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaign.java index 06a370898..20088a729 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaign.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaign.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionActivecampaign.Deserializer.class) @@ -81,13 +82,27 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionActivecampaignListContacts.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionActivecampaignUpsertContact.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionActivecampaignUpsertContact.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtable.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtable.java index c7d701ea4..1354a6513 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtable.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtable.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionAirtable.Deserializer.class) @@ -89,17 +90,35 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionAirtable deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAirtableCreateRecord.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAirtableCreateRecord.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAirtableListRecords.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAirtableListRecords.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAirtableUpdateRecord.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAirtableUpdateRecord.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0.java index 08557e778..6e14c8ab6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionAuth0.Deserializer.class) @@ -121,33 +122,75 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionAuth0 deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0CreateUser.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0CreateUser.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0GetUser.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0GetUser.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0UpdateUser.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0UpdateUser.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0SendRequest.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0SendRequest.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0SendEmail.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0SendEmail.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0SendSms.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0SendSms.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0MakeCall.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0MakeCall.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParamsMethod.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParamsMethod.java index 56bd83eb8..3142d9681 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParamsMethod.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParamsMethod.java @@ -7,18 +7,18 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class FlowActionAuth0SendRequestParamsMethod { - public static final FlowActionAuth0SendRequestParamsMethod PATCH = - new FlowActionAuth0SendRequestParamsMethod(Value.PATCH, "PATCH"); - - public static final FlowActionAuth0SendRequestParamsMethod DELETE = - new FlowActionAuth0SendRequestParamsMethod(Value.DELETE, "DELETE"); - public static final FlowActionAuth0SendRequestParamsMethod GET = new FlowActionAuth0SendRequestParamsMethod(Value.GET, "GET"); public static final FlowActionAuth0SendRequestParamsMethod PUT = new FlowActionAuth0SendRequestParamsMethod(Value.PUT, "PUT"); + public static final FlowActionAuth0SendRequestParamsMethod PATCH = + new FlowActionAuth0SendRequestParamsMethod(Value.PATCH, "PATCH"); + + public static final FlowActionAuth0SendRequestParamsMethod DELETE = + new FlowActionAuth0SendRequestParamsMethod(Value.DELETE, "DELETE"); + public static final FlowActionAuth0SendRequestParamsMethod POST = new FlowActionAuth0SendRequestParamsMethod(Value.POST, "POST"); @@ -55,14 +55,14 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case PATCH: - return visitor.visitPatch(); - case DELETE: - return visitor.visitDelete(); case GET: return visitor.visitGet(); case PUT: return visitor.visitPut(); + case PATCH: + return visitor.visitPatch(); + case DELETE: + return visitor.visitDelete(); case POST: return visitor.visitPost(); case UNKNOWN: @@ -74,14 +74,14 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static FlowActionAuth0SendRequestParamsMethod valueOf(String value) { switch (value) { - case "PATCH": - return PATCH; - case "DELETE": - return DELETE; case "GET": return GET; case "PUT": return PUT; + case "PATCH": + return PATCH; + case "DELETE": + return DELETE; case "POST": return POST; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbit.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbit.java index 1cc990a3e..f38c62fc0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbit.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbit.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionClearbit.Deserializer.class) @@ -81,13 +82,25 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionClearbit deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionClearbitFindPerson.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionClearbitFindPerson.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionClearbitFindCompany.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionClearbitFindCompany.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlow.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlow.java index 1b493a483..24747309b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlow.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlow.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionFlow.Deserializer.class) @@ -121,33 +122,74 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionFlow deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowBooleanCondition.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowBooleanCondition.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowDelayFlow.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowDelayFlow.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowDoNothing.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowDoNothing.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowErrorMessage.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowErrorMessage.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowMapValue.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowMapValue.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowReturnJson.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowReturnJson.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowStoreVars.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowStoreVars.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowParamsUnits.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowParamsUnits.java index d64396682..5c3146379 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowParamsUnits.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowParamsUnits.java @@ -13,12 +13,12 @@ public final class FlowActionFlowDelayFlowParamsUnits { public static final FlowActionFlowDelayFlowParamsUnits MINUTES = new FlowActionFlowDelayFlowParamsUnits(Value.MINUTES, "MINUTES"); - public static final FlowActionFlowDelayFlowParamsUnits DAYS = - new FlowActionFlowDelayFlowParamsUnits(Value.DAYS, "DAYS"); - public static final FlowActionFlowDelayFlowParamsUnits HOURS = new FlowActionFlowDelayFlowParamsUnits(Value.HOURS, "HOURS"); + public static final FlowActionFlowDelayFlowParamsUnits DAYS = + new FlowActionFlowDelayFlowParamsUnits(Value.DAYS, "DAYS"); + private final Value value; private final String string; @@ -56,10 +56,10 @@ public T visit(Visitor visitor) { return visitor.visitSeconds(); case MINUTES: return visitor.visitMinutes(); - case DAYS: - return visitor.visitDays(); case HOURS: return visitor.visitHours(); + case DAYS: + return visitor.visitDays(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -73,10 +73,10 @@ public static FlowActionFlowDelayFlowParamsUnits valueOf(String value) { return SECONDS; case "MINUTES": return MINUTES; - case "DAYS": - return DAYS; case "HOURS": return HOURS; + case "DAYS": + return DAYS; default: return new FlowActionFlowDelayFlowParamsUnits(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsFallback.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsFallback.java index 48a01b9d9..c5886003c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsFallback.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsFallback.java @@ -102,13 +102,13 @@ static final class Deserializer extends StdDeserializer>() {})); } catch (RuntimeException e) { diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsInput.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsInput.java index da6cdaaba..cec51d089 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsInput.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsInput.java @@ -82,13 +82,13 @@ static final class Deserializer extends StdDeserializer T visit(Visitor visitor) { switch (value) { case FORM: return visitor.visitForm(); - case XML: - return visitor.visitXml(); case JSON: return visitor.visitJson(); + case XML: + return visitor.visitXml(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -66,10 +66,10 @@ public static FlowActionHttpSendRequestParamsContentType valueOf(String value) { switch (value) { case "FORM": return FORM; - case "XML": - return XML; case "JSON": return JSON; + case "XML": + return XML; default: return new FlowActionHttpSendRequestParamsContentType(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsMethod.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsMethod.java index 63fda3fa3..62eafe2d8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsMethod.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsMethod.java @@ -7,18 +7,18 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class FlowActionHttpSendRequestParamsMethod { - public static final FlowActionHttpSendRequestParamsMethod PATCH = - new FlowActionHttpSendRequestParamsMethod(Value.PATCH, "PATCH"); - - public static final FlowActionHttpSendRequestParamsMethod DELETE = - new FlowActionHttpSendRequestParamsMethod(Value.DELETE, "DELETE"); - public static final FlowActionHttpSendRequestParamsMethod GET = new FlowActionHttpSendRequestParamsMethod(Value.GET, "GET"); public static final FlowActionHttpSendRequestParamsMethod PUT = new FlowActionHttpSendRequestParamsMethod(Value.PUT, "PUT"); + public static final FlowActionHttpSendRequestParamsMethod PATCH = + new FlowActionHttpSendRequestParamsMethod(Value.PATCH, "PATCH"); + + public static final FlowActionHttpSendRequestParamsMethod DELETE = + new FlowActionHttpSendRequestParamsMethod(Value.DELETE, "DELETE"); + public static final FlowActionHttpSendRequestParamsMethod POST = new FlowActionHttpSendRequestParamsMethod(Value.POST, "POST"); @@ -55,14 +55,14 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case PATCH: - return visitor.visitPatch(); - case DELETE: - return visitor.visitDelete(); case GET: return visitor.visitGet(); case PUT: return visitor.visitPut(); + case PATCH: + return visitor.visitPatch(); + case DELETE: + return visitor.visitDelete(); case POST: return visitor.visitPost(); case UNKNOWN: @@ -74,14 +74,14 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static FlowActionHttpSendRequestParamsMethod valueOf(String value) { switch (value) { - case "PATCH": - return PATCH; - case "DELETE": - return DELETE; case "GET": return GET; case "PUT": return PUT; + case "PATCH": + return PATCH; + case "DELETE": + return DELETE; case "POST": return POST; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspot.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspot.java index 769407858..06e79acc1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspot.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspot.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionHubspot.Deserializer.class) @@ -89,17 +90,35 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionHubspot deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHubspotEnrollContact.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHubspotEnrollContact.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHubspotGetContact.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHubspotGetContact.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHubspotUpsertContact.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHubspotUpsertContact.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactParamsWorkflowId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactParamsWorkflowId.java index bcd188307..87b1e4a7e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactParamsWorkflowId.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactParamsWorkflowId.java @@ -83,13 +83,13 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionJson deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJsonCreateJson.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJsonCreateJson.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJsonParseJson.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJsonParseJson.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJsonSerializeJson.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJsonSerializeJson.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwt.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwt.java index 171c06498..dadc7f02a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwt.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwt.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionJwt.Deserializer.class) @@ -89,17 +90,35 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionJwt deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJwtDecodeJwt.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJwtDecodeJwt.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJwtSignJwt.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJwtSignJwt.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJwtVerifyJwt.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJwtVerifyJwt.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParams.java index 405efb196..ab392b06c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParams.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParams.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionMailjetSendEmailParams.Deserializer.class) @@ -82,14 +83,19 @@ static final class Deserializer extends StdDeserializer && ((Map) value).containsKey("content")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, FlowActionMailjetSendEmailParamsContent.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, FlowActionMailjetSendEmailParamsTemplateId.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("template_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, FlowActionMailjetSendEmailParamsTemplateId.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtp.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionOtp.java index 11e628e90..8d634af27 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtp.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionOtp.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionOtp.Deserializer.class) @@ -81,13 +82,25 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionOtp deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionOtpGenerateCode.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionOtpGenerateCode.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionOtpVerifyCode.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionOtpVerifyCode.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedrive.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedrive.java index b6dcef663..5582e923b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedrive.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedrive.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionPipedrive.Deserializer.class) @@ -89,17 +90,35 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionPipedrive deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionPipedriveAddDeal.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionPipedriveAddDeal.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionPipedriveAddOrganization.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionPipedriveAddOrganization.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionPipedriveAddPerson.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionPipedriveAddPerson.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsOrganizationId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsOrganizationId.java index a54e34bdd..0941ad0d2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsOrganizationId.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsOrganizationId.java @@ -83,13 +83,13 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionSalesforce deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforceCreateLead.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforceCreateLead.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforceGetLead.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforceGetLead.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforceSearchLeads.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforceSearchLeads.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforceUpdateLead.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforceUpdateLead.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachmentColor.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachmentColor.java index 842a7764b..c3118562a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachmentColor.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachmentColor.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class FlowActionSlackPostMessageParamsAttachmentColor { - public static final FlowActionSlackPostMessageParamsAttachmentColor DANGER = - new FlowActionSlackPostMessageParamsAttachmentColor(Value.DANGER, "DANGER"); - public static final FlowActionSlackPostMessageParamsAttachmentColor GOOD = new FlowActionSlackPostMessageParamsAttachmentColor(Value.GOOD, "GOOD"); + public static final FlowActionSlackPostMessageParamsAttachmentColor DANGER = + new FlowActionSlackPostMessageParamsAttachmentColor(Value.DANGER, "DANGER"); + public static final FlowActionSlackPostMessageParamsAttachmentColor WARNING = new FlowActionSlackPostMessageParamsAttachmentColor(Value.WARNING, "WARNING"); @@ -49,10 +49,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case DANGER: - return visitor.visitDanger(); case GOOD: return visitor.visitGood(); + case DANGER: + return visitor.visitDanger(); case WARNING: return visitor.visitWarning(); case UNKNOWN: @@ -64,10 +64,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static FlowActionSlackPostMessageParamsAttachmentColor valueOf(String value) { switch (value) { - case "DANGER": - return DANGER; case "GOOD": return GOOD; + case "DANGER": + return DANGER; case "WARNING": return WARNING; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripe.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripe.java index 6496bccf0..77d496db0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripe.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripe.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionStripe.Deserializer.class) @@ -121,33 +122,75 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionStripe deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeAddTaxId.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeAddTaxId.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeCreateCustomer.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeCreateCustomer.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeCreatePortalSession.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeCreatePortalSession.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeDeleteTaxId.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeDeleteTaxId.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeFindCustomers.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeFindCustomers.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeGetCustomer.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeGetCustomer.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeUpdateCustomer.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeUpdateCustomer.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilio.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilio.java index 7f91ca908..3af55ce64 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilio.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilio.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionTwilio.Deserializer.class) @@ -81,13 +82,25 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionTwilio deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionTwilioMakeCall.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionTwilioMakeCall.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionTwilioSendSms.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionTwilioSendSms.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageParamsType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageParamsType.java index 96951c41d..55ff20605 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageParamsType.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageParamsType.java @@ -7,9 +7,6 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class FlowActionWhatsappSendMessageParamsType { - public static final FlowActionWhatsappSendMessageParamsType INTERACTIVE = - new FlowActionWhatsappSendMessageParamsType(Value.INTERACTIVE, "INTERACTIVE"); - public static final FlowActionWhatsappSendMessageParamsType DOCUMENT = new FlowActionWhatsappSendMessageParamsType(Value.DOCUMENT, "DOCUMENT"); @@ -19,21 +16,24 @@ public final class FlowActionWhatsappSendMessageParamsType { public static final FlowActionWhatsappSendMessageParamsType TEXT = new FlowActionWhatsappSendMessageParamsType(Value.TEXT, "TEXT"); + public static final FlowActionWhatsappSendMessageParamsType INTERACTIVE = + new FlowActionWhatsappSendMessageParamsType(Value.INTERACTIVE, "INTERACTIVE"); + public static final FlowActionWhatsappSendMessageParamsType AUDIO = new FlowActionWhatsappSendMessageParamsType(Value.AUDIO, "AUDIO"); public static final FlowActionWhatsappSendMessageParamsType CONTACTS = new FlowActionWhatsappSendMessageParamsType(Value.CONTACTS, "CONTACTS"); + public static final FlowActionWhatsappSendMessageParamsType IMAGE = + new FlowActionWhatsappSendMessageParamsType(Value.IMAGE, "IMAGE"); + public static final FlowActionWhatsappSendMessageParamsType LOCATION = new FlowActionWhatsappSendMessageParamsType(Value.LOCATION, "LOCATION"); public static final FlowActionWhatsappSendMessageParamsType STICKER = new FlowActionWhatsappSendMessageParamsType(Value.STICKER, "STICKER"); - public static final FlowActionWhatsappSendMessageParamsType IMAGE = - new FlowActionWhatsappSendMessageParamsType(Value.IMAGE, "IMAGE"); - private final Value value; private final String string; @@ -67,24 +67,24 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case INTERACTIVE: - return visitor.visitInteractive(); case DOCUMENT: return visitor.visitDocument(); case TEMPLATE: return visitor.visitTemplate(); case TEXT: return visitor.visitText(); + case INTERACTIVE: + return visitor.visitInteractive(); case AUDIO: return visitor.visitAudio(); case CONTACTS: return visitor.visitContacts(); + case IMAGE: + return visitor.visitImage(); case LOCATION: return visitor.visitLocation(); case STICKER: return visitor.visitSticker(); - case IMAGE: - return visitor.visitImage(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -94,24 +94,24 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static FlowActionWhatsappSendMessageParamsType valueOf(String value) { switch (value) { - case "INTERACTIVE": - return INTERACTIVE; case "DOCUMENT": return DOCUMENT; case "TEMPLATE": return TEMPLATE; case "TEXT": return TEXT; + case "INTERACTIVE": + return INTERACTIVE; case "AUDIO": return AUDIO; case "CONTACTS": return CONTACTS; + case "IMAGE": + return IMAGE; case "LOCATION": return LOCATION; case "STICKER": return STICKER; - case "IMAGE": - return IMAGE; default: return new FlowActionWhatsappSendMessageParamsType(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionXml.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionXml.java index f182e2e9c..73201c22e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionXml.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowActionXml.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FlowActionXml.Deserializer.class) @@ -81,13 +82,25 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowActionXml deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionXmlParseXml.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionXmlParseXml.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionXmlSerializeXml.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("action") + && ((Map) value).containsKey("params")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionXmlSerializeXml.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupJwtAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupJwtAlgorithmEnum.java index 5ad6528ba..7220836cf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupJwtAlgorithmEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupJwtAlgorithmEnum.java @@ -10,17 +10,23 @@ public final class FlowsVaultConnectioSetupJwtAlgorithmEnum { public static final FlowsVaultConnectioSetupJwtAlgorithmEnum RS512 = new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.RS512, "RS512"); + public static final FlowsVaultConnectioSetupJwtAlgorithmEnum ES384 = + new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.ES384, "ES384"); + + public static final FlowsVaultConnectioSetupJwtAlgorithmEnum PS384 = + new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.PS384, "PS384"); + public static final FlowsVaultConnectioSetupJwtAlgorithmEnum ES256 = new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.ES256, "ES256"); public static final FlowsVaultConnectioSetupJwtAlgorithmEnum PS256 = new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.PS256, "PS256"); - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum ES384 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.ES384, "ES384"); + public static final FlowsVaultConnectioSetupJwtAlgorithmEnum HS384 = + new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.HS384, "HS384"); - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum PS384 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.PS384, "PS384"); + public static final FlowsVaultConnectioSetupJwtAlgorithmEnum PS512 = + new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.PS512, "PS512"); public static final FlowsVaultConnectioSetupJwtAlgorithmEnum HS256 = new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.HS256, "HS256"); @@ -28,11 +34,8 @@ public final class FlowsVaultConnectioSetupJwtAlgorithmEnum { public static final FlowsVaultConnectioSetupJwtAlgorithmEnum ES512 = new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.ES512, "ES512"); - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum HS384 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.HS384, "HS384"); - - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum PS512 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.PS512, "PS512"); + public static final FlowsVaultConnectioSetupJwtAlgorithmEnum RS384 = + new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.RS384, "RS384"); public static final FlowsVaultConnectioSetupJwtAlgorithmEnum HS512 = new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.HS512, "HS512"); @@ -40,9 +43,6 @@ public final class FlowsVaultConnectioSetupJwtAlgorithmEnum { public static final FlowsVaultConnectioSetupJwtAlgorithmEnum RS256 = new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.RS256, "RS256"); - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum RS384 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.RS384, "RS384"); - private final Value value; private final String string; @@ -78,28 +78,28 @@ public T visit(Visitor visitor) { switch (value) { case RS512: return visitor.visitRs512(); - case ES256: - return visitor.visitEs256(); - case PS256: - return visitor.visitPs256(); case ES384: return visitor.visitEs384(); case PS384: return visitor.visitPs384(); - case HS256: - return visitor.visitHs256(); - case ES512: - return visitor.visitEs512(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); case HS384: return visitor.visitHs384(); case PS512: return visitor.visitPs512(); + case HS256: + return visitor.visitHs256(); + case ES512: + return visitor.visitEs512(); + case RS384: + return visitor.visitRs384(); case HS512: return visitor.visitHs512(); case RS256: return visitor.visitRs256(); - case RS384: - return visitor.visitRs384(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -111,28 +111,28 @@ public static FlowsVaultConnectioSetupJwtAlgorithmEnum valueOf(String value) { switch (value) { case "RS512": return RS512; - case "ES256": - return ES256; - case "PS256": - return PS256; case "ES384": return ES384; case "PS384": return PS384; - case "HS256": - return HS256; - case "ES512": - return ES512; + case "ES256": + return ES256; + case "PS256": + return PS256; case "HS384": return HS384; case "PS512": return PS512; + case "HS256": + return HS256; + case "ES512": + return ES512; + case "RS384": + return RS384; case "HS512": return HS512; case "RS256": return RS256; - case "RS384": - return RS384; default: return new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpApiKeySetupInEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpApiKeySetupInEnum.java index e2f8c9fbd..9d457bf4a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpApiKeySetupInEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpApiKeySetupInEnum.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class FlowsVaultConnectionHttpApiKeySetupInEnum { - public static final FlowsVaultConnectionHttpApiKeySetupInEnum QUERY = - new FlowsVaultConnectionHttpApiKeySetupInEnum(Value.QUERY, "QUERY"); - public static final FlowsVaultConnectionHttpApiKeySetupInEnum HEADER = new FlowsVaultConnectionHttpApiKeySetupInEnum(Value.HEADER, "HEADER"); + public static final FlowsVaultConnectionHttpApiKeySetupInEnum QUERY = + new FlowsVaultConnectionHttpApiKeySetupInEnum(Value.QUERY, "QUERY"); + private final Value value; private final String string; @@ -46,10 +46,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case QUERY: - return visitor.visitQuery(); case HEADER: return visitor.visitHeader(); + case QUERY: + return visitor.visitQuery(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -59,10 +59,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static FlowsVaultConnectionHttpApiKeySetupInEnum valueOf(String value) { switch (value) { - case "QUERY": - return QUERY; case "HEADER": return HEADER; + case "QUERY": + return QUERY; default: return new FlowsVaultConnectionHttpApiKeySetupInEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlock.java b/src/main/java/com/auth0/client/mgmt/types/FormBlock.java index e12842dd3..8cadc3c23 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlock.java +++ b/src/main/java/com/auth0/client/mgmt/types/FormBlock.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FormBlock.Deserializer.class) @@ -129,37 +130,81 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FormBlock deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockDivider.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockDivider.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockHtml.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockHtml.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockImage.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockImage.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockJumpButton.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockJumpButton.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockResendButton.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockResendButton.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockNextButton.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockNextButton.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockPreviousButton.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockPreviousButton.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockRichText.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockRichText.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FormField.java b/src/main/java/com/auth0/client/mgmt/types/FormField.java index 2efcc642c..5716153a2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FormField.java +++ b/src/main/java/com/auth0/client/mgmt/types/FormField.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FormField.Deserializer.class) @@ -193,69 +194,154 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FormField deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldBoolean.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldBoolean.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldCards.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldCards.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldChoice.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldChoice.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldCustom.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldCustom.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldDate.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldDate.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldDropdown.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldDropdown.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldEmail.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldEmail.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldFile.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldFile.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldLegal.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldLegal.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldNumber.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldNumber.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldPassword.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldPassword.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldPayment.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldPayment.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldSocial.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldSocial.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldTel.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldTel.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldText.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldText.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldUrl.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldUrl.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldBooleanConfigOptions.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldBooleanConfigOptions.java index 7ffed4dd4..5719409c2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldBooleanConfigOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/FormFieldBooleanConfigOptions.java @@ -20,27 +20,27 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FormFieldBooleanConfigOptions.Builder.class) public final class FormFieldBooleanConfigOptions { - private final Optional true_; + private final Optional _true; - private final Optional false_; + private final Optional _false; private final Map additionalProperties; private FormFieldBooleanConfigOptions( - Optional true_, Optional false_, Map additionalProperties) { - this.true_ = true_; - this.false_ = false_; + Optional _true, Optional _false, Map additionalProperties) { + this._true = _true; + this._false = _false; this.additionalProperties = additionalProperties; } @JsonProperty("true") public Optional getTrue() { - return true_; + return _true; } @JsonProperty("false") public Optional getFalse() { - return false_; + return _false; } @java.lang.Override @@ -55,12 +55,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(FormFieldBooleanConfigOptions other) { - return true_.equals(other.true_) && false_.equals(other.false_); + return _true.equals(other._true) && _false.equals(other._false); } @java.lang.Override public int hashCode() { - return Objects.hash(this.true_, this.false_); + return Objects.hash(this._true, this._false); } @java.lang.Override @@ -74,9 +74,9 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional true_ = Optional.empty(); + private Optional _true = Optional.empty(); - private Optional false_ = Optional.empty(); + private Optional _false = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -84,35 +84,35 @@ public static final class Builder { private Builder() {} public Builder from(FormFieldBooleanConfigOptions other) { - true_(other.getTrue()); - false_(other.getFalse()); + _true(other.getTrue()); + _false(other.getFalse()); return this; } @JsonSetter(value = "true", nulls = Nulls.SKIP) - public Builder true_(Optional true_) { - this.true_ = true_; + public Builder _true(Optional _true) { + this._true = _true; return this; } - public Builder true_(String true_) { - this.true_ = Optional.ofNullable(true_); + public Builder _true(String _true) { + this._true = Optional.ofNullable(_true); return this; } @JsonSetter(value = "false", nulls = Nulls.SKIP) - public Builder false_(Optional false_) { - this.false_ = false_; + public Builder _false(Optional _false) { + this._false = _false; return this; } - public Builder false_(String false_) { - this.false_ = Optional.ofNullable(false_); + public Builder _false(String _false) { + this._false = Optional.ofNullable(_false); return this; } public FormFieldBooleanConfigOptions build() { - return new FormFieldBooleanConfigOptions(true_, false_, additionalProperties); + return new FormFieldBooleanConfigOptions(_true, _false, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPasswordConfigHashEnum.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPasswordConfigHashEnum.java index b61d4c088..437704abc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPasswordConfigHashEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/FormFieldPasswordConfigHashEnum.java @@ -9,16 +9,16 @@ public final class FormFieldPasswordConfigHashEnum { public static final FormFieldPasswordConfigHashEnum SHA1 = new FormFieldPasswordConfigHashEnum(Value.SHA1, "SHA1"); + public static final FormFieldPasswordConfigHashEnum NONE = new FormFieldPasswordConfigHashEnum(Value.NONE, "NONE"); + public static final FormFieldPasswordConfigHashEnum SHA256 = new FormFieldPasswordConfigHashEnum(Value.SHA256, "SHA256"); - public static final FormFieldPasswordConfigHashEnum NONE = new FormFieldPasswordConfigHashEnum(Value.NONE, "NONE"); + public static final FormFieldPasswordConfigHashEnum MD5 = new FormFieldPasswordConfigHashEnum(Value.MD5, "MD5"); public static final FormFieldPasswordConfigHashEnum SHA512 = new FormFieldPasswordConfigHashEnum(Value.SHA512, "SHA512"); - public static final FormFieldPasswordConfigHashEnum MD5 = new FormFieldPasswordConfigHashEnum(Value.MD5, "MD5"); - private final Value value; private final String string; @@ -54,14 +54,14 @@ public T visit(Visitor visitor) { switch (value) { case SHA1: return visitor.visitSha1(); - case SHA256: - return visitor.visitSha256(); case NONE: return visitor.visitNone(); - case SHA512: - return visitor.visitSha512(); + case SHA256: + return visitor.visitSha256(); case MD5: return visitor.visitMd5(); + case SHA512: + return visitor.visitSha512(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -73,14 +73,14 @@ public static FormFieldPasswordConfigHashEnum valueOf(String value) { switch (value) { case "SHA1": return SHA1; - case "SHA256": - return SHA256; case "NONE": return NONE; - case "SHA512": - return SHA512; + case "SHA256": + return SHA256; case "MD5": return MD5; + case "SHA512": + return SHA512; default: return new FormFieldPasswordConfigHashEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigCharge.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigCharge.java index f9fbb95ac..6fde01b5b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigCharge.java +++ b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigCharge.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FormFieldPaymentConfigCharge.Deserializer.class) @@ -82,14 +83,22 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("one_off")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldPaymentConfigChargeOneOff.class)); + } catch (RuntimeException e) { + } } - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldPaymentConfigChargeSubscription.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("subscription")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, FormFieldPaymentConfigChargeSubscription.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffCurrencyEnum.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffCurrencyEnum.java index 6743e7c97..833d5a38a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffCurrencyEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffCurrencyEnum.java @@ -7,26 +7,23 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class FormFieldPaymentConfigChargeOneOffCurrencyEnum { - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum AUD = - new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.AUD, "AUD"); - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum CAD = new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.CAD, "CAD"); + public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum AUD = + new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.AUD, "AUD"); + public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum USD = new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.USD, "USD"); - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum CHF = - new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.CHF, "CHF"); - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum EUR = new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.EUR, "EUR"); public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum INR = new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.INR, "INR"); - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum MXN = - new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.MXN, "MXN"); + public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum CHF = + new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.CHF, "CHF"); public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum GBP = new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.GBP, "GBP"); @@ -34,6 +31,9 @@ public final class FormFieldPaymentConfigChargeOneOffCurrencyEnum { public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum SEK = new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.SEK, "SEK"); + public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum MXN = + new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.MXN, "MXN"); + private final Value value; private final String string; @@ -67,24 +67,24 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case AUD: - return visitor.visitAud(); case CAD: return visitor.visitCad(); + case AUD: + return visitor.visitAud(); case USD: return visitor.visitUsd(); - case CHF: - return visitor.visitChf(); case EUR: return visitor.visitEur(); case INR: return visitor.visitInr(); - case MXN: - return visitor.visitMxn(); + case CHF: + return visitor.visitChf(); case GBP: return visitor.visitGbp(); case SEK: return visitor.visitSek(); + case MXN: + return visitor.visitMxn(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -94,24 +94,24 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static FormFieldPaymentConfigChargeOneOffCurrencyEnum valueOf(String value) { switch (value) { - case "AUD": - return AUD; case "CAD": return CAD; + case "AUD": + return AUD; case "USD": return USD; - case "CHF": - return CHF; case "EUR": return EUR; case "INR": return INR; - case "MXN": - return MXN; + case "CHF": + return CHF; case "GBP": return GBP; case "SEK": return SEK; + case "MXN": + return MXN; default: return new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffOneOffAmount.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffOneOffAmount.java index 20aa4f64f..fa1674340 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffOneOffAmount.java +++ b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffOneOffAmount.java @@ -83,13 +83,13 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FormNode deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFlow.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFlow.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormRouter.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormRouter.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormStep.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormStep.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FormWidget.java b/src/main/java/com/auth0/client/mgmt/types/FormWidget.java index 7fc550a16..35b97f00e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FormWidget.java +++ b/src/main/java/com/auth0/client/mgmt/types/FormWidget.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = FormWidget.Deserializer.class) @@ -89,17 +90,36 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FormWidget deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormWidgetAuth0VerifiableCredentials.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, FormWidgetAuth0VerifiableCredentials.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormWidgetGMapsAddress.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormWidgetGMapsAddress.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormWidgetRecaptcha.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("category") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("config")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormWidgetRecaptcha.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetBrandingResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetBrandingResponseContent.java index 4e25135b8..e3908581e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetBrandingResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetBrandingResponseContent.java @@ -26,6 +26,8 @@ public final class GetBrandingResponseContent { private final Optional logoUrl; + private final Optional identifiers; + private final Optional font; private final Map additionalProperties; @@ -34,11 +36,13 @@ private GetBrandingResponseContent( Optional colors, Optional faviconUrl, Optional logoUrl, + Optional identifiers, Optional font, Map additionalProperties) { this.colors = colors; this.faviconUrl = faviconUrl; this.logoUrl = logoUrl; + this.identifiers = identifiers; this.font = font; this.additionalProperties = additionalProperties; } @@ -64,6 +68,11 @@ public Optional getLogoUrl() { return logoUrl; } + @JsonProperty("identifiers") + public Optional getIdentifiers() { + return identifiers; + } + @JsonProperty("font") public Optional getFont() { return font; @@ -84,12 +93,13 @@ private boolean equalTo(GetBrandingResponseContent other) { return colors.equals(other.colors) && faviconUrl.equals(other.faviconUrl) && logoUrl.equals(other.logoUrl) + && identifiers.equals(other.identifiers) && font.equals(other.font); } @java.lang.Override public int hashCode() { - return Objects.hash(this.colors, this.faviconUrl, this.logoUrl, this.font); + return Objects.hash(this.colors, this.faviconUrl, this.logoUrl, this.identifiers, this.font); } @java.lang.Override @@ -109,6 +119,8 @@ public static final class Builder { private Optional logoUrl = Optional.empty(); + private Optional identifiers = Optional.empty(); + private Optional font = Optional.empty(); @JsonAnySetter @@ -120,6 +132,7 @@ public Builder from(GetBrandingResponseContent other) { colors(other.getColors()); faviconUrl(other.getFaviconUrl()); logoUrl(other.getLogoUrl()); + identifiers(other.getIdentifiers()); font(other.getFont()); return this; } @@ -163,6 +176,17 @@ public Builder logoUrl(String logoUrl) { return this; } + @JsonSetter(value = "identifiers", nulls = Nulls.SKIP) + public Builder identifiers(Optional identifiers) { + this.identifiers = identifiers; + return this; + } + + public Builder identifiers(BrandingIdentifiers identifiers) { + this.identifiers = Optional.ofNullable(identifiers); + return this; + } + @JsonSetter(value = "font", nulls = Nulls.SKIP) public Builder font(Optional font) { this.font = font; @@ -175,7 +199,7 @@ public Builder font(BrandingFont font) { } public GetBrandingResponseContent build() { - return new GetBrandingResponseContent(colors, faviconUrl, logoUrl, font, additionalProperties); + return new GetBrandingResponseContent(colors, faviconUrl, logoUrl, identifiers, font, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDefaultDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetDefaultDomainResponseContent.java index b6d09d985..ec75759f8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetDefaultDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetDefaultDomainResponseContent.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = GetDefaultDomainResponseContent.Deserializer.class) @@ -82,14 +83,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("custom_domain_id") + && ((Map) value).containsKey("domain") + && ((Map) value).containsKey("primary") + && ((Map) value).containsKey("status") + && ((Map) value).containsKey("type")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, GetDefaultCustomDomainResponseContent.class)); + } catch (RuntimeException e) { + } } - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, GetDefaultCanonicalDomainResponseContent.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("domain")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, GetDefaultCanonicalDomainResponseContent.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokensRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokensRequestParameters.java index 8d7e1a369..b94124920 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokensRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokensRequestParameters.java @@ -89,6 +89,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -189,7 +192,7 @@ public interface _FinalStage { /** *

Number of results per page. Defaults to 50.

*/ - _FinalStage take(OptionalNullable take); + _FinalStage take(@Nullable OptionalNullable take); _FinalStage take(Integer take); @@ -407,7 +410,7 @@ public _FinalStage take(Integer take) { */ @java.lang.Override @JsonSetter(value = "take", nulls = Nulls.SKIP) - public _FinalStage take(OptionalNullable take) { + public _FinalStage take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java index 15ff91aa4..14ac292a2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java @@ -62,6 +62,8 @@ public final class GetResourceServerResponseContent { private final Optional subjectTypeAuthorization; + private final OptionalNullable authorizationPolicy; + private final Optional clientId; private final Map additionalProperties; @@ -86,6 +88,7 @@ private GetResourceServerResponseContent( OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, + OptionalNullable authorizationPolicy, Optional clientId, Map additionalProperties) { this.id = id; @@ -107,6 +110,7 @@ private GetResourceServerResponseContent( this.authorizationDetails = authorizationDetails; this.proofOfPossession = proofOfPossession; this.subjectTypeAuthorization = subjectTypeAuthorization; + this.authorizationPolicy = authorizationPolicy; this.clientId = clientId; this.additionalProperties = additionalProperties; } @@ -258,6 +262,15 @@ public Optional getSubjectTypeAuthorizat return subjectTypeAuthorization; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + public OptionalNullable getAuthorizationPolicy() { + if (authorizationPolicy == null) { + return OptionalNullable.absent(); + } + return authorizationPolicy; + } + /** * @return The client ID of the client that this resource server is linked to */ @@ -290,6 +303,12 @@ private OptionalNullable _getProofOfPossession( return proofOfPossession; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + private OptionalNullable _getAuthorizationPolicy() { + return authorizationPolicy; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -321,6 +340,7 @@ private boolean equalTo(GetResourceServerResponseContent other) { && authorizationDetails.equals(other.authorizationDetails) && proofOfPossession.equals(other.proofOfPossession) && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) + && authorizationPolicy.equals(other.authorizationPolicy) && clientId.equals(other.clientId); } @@ -346,6 +366,7 @@ public int hashCode() { this.authorizationDetails, this.proofOfPossession, this.subjectTypeAuthorization, + this.authorizationPolicy, this.clientId); } @@ -398,6 +419,8 @@ public static final class Builder { private Optional subjectTypeAuthorization = Optional.empty(); + private OptionalNullable authorizationPolicy = OptionalNullable.absent(); + private Optional clientId = Optional.empty(); @JsonAnySetter @@ -425,6 +448,7 @@ public Builder from(GetResourceServerResponseContent other) { authorizationDetails(other.getAuthorizationDetails()); proofOfPossession(other.getProofOfPossession()); subjectTypeAuthorization(other.getSubjectTypeAuthorization()); + authorizationPolicy(other.getAuthorizationPolicy()); clientId(other.getClientId()); return this; } @@ -761,6 +785,39 @@ public Builder subjectTypeAuthorization(ResourceServerSubjectTypeAuthorization s return this; } + @JsonSetter(value = "authorization_policy", nulls = Nulls.SKIP) + public Builder authorizationPolicy( + @Nullable OptionalNullable authorizationPolicy) { + this.authorizationPolicy = authorizationPolicy; + return this; + } + + public Builder authorizationPolicy(ResourceServerAuthorizationPolicy authorizationPolicy) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy); + return this; + } + + public Builder authorizationPolicy(Optional authorizationPolicy) { + if (authorizationPolicy.isPresent()) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } else { + this.authorizationPolicy = OptionalNullable.absent(); + } + return this; + } + + public Builder authorizationPolicy( + com.auth0.client.mgmt.core.Nullable authorizationPolicy) { + if (authorizationPolicy.isNull()) { + this.authorizationPolicy = OptionalNullable.ofNull(); + } else if (authorizationPolicy.isEmpty()) { + this.authorizationPolicy = OptionalNullable.absent(); + } else { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } + return this; + } + /** *

The client ID of the client that this resource server is linked to

*/ @@ -796,6 +853,7 @@ public GetResourceServerResponseContent build() { authorizationDetails, proofOfPossession, subjectTypeAuthorization, + authorizationPolicy, clientId, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetSelfServiceProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetSelfServiceProfileResponseContent.java index faeab76d3..16776631a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetSelfServiceProfileResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetSelfServiceProfileResponseContent.java @@ -90,7 +90,7 @@ public Optional getDescription() { } /** - * @return List of attributes to be mapped that will be shown to the user during the SS-SSO flow. + * @return List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow. */ @JsonProperty("user_attributes") public Optional> getUserAttributes() { @@ -119,7 +119,7 @@ public Optional getBranding() { } /** - * @return List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate] + * @return List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate] */ @JsonProperty("allowed_strategies") public Optional> getAllowedStrategies() { @@ -262,7 +262,7 @@ public Builder description(String description) { } /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

+ *

List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow.

*/ @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) public Builder userAttributes(Optional> userAttributes) { @@ -315,7 +315,7 @@ public Builder branding(SelfServiceProfileBrandingProperties branding) { } /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

+ *

List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

*/ @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) public Builder allowedStrategies(Optional> allowedStrategies) { diff --git a/src/main/java/com/auth0/client/mgmt/types/GuardianEnrollmentFactorEnum.java b/src/main/java/com/auth0/client/mgmt/types/GuardianEnrollmentFactorEnum.java index 03409797d..59d401f90 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GuardianEnrollmentFactorEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/GuardianEnrollmentFactorEnum.java @@ -7,21 +7,21 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class GuardianEnrollmentFactorEnum { - public static final GuardianEnrollmentFactorEnum EMAIL = new GuardianEnrollmentFactorEnum(Value.EMAIL, "email"); - public static final GuardianEnrollmentFactorEnum OTP = new GuardianEnrollmentFactorEnum(Value.OTP, "otp"); public static final GuardianEnrollmentFactorEnum WEBAUTHN_PLATFORM = new GuardianEnrollmentFactorEnum(Value.WEBAUTHN_PLATFORM, "webauthn-platform"); + public static final GuardianEnrollmentFactorEnum EMAIL = new GuardianEnrollmentFactorEnum(Value.EMAIL, "email"); + + public static final GuardianEnrollmentFactorEnum WEBAUTHN_ROAMING = + new GuardianEnrollmentFactorEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); + public static final GuardianEnrollmentFactorEnum PHONE = new GuardianEnrollmentFactorEnum(Value.PHONE, "phone"); public static final GuardianEnrollmentFactorEnum PUSH_NOTIFICATION = new GuardianEnrollmentFactorEnum(Value.PUSH_NOTIFICATION, "push-notification"); - public static final GuardianEnrollmentFactorEnum WEBAUTHN_ROAMING = - new GuardianEnrollmentFactorEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); - private final Value value; private final String string; @@ -55,18 +55,18 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case EMAIL: - return visitor.visitEmail(); case OTP: return visitor.visitOtp(); case WEBAUTHN_PLATFORM: return visitor.visitWebauthnPlatform(); + case EMAIL: + return visitor.visitEmail(); + case WEBAUTHN_ROAMING: + return visitor.visitWebauthnRoaming(); case PHONE: return visitor.visitPhone(); case PUSH_NOTIFICATION: return visitor.visitPushNotification(); - case WEBAUTHN_ROAMING: - return visitor.visitWebauthnRoaming(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -76,18 +76,18 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static GuardianEnrollmentFactorEnum valueOf(String value) { switch (value) { - case "email": - return EMAIL; case "otp": return OTP; case "webauthn-platform": return WEBAUTHN_PLATFORM; + case "email": + return EMAIL; + case "webauthn-roaming": + return WEBAUTHN_ROAMING; case "phone": return PHONE; case "push-notification": return PUSH_NOTIFICATION; - case "webauthn-roaming": - return WEBAUTHN_ROAMING; default: return new GuardianEnrollmentFactorEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/GuardianFactorNameEnum.java index 4c9117e5d..f5209486d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorNameEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/GuardianFactorNameEnum.java @@ -7,19 +7,14 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class GuardianFactorNameEnum { - public static final GuardianFactorNameEnum EMAIL = new GuardianFactorNameEnum(Value.EMAIL, "email"); - - public static final GuardianFactorNameEnum DUO = new GuardianFactorNameEnum(Value.DUO, "duo"); - public static final GuardianFactorNameEnum OTP = new GuardianFactorNameEnum(Value.OTP, "otp"); public static final GuardianFactorNameEnum WEBAUTHN_PLATFORM = new GuardianFactorNameEnum(Value.WEBAUTHN_PLATFORM, "webauthn-platform"); - public static final GuardianFactorNameEnum PUSH_NOTIFICATION = - new GuardianFactorNameEnum(Value.PUSH_NOTIFICATION, "push-notification"); + public static final GuardianFactorNameEnum EMAIL = new GuardianFactorNameEnum(Value.EMAIL, "email"); - public static final GuardianFactorNameEnum SMS = new GuardianFactorNameEnum(Value.SMS, "sms"); + public static final GuardianFactorNameEnum DUO = new GuardianFactorNameEnum(Value.DUO, "duo"); public static final GuardianFactorNameEnum WEBAUTHN_ROAMING = new GuardianFactorNameEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); @@ -27,6 +22,11 @@ public final class GuardianFactorNameEnum { public static final GuardianFactorNameEnum RECOVERY_CODE = new GuardianFactorNameEnum(Value.RECOVERY_CODE, "recovery-code"); + public static final GuardianFactorNameEnum SMS = new GuardianFactorNameEnum(Value.SMS, "sms"); + + public static final GuardianFactorNameEnum PUSH_NOTIFICATION = + new GuardianFactorNameEnum(Value.PUSH_NOTIFICATION, "push-notification"); + private final Value value; private final String string; @@ -60,22 +60,22 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case EMAIL: - return visitor.visitEmail(); - case DUO: - return visitor.visitDuo(); case OTP: return visitor.visitOtp(); case WEBAUTHN_PLATFORM: return visitor.visitWebauthnPlatform(); - case PUSH_NOTIFICATION: - return visitor.visitPushNotification(); - case SMS: - return visitor.visitSms(); + case EMAIL: + return visitor.visitEmail(); + case DUO: + return visitor.visitDuo(); case WEBAUTHN_ROAMING: return visitor.visitWebauthnRoaming(); case RECOVERY_CODE: return visitor.visitRecoveryCode(); + case SMS: + return visitor.visitSms(); + case PUSH_NOTIFICATION: + return visitor.visitPushNotification(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -85,22 +85,22 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static GuardianFactorNameEnum valueOf(String value) { switch (value) { - case "email": - return EMAIL; - case "duo": - return DUO; case "otp": return OTP; case "webauthn-platform": return WEBAUTHN_PLATFORM; - case "push-notification": - return PUSH_NOTIFICATION; - case "sms": - return SMS; + case "email": + return EMAIL; + case "duo": + return DUO; case "webauthn-roaming": return WEBAUTHN_ROAMING; case "recovery-code": return RECOVERY_CODE; + case "sms": + return SMS; + case "push-notification": + return PUSH_NOTIFICATION; default: return new GuardianFactorNameEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorsProviderSmsProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/GuardianFactorsProviderSmsProviderEnum.java index d56e13452..9c6e8a21d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorsProviderSmsProviderEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/GuardianFactorsProviderSmsProviderEnum.java @@ -10,12 +10,12 @@ public final class GuardianFactorsProviderSmsProviderEnum { public static final GuardianFactorsProviderSmsProviderEnum PHONE_MESSAGE_HOOK = new GuardianFactorsProviderSmsProviderEnum(Value.PHONE_MESSAGE_HOOK, "phone-message-hook"); - public static final GuardianFactorsProviderSmsProviderEnum TWILIO = - new GuardianFactorsProviderSmsProviderEnum(Value.TWILIO, "twilio"); - public static final GuardianFactorsProviderSmsProviderEnum AUTH0 = new GuardianFactorsProviderSmsProviderEnum(Value.AUTH0, "auth0"); + public static final GuardianFactorsProviderSmsProviderEnum TWILIO = + new GuardianFactorsProviderSmsProviderEnum(Value.TWILIO, "twilio"); + private final Value value; private final String string; @@ -51,10 +51,10 @@ public T visit(Visitor visitor) { switch (value) { case PHONE_MESSAGE_HOOK: return visitor.visitPhoneMessageHook(); - case TWILIO: - return visitor.visitTwilio(); case AUTH0: return visitor.visitAuth0(); + case TWILIO: + return visitor.visitTwilio(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -66,10 +66,10 @@ public static GuardianFactorsProviderSmsProviderEnum valueOf(String value) { switch (value) { case "phone-message-hook": return PHONE_MESSAGE_HOOK; - case "twilio": - return TWILIO; case "auth0": return AUTH0; + case "twilio": + return TWILIO; default: return new GuardianFactorsProviderSmsProviderEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/HookTriggerIdEnum.java b/src/main/java/com/auth0/client/mgmt/types/HookTriggerIdEnum.java index e90d154bd..2302a134e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/HookTriggerIdEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/HookTriggerIdEnum.java @@ -7,14 +7,11 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class HookTriggerIdEnum { - public static final HookTriggerIdEnum CREDENTIALS_EXCHANGE = - new HookTriggerIdEnum(Value.CREDENTIALS_EXCHANGE, "credentials-exchange"); - public static final HookTriggerIdEnum POST_USER_REGISTRATION = new HookTriggerIdEnum(Value.POST_USER_REGISTRATION, "post-user-registration"); - public static final HookTriggerIdEnum PRE_USER_REGISTRATION = - new HookTriggerIdEnum(Value.PRE_USER_REGISTRATION, "pre-user-registration"); + public static final HookTriggerIdEnum CREDENTIALS_EXCHANGE = + new HookTriggerIdEnum(Value.CREDENTIALS_EXCHANGE, "credentials-exchange"); public static final HookTriggerIdEnum POST_CHANGE_PASSWORD = new HookTriggerIdEnum(Value.POST_CHANGE_PASSWORD, "post-change-password"); @@ -22,6 +19,9 @@ public final class HookTriggerIdEnum { public static final HookTriggerIdEnum SEND_PHONE_MESSAGE = new HookTriggerIdEnum(Value.SEND_PHONE_MESSAGE, "send-phone-message"); + public static final HookTriggerIdEnum PRE_USER_REGISTRATION = + new HookTriggerIdEnum(Value.PRE_USER_REGISTRATION, "pre-user-registration"); + private final Value value; private final String string; @@ -54,16 +54,16 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case CREDENTIALS_EXCHANGE: - return visitor.visitCredentialsExchange(); case POST_USER_REGISTRATION: return visitor.visitPostUserRegistration(); - case PRE_USER_REGISTRATION: - return visitor.visitPreUserRegistration(); + case CREDENTIALS_EXCHANGE: + return visitor.visitCredentialsExchange(); case POST_CHANGE_PASSWORD: return visitor.visitPostChangePassword(); case SEND_PHONE_MESSAGE: return visitor.visitSendPhoneMessage(); + case PRE_USER_REGISTRATION: + return visitor.visitPreUserRegistration(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -73,16 +73,16 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static HookTriggerIdEnum valueOf(String value) { switch (value) { - case "credentials-exchange": - return CREDENTIALS_EXCHANGE; case "post-user-registration": return POST_USER_REGISTRATION; - case "pre-user-registration": - return PRE_USER_REGISTRATION; + case "credentials-exchange": + return CREDENTIALS_EXCHANGE; case "post-change-password": return POST_CHANGE_PASSWORD; case "send-phone-message": return SEND_PHONE_MESSAGE; + case "pre-user-registration": + return PRE_USER_REGISTRATION; default: return new HookTriggerIdEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionResponseCommon.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionResponseCommon.java index 841aa2ae5..e5676e6fa 100644 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionResponseCommon.java +++ b/src/main/java/com/auth0/client/mgmt/types/IConnectionResponseCommon.java @@ -7,7 +7,7 @@ import java.util.Optional; public interface IConnectionResponseCommon extends ICreateConnectionCommon { - String getId(); + Optional getId(); Optional> getRealms(); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ICreateConnectionCommon.java b/src/main/java/com/auth0/client/mgmt/types/ICreateConnectionCommon.java index 084ebe52c..4a13ff358 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ICreateConnectionCommon.java +++ b/src/main/java/com/auth0/client/mgmt/types/ICreateConnectionCommon.java @@ -9,7 +9,7 @@ import java.util.Optional; public interface ICreateConnectionCommon { - String getName(); + Optional getName(); Optional> getEnabledClients(); diff --git a/src/main/java/com/auth0/client/mgmt/types/IdentityProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/IdentityProviderEnum.java index 31c8b2ab0..3205a86d8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/IdentityProviderEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/IdentityProviderEnum.java @@ -7,123 +7,123 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class IdentityProviderEnum { - public static final IdentityProviderEnum SHOP = new IdentityProviderEnum(Value.SHOP, "shop"); + public static final IdentityProviderEnum AD = new IdentityProviderEnum(Value.AD, "ad"); - public static final IdentityProviderEnum AUTH0OIDC = new IdentityProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); + public static final IdentityProviderEnum BAIDU = new IdentityProviderEnum(Value.BAIDU, "baidu"); - public static final IdentityProviderEnum DWOLLA = new IdentityProviderEnum(Value.DWOLLA, "dwolla"); + public static final IdentityProviderEnum BITLY = new IdentityProviderEnum(Value.BITLY, "bitly"); - public static final IdentityProviderEnum OKTA = new IdentityProviderEnum(Value.OKTA, "okta"); + public static final IdentityProviderEnum PAYPAL_SANDBOX = + new IdentityProviderEnum(Value.PAYPAL_SANDBOX, "paypal-sandbox"); - public static final IdentityProviderEnum PLANNINGCENTER = - new IdentityProviderEnum(Value.PLANNINGCENTER, "planningcenter"); + public static final IdentityProviderEnum SAMLP = new IdentityProviderEnum(Value.SAMLP, "samlp"); - public static final IdentityProviderEnum GOOGLE_OAUTH2 = - new IdentityProviderEnum(Value.GOOGLE_OAUTH2, "google-oauth2"); + public static final IdentityProviderEnum DROPBOX = new IdentityProviderEnum(Value.DROPBOX, "dropbox"); - public static final IdentityProviderEnum AUTH0 = new IdentityProviderEnum(Value.AUTH0, "auth0"); + public static final IdentityProviderEnum VKONTAKTE = new IdentityProviderEnum(Value.VKONTAKTE, "vkontakte"); - public static final IdentityProviderEnum EXACT = new IdentityProviderEnum(Value.EXACT, "exact"); + public static final IdentityProviderEnum INSTAGRAM = new IdentityProviderEnum(Value.INSTAGRAM, "instagram"); - public static final IdentityProviderEnum WORDPRESS = new IdentityProviderEnum(Value.WORDPRESS, "wordpress"); + public static final IdentityProviderEnum PINGFEDERATE = + new IdentityProviderEnum(Value.PINGFEDERATE, "pingfederate"); - public static final IdentityProviderEnum FITBIT = new IdentityProviderEnum(Value.FITBIT, "fitbit"); + public static final IdentityProviderEnum THIRTYSEVENSIGNALS = + new IdentityProviderEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); - public static final IdentityProviderEnum EVERNOTE = new IdentityProviderEnum(Value.EVERNOTE, "evernote"); + public static final IdentityProviderEnum WAAD = new IdentityProviderEnum(Value.WAAD, "waad"); - public static final IdentityProviderEnum SHAREPOINT = new IdentityProviderEnum(Value.SHAREPOINT, "sharepoint"); + public static final IdentityProviderEnum OIDC = new IdentityProviderEnum(Value.OIDC, "oidc"); - public static final IdentityProviderEnum SHOPIFY = new IdentityProviderEnum(Value.SHOPIFY, "shopify"); + public static final IdentityProviderEnum SALESFORCE_COMMUNITY = + new IdentityProviderEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community"); - public static final IdentityProviderEnum SALESFORCE_SANDBOX = - new IdentityProviderEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); + public static final IdentityProviderEnum DACCOUNT = new IdentityProviderEnum(Value.DACCOUNT, "daccount"); - public static final IdentityProviderEnum FACEBOOK = new IdentityProviderEnum(Value.FACEBOOK, "facebook"); + public static final IdentityProviderEnum SOUNDCLOUD = new IdentityProviderEnum(Value.SOUNDCLOUD, "soundcloud"); - public static final IdentityProviderEnum OAUTH1 = new IdentityProviderEnum(Value.OAUTH1, "oauth1"); + public static final IdentityProviderEnum EVERNOTE_SANDBOX = + new IdentityProviderEnum(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); - public static final IdentityProviderEnum APPLE = new IdentityProviderEnum(Value.APPLE, "apple"); + public static final IdentityProviderEnum OAUTH2 = new IdentityProviderEnum(Value.OAUTH2, "oauth2"); - public static final IdentityProviderEnum UNTAPPD = new IdentityProviderEnum(Value.UNTAPPD, "untappd"); + public static final IdentityProviderEnum BOX = new IdentityProviderEnum(Value.BOX, "box"); - public static final IdentityProviderEnum AMAZON = new IdentityProviderEnum(Value.AMAZON, "amazon"); + public static final IdentityProviderEnum IP = new IdentityProviderEnum(Value.IP, "ip"); - public static final IdentityProviderEnum LINE = new IdentityProviderEnum(Value.LINE, "line"); + public static final IdentityProviderEnum ADFS = new IdentityProviderEnum(Value.ADFS, "adfs"); - public static final IdentityProviderEnum BITBUCKET = new IdentityProviderEnum(Value.BITBUCKET, "bitbucket"); + public static final IdentityProviderEnum EMAIL = new IdentityProviderEnum(Value.EMAIL, "email"); - public static final IdentityProviderEnum GITHUB = new IdentityProviderEnum(Value.GITHUB, "github"); + public static final IdentityProviderEnum YAHOO = new IdentityProviderEnum(Value.YAHOO, "yahoo"); - public static final IdentityProviderEnum SALESFORCE = new IdentityProviderEnum(Value.SALESFORCE, "salesforce"); + public static final IdentityProviderEnum WEIBO = new IdentityProviderEnum(Value.WEIBO, "weibo"); - public static final IdentityProviderEnum OFFICE365 = new IdentityProviderEnum(Value.OFFICE365, "office365"); + public static final IdentityProviderEnum CUSTOM = new IdentityProviderEnum(Value.CUSTOM, "custom"); - public static final IdentityProviderEnum SMS = new IdentityProviderEnum(Value.SMS, "sms"); + public static final IdentityProviderEnum PAYPAL = new IdentityProviderEnum(Value.PAYPAL, "paypal"); - public static final IdentityProviderEnum TWITTER = new IdentityProviderEnum(Value.TWITTER, "twitter"); + public static final IdentityProviderEnum LINKEDIN = new IdentityProviderEnum(Value.LINKEDIN, "linkedin"); - public static final IdentityProviderEnum WINDOWSLIVE = new IdentityProviderEnum(Value.WINDOWSLIVE, "windowslive"); + public static final IdentityProviderEnum GOOGLE_APPS = new IdentityProviderEnum(Value.GOOGLE_APPS, "google-apps"); - public static final IdentityProviderEnum YANDEX = new IdentityProviderEnum(Value.YANDEX, "yandex"); + public static final IdentityProviderEnum DWOLLA = new IdentityProviderEnum(Value.DWOLLA, "dwolla"); - public static final IdentityProviderEnum AD = new IdentityProviderEnum(Value.AD, "ad"); + public static final IdentityProviderEnum SHOP = new IdentityProviderEnum(Value.SHOP, "shop"); - public static final IdentityProviderEnum BAIDU = new IdentityProviderEnum(Value.BAIDU, "baidu"); + public static final IdentityProviderEnum AUTH0OIDC = new IdentityProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); - public static final IdentityProviderEnum BITLY = new IdentityProviderEnum(Value.BITLY, "bitly"); + public static final IdentityProviderEnum PLANNINGCENTER = + new IdentityProviderEnum(Value.PLANNINGCENTER, "planningcenter"); - public static final IdentityProviderEnum PAYPAL_SANDBOX = - new IdentityProviderEnum(Value.PAYPAL_SANDBOX, "paypal-sandbox"); + public static final IdentityProviderEnum OKTA = new IdentityProviderEnum(Value.OKTA, "okta"); - public static final IdentityProviderEnum SAMLP = new IdentityProviderEnum(Value.SAMLP, "samlp"); + public static final IdentityProviderEnum AUTH0 = new IdentityProviderEnum(Value.AUTH0, "auth0"); - public static final IdentityProviderEnum DROPBOX = new IdentityProviderEnum(Value.DROPBOX, "dropbox"); + public static final IdentityProviderEnum GOOGLE_OAUTH2 = + new IdentityProviderEnum(Value.GOOGLE_OAUTH2, "google-oauth2"); - public static final IdentityProviderEnum VKONTAKTE = new IdentityProviderEnum(Value.VKONTAKTE, "vkontakte"); + public static final IdentityProviderEnum WORDPRESS = new IdentityProviderEnum(Value.WORDPRESS, "wordpress"); - public static final IdentityProviderEnum PINGFEDERATE = - new IdentityProviderEnum(Value.PINGFEDERATE, "pingfederate"); + public static final IdentityProviderEnum EXACT = new IdentityProviderEnum(Value.EXACT, "exact"); - public static final IdentityProviderEnum INSTAGRAM = new IdentityProviderEnum(Value.INSTAGRAM, "instagram"); + public static final IdentityProviderEnum FITBIT = new IdentityProviderEnum(Value.FITBIT, "fitbit"); - public static final IdentityProviderEnum THIRTYSEVENSIGNALS = - new IdentityProviderEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); + public static final IdentityProviderEnum EVERNOTE = new IdentityProviderEnum(Value.EVERNOTE, "evernote"); - public static final IdentityProviderEnum WAAD = new IdentityProviderEnum(Value.WAAD, "waad"); + public static final IdentityProviderEnum SHAREPOINT = new IdentityProviderEnum(Value.SHAREPOINT, "sharepoint"); - public static final IdentityProviderEnum OIDC = new IdentityProviderEnum(Value.OIDC, "oidc"); + public static final IdentityProviderEnum SHOPIFY = new IdentityProviderEnum(Value.SHOPIFY, "shopify"); - public static final IdentityProviderEnum EVERNOTE_SANDBOX = - new IdentityProviderEnum(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); + public static final IdentityProviderEnum SALESFORCE_SANDBOX = + new IdentityProviderEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); - public static final IdentityProviderEnum SALESFORCE_COMMUNITY = - new IdentityProviderEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community"); + public static final IdentityProviderEnum FACEBOOK = new IdentityProviderEnum(Value.FACEBOOK, "facebook"); - public static final IdentityProviderEnum DACCOUNT = new IdentityProviderEnum(Value.DACCOUNT, "daccount"); + public static final IdentityProviderEnum APPLE = new IdentityProviderEnum(Value.APPLE, "apple"); - public static final IdentityProviderEnum SOUNDCLOUD = new IdentityProviderEnum(Value.SOUNDCLOUD, "soundcloud"); + public static final IdentityProviderEnum OAUTH1 = new IdentityProviderEnum(Value.OAUTH1, "oauth1"); - public static final IdentityProviderEnum OAUTH2 = new IdentityProviderEnum(Value.OAUTH2, "oauth2"); + public static final IdentityProviderEnum AMAZON = new IdentityProviderEnum(Value.AMAZON, "amazon"); - public static final IdentityProviderEnum BOX = new IdentityProviderEnum(Value.BOX, "box"); + public static final IdentityProviderEnum LINE = new IdentityProviderEnum(Value.LINE, "line"); - public static final IdentityProviderEnum IP = new IdentityProviderEnum(Value.IP, "ip"); + public static final IdentityProviderEnum UNTAPPD = new IdentityProviderEnum(Value.UNTAPPD, "untappd"); - public static final IdentityProviderEnum ADFS = new IdentityProviderEnum(Value.ADFS, "adfs"); + public static final IdentityProviderEnum GITHUB = new IdentityProviderEnum(Value.GITHUB, "github"); - public static final IdentityProviderEnum EMAIL = new IdentityProviderEnum(Value.EMAIL, "email"); + public static final IdentityProviderEnum SALESFORCE = new IdentityProviderEnum(Value.SALESFORCE, "salesforce"); - public static final IdentityProviderEnum CUSTOM = new IdentityProviderEnum(Value.CUSTOM, "custom"); + public static final IdentityProviderEnum BITBUCKET = new IdentityProviderEnum(Value.BITBUCKET, "bitbucket"); - public static final IdentityProviderEnum YAHOO = new IdentityProviderEnum(Value.YAHOO, "yahoo"); + public static final IdentityProviderEnum OFFICE365 = new IdentityProviderEnum(Value.OFFICE365, "office365"); - public static final IdentityProviderEnum WEIBO = new IdentityProviderEnum(Value.WEIBO, "weibo"); + public static final IdentityProviderEnum SMS = new IdentityProviderEnum(Value.SMS, "sms"); - public static final IdentityProviderEnum GOOGLE_APPS = new IdentityProviderEnum(Value.GOOGLE_APPS, "google-apps"); + public static final IdentityProviderEnum WINDOWSLIVE = new IdentityProviderEnum(Value.WINDOWSLIVE, "windowslive"); - public static final IdentityProviderEnum PAYPAL = new IdentityProviderEnum(Value.PAYPAL, "paypal"); + public static final IdentityProviderEnum YANDEX = new IdentityProviderEnum(Value.YANDEX, "yandex"); - public static final IdentityProviderEnum LINKEDIN = new IdentityProviderEnum(Value.LINKEDIN, "linkedin"); + public static final IdentityProviderEnum TWITTER = new IdentityProviderEnum(Value.TWITTER, "twitter"); private final Value value; @@ -157,62 +157,6 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case SHOP: - return visitor.visitShop(); - case AUTH0OIDC: - return visitor.visitAuth0Oidc(); - case DWOLLA: - return visitor.visitDwolla(); - case OKTA: - return visitor.visitOkta(); - case PLANNINGCENTER: - return visitor.visitPlanningcenter(); - case GOOGLE_OAUTH2: - return visitor.visitGoogleOauth2(); - case AUTH0: - return visitor.visitAuth0(); - case EXACT: - return visitor.visitExact(); - case WORDPRESS: - return visitor.visitWordpress(); - case FITBIT: - return visitor.visitFitbit(); - case EVERNOTE: - return visitor.visitEvernote(); - case SHAREPOINT: - return visitor.visitSharepoint(); - case SHOPIFY: - return visitor.visitShopify(); - case SALESFORCE_SANDBOX: - return visitor.visitSalesforceSandbox(); - case FACEBOOK: - return visitor.visitFacebook(); - case OAUTH1: - return visitor.visitOauth1(); - case APPLE: - return visitor.visitApple(); - case UNTAPPD: - return visitor.visitUntappd(); - case AMAZON: - return visitor.visitAmazon(); - case LINE: - return visitor.visitLine(); - case BITBUCKET: - return visitor.visitBitbucket(); - case GITHUB: - return visitor.visitGithub(); - case SALESFORCE: - return visitor.visitSalesforce(); - case OFFICE365: - return visitor.visitOffice365(); - case SMS: - return visitor.visitSms(); - case TWITTER: - return visitor.visitTwitter(); - case WINDOWSLIVE: - return visitor.visitWindowslive(); - case YANDEX: - return visitor.visitYandex(); case AD: return visitor.visitAd(); case BAIDU: @@ -227,24 +171,24 @@ public T visit(Visitor visitor) { return visitor.visitDropbox(); case VKONTAKTE: return visitor.visitVkontakte(); - case PINGFEDERATE: - return visitor.visitPingfederate(); case INSTAGRAM: return visitor.visitInstagram(); + case PINGFEDERATE: + return visitor.visitPingfederate(); case THIRTYSEVENSIGNALS: return visitor.visitThirtysevensignals(); case WAAD: return visitor.visitWaad(); case OIDC: return visitor.visitOidc(); - case EVERNOTE_SANDBOX: - return visitor.visitEvernoteSandbox(); case SALESFORCE_COMMUNITY: return visitor.visitSalesforceCommunity(); case DACCOUNT: return visitor.visitDaccount(); case SOUNDCLOUD: return visitor.visitSoundcloud(); + case EVERNOTE_SANDBOX: + return visitor.visitEvernoteSandbox(); case OAUTH2: return visitor.visitOauth2(); case BOX: @@ -255,18 +199,74 @@ public T visit(Visitor visitor) { return visitor.visitAdfs(); case EMAIL: return visitor.visitEmail(); - case CUSTOM: - return visitor.visitCustom(); case YAHOO: return visitor.visitYahoo(); case WEIBO: return visitor.visitWeibo(); - case GOOGLE_APPS: - return visitor.visitGoogleApps(); + case CUSTOM: + return visitor.visitCustom(); case PAYPAL: return visitor.visitPaypal(); case LINKEDIN: return visitor.visitLinkedin(); + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case DWOLLA: + return visitor.visitDwolla(); + case SHOP: + return visitor.visitShop(); + case AUTH0OIDC: + return visitor.visitAuth0Oidc(); + case PLANNINGCENTER: + return visitor.visitPlanningcenter(); + case OKTA: + return visitor.visitOkta(); + case AUTH0: + return visitor.visitAuth0(); + case GOOGLE_OAUTH2: + return visitor.visitGoogleOauth2(); + case WORDPRESS: + return visitor.visitWordpress(); + case EXACT: + return visitor.visitExact(); + case FITBIT: + return visitor.visitFitbit(); + case EVERNOTE: + return visitor.visitEvernote(); + case SHAREPOINT: + return visitor.visitSharepoint(); + case SHOPIFY: + return visitor.visitShopify(); + case SALESFORCE_SANDBOX: + return visitor.visitSalesforceSandbox(); + case FACEBOOK: + return visitor.visitFacebook(); + case APPLE: + return visitor.visitApple(); + case OAUTH1: + return visitor.visitOauth1(); + case AMAZON: + return visitor.visitAmazon(); + case LINE: + return visitor.visitLine(); + case UNTAPPD: + return visitor.visitUntappd(); + case GITHUB: + return visitor.visitGithub(); + case SALESFORCE: + return visitor.visitSalesforce(); + case BITBUCKET: + return visitor.visitBitbucket(); + case OFFICE365: + return visitor.visitOffice365(); + case SMS: + return visitor.visitSms(); + case WINDOWSLIVE: + return visitor.visitWindowslive(); + case YANDEX: + return visitor.visitYandex(); + case TWITTER: + return visitor.visitTwitter(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -276,62 +276,6 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static IdentityProviderEnum valueOf(String value) { switch (value) { - case "shop": - return SHOP; - case "auth0-oidc": - return AUTH0OIDC; - case "dwolla": - return DWOLLA; - case "okta": - return OKTA; - case "planningcenter": - return PLANNINGCENTER; - case "google-oauth2": - return GOOGLE_OAUTH2; - case "auth0": - return AUTH0; - case "exact": - return EXACT; - case "wordpress": - return WORDPRESS; - case "fitbit": - return FITBIT; - case "evernote": - return EVERNOTE; - case "sharepoint": - return SHAREPOINT; - case "shopify": - return SHOPIFY; - case "salesforce-sandbox": - return SALESFORCE_SANDBOX; - case "facebook": - return FACEBOOK; - case "oauth1": - return OAUTH1; - case "apple": - return APPLE; - case "untappd": - return UNTAPPD; - case "amazon": - return AMAZON; - case "line": - return LINE; - case "bitbucket": - return BITBUCKET; - case "github": - return GITHUB; - case "salesforce": - return SALESFORCE; - case "office365": - return OFFICE365; - case "sms": - return SMS; - case "twitter": - return TWITTER; - case "windowslive": - return WINDOWSLIVE; - case "yandex": - return YANDEX; case "ad": return AD; case "baidu": @@ -346,24 +290,24 @@ public static IdentityProviderEnum valueOf(String value) { return DROPBOX; case "vkontakte": return VKONTAKTE; - case "pingfederate": - return PINGFEDERATE; case "instagram": return INSTAGRAM; + case "pingfederate": + return PINGFEDERATE; case "thirtysevensignals": return THIRTYSEVENSIGNALS; case "waad": return WAAD; case "oidc": return OIDC; - case "evernote-sandbox": - return EVERNOTE_SANDBOX; case "salesforce-community": return SALESFORCE_COMMUNITY; case "daccount": return DACCOUNT; case "soundcloud": return SOUNDCLOUD; + case "evernote-sandbox": + return EVERNOTE_SANDBOX; case "oauth2": return OAUTH2; case "box": @@ -374,18 +318,74 @@ public static IdentityProviderEnum valueOf(String value) { return ADFS; case "email": return EMAIL; - case "custom": - return CUSTOM; case "yahoo": return YAHOO; case "weibo": return WEIBO; - case "google-apps": - return GOOGLE_APPS; + case "custom": + return CUSTOM; case "paypal": return PAYPAL; case "linkedin": return LINKEDIN; + case "google-apps": + return GOOGLE_APPS; + case "dwolla": + return DWOLLA; + case "shop": + return SHOP; + case "auth0-oidc": + return AUTH0OIDC; + case "planningcenter": + return PLANNINGCENTER; + case "okta": + return OKTA; + case "auth0": + return AUTH0; + case "google-oauth2": + return GOOGLE_OAUTH2; + case "wordpress": + return WORDPRESS; + case "exact": + return EXACT; + case "fitbit": + return FITBIT; + case "evernote": + return EVERNOTE; + case "sharepoint": + return SHAREPOINT; + case "shopify": + return SHOPIFY; + case "salesforce-sandbox": + return SALESFORCE_SANDBOX; + case "facebook": + return FACEBOOK; + case "apple": + return APPLE; + case "oauth1": + return OAUTH1; + case "amazon": + return AMAZON; + case "line": + return LINE; + case "untappd": + return UNTAPPD; + case "github": + return GITHUB; + case "salesforce": + return SALESFORCE; + case "bitbucket": + return BITBUCKET; + case "office365": + return OFFICE365; + case "sms": + return SMS; + case "windowslive": + return WINDOWSLIVE; + case "yandex": + return YANDEX; + case "twitter": + return TWITTER; default: return new IdentityProviderEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/IntegrationFeatureTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/IntegrationFeatureTypeEnum.java index 378ce1601..9971a1e6f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/IntegrationFeatureTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/IntegrationFeatureTypeEnum.java @@ -10,14 +10,14 @@ public final class IntegrationFeatureTypeEnum { public static final IntegrationFeatureTypeEnum UNSPECIFIED = new IntegrationFeatureTypeEnum(Value.UNSPECIFIED, "unspecified"); - public static final IntegrationFeatureTypeEnum SMS_PROVIDER = - new IntegrationFeatureTypeEnum(Value.SMS_PROVIDER, "sms_provider"); - public static final IntegrationFeatureTypeEnum ACTION = new IntegrationFeatureTypeEnum(Value.ACTION, "action"); public static final IntegrationFeatureTypeEnum SSO_INTEGRATION = new IntegrationFeatureTypeEnum(Value.SSO_INTEGRATION, "sso_integration"); + public static final IntegrationFeatureTypeEnum SMS_PROVIDER = + new IntegrationFeatureTypeEnum(Value.SMS_PROVIDER, "sms_provider"); + public static final IntegrationFeatureTypeEnum SOCIAL_CONNECTION = new IntegrationFeatureTypeEnum(Value.SOCIAL_CONNECTION, "social_connection"); @@ -59,12 +59,12 @@ public T visit(Visitor visitor) { switch (value) { case UNSPECIFIED: return visitor.visitUnspecified(); - case SMS_PROVIDER: - return visitor.visitSmsProvider(); case ACTION: return visitor.visitAction(); case SSO_INTEGRATION: return visitor.visitSsoIntegration(); + case SMS_PROVIDER: + return visitor.visitSmsProvider(); case SOCIAL_CONNECTION: return visitor.visitSocialConnection(); case LOG_STREAM: @@ -80,12 +80,12 @@ public static IntegrationFeatureTypeEnum valueOf(String value) { switch (value) { case "unspecified": return UNSPECIFIED; - case "sms_provider": - return SMS_PROVIDER; case "action": return ACTION; case "sso_integration": return SSO_INTEGRATION; + case "sms_provider": + return SMS_PROVIDER; case "social_connection": return SOCIAL_CONNECTION; case "log_stream": diff --git a/src/main/java/com/auth0/client/mgmt/types/ListActionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListActionsRequestParameters.java index b63b09676..96ae64a1f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListActionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListActionsRequestParameters.java @@ -91,6 +91,9 @@ public OptionalNullable getDeployed() { */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -99,6 +102,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -282,7 +288,7 @@ public Builder deployed(com.auth0.client.mgmt.core.Nullable deployed) { *

Use this field to request a specific page of the list results.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -316,7 +322,7 @@ public Builder page(com.auth0.client.mgmt.core.Nullable page) { *

The maximum number of results to be returned by the server in single response. 20 by default

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ListClientGrantsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListClientGrantsRequestParameters.java index a880d39e1..0e14a982b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListClientGrantsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListClientGrantsRequestParameters.java @@ -73,6 +73,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -121,7 +124,7 @@ public OptionalNullable getSubjectType() { } /** - * @return Applies this client grant as the default for all clients in the specified group. The only accepted value is third_party_clients, which applies the grant to all third-party clients. Per-client grants for the same audience take precedence. Mutually exclusive with client_id. + * @return Applies this client grant as the default for all clients in the specified group. The only accepted value is third_party_clients, which applies the grant to all third-party clients. Per-client grants for the same audience take precedence. Mutually exclusive with client_id. */ @JsonIgnore public OptionalNullable getDefaultFor() { @@ -243,7 +246,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } @@ -410,7 +413,7 @@ public Builder subjectType(com.auth0.client.mgmt.core.NullableApplies this client grant as the default for all clients in the specified group. The only accepted value is third_party_clients, which applies the grant to all third-party clients. Per-client grants for the same audience take precedence. Mutually exclusive with client_id.

+ *

Applies this client grant as the default for all clients in the specified group. The only accepted value is third_party_clients, which applies the grant to all third-party clients. Per-client grants for the same audience take precedence. Mutually exclusive with client_id.

*/ @JsonSetter(value = "default_for", nulls = Nulls.SKIP) public Builder defaultFor(@Nullable OptionalNullable defaultFor) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java index ee26b48e3..117c634b1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java @@ -96,6 +96,9 @@ public OptionalNullable getIncludeFields() { */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -104,6 +107,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -112,6 +118,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -331,7 +340,7 @@ public Builder includeFields(com.auth0.client.mgmt.core.Nullable includ *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -365,7 +374,7 @@ public Builder page(com.auth0.client.mgmt.core.Nullable page) { *

Number of results per page. Default value is 50, maximum value is 100

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -399,7 +408,7 @@ public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfileRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfileRequestParameters.java index f6a468508..ae2a51433 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfileRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfileRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -139,7 +142,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 5.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ListConnectionsQueryParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListConnectionsQueryParameters.java index bb98ab988..878653363 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListConnectionsQueryParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListConnectionsQueryParameters.java @@ -82,6 +82,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -249,7 +252,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsRequestParameters.java index 7d76b8813..c20cc93c0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListDeviceCredentialsRequestParameters.Builder.class) @@ -66,6 +66,9 @@ private ListDeviceCredentialsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -74,6 +77,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -82,6 +88,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -224,7 +233,7 @@ public Builder from(ListDeviceCredentialsRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -243,7 +252,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -258,7 +267,7 @@ public Builder page(Nullable page) { *

Number of results per page. There is a maximum of 1000 results allowed from this endpoint.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -277,7 +286,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -292,7 +301,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -311,7 +320,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { @@ -326,7 +335,7 @@ public Builder includeTotals(Nullable includeTotals) { *

Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.

*/ @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public Builder fields(@org.jetbrains.annotations.Nullable OptionalNullable fields) { + public Builder fields(@Nullable OptionalNullable fields) { this.fields = fields; return this; } @@ -345,7 +354,7 @@ public Builder fields(Optional fields) { return this; } - public Builder fields(Nullable fields) { + public Builder fields(com.auth0.client.mgmt.core.Nullable fields) { if (fields.isNull()) { this.fields = OptionalNullable.ofNull(); } else if (fields.isEmpty()) { @@ -360,7 +369,7 @@ public Builder fields(Nullable fields) { *

Whether specified fields are to be included (true) or excluded (false).

*/ @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) - public Builder includeFields(@org.jetbrains.annotations.Nullable OptionalNullable includeFields) { + public Builder includeFields(@Nullable OptionalNullable includeFields) { this.includeFields = includeFields; return this; } @@ -379,7 +388,7 @@ public Builder includeFields(Optional includeFields) { return this; } - public Builder includeFields(Nullable includeFields) { + public Builder includeFields(com.auth0.client.mgmt.core.Nullable includeFields) { if (includeFields.isNull()) { this.includeFields = OptionalNullable.ofNull(); } else if (includeFields.isEmpty()) { @@ -394,7 +403,7 @@ public Builder includeFields(Nullable includeFields) { *

user_id of the devices to retrieve.

*/ @JsonSetter(value = "user_id", nulls = Nulls.SKIP) - public Builder userId(@org.jetbrains.annotations.Nullable OptionalNullable userId) { + public Builder userId(@Nullable OptionalNullable userId) { this.userId = userId; return this; } @@ -413,7 +422,7 @@ public Builder userId(Optional userId) { return this; } - public Builder userId(Nullable userId) { + public Builder userId(com.auth0.client.mgmt.core.Nullable userId) { if (userId.isNull()) { this.userId = OptionalNullable.ofNull(); } else if (userId.isEmpty()) { @@ -428,7 +437,7 @@ public Builder userId(Nullable userId) { *

client_id of the devices to retrieve.

*/ @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(@org.jetbrains.annotations.Nullable OptionalNullable clientId) { + public Builder clientId(@Nullable OptionalNullable clientId) { this.clientId = clientId; return this; } @@ -447,7 +456,7 @@ public Builder clientId(Optional clientId) { return this; } - public Builder clientId(Nullable clientId) { + public Builder clientId(com.auth0.client.mgmt.core.Nullable clientId) { if (clientId.isNull()) { this.clientId = OptionalNullable.ofNull(); } else if (clientId.isEmpty()) { @@ -462,7 +471,7 @@ public Builder clientId(Nullable clientId) { *

Type of credentials to retrieve. Must be public_key, refresh_token or rotating_refresh_token. The property will default to refresh_token when paging is requested

*/ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(@org.jetbrains.annotations.Nullable OptionalNullable type) { + public Builder type(@Nullable OptionalNullable type) { this.type = type; return this; } @@ -481,7 +490,7 @@ public Builder type(Optional type) { return this; } - public Builder type(Nullable type) { + public Builder type(com.auth0.client.mgmt.core.Nullable type) { if (type.isNull()) { this.type = OptionalNullable.ofNull(); } else if (type.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsRequestParameters.java index 544144be8..4a2c0d723 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -138,7 +141,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParameters.java index 5bff83cc2..7eb337832 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParameters.java @@ -67,6 +67,9 @@ public Optional> getHydrate() { */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -75,6 +78,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -83,6 +89,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -191,7 +200,7 @@ public Builder hydrate(ListFlowsRequestParametersHydrateEnum hydrate) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -225,7 +234,7 @@ public Builder page(com.auth0.client.mgmt.core.Nullable page) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -259,7 +268,7 @@ public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ListFormsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListFormsRequestParameters.java index 664287ccb..42e908236 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListFormsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListFormsRequestParameters.java @@ -63,6 +63,9 @@ public Optional> getHydrate() { */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -71,6 +74,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -79,6 +85,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -171,7 +180,7 @@ public Builder hydrate(FormsRequestParametersHydrateEnum hydrate) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -205,7 +214,7 @@ public Builder page(com.auth0.client.mgmt.core.Nullable page) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -239,7 +248,7 @@ public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ListGroupsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListGroupsRequestParameters.java index 02ce7dff1..1357e3dc8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListGroupsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListGroupsRequestParameters.java @@ -28,6 +28,8 @@ public final class ListGroupsRequestParameters { private final OptionalNullable externalId; + private final OptionalNullable search; + private final OptionalNullable fields; private final OptionalNullable includeFields; @@ -42,6 +44,7 @@ private ListGroupsRequestParameters( OptionalNullable connectionId, OptionalNullable name, OptionalNullable externalId, + OptionalNullable search, OptionalNullable fields, OptionalNullable includeFields, OptionalNullable from, @@ -50,6 +53,7 @@ private ListGroupsRequestParameters( this.connectionId = connectionId; this.name = name; this.externalId = externalId; + this.search = search; this.fields = fields; this.includeFields = includeFields; this.from = from; @@ -90,6 +94,17 @@ public OptionalNullable getExternalId() { return externalId; } + /** + * @return Search for groups by name or external ID. + */ + @JsonIgnore + public OptionalNullable getSearch() { + if (search == null) { + return OptionalNullable.absent(); + } + return search; + } + /** * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ @@ -128,6 +143,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -146,6 +164,7 @@ private boolean equalTo(ListGroupsRequestParameters other) { return connectionId.equals(other.connectionId) && name.equals(other.name) && externalId.equals(other.externalId) + && search.equals(other.search) && fields.equals(other.fields) && includeFields.equals(other.includeFields) && from.equals(other.from) @@ -155,7 +174,14 @@ private boolean equalTo(ListGroupsRequestParameters other) { @java.lang.Override public int hashCode() { return Objects.hash( - this.connectionId, this.name, this.externalId, this.fields, this.includeFields, this.from, this.take); + this.connectionId, + this.name, + this.externalId, + this.search, + this.fields, + this.includeFields, + this.from, + this.take); } @java.lang.Override @@ -175,6 +201,8 @@ public static final class Builder { private OptionalNullable externalId = OptionalNullable.absent(); + private OptionalNullable search = OptionalNullable.absent(); + private OptionalNullable fields = OptionalNullable.absent(); private OptionalNullable includeFields = OptionalNullable.absent(); @@ -192,6 +220,7 @@ public Builder from(ListGroupsRequestParameters other) { connectionId(other.getConnectionId()); name(other.getName()); externalId(other.getExternalId()); + search(other.getSearch()); fields(other.getFields()); includeFields(other.getIncludeFields()); from(other.getFrom()); @@ -301,6 +330,40 @@ public Builder externalId(com.auth0.client.mgmt.core.Nullable externalId return this; } + /** + *

Search for groups by name or external ID.

+ */ + @JsonSetter(value = "search", nulls = Nulls.SKIP) + public Builder search(@Nullable OptionalNullable search) { + this.search = search; + return this; + } + + public Builder search(String search) { + this.search = OptionalNullable.of(search); + return this; + } + + public Builder search(Optional search) { + if (search.isPresent()) { + this.search = OptionalNullable.of(search.get()); + } else { + this.search = OptionalNullable.absent(); + } + return this; + } + + public Builder search(com.auth0.client.mgmt.core.Nullable search) { + if (search.isNull()) { + this.search = OptionalNullable.ofNull(); + } else if (search.isEmpty()) { + this.search = OptionalNullable.absent(); + } else { + this.search = OptionalNullable.of(search.get()); + } + return this; + } + /** *

A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields

*/ @@ -407,7 +470,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } @@ -439,7 +502,7 @@ public Builder take(com.auth0.client.mgmt.core.Nullable take) { public ListGroupsRequestParameters build() { return new ListGroupsRequestParameters( - connectionId, name, externalId, fields, includeFields, from, take, additionalProperties); + connectionId, name, externalId, search, fields, includeFields, from, take, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListHooksRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListHooksRequestParameters.java index d136b43eb..ed25b0781 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListHooksRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListHooksRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListHooksRequestParameters.Builder.class) @@ -58,6 +58,9 @@ private ListHooksRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -66,6 +69,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -74,6 +80,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -177,7 +186,7 @@ public Builder from(ListHooksRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -196,7 +205,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -211,7 +220,7 @@ public Builder page(Nullable page) { *

Number of results per page.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -230,7 +239,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -245,7 +254,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -264,7 +273,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { @@ -279,7 +288,7 @@ public Builder includeTotals(Nullable includeTotals) { *

Optional filter on whether a hook is enabled (true) or disabled (false).

*/ @JsonSetter(value = "enabled", nulls = Nulls.SKIP) - public Builder enabled(@org.jetbrains.annotations.Nullable OptionalNullable enabled) { + public Builder enabled(@Nullable OptionalNullable enabled) { this.enabled = enabled; return this; } @@ -298,7 +307,7 @@ public Builder enabled(Optional enabled) { return this; } - public Builder enabled(Nullable enabled) { + public Builder enabled(com.auth0.client.mgmt.core.Nullable enabled) { if (enabled.isNull()) { this.enabled = OptionalNullable.ofNull(); } else if (enabled.isEmpty()) { @@ -313,7 +322,7 @@ public Builder enabled(Nullable enabled) { *

Comma-separated list of fields to include in the result. Leave empty to retrieve all fields.

*/ @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public Builder fields(@org.jetbrains.annotations.Nullable OptionalNullable fields) { + public Builder fields(@Nullable OptionalNullable fields) { this.fields = fields; return this; } @@ -332,7 +341,7 @@ public Builder fields(Optional fields) { return this; } - public Builder fields(Nullable fields) { + public Builder fields(com.auth0.client.mgmt.core.Nullable fields) { if (fields.isNull()) { this.fields = OptionalNullable.ofNull(); } else if (fields.isEmpty()) { @@ -347,7 +356,7 @@ public Builder fields(Nullable fields) { *

Retrieves hooks that match the trigger

*/ @JsonSetter(value = "triggerId", nulls = Nulls.SKIP) - public Builder triggerId(@org.jetbrains.annotations.Nullable OptionalNullable triggerId) { + public Builder triggerId(@Nullable OptionalNullable triggerId) { this.triggerId = triggerId; return this; } @@ -366,7 +375,7 @@ public Builder triggerId(Optional triggerId) { return this; } - public Builder triggerId(Nullable triggerId) { + public Builder triggerId(com.auth0.client.mgmt.core.Nullable triggerId) { if (triggerId.isNull()) { this.triggerId = OptionalNullable.ofNull(); } else if (triggerId.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListLogsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListLogsRequestParameters.java index 2dccbf060..ba25c6f20 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListLogsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListLogsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListLogsRequestParameters.Builder.class) @@ -62,6 +62,9 @@ private ListLogsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -70,6 +73,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -111,6 +117,9 @@ public OptionalNullable getIncludeFields() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -199,7 +208,7 @@ public Builder from(ListLogsRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -218,7 +227,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -233,7 +242,7 @@ public Builder page(Nullable page) { *

Number of results per page. Paging is disabled if parameter not sent. Default: 50. Max value: 100

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -252,7 +261,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -267,7 +276,7 @@ public Builder perPage(Nullable perPage) { *

Field to use for sorting appended with :1 for ascending and :-1 for descending. e.g. date:-1

*/ @JsonSetter(value = "sort", nulls = Nulls.SKIP) - public Builder sort(@org.jetbrains.annotations.Nullable OptionalNullable sort) { + public Builder sort(@Nullable OptionalNullable sort) { this.sort = sort; return this; } @@ -286,7 +295,7 @@ public Builder sort(Optional sort) { return this; } - public Builder sort(Nullable sort) { + public Builder sort(com.auth0.client.mgmt.core.Nullable sort) { if (sort.isNull()) { this.sort = OptionalNullable.ofNull(); } else if (sort.isEmpty()) { @@ -301,7 +310,7 @@ public Builder sort(Nullable sort) { *

Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.

*/ @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public Builder fields(@org.jetbrains.annotations.Nullable OptionalNullable fields) { + public Builder fields(@Nullable OptionalNullable fields) { this.fields = fields; return this; } @@ -320,7 +329,7 @@ public Builder fields(Optional fields) { return this; } - public Builder fields(Nullable fields) { + public Builder fields(com.auth0.client.mgmt.core.Nullable fields) { if (fields.isNull()) { this.fields = OptionalNullable.ofNull(); } else if (fields.isEmpty()) { @@ -335,7 +344,7 @@ public Builder fields(Nullable fields) { *

Whether specified fields are to be included (true) or excluded (false)

*/ @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) - public Builder includeFields(@org.jetbrains.annotations.Nullable OptionalNullable includeFields) { + public Builder includeFields(@Nullable OptionalNullable includeFields) { this.includeFields = includeFields; return this; } @@ -354,7 +363,7 @@ public Builder includeFields(Optional includeFields) { return this; } - public Builder includeFields(Nullable includeFields) { + public Builder includeFields(com.auth0.client.mgmt.core.Nullable includeFields) { if (includeFields.isNull()) { this.includeFields = OptionalNullable.ofNull(); } else if (includeFields.isEmpty()) { @@ -369,7 +378,7 @@ public Builder includeFields(Nullable includeFields) { *

Return results as an array when false (default). Return results inside an object that also contains a total result count when true.

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -388,7 +397,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { @@ -405,7 +414,7 @@ public Builder includeTotals(Nullable includeTotals) { * Values specified without quotes are matched using a case insensitive 'starts with' search. If quotes are used a case insensitve exact search is used. If multiple fields are used, the AND operator is used to join the clauses.

*/ @JsonSetter(value = "search", nulls = Nulls.SKIP) - public Builder search(@org.jetbrains.annotations.Nullable OptionalNullable search) { + public Builder search(@Nullable OptionalNullable search) { this.search = search; return this; } @@ -424,7 +433,7 @@ public Builder search(Optional search) { return this; } - public Builder search(Nullable search) { + public Builder search(com.auth0.client.mgmt.core.Nullable search) { if (search.isNull()) { this.search = OptionalNullable.ofNull(); } else if (search.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsRequestParameters.java index 85fb5d02f..022fbef64 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListNetworkAclsRequestParameters.Builder.class) @@ -46,6 +46,9 @@ private ListNetworkAclsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -54,6 +57,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -62,6 +68,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -118,7 +127,7 @@ public Builder from(ListNetworkAclsRequestParameters other) { *

Use this field to request a specific page of the list results.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -137,7 +146,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -152,7 +161,7 @@ public Builder page(Nullable page) { *

The amount of results per page.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -171,7 +180,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -186,7 +195,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -205,7 +214,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsRequestParameters.java index 30c6c4e61..17ae4f5ba 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsRequestParameters.java @@ -57,6 +57,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -159,7 +162,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ListResourceServerRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListResourceServerRequestParameters.java index 02964f2b3..40f6d3a75 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListResourceServerRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListResourceServerRequestParameters.java @@ -67,6 +67,9 @@ public Optional> getIdentifiers() { */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -75,6 +78,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -83,6 +89,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -191,7 +200,7 @@ public Builder identifiers(String identifiers) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -225,7 +234,7 @@ public Builder page(com.auth0.client.mgmt.core.Nullable page) { *

Number of results per page.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -259,7 +268,7 @@ public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ListRolesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListRolesRequestParameters.java index d03379b94..7dd16a6db 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListRolesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListRolesRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListRolesRequestParameters.Builder.class) @@ -50,6 +50,9 @@ private ListRolesRequestParameters( */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -58,6 +61,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -66,6 +72,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -139,7 +148,7 @@ public Builder from(ListRolesRequestParameters other) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -158,7 +167,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -173,7 +182,7 @@ public Builder perPage(Nullable perPage) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -192,7 +201,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -207,7 +216,7 @@ public Builder page(Nullable page) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -226,7 +235,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { @@ -241,7 +250,7 @@ public Builder includeTotals(Nullable includeTotals) { *

Optional filter on name (case-insensitive).

*/ @JsonSetter(value = "name_filter", nulls = Nulls.SKIP) - public Builder nameFilter(@org.jetbrains.annotations.Nullable OptionalNullable nameFilter) { + public Builder nameFilter(@Nullable OptionalNullable nameFilter) { this.nameFilter = nameFilter; return this; } @@ -260,7 +269,7 @@ public Builder nameFilter(Optional nameFilter) { return this; } - public Builder nameFilter(Nullable nameFilter) { + public Builder nameFilter(com.auth0.client.mgmt.core.Nullable nameFilter) { if (nameFilter.isNull()) { this.nameFilter = OptionalNullable.ofNull(); } else if (nameFilter.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListRulesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListRulesRequestParameters.java index 84fe0e4b0..821adfc61 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListRulesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListRulesRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListRulesRequestParameters.Builder.class) @@ -58,6 +58,9 @@ private ListRulesRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -66,6 +69,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -74,6 +80,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -177,7 +186,7 @@ public Builder from(ListRulesRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -196,7 +205,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -211,7 +220,7 @@ public Builder page(Nullable page) { *

Number of results per page.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -230,7 +239,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -245,7 +254,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -264,7 +273,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { @@ -279,7 +288,7 @@ public Builder includeTotals(Nullable includeTotals) { *

Optional filter on whether a rule is enabled (true) or disabled (false).

*/ @JsonSetter(value = "enabled", nulls = Nulls.SKIP) - public Builder enabled(@org.jetbrains.annotations.Nullable OptionalNullable enabled) { + public Builder enabled(@Nullable OptionalNullable enabled) { this.enabled = enabled; return this; } @@ -298,7 +307,7 @@ public Builder enabled(Optional enabled) { return this; } - public Builder enabled(Nullable enabled) { + public Builder enabled(com.auth0.client.mgmt.core.Nullable enabled) { if (enabled.isNull()) { this.enabled = OptionalNullable.ofNull(); } else if (enabled.isEmpty()) { @@ -313,7 +322,7 @@ public Builder enabled(Nullable enabled) { *

Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.

*/ @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public Builder fields(@org.jetbrains.annotations.Nullable OptionalNullable fields) { + public Builder fields(@Nullable OptionalNullable fields) { this.fields = fields; return this; } @@ -332,7 +341,7 @@ public Builder fields(Optional fields) { return this; } - public Builder fields(Nullable fields) { + public Builder fields(com.auth0.client.mgmt.core.Nullable fields) { if (fields.isNull()) { this.fields = OptionalNullable.ofNull(); } else if (fields.isEmpty()) { @@ -347,7 +356,7 @@ public Builder fields(Nullable fields) { *

Whether specified fields are to be included (true) or excluded (false).

*/ @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) - public Builder includeFields(@org.jetbrains.annotations.Nullable OptionalNullable includeFields) { + public Builder includeFields(@Nullable OptionalNullable includeFields) { this.includeFields = includeFields; return this; } @@ -366,7 +375,7 @@ public Builder includeFields(Optional includeFields) { return this; } - public Builder includeFields(Nullable includeFields) { + public Builder includeFields(com.auth0.client.mgmt.core.Nullable includeFields) { if (includeFields.isNull()) { this.includeFields = OptionalNullable.ofNull(); } else if (includeFields.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesRequestParameters.java index 3a9db2691..ebd851fde 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListSelfServiceProfilesRequestParameters.Builder.class) @@ -46,6 +46,9 @@ private ListSelfServiceProfilesRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -54,6 +57,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -62,6 +68,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -119,7 +128,7 @@ public Builder from(ListSelfServiceProfilesRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -138,7 +147,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -153,7 +162,7 @@ public Builder page(Nullable page) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -172,7 +181,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -187,7 +196,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -206,7 +215,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileRequestParameters.java index 885ffe028..d4c57394c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -139,7 +142,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 5.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsRequestParameters.java index cffb8c398..df0d014e8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListUserGrantsRequestParameters.Builder.class) @@ -58,6 +58,9 @@ private ListUserGrantsRequestParameters( */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -66,6 +69,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -74,6 +80,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -177,7 +186,7 @@ public Builder from(ListUserGrantsRequestParameters other) { *

Number of results per page.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -196,7 +205,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -211,7 +220,7 @@ public Builder perPage(Nullable perPage) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -230,7 +239,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -245,7 +254,7 @@ public Builder page(Nullable page) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -264,7 +273,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { @@ -279,7 +288,7 @@ public Builder includeTotals(Nullable includeTotals) { *

user_id of the grants to retrieve.

*/ @JsonSetter(value = "user_id", nulls = Nulls.SKIP) - public Builder userId(@org.jetbrains.annotations.Nullable OptionalNullable userId) { + public Builder userId(@Nullable OptionalNullable userId) { this.userId = userId; return this; } @@ -298,7 +307,7 @@ public Builder userId(Optional userId) { return this; } - public Builder userId(Nullable userId) { + public Builder userId(com.auth0.client.mgmt.core.Nullable userId) { if (userId.isNull()) { this.userId = OptionalNullable.ofNull(); } else if (userId.isEmpty()) { @@ -313,7 +322,7 @@ public Builder userId(Nullable userId) { *

client_id of the grants to retrieve.

*/ @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(@org.jetbrains.annotations.Nullable OptionalNullable clientId) { + public Builder clientId(@Nullable OptionalNullable clientId) { this.clientId = clientId; return this; } @@ -332,7 +341,7 @@ public Builder clientId(Optional clientId) { return this; } - public Builder clientId(Nullable clientId) { + public Builder clientId(com.auth0.client.mgmt.core.Nullable clientId) { if (clientId.isNull()) { this.clientId = OptionalNullable.ofNull(); } else if (clientId.isEmpty()) { @@ -347,7 +356,7 @@ public Builder clientId(Nullable clientId) { *

audience of the grants to retrieve.

*/ @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public Builder audience(@org.jetbrains.annotations.Nullable OptionalNullable audience) { + public Builder audience(@Nullable OptionalNullable audience) { this.audience = audience; return this; } @@ -366,7 +375,7 @@ public Builder audience(Optional audience) { return this; } - public Builder audience(Nullable audience) { + public Builder audience(com.auth0.client.mgmt.core.Nullable audience) { if (audience.isNull()) { this.audience = OptionalNullable.ofNull(); } else if (audience.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java index b5fbe4eaf..4e737df5c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListUsersRequestParameters.Builder.class) @@ -74,6 +74,9 @@ private ListUsersRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -82,6 +85,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -90,6 +96,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -263,7 +272,7 @@ public Builder from(ListUsersRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -282,7 +291,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -297,7 +306,7 @@ public Builder page(Nullable page) { *

Number of results per page.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -316,7 +325,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -331,7 +340,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -350,7 +359,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { @@ -365,7 +374,7 @@ public Builder includeTotals(Nullable includeTotals) { *

Field to sort by. Use field:order where order is 1 for ascending and -1 for descending. e.g. created_at:1

*/ @JsonSetter(value = "sort", nulls = Nulls.SKIP) - public Builder sort(@org.jetbrains.annotations.Nullable OptionalNullable sort) { + public Builder sort(@Nullable OptionalNullable sort) { this.sort = sort; return this; } @@ -384,7 +393,7 @@ public Builder sort(Optional sort) { return this; } - public Builder sort(Nullable sort) { + public Builder sort(com.auth0.client.mgmt.core.Nullable sort) { if (sort.isNull()) { this.sort = OptionalNullable.ofNull(); } else if (sort.isEmpty()) { @@ -399,7 +408,7 @@ public Builder sort(Nullable sort) { *

Connection filter. Only applies when using search_engine=v1. To filter by connection with search_engine=v2|v3, use q=identities.connection:"connection_name"

*/ @JsonSetter(value = "connection", nulls = Nulls.SKIP) - public Builder connection(@org.jetbrains.annotations.Nullable OptionalNullable connection) { + public Builder connection(@Nullable OptionalNullable connection) { this.connection = connection; return this; } @@ -418,7 +427,7 @@ public Builder connection(Optional connection) { return this; } - public Builder connection(Nullable connection) { + public Builder connection(com.auth0.client.mgmt.core.Nullable connection) { if (connection.isNull()) { this.connection = OptionalNullable.ofNull(); } else if (connection.isEmpty()) { @@ -433,7 +442,7 @@ public Builder connection(Nullable connection) { *

Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.

*/ @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public Builder fields(@org.jetbrains.annotations.Nullable OptionalNullable fields) { + public Builder fields(@Nullable OptionalNullable fields) { this.fields = fields; return this; } @@ -452,7 +461,7 @@ public Builder fields(Optional fields) { return this; } - public Builder fields(Nullable fields) { + public Builder fields(com.auth0.client.mgmt.core.Nullable fields) { if (fields.isNull()) { this.fields = OptionalNullable.ofNull(); } else if (fields.isEmpty()) { @@ -467,7 +476,7 @@ public Builder fields(Nullable fields) { *

Whether specified fields are to be included (true) or excluded (false).

*/ @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) - public Builder includeFields(@org.jetbrains.annotations.Nullable OptionalNullable includeFields) { + public Builder includeFields(@Nullable OptionalNullable includeFields) { this.includeFields = includeFields; return this; } @@ -486,7 +495,7 @@ public Builder includeFields(Optional includeFields) { return this; } - public Builder includeFields(Nullable includeFields) { + public Builder includeFields(com.auth0.client.mgmt.core.Nullable includeFields) { if (includeFields.isNull()) { this.includeFields = OptionalNullable.ofNull(); } else if (includeFields.isEmpty()) { @@ -501,7 +510,7 @@ public Builder includeFields(Nullable includeFields) { *

Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields.

*/ @JsonSetter(value = "q", nulls = Nulls.SKIP) - public Builder q(@org.jetbrains.annotations.Nullable OptionalNullable q) { + public Builder q(@Nullable OptionalNullable q) { this.q = q; return this; } @@ -520,7 +529,7 @@ public Builder q(Optional q) { return this; } - public Builder q(Nullable q) { + public Builder q(com.auth0.client.mgmt.core.Nullable q) { if (q.isNull()) { this.q = OptionalNullable.ofNull(); } else if (q.isEmpty()) { @@ -535,8 +544,7 @@ public Builder q(Nullable q) { *

The version of the search engine

*/ @JsonSetter(value = "search_engine", nulls = Nulls.SKIP) - public Builder searchEngine( - @org.jetbrains.annotations.Nullable OptionalNullable searchEngine) { + public Builder searchEngine(@Nullable OptionalNullable searchEngine) { this.searchEngine = searchEngine; return this; } @@ -555,7 +563,7 @@ public Builder searchEngine(Optional searchEngine) { return this; } - public Builder searchEngine(Nullable searchEngine) { + public Builder searchEngine(com.auth0.client.mgmt.core.Nullable searchEngine) { if (searchEngine.isNull()) { this.searchEngine = OptionalNullable.ofNull(); } else if (searchEngine.isEmpty()) { @@ -570,7 +578,7 @@ public Builder searchEngine(Nullable searchEngine) { *

If true (default), results are returned in a deterministic order. If false, results may be returned in a non-deterministic order, which can enhance performance for complex queries targeting a small number of users. Set to false only when consistent ordering and pagination is not required.

*/ @JsonSetter(value = "primary_order", nulls = Nulls.SKIP) - public Builder primaryOrder(@org.jetbrains.annotations.Nullable OptionalNullable primaryOrder) { + public Builder primaryOrder(@Nullable OptionalNullable primaryOrder) { this.primaryOrder = primaryOrder; return this; } @@ -589,7 +597,7 @@ public Builder primaryOrder(Optional primaryOrder) { return this; } - public Builder primaryOrder(Nullable primaryOrder) { + public Builder primaryOrder(com.auth0.client.mgmt.core.Nullable primaryOrder) { if (primaryOrder.isNull()) { this.primaryOrder = OptionalNullable.ofNull(); } else if (primaryOrder.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSinkRegionEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSinkRegionEnum.java index c2d83884c..1990ab315 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSinkRegionEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSinkRegionEnum.java @@ -7,20 +7,38 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class LogStreamEventBridgeSinkRegionEnum { + public static final LogStreamEventBridgeSinkRegionEnum AP_NORTHEAST3 = + new LogStreamEventBridgeSinkRegionEnum(Value.AP_NORTHEAST3, "ap-northeast-3"); + public static final LogStreamEventBridgeSinkRegionEnum EU_SOUTH1 = new LogStreamEventBridgeSinkRegionEnum(Value.EU_SOUTH1, "eu-south-1"); - public static final LogStreamEventBridgeSinkRegionEnum AP_NORTHEAST2 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_NORTHEAST2, "ap-northeast-2"); + public static final LogStreamEventBridgeSinkRegionEnum EU_WEST1 = + new LogStreamEventBridgeSinkRegionEnum(Value.EU_WEST1, "eu-west-1"); public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST1 = new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST1, "ap-southeast-1"); + public static final LogStreamEventBridgeSinkRegionEnum US_WEST1 = + new LogStreamEventBridgeSinkRegionEnum(Value.US_WEST1, "us-west-1"); + + public static final LogStreamEventBridgeSinkRegionEnum EU_WEST2 = + new LogStreamEventBridgeSinkRegionEnum(Value.EU_WEST2, "eu-west-2"); + + public static final LogStreamEventBridgeSinkRegionEnum AP_NORTHEAST2 = + new LogStreamEventBridgeSinkRegionEnum(Value.AP_NORTHEAST2, "ap-northeast-2"); + + public static final LogStreamEventBridgeSinkRegionEnum US_GOV_WEST1 = + new LogStreamEventBridgeSinkRegionEnum(Value.US_GOV_WEST1, "us-gov-west-1"); + + public static final LogStreamEventBridgeSinkRegionEnum US_WEST2 = + new LogStreamEventBridgeSinkRegionEnum(Value.US_WEST2, "us-west-2"); + public static final LogStreamEventBridgeSinkRegionEnum EU_SOUTH2 = new LogStreamEventBridgeSinkRegionEnum(Value.EU_SOUTH2, "eu-south-2"); - public static final LogStreamEventBridgeSinkRegionEnum AP_NORTHEAST3 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_NORTHEAST3, "ap-northeast-3"); + public static final LogStreamEventBridgeSinkRegionEnum EU_WEST3 = + new LogStreamEventBridgeSinkRegionEnum(Value.EU_WEST3, "eu-west-3"); public static final LogStreamEventBridgeSinkRegionEnum AP_NORTHEAST1 = new LogStreamEventBridgeSinkRegionEnum(Value.AP_NORTHEAST1, "ap-northeast-1"); @@ -37,9 +55,6 @@ public final class LogStreamEventBridgeSinkRegionEnum { public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTH2 = new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTH2, "ap-south-2"); - public static final LogStreamEventBridgeSinkRegionEnum US_GOV_WEST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.US_GOV_WEST1, "us-gov-west-1"); - public static final LogStreamEventBridgeSinkRegionEnum CA_WEST1 = new LogStreamEventBridgeSinkRegionEnum(Value.CA_WEST1, "ca-west-1"); @@ -49,8 +64,11 @@ public final class LogStreamEventBridgeSinkRegionEnum { public static final LogStreamEventBridgeSinkRegionEnum MX_CENTRAL1 = new LogStreamEventBridgeSinkRegionEnum(Value.MX_CENTRAL1, "mx-central-1"); - public static final LogStreamEventBridgeSinkRegionEnum US_EAST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.US_EAST1, "us-east-1"); + public static final LogStreamEventBridgeSinkRegionEnum US_EAST2 = + new LogStreamEventBridgeSinkRegionEnum(Value.US_EAST2, "us-east-2"); + + public static final LogStreamEventBridgeSinkRegionEnum US_GOV_EAST1 = + new LogStreamEventBridgeSinkRegionEnum(Value.US_GOV_EAST1, "us-gov-east-1"); public static final LogStreamEventBridgeSinkRegionEnum SA_EAST1 = new LogStreamEventBridgeSinkRegionEnum(Value.SA_EAST1, "sa-east-1"); @@ -58,44 +76,38 @@ public final class LogStreamEventBridgeSinkRegionEnum { public static final LogStreamEventBridgeSinkRegionEnum AP_EAST2 = new LogStreamEventBridgeSinkRegionEnum(Value.AP_EAST2, "ap-east-2"); - public static final LogStreamEventBridgeSinkRegionEnum US_GOV_EAST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.US_GOV_EAST1, "us-gov-east-1"); - - public static final LogStreamEventBridgeSinkRegionEnum US_EAST2 = - new LogStreamEventBridgeSinkRegionEnum(Value.US_EAST2, "us-east-2"); + public static final LogStreamEventBridgeSinkRegionEnum US_EAST1 = + new LogStreamEventBridgeSinkRegionEnum(Value.US_EAST1, "us-east-1"); - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST5 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST5, "ap-southeast-5"); + public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST6 = + new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST6, "ap-southeast-6"); public static final LogStreamEventBridgeSinkRegionEnum AP_EAST1 = new LogStreamEventBridgeSinkRegionEnum(Value.AP_EAST1, "ap-east-1"); - public static final LogStreamEventBridgeSinkRegionEnum ME_CENTRAL1 = - new LogStreamEventBridgeSinkRegionEnum(Value.ME_CENTRAL1, "me-central-1"); - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST7 = new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST7, "ap-southeast-7"); - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST6 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST6, "ap-southeast-6"); - - public static final LogStreamEventBridgeSinkRegionEnum US_WEST2 = - new LogStreamEventBridgeSinkRegionEnum(Value.US_WEST2, "us-west-2"); + public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST5 = + new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST5, "ap-southeast-5"); - public static final LogStreamEventBridgeSinkRegionEnum EU_WEST3 = - new LogStreamEventBridgeSinkRegionEnum(Value.EU_WEST3, "eu-west-3"); + public static final LogStreamEventBridgeSinkRegionEnum ME_CENTRAL1 = + new LogStreamEventBridgeSinkRegionEnum(Value.ME_CENTRAL1, "me-central-1"); public static final LogStreamEventBridgeSinkRegionEnum AF_SOUTH1 = new LogStreamEventBridgeSinkRegionEnum(Value.AF_SOUTH1, "af-south-1"); - public static final LogStreamEventBridgeSinkRegionEnum EU_WEST2 = - new LogStreamEventBridgeSinkRegionEnum(Value.EU_WEST2, "eu-west-2"); + public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST3 = + new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST3, "ap-southeast-3"); + + public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST4 = + new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST4, "ap-southeast-4"); public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST2 = new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST2, "ap-southeast-2"); - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST4 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST4, "ap-southeast-4"); + public static final LogStreamEventBridgeSinkRegionEnum EU_CENTRAL2 = + new LogStreamEventBridgeSinkRegionEnum(Value.EU_CENTRAL2, "eu-central-2"); public static final LogStreamEventBridgeSinkRegionEnum EU_CENTRAL1 = new LogStreamEventBridgeSinkRegionEnum(Value.EU_CENTRAL1, "eu-central-1"); @@ -103,18 +115,6 @@ public final class LogStreamEventBridgeSinkRegionEnum { public static final LogStreamEventBridgeSinkRegionEnum IL_CENTRAL1 = new LogStreamEventBridgeSinkRegionEnum(Value.IL_CENTRAL1, "il-central-1"); - public static final LogStreamEventBridgeSinkRegionEnum US_WEST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.US_WEST1, "us-west-1"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST3 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST3, "ap-southeast-3"); - - public static final LogStreamEventBridgeSinkRegionEnum EU_CENTRAL2 = - new LogStreamEventBridgeSinkRegionEnum(Value.EU_CENTRAL2, "eu-central-2"); - - public static final LogStreamEventBridgeSinkRegionEnum EU_WEST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.EU_WEST1, "eu-west-1"); - private final Value value; private final String string; @@ -148,16 +148,28 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case AP_NORTHEAST3: + return visitor.visitApNortheast3(); case EU_SOUTH1: return visitor.visitEuSouth1(); - case AP_NORTHEAST2: - return visitor.visitApNortheast2(); + case EU_WEST1: + return visitor.visitEuWest1(); case AP_SOUTHEAST1: return visitor.visitApSoutheast1(); + case US_WEST1: + return visitor.visitUsWest1(); + case EU_WEST2: + return visitor.visitEuWest2(); + case AP_NORTHEAST2: + return visitor.visitApNortheast2(); + case US_GOV_WEST1: + return visitor.visitUsGovWest1(); + case US_WEST2: + return visitor.visitUsWest2(); case EU_SOUTH2: return visitor.visitEuSouth2(); - case AP_NORTHEAST3: - return visitor.visitApNortheast3(); + case EU_WEST3: + return visitor.visitEuWest3(); case AP_NORTHEAST1: return visitor.visitApNortheast1(); case AP_SOUTH1: @@ -168,58 +180,46 @@ public T visit(Visitor visitor) { return visitor.visitEuNorth1(); case AP_SOUTH2: return visitor.visitApSouth2(); - case US_GOV_WEST1: - return visitor.visitUsGovWest1(); case CA_WEST1: return visitor.visitCaWest1(); case ME_SOUTH1: return visitor.visitMeSouth1(); case MX_CENTRAL1: return visitor.visitMxCentral1(); - case US_EAST1: - return visitor.visitUsEast1(); + case US_EAST2: + return visitor.visitUsEast2(); + case US_GOV_EAST1: + return visitor.visitUsGovEast1(); case SA_EAST1: return visitor.visitSaEast1(); case AP_EAST2: return visitor.visitApEast2(); - case US_GOV_EAST1: - return visitor.visitUsGovEast1(); - case US_EAST2: - return visitor.visitUsEast2(); - case AP_SOUTHEAST5: - return visitor.visitApSoutheast5(); + case US_EAST1: + return visitor.visitUsEast1(); + case AP_SOUTHEAST6: + return visitor.visitApSoutheast6(); case AP_EAST1: return visitor.visitApEast1(); - case ME_CENTRAL1: - return visitor.visitMeCentral1(); case AP_SOUTHEAST7: return visitor.visitApSoutheast7(); - case AP_SOUTHEAST6: - return visitor.visitApSoutheast6(); - case US_WEST2: - return visitor.visitUsWest2(); - case EU_WEST3: - return visitor.visitEuWest3(); + case AP_SOUTHEAST5: + return visitor.visitApSoutheast5(); + case ME_CENTRAL1: + return visitor.visitMeCentral1(); case AF_SOUTH1: return visitor.visitAfSouth1(); - case EU_WEST2: - return visitor.visitEuWest2(); - case AP_SOUTHEAST2: - return visitor.visitApSoutheast2(); + case AP_SOUTHEAST3: + return visitor.visitApSoutheast3(); case AP_SOUTHEAST4: return visitor.visitApSoutheast4(); + case AP_SOUTHEAST2: + return visitor.visitApSoutheast2(); + case EU_CENTRAL2: + return visitor.visitEuCentral2(); case EU_CENTRAL1: return visitor.visitEuCentral1(); case IL_CENTRAL1: return visitor.visitIlCentral1(); - case US_WEST1: - return visitor.visitUsWest1(); - case AP_SOUTHEAST3: - return visitor.visitApSoutheast3(); - case EU_CENTRAL2: - return visitor.visitEuCentral2(); - case EU_WEST1: - return visitor.visitEuWest1(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -229,16 +229,28 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static LogStreamEventBridgeSinkRegionEnum valueOf(String value) { switch (value) { + case "ap-northeast-3": + return AP_NORTHEAST3; case "eu-south-1": return EU_SOUTH1; - case "ap-northeast-2": - return AP_NORTHEAST2; + case "eu-west-1": + return EU_WEST1; case "ap-southeast-1": return AP_SOUTHEAST1; + case "us-west-1": + return US_WEST1; + case "eu-west-2": + return EU_WEST2; + case "ap-northeast-2": + return AP_NORTHEAST2; + case "us-gov-west-1": + return US_GOV_WEST1; + case "us-west-2": + return US_WEST2; case "eu-south-2": return EU_SOUTH2; - case "ap-northeast-3": - return AP_NORTHEAST3; + case "eu-west-3": + return EU_WEST3; case "ap-northeast-1": return AP_NORTHEAST1; case "ap-south-1": @@ -249,58 +261,46 @@ public static LogStreamEventBridgeSinkRegionEnum valueOf(String value) { return EU_NORTH1; case "ap-south-2": return AP_SOUTH2; - case "us-gov-west-1": - return US_GOV_WEST1; case "ca-west-1": return CA_WEST1; case "me-south-1": return ME_SOUTH1; case "mx-central-1": return MX_CENTRAL1; - case "us-east-1": - return US_EAST1; + case "us-east-2": + return US_EAST2; + case "us-gov-east-1": + return US_GOV_EAST1; case "sa-east-1": return SA_EAST1; case "ap-east-2": return AP_EAST2; - case "us-gov-east-1": - return US_GOV_EAST1; - case "us-east-2": - return US_EAST2; - case "ap-southeast-5": - return AP_SOUTHEAST5; + case "us-east-1": + return US_EAST1; + case "ap-southeast-6": + return AP_SOUTHEAST6; case "ap-east-1": return AP_EAST1; - case "me-central-1": - return ME_CENTRAL1; case "ap-southeast-7": return AP_SOUTHEAST7; - case "ap-southeast-6": - return AP_SOUTHEAST6; - case "us-west-2": - return US_WEST2; - case "eu-west-3": - return EU_WEST3; + case "ap-southeast-5": + return AP_SOUTHEAST5; + case "me-central-1": + return ME_CENTRAL1; case "af-south-1": return AF_SOUTH1; - case "eu-west-2": - return EU_WEST2; - case "ap-southeast-2": - return AP_SOUTHEAST2; + case "ap-southeast-3": + return AP_SOUTHEAST3; case "ap-southeast-4": return AP_SOUTHEAST4; + case "ap-southeast-2": + return AP_SOUTHEAST2; + case "eu-central-2": + return EU_CENTRAL2; case "eu-central-1": return EU_CENTRAL1; case "il-central-1": return IL_CENTRAL1; - case "us-west-1": - return US_WEST1; - case "ap-southeast-3": - return AP_SOUTHEAST3; - case "eu-central-2": - return EU_CENTRAL2; - case "eu-west-1": - return EU_WEST1; default: return new LogStreamEventBridgeSinkRegionEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridRegionEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridRegionEnum.java index daae8ad22..c405354f0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridRegionEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridRegionEnum.java @@ -7,61 +7,66 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class LogStreamEventGridRegionEnum { - public static final LogStreamEventGridRegionEnum GERMANYWESTCENTRAL = - new LogStreamEventGridRegionEnum(Value.GERMANYWESTCENTRAL, "germanywestcentral"); - public static final LogStreamEventGridRegionEnum WESTINDIA = new LogStreamEventGridRegionEnum(Value.WESTINDIA, "westindia"); public static final LogStreamEventGridRegionEnum SOUTHCENTRALUS = new LogStreamEventGridRegionEnum(Value.SOUTHCENTRALUS, "southcentralus"); + public static final LogStreamEventGridRegionEnum GERMANYWESTCENTRAL = + new LogStreamEventGridRegionEnum(Value.GERMANYWESTCENTRAL, "germanywestcentral"); + public static final LogStreamEventGridRegionEnum JAPANEAST = new LogStreamEventGridRegionEnum(Value.JAPANEAST, "japaneast"); public static final LogStreamEventGridRegionEnum KOREACENTRAL = new LogStreamEventGridRegionEnum(Value.KOREACENTRAL, "koreacentral"); - public static final LogStreamEventGridRegionEnum AUSTRALIASOUTHEAST = - new LogStreamEventGridRegionEnum(Value.AUSTRALIASOUTHEAST, "australiasoutheast"); - public static final LogStreamEventGridRegionEnum SOUTHAFRICANORTH = new LogStreamEventGridRegionEnum(Value.SOUTHAFRICANORTH, "southafricanorth"); + public static final LogStreamEventGridRegionEnum AUSTRALIASOUTHEAST = + new LogStreamEventGridRegionEnum(Value.AUSTRALIASOUTHEAST, "australiasoutheast"); + public static final LogStreamEventGridRegionEnum CANADACENTRAL = new LogStreamEventGridRegionEnum(Value.CANADACENTRAL, "canadacentral"); public static final LogStreamEventGridRegionEnum CANADAEAST = new LogStreamEventGridRegionEnum(Value.CANADAEAST, "canadaeast"); + public static final LogStreamEventGridRegionEnum BRAZILSOUTH = + new LogStreamEventGridRegionEnum(Value.BRAZILSOUTH, "brazilsouth"); + public static final LogStreamEventGridRegionEnum SOUTHINDIA = new LogStreamEventGridRegionEnum(Value.SOUTHINDIA, "southindia"); public static final LogStreamEventGridRegionEnum KOREASOUTH = new LogStreamEventGridRegionEnum(Value.KOREASOUTH, "koreasouth"); - public static final LogStreamEventGridRegionEnum BRAZILSOUTH = - new LogStreamEventGridRegionEnum(Value.BRAZILSOUTH, "brazilsouth"); - public static final LogStreamEventGridRegionEnum CENTRALINDIA = new LogStreamEventGridRegionEnum(Value.CENTRALINDIA, "centralindia"); - public static final LogStreamEventGridRegionEnum EASTUS2 = - new LogStreamEventGridRegionEnum(Value.EASTUS2, "eastus2"); - public static final LogStreamEventGridRegionEnum SOUTHEASTASIA = new LogStreamEventGridRegionEnum(Value.SOUTHEASTASIA, "southeastasia"); + public static final LogStreamEventGridRegionEnum EASTUS2 = + new LogStreamEventGridRegionEnum(Value.EASTUS2, "eastus2"); + public static final LogStreamEventGridRegionEnum AUSTRALIAEAST = new LogStreamEventGridRegionEnum(Value.AUSTRALIAEAST, "australiaeast"); + public static final LogStreamEventGridRegionEnum SWITZERLANDNORTH = + new LogStreamEventGridRegionEnum(Value.SWITZERLANDNORTH, "switzerlandnorth"); + public static final LogStreamEventGridRegionEnum EASTUS = new LogStreamEventGridRegionEnum(Value.EASTUS, "eastus"); public static final LogStreamEventGridRegionEnum FRANCECENTRAL = new LogStreamEventGridRegionEnum(Value.FRANCECENTRAL, "francecentral"); - public static final LogStreamEventGridRegionEnum SWITZERLANDNORTH = - new LogStreamEventGridRegionEnum(Value.SWITZERLANDNORTH, "switzerlandnorth"); + public static final LogStreamEventGridRegionEnum NORTHCENTRALUS = + new LogStreamEventGridRegionEnum(Value.NORTHCENTRALUS, "northcentralus"); + + public static final LogStreamEventGridRegionEnum UKWEST = new LogStreamEventGridRegionEnum(Value.UKWEST, "ukwest"); public static final LogStreamEventGridRegionEnum UAENORTH = new LogStreamEventGridRegionEnum(Value.UAENORTH, "uaenorth"); @@ -69,37 +74,32 @@ public final class LogStreamEventGridRegionEnum { public static final LogStreamEventGridRegionEnum NORTHEUROPE = new LogStreamEventGridRegionEnum(Value.NORTHEUROPE, "northeurope"); - public static final LogStreamEventGridRegionEnum NORTHCENTRALUS = - new LogStreamEventGridRegionEnum(Value.NORTHCENTRALUS, "northcentralus"); - - public static final LogStreamEventGridRegionEnum UKWEST = new LogStreamEventGridRegionEnum(Value.UKWEST, "ukwest"); + public static final LogStreamEventGridRegionEnum WESTCENTRALUS = + new LogStreamEventGridRegionEnum(Value.WESTCENTRALUS, "westcentralus"); public static final LogStreamEventGridRegionEnum NORWAYEAST = new LogStreamEventGridRegionEnum(Value.NORWAYEAST, "norwayeast"); public static final LogStreamEventGridRegionEnum WESTUS = new LogStreamEventGridRegionEnum(Value.WESTUS, "westus"); - public static final LogStreamEventGridRegionEnum WESTCENTRALUS = - new LogStreamEventGridRegionEnum(Value.WESTCENTRALUS, "westcentralus"); - - public static final LogStreamEventGridRegionEnum EASTASIA = - new LogStreamEventGridRegionEnum(Value.EASTASIA, "eastasia"); - public static final LogStreamEventGridRegionEnum AUSTRALIACENTRAL = new LogStreamEventGridRegionEnum(Value.AUSTRALIACENTRAL, "australiacentral"); public static final LogStreamEventGridRegionEnum SWEDENCENTRAL = new LogStreamEventGridRegionEnum(Value.SWEDENCENTRAL, "swedencentral"); + public static final LogStreamEventGridRegionEnum EASTASIA = + new LogStreamEventGridRegionEnum(Value.EASTASIA, "eastasia"); + + public static final LogStreamEventGridRegionEnum JAPANWEST = + new LogStreamEventGridRegionEnum(Value.JAPANWEST, "japanwest"); + public static final LogStreamEventGridRegionEnum CENTRALUS = new LogStreamEventGridRegionEnum(Value.CENTRALUS, "centralus"); public static final LogStreamEventGridRegionEnum WESTEUROPE = new LogStreamEventGridRegionEnum(Value.WESTEUROPE, "westeurope"); - public static final LogStreamEventGridRegionEnum JAPANWEST = - new LogStreamEventGridRegionEnum(Value.JAPANWEST, "japanwest"); - public static final LogStreamEventGridRegionEnum WESTUS2 = new LogStreamEventGridRegionEnum(Value.WESTUS2, "westus2"); @@ -139,70 +139,70 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case GERMANYWESTCENTRAL: - return visitor.visitGermanywestcentral(); case WESTINDIA: return visitor.visitWestindia(); case SOUTHCENTRALUS: return visitor.visitSouthcentralus(); + case GERMANYWESTCENTRAL: + return visitor.visitGermanywestcentral(); case JAPANEAST: return visitor.visitJapaneast(); case KOREACENTRAL: return visitor.visitKoreacentral(); - case AUSTRALIASOUTHEAST: - return visitor.visitAustraliasoutheast(); case SOUTHAFRICANORTH: return visitor.visitSouthafricanorth(); + case AUSTRALIASOUTHEAST: + return visitor.visitAustraliasoutheast(); case CANADACENTRAL: return visitor.visitCanadacentral(); case CANADAEAST: return visitor.visitCanadaeast(); + case BRAZILSOUTH: + return visitor.visitBrazilsouth(); case SOUTHINDIA: return visitor.visitSouthindia(); case KOREASOUTH: return visitor.visitKoreasouth(); - case BRAZILSOUTH: - return visitor.visitBrazilsouth(); case CENTRALINDIA: return visitor.visitCentralindia(); - case EASTUS2: - return visitor.visitEastus2(); case SOUTHEASTASIA: return visitor.visitSoutheastasia(); + case EASTUS2: + return visitor.visitEastus2(); case AUSTRALIAEAST: return visitor.visitAustraliaeast(); + case SWITZERLANDNORTH: + return visitor.visitSwitzerlandnorth(); case EASTUS: return visitor.visitEastus(); case FRANCECENTRAL: return visitor.visitFrancecentral(); - case SWITZERLANDNORTH: - return visitor.visitSwitzerlandnorth(); - case UAENORTH: - return visitor.visitUaenorth(); - case NORTHEUROPE: - return visitor.visitNortheurope(); case NORTHCENTRALUS: return visitor.visitNorthcentralus(); case UKWEST: return visitor.visitUkwest(); + case UAENORTH: + return visitor.visitUaenorth(); + case NORTHEUROPE: + return visitor.visitNortheurope(); + case WESTCENTRALUS: + return visitor.visitWestcentralus(); case NORWAYEAST: return visitor.visitNorwayeast(); case WESTUS: return visitor.visitWestus(); - case WESTCENTRALUS: - return visitor.visitWestcentralus(); - case EASTASIA: - return visitor.visitEastasia(); case AUSTRALIACENTRAL: return visitor.visitAustraliacentral(); case SWEDENCENTRAL: return visitor.visitSwedencentral(); + case EASTASIA: + return visitor.visitEastasia(); + case JAPANWEST: + return visitor.visitJapanwest(); case CENTRALUS: return visitor.visitCentralus(); case WESTEUROPE: return visitor.visitWesteurope(); - case JAPANWEST: - return visitor.visitJapanwest(); case WESTUS2: return visitor.visitWestus2(); case UKSOUTH: @@ -216,70 +216,70 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static LogStreamEventGridRegionEnum valueOf(String value) { switch (value) { - case "germanywestcentral": - return GERMANYWESTCENTRAL; case "westindia": return WESTINDIA; case "southcentralus": return SOUTHCENTRALUS; + case "germanywestcentral": + return GERMANYWESTCENTRAL; case "japaneast": return JAPANEAST; case "koreacentral": return KOREACENTRAL; - case "australiasoutheast": - return AUSTRALIASOUTHEAST; case "southafricanorth": return SOUTHAFRICANORTH; + case "australiasoutheast": + return AUSTRALIASOUTHEAST; case "canadacentral": return CANADACENTRAL; case "canadaeast": return CANADAEAST; + case "brazilsouth": + return BRAZILSOUTH; case "southindia": return SOUTHINDIA; case "koreasouth": return KOREASOUTH; - case "brazilsouth": - return BRAZILSOUTH; case "centralindia": return CENTRALINDIA; - case "eastus2": - return EASTUS2; case "southeastasia": return SOUTHEASTASIA; + case "eastus2": + return EASTUS2; case "australiaeast": return AUSTRALIAEAST; + case "switzerlandnorth": + return SWITZERLANDNORTH; case "eastus": return EASTUS; case "francecentral": return FRANCECENTRAL; - case "switzerlandnorth": - return SWITZERLANDNORTH; - case "uaenorth": - return UAENORTH; - case "northeurope": - return NORTHEUROPE; case "northcentralus": return NORTHCENTRALUS; case "ukwest": return UKWEST; + case "uaenorth": + return UAENORTH; + case "northeurope": + return NORTHEUROPE; + case "westcentralus": + return WESTCENTRALUS; case "norwayeast": return NORWAYEAST; case "westus": return WESTUS; - case "westcentralus": - return WESTCENTRALUS; - case "eastasia": - return EASTASIA; case "australiacentral": return AUSTRALIACENTRAL; case "swedencentral": return SWEDENCENTRAL; + case "eastasia": + return EASTASIA; + case "japanwest": + return JAPANWEST; case "centralus": return CENTRALUS; case "westeurope": return WESTEUROPE; - case "japanwest": - return JAPANWEST; case "westus2": return WESTUS2; case "uksouth": diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterGroupNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterGroupNameEnum.java index 5690aa6ca..7b844f151 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterGroupNameEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterGroupNameEnum.java @@ -7,17 +7,17 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class LogStreamFilterGroupNameEnum { - public static final LogStreamFilterGroupNameEnum AUTH_LOGIN_SUCCESS = - new LogStreamFilterGroupNameEnum(Value.AUTH_LOGIN_SUCCESS, "auth.login.success"); - public static final LogStreamFilterGroupNameEnum AUTH_LOGOUT_SUCCESS = new LogStreamFilterGroupNameEnum(Value.AUTH_LOGOUT_SUCCESS, "auth.logout.success"); + public static final LogStreamFilterGroupNameEnum SYSTEM_NOTIFICATION = + new LogStreamFilterGroupNameEnum(Value.SYSTEM_NOTIFICATION, "system.notification"); + public static final LogStreamFilterGroupNameEnum AUTH_TOKEN_EXCHANGE_FAIL = new LogStreamFilterGroupNameEnum(Value.AUTH_TOKEN_EXCHANGE_FAIL, "auth.token_exchange.fail"); - public static final LogStreamFilterGroupNameEnum SYSTEM_NOTIFICATION = - new LogStreamFilterGroupNameEnum(Value.SYSTEM_NOTIFICATION, "system.notification"); + public static final LogStreamFilterGroupNameEnum MANAGEMENT_FAIL = + new LogStreamFilterGroupNameEnum(Value.MANAGEMENT_FAIL, "management.fail"); public static final LogStreamFilterGroupNameEnum ACTIONS = new LogStreamFilterGroupNameEnum(Value.ACTIONS, "actions"); @@ -25,8 +25,8 @@ public final class LogStreamFilterGroupNameEnum { public static final LogStreamFilterGroupNameEnum AUTH_SILENT_AUTH_FAIL = new LogStreamFilterGroupNameEnum(Value.AUTH_SILENT_AUTH_FAIL, "auth.silent_auth.fail"); - public static final LogStreamFilterGroupNameEnum MANAGEMENT_FAIL = - new LogStreamFilterGroupNameEnum(Value.MANAGEMENT_FAIL, "management.fail"); + public static final LogStreamFilterGroupNameEnum AUTH_LOGOUT_FAIL = + new LogStreamFilterGroupNameEnum(Value.AUTH_LOGOUT_FAIL, "auth.logout.fail"); public static final LogStreamFilterGroupNameEnum AUTH_TOKEN_EXCHANGE_SUCCESS = new LogStreamFilterGroupNameEnum(Value.AUTH_TOKEN_EXCHANGE_SUCCESS, "auth.token_exchange.success"); @@ -34,15 +34,18 @@ public final class LogStreamFilterGroupNameEnum { public static final LogStreamFilterGroupNameEnum USER_NOTIFICATION = new LogStreamFilterGroupNameEnum(Value.USER_NOTIFICATION, "user.notification"); + public static final LogStreamFilterGroupNameEnum AUTH_LOGIN_SUCCESS = + new LogStreamFilterGroupNameEnum(Value.AUTH_LOGIN_SUCCESS, "auth.login.success"); + public static final LogStreamFilterGroupNameEnum AUTH_SILENT_AUTH_SUCCESS = new LogStreamFilterGroupNameEnum(Value.AUTH_SILENT_AUTH_SUCCESS, "auth.silent_auth.success"); - public static final LogStreamFilterGroupNameEnum AUTH_LOGOUT_FAIL = - new LogStreamFilterGroupNameEnum(Value.AUTH_LOGOUT_FAIL, "auth.logout.fail"); - public static final LogStreamFilterGroupNameEnum MANAGEMENT_SUCCESS = new LogStreamFilterGroupNameEnum(Value.MANAGEMENT_SUCCESS, "management.success"); + public static final LogStreamFilterGroupNameEnum SCIM_EVENT = + new LogStreamFilterGroupNameEnum(Value.SCIM_EVENT, "scim.event"); + public static final LogStreamFilterGroupNameEnum OTHER = new LogStreamFilterGroupNameEnum(Value.OTHER, "other"); public static final LogStreamFilterGroupNameEnum AUTH_SIGNUP_FAIL = @@ -51,8 +54,8 @@ public final class LogStreamFilterGroupNameEnum { public static final LogStreamFilterGroupNameEnum AUTH_SIGNUP_SUCCESS = new LogStreamFilterGroupNameEnum(Value.AUTH_SIGNUP_SUCCESS, "auth.signup.success"); - public static final LogStreamFilterGroupNameEnum SCIM_EVENT = - new LogStreamFilterGroupNameEnum(Value.SCIM_EVENT, "scim.event"); + public static final LogStreamFilterGroupNameEnum USER_FAIL = + new LogStreamFilterGroupNameEnum(Value.USER_FAIL, "user.fail"); public static final LogStreamFilterGroupNameEnum AUTH_LOGIN_FAIL = new LogStreamFilterGroupNameEnum(Value.AUTH_LOGIN_FAIL, "auth.login.fail"); @@ -60,9 +63,6 @@ public final class LogStreamFilterGroupNameEnum { public static final LogStreamFilterGroupNameEnum AUTH_LOGIN_NOTIFICATION = new LogStreamFilterGroupNameEnum(Value.AUTH_LOGIN_NOTIFICATION, "auth.login.notification"); - public static final LogStreamFilterGroupNameEnum USER_FAIL = - new LogStreamFilterGroupNameEnum(Value.USER_FAIL, "user.fail"); - public static final LogStreamFilterGroupNameEnum USER_SUCCESS = new LogStreamFilterGroupNameEnum(Value.USER_SUCCESS, "user.success"); @@ -99,44 +99,44 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case AUTH_LOGIN_SUCCESS: - return visitor.visitAuthLoginSuccess(); case AUTH_LOGOUT_SUCCESS: return visitor.visitAuthLogoutSuccess(); - case AUTH_TOKEN_EXCHANGE_FAIL: - return visitor.visitAuthTokenExchangeFail(); case SYSTEM_NOTIFICATION: return visitor.visitSystemNotification(); + case AUTH_TOKEN_EXCHANGE_FAIL: + return visitor.visitAuthTokenExchangeFail(); + case MANAGEMENT_FAIL: + return visitor.visitManagementFail(); case ACTIONS: return visitor.visitActions(); case AUTH_SILENT_AUTH_FAIL: return visitor.visitAuthSilentAuthFail(); - case MANAGEMENT_FAIL: - return visitor.visitManagementFail(); + case AUTH_LOGOUT_FAIL: + return visitor.visitAuthLogoutFail(); case AUTH_TOKEN_EXCHANGE_SUCCESS: return visitor.visitAuthTokenExchangeSuccess(); case USER_NOTIFICATION: return visitor.visitUserNotification(); + case AUTH_LOGIN_SUCCESS: + return visitor.visitAuthLoginSuccess(); case AUTH_SILENT_AUTH_SUCCESS: return visitor.visitAuthSilentAuthSuccess(); - case AUTH_LOGOUT_FAIL: - return visitor.visitAuthLogoutFail(); case MANAGEMENT_SUCCESS: return visitor.visitManagementSuccess(); + case SCIM_EVENT: + return visitor.visitScimEvent(); case OTHER: return visitor.visitOther(); case AUTH_SIGNUP_FAIL: return visitor.visitAuthSignupFail(); case AUTH_SIGNUP_SUCCESS: return visitor.visitAuthSignupSuccess(); - case SCIM_EVENT: - return visitor.visitScimEvent(); + case USER_FAIL: + return visitor.visitUserFail(); case AUTH_LOGIN_FAIL: return visitor.visitAuthLoginFail(); case AUTH_LOGIN_NOTIFICATION: return visitor.visitAuthLoginNotification(); - case USER_FAIL: - return visitor.visitUserFail(); case USER_SUCCESS: return visitor.visitUserSuccess(); case UNKNOWN: @@ -148,44 +148,44 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static LogStreamFilterGroupNameEnum valueOf(String value) { switch (value) { - case "auth.login.success": - return AUTH_LOGIN_SUCCESS; case "auth.logout.success": return AUTH_LOGOUT_SUCCESS; - case "auth.token_exchange.fail": - return AUTH_TOKEN_EXCHANGE_FAIL; case "system.notification": return SYSTEM_NOTIFICATION; + case "auth.token_exchange.fail": + return AUTH_TOKEN_EXCHANGE_FAIL; + case "management.fail": + return MANAGEMENT_FAIL; case "actions": return ACTIONS; case "auth.silent_auth.fail": return AUTH_SILENT_AUTH_FAIL; - case "management.fail": - return MANAGEMENT_FAIL; + case "auth.logout.fail": + return AUTH_LOGOUT_FAIL; case "auth.token_exchange.success": return AUTH_TOKEN_EXCHANGE_SUCCESS; case "user.notification": return USER_NOTIFICATION; + case "auth.login.success": + return AUTH_LOGIN_SUCCESS; case "auth.silent_auth.success": return AUTH_SILENT_AUTH_SUCCESS; - case "auth.logout.fail": - return AUTH_LOGOUT_FAIL; case "management.success": return MANAGEMENT_SUCCESS; + case "scim.event": + return SCIM_EVENT; case "other": return OTHER; case "auth.signup.fail": return AUTH_SIGNUP_FAIL; case "auth.signup.success": return AUTH_SIGNUP_SUCCESS; - case "scim.event": - return SCIM_EVENT; + case "user.fail": + return USER_FAIL; case "auth.login.fail": return AUTH_LOGIN_FAIL; case "auth.login.notification": return AUTH_LOGIN_NOTIFICATION; - case "user.fail": - return USER_FAIL; case "user.success": return USER_SUCCESS; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSinkPatch.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSinkPatch.java index 594e4516a..8cb1a4cbb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSinkPatch.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamSinkPatch.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = LogStreamSinkPatch.Deserializer.class) @@ -113,29 +114,48 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public LogStreamSinkPatch deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamHttpSink.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("httpEndpoint")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamHttpSink.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamDatadogSink.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("datadogApiKey") + && ((Map) value).containsKey("datadogRegion")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamDatadogSink.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSplunkSink.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("splunkDomain") + && ((Map) value).containsKey("splunkPort") + && ((Map) value).containsKey("splunkToken") + && ((Map) value).containsKey("splunkSecure")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSplunkSink.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSumoSink.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("sumoSourceAddress")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSumoSink.class)); + } catch (RuntimeException e) { + } } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSegmentSink.class)); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamMixpanelSinkPatch.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("mixpanelRegion") + && ((Map) value).containsKey("mixpanelProjectId") + && ((Map) value).containsKey("mixpanelServiceAccountUsername")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamMixpanelSinkPatch.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamStatusEnum.java index 4fb5fa90b..b8077ad96 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamStatusEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamStatusEnum.java @@ -7,10 +7,10 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class LogStreamStatusEnum { - public static final LogStreamStatusEnum PAUSED = new LogStreamStatusEnum(Value.PAUSED, "paused"); - public static final LogStreamStatusEnum SUSPENDED = new LogStreamStatusEnum(Value.SUSPENDED, "suspended"); + public static final LogStreamStatusEnum PAUSED = new LogStreamStatusEnum(Value.PAUSED, "paused"); + public static final LogStreamStatusEnum ACTIVE = new LogStreamStatusEnum(Value.ACTIVE, "active"); private final Value value; @@ -45,10 +45,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case PAUSED: - return visitor.visitPaused(); case SUSPENDED: return visitor.visitSuspended(); + case PAUSED: + return visitor.visitPaused(); case ACTIVE: return visitor.visitActive(); case UNKNOWN: @@ -60,10 +60,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static LogStreamStatusEnum valueOf(String value) { switch (value) { - case "paused": - return PAUSED; case "suspended": return SUSPENDED; + case "paused": + return PAUSED; case "active": return ACTIVE; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/OauthScope.java b/src/main/java/com/auth0/client/mgmt/types/OauthScope.java index 02f55e725..e265ac47b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/OauthScope.java +++ b/src/main/java/com/auth0/client/mgmt/types/OauthScope.java @@ -7,332 +7,407 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class OauthScope { - public static final OauthScope READ_AUTHENTICATION_METHODS = - new OauthScope(Value.READ_AUTHENTICATION_METHODS, "read:authentication_methods"); + public static final OauthScope DELETE_ACTIONS = new OauthScope(Value.DELETE_ACTIONS, "delete:actions"); - public static final OauthScope UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS = new OauthScope( - Value.UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS, "update:client_token_vault_privileged_access"); + public static final OauthScope READ_CONNECTIONS_KEYS = + new OauthScope(Value.READ_CONNECTIONS_KEYS, "read:connections_keys"); - public static final OauthScope UPDATE_USERS_APP_METADATA = - new OauthScope(Value.UPDATE_USERS_APP_METADATA, "update:users_app_metadata"); + public static final OauthScope READ_GROUPS = new OauthScope(Value.READ_GROUPS, "read:groups"); - public static final OauthScope READ_ANOMALY_BLOCKS = - new OauthScope(Value.READ_ANOMALY_BLOCKS, "read:anomaly_blocks"); + public static final OauthScope READ_ACTIONS = new OauthScope(Value.READ_ACTIONS, "read:actions"); - public static final OauthScope READ_CLIENT_SUMMARY = - new OauthScope(Value.READ_CLIENT_SUMMARY, "read:client_summary"); + public static final OauthScope DELETE_ROLE_MEMBERS = + new OauthScope(Value.DELETE_ROLE_MEMBERS, "delete:role_members"); - public static final OauthScope READ_SCIM_CONFIG = new OauthScope(Value.READ_SCIM_CONFIG, "read:scim_config"); + public static final OauthScope CREATE_CLIENT_GRANTS = + new OauthScope(Value.CREATE_CLIENT_GRANTS, "create:client_grants"); - public static final OauthScope CREATE_RULES = new OauthScope(Value.CREATE_RULES, "create:rules"); + public static final OauthScope UPDATE_TOKEN_EXCHANGE_PROFILES = + new OauthScope(Value.UPDATE_TOKEN_EXCHANGE_PROFILES, "update:token_exchange_profiles"); - public static final OauthScope UPDATE_SCIM_CONFIG = new OauthScope(Value.UPDATE_SCIM_CONFIG, "update:scim_config"); + public static final OauthScope READ_CURRENT_USER = new OauthScope(Value.READ_CURRENT_USER, "read:current_user"); - public static final OauthScope READ_PROMPTS = new OauthScope(Value.READ_PROMPTS, "read:prompts"); + public static final OauthScope READ_SCIM_TOKEN = new OauthScope(Value.READ_SCIM_TOKEN, "read:scim_token"); - public static final OauthScope CREATE_ORGANIZATION_DISCOVERY_DOMAINS = - new OauthScope(Value.CREATE_ORGANIZATION_DISCOVERY_DOMAINS, "create:organization_discovery_domains"); + public static final OauthScope UPDATE_ROLES = new OauthScope(Value.UPDATE_ROLES, "update:roles"); - public static final OauthScope CREATE_PHONE_TEMPLATES = - new OauthScope(Value.CREATE_PHONE_TEMPLATES, "create:phone_templates"); + public static final OauthScope CREATE_ORGANIZATIONS = + new OauthScope(Value.CREATE_ORGANIZATIONS, "create:organizations"); - public static final OauthScope UPDATE_PHONE_PROVIDERS = - new OauthScope(Value.UPDATE_PHONE_PROVIDERS, "update:phone_providers"); + public static final OauthScope READ_CONNECTIONS = new OauthScope(Value.READ_CONNECTIONS, "read:connections"); - public static final OauthScope CREATE_ROLES = new OauthScope(Value.CREATE_ROLES, "create:roles"); + public static final OauthScope CREATE_DIRECTORY_PROVISIONINGS = + new OauthScope(Value.CREATE_DIRECTORY_PROVISIONINGS, "create:directory_provisionings"); - public static final OauthScope DELETE_AUTHENTICATION_METHODS = - new OauthScope(Value.DELETE_AUTHENTICATION_METHODS, "delete:authentication_methods"); + public static final OauthScope DELETE_ORGANIZATIONS = + new OauthScope(Value.DELETE_ORGANIZATIONS, "delete:organizations"); - public static final OauthScope CREATE_CONNECTIONS_KEYS = - new OauthScope(Value.CREATE_CONNECTIONS_KEYS, "create:connections_keys"); + public static final OauthScope CREATE_ORGANIZATION_MEMBER_ROLES = + new OauthScope(Value.CREATE_ORGANIZATION_MEMBER_ROLES, "create:organization_member_roles"); - public static final OauthScope UPDATE_RULES = new OauthScope(Value.UPDATE_RULES, "update:rules"); + public static final OauthScope DELETE_CLIENT_GRANTS = + new OauthScope(Value.DELETE_CLIENT_GRANTS, "delete:client_grants"); - public static final OauthScope UPDATE_FLOWS_VAULT_CONNECTIONS = - new OauthScope(Value.UPDATE_FLOWS_VAULT_CONNECTIONS, "update:flows_vault_connections"); + public static final OauthScope UPDATE_CURRENT_USER_METADATA = + new OauthScope(Value.UPDATE_CURRENT_USER_METADATA, "update:current_user_metadata"); - public static final OauthScope READ_ENCRYPTION_KEYS = - new OauthScope(Value.READ_ENCRYPTION_KEYS, "read:encryption_keys"); + public static final OauthScope READ_EVENT_DELIVERIES = + new OauthScope(Value.READ_EVENT_DELIVERIES, "read:event_deliveries"); - public static final OauthScope DELETE_SESSIONS = new OauthScope(Value.DELETE_SESSIONS, "delete:sessions"); + public static final OauthScope DELETE_PHONE_PROVIDERS = + new OauthScope(Value.DELETE_PHONE_PROVIDERS, "delete:phone_providers"); - public static final OauthScope UPDATE_ACTIONS = new OauthScope(Value.UPDATE_ACTIONS, "update:actions"); + public static final OauthScope UPDATE_CLIENTS = new OauthScope(Value.UPDATE_CLIENTS, "update:clients"); - public static final OauthScope CREATE_EVENT_STREAMS = - new OauthScope(Value.CREATE_EVENT_STREAMS, "create:event_streams"); + public static final OauthScope READ_REFRESH_TOKENS = + new OauthScope(Value.READ_REFRESH_TOKENS, "read:refresh_tokens"); - public static final OauthScope DELETE_EVENT_STREAMS = - new OauthScope(Value.DELETE_EVENT_STREAMS, "delete:event_streams"); + public static final OauthScope CREATE_SSO_ACCESS_TICKETS = + new OauthScope(Value.CREATE_SSO_ACCESS_TICKETS, "create:sso_access_tickets"); - public static final OauthScope DELETE_FLOWS = new OauthScope(Value.DELETE_FLOWS, "delete:flows"); + public static final OauthScope UPDATE_EMAIL_TEMPLATES = + new OauthScope(Value.UPDATE_EMAIL_TEMPLATES, "update:email_templates"); - public static final OauthScope DELETE_PHONE_PROVIDERS = - new OauthScope(Value.DELETE_PHONE_PROVIDERS, "delete:phone_providers"); + public static final OauthScope CREATE_USERS = new OauthScope(Value.CREATE_USERS, "create:users"); - public static final OauthScope DELETE_SELF_SERVICE_PROFILES = - new OauthScope(Value.DELETE_SELF_SERVICE_PROFILES, "delete:self_service_profiles"); + public static final OauthScope READ_PHONE_TEMPLATES = + new OauthScope(Value.READ_PHONE_TEMPLATES, "read:phone_templates"); - public static final OauthScope READ_GROUP_MEMBERS = new OauthScope(Value.READ_GROUP_MEMBERS, "read:group_members"); + public static final OauthScope DELETE_GROUPS = new OauthScope(Value.DELETE_GROUPS, "delete:groups"); - public static final OauthScope CREATE_SIGNING_KEYS = - new OauthScope(Value.CREATE_SIGNING_KEYS, "create:signing_keys"); + public static final OauthScope DELETE_ORGANIZATION_CONNECTIONS = + new OauthScope(Value.DELETE_ORGANIZATION_CONNECTIONS, "delete:organization_connections"); - public static final OauthScope UPDATE_SIGNING_KEYS = - new OauthScope(Value.UPDATE_SIGNING_KEYS, "update:signing_keys"); + public static final OauthScope READ_ROLE_MEMBERS = new OauthScope(Value.READ_ROLE_MEMBERS, "read:role_members"); - public static final OauthScope CREATE_USER_TICKETS = - new OauthScope(Value.CREATE_USER_TICKETS, "create:user_tickets"); + public static final OauthScope DELETE_FEDERATED_CONNECTIONS_TOKENS = + new OauthScope(Value.DELETE_FEDERATED_CONNECTIONS_TOKENS, "delete:federated_connections_tokens"); - public static final OauthScope DELETE_GRANTS = new OauthScope(Value.DELETE_GRANTS, "delete:grants"); + public static final OauthScope READ_SELF_SERVICE_PROFILES = + new OauthScope(Value.READ_SELF_SERVICE_PROFILES, "read:self_service_profiles"); - public static final OauthScope DELETE_REFRESH_TOKENS = - new OauthScope(Value.DELETE_REFRESH_TOKENS, "delete:refresh_tokens"); + public static final OauthScope CREATE_ORGANIZATION_DISCOVERY_DOMAINS = + new OauthScope(Value.CREATE_ORGANIZATION_DISCOVERY_DOMAINS, "create:organization_discovery_domains"); - public static final OauthScope READ_RULES_CONFIGS = new OauthScope(Value.READ_RULES_CONFIGS, "read:rules_configs"); + public static final OauthScope READ_SCIM_CONFIG = new OauthScope(Value.READ_SCIM_CONFIG, "read:scim_config"); - public static final OauthScope CREATE_SELF_SERVICE_PROFILES = - new OauthScope(Value.CREATE_SELF_SERVICE_PROFILES, "create:self_service_profiles"); + public static final OauthScope UPDATE_SCIM_CONFIG = new OauthScope(Value.UPDATE_SCIM_CONFIG, "update:scim_config"); - public static final OauthScope UPDATE_REFRESH_TOKENS = - new OauthScope(Value.UPDATE_REFRESH_TOKENS, "update:refresh_tokens"); + public static final OauthScope DELETE_CLIENTS = new OauthScope(Value.DELETE_CLIENTS, "delete:clients"); - public static final OauthScope READ_USER_IDP_TOKENS = - new OauthScope(Value.READ_USER_IDP_TOKENS, "read:user_idp_tokens"); + public static final OauthScope READ_FLOWS_EXECUTIONS = + new OauthScope(Value.READ_FLOWS_EXECUTIONS, "read:flows_executions"); - public static final OauthScope READ_CUSTOM_SIGNING_KEYS = - new OauthScope(Value.READ_CUSTOM_SIGNING_KEYS, "read:custom_signing_keys"); + public static final OauthScope DELETE_AUTHENTICATION_METHODS = + new OauthScope(Value.DELETE_AUTHENTICATION_METHODS, "delete:authentication_methods"); - public static final OauthScope READ_HOOKS = new OauthScope(Value.READ_HOOKS, "read:hooks"); + public static final OauthScope CREATE_CONNECTIONS_KEYS = + new OauthScope(Value.CREATE_CONNECTIONS_KEYS, "create:connections_keys"); - public static final OauthScope CREATE_CURRENT_USER_DEVICE_CREDENTIALS = - new OauthScope(Value.CREATE_CURRENT_USER_DEVICE_CREDENTIALS, "create:current_user_device_credentials"); + public static final OauthScope DELETE_ORGANIZATION_CLIENT_GRANTS = + new OauthScope(Value.DELETE_ORGANIZATION_CLIENT_GRANTS, "delete:organization_client_grants"); - public static final OauthScope DELETE_BRANDING = new OauthScope(Value.DELETE_BRANDING, "delete:branding"); + public static final OauthScope UPDATE_SELF_SERVICE_PROFILES = + new OauthScope(Value.UPDATE_SELF_SERVICE_PROFILES, "update:self_service_profiles"); - public static final OauthScope DELETE_CLIENT_CREDENTIALS = - new OauthScope(Value.DELETE_CLIENT_CREDENTIALS, "delete:client_credentials"); + public static final OauthScope CREATE_ROLES = new OauthScope(Value.CREATE_ROLES, "create:roles"); - public static final OauthScope UPDATE_TENANT_SETTINGS = - new OauthScope(Value.UPDATE_TENANT_SETTINGS, "update:tenant_settings"); + public static final OauthScope CREATE_SIGNING_KEYS = + new OauthScope(Value.CREATE_SIGNING_KEYS, "create:signing_keys"); - public static final OauthScope READ_ORGANIZATION_INVITATIONS = - new OauthScope(Value.READ_ORGANIZATION_INVITATIONS, "read:organization_invitations"); + public static final OauthScope UPDATE_EVENT_STREAMS = + new OauthScope(Value.UPDATE_EVENT_STREAMS, "update:event_streams"); - public static final OauthScope READ_GRANTS = new OauthScope(Value.READ_GRANTS, "read:grants"); + public static final OauthScope READ_GROUP_MEMBERS = new OauthScope(Value.READ_GROUP_MEMBERS, "read:group_members"); + + public static final OauthScope UPDATE_ACTIONS = new OauthScope(Value.UPDATE_ACTIONS, "update:actions"); + + public static final OauthScope CREATE_FLOWS = new OauthScope(Value.CREATE_FLOWS, "create:flows"); + + public static final OauthScope READ_CUSTOM_SIGNING_KEYS = + new OauthScope(Value.READ_CUSTOM_SIGNING_KEYS, "read:custom_signing_keys"); + + public static final OauthScope DELETE_CLIENT_CREDENTIALS = + new OauthScope(Value.DELETE_CLIENT_CREDENTIALS, "delete:client_credentials"); public static final OauthScope DELETE_ORGANIZATION_INVITATIONS = new OauthScope(Value.DELETE_ORGANIZATION_INVITATIONS, "delete:organization_invitations"); - public static final OauthScope UPDATE_RULES_CONFIGS = - new OauthScope(Value.UPDATE_RULES_CONFIGS, "update:rules_configs"); + public static final OauthScope CREATE_ORGANIZATION_CLIENT_GRANTS = + new OauthScope(Value.CREATE_ORGANIZATION_CLIENT_GRANTS, "create:organization_client_grants"); - public static final OauthScope UPDATE_CONNECTION_PROFILES = - new OauthScope(Value.UPDATE_CONNECTION_PROFILES, "update:connection_profiles"); + public static final OauthScope READ_USER_IDP_TOKENS = + new OauthScope(Value.READ_USER_IDP_TOKENS, "read:user_idp_tokens"); - public static final OauthScope READ_GROUPS = new OauthScope(Value.READ_GROUPS, "read:groups"); + public static final OauthScope DELETE_REFRESH_TOKENS = + new OauthScope(Value.DELETE_REFRESH_TOKENS, "delete:refresh_tokens"); - public static final OauthScope DELETE_ACTIONS = new OauthScope(Value.DELETE_ACTIONS, "delete:actions"); + public static final OauthScope CREATE_SELF_SERVICE_PROFILES = + new OauthScope(Value.CREATE_SELF_SERVICE_PROFILES, "create:self_service_profiles"); - public static final OauthScope UPDATE_AUTHENTICATION_METHODS = - new OauthScope(Value.UPDATE_AUTHENTICATION_METHODS, "update:authentication_methods"); + public static final OauthScope UPDATE_USER_ATTRIBUTE_PROFILES = + new OauthScope(Value.UPDATE_USER_ATTRIBUTE_PROFILES, "update:user_attribute_profiles"); public static final OauthScope CREATE_VDCS_TEMPLATES = new OauthScope(Value.CREATE_VDCS_TEMPLATES, "create:vdcs_templates"); - public static final OauthScope READ_ATTACK_PROTECTION = - new OauthScope(Value.READ_ATTACK_PROTECTION, "read:attack_protection"); - - public static final OauthScope READ_ORGANIZATION_DISCOVERY_DOMAINS = - new OauthScope(Value.READ_ORGANIZATION_DISCOVERY_DOMAINS, "read:organization_discovery_domains"); - public static final OauthScope CREATE_CUSTOM_DOMAINS = new OauthScope(Value.CREATE_CUSTOM_DOMAINS, "create:custom_domains"); - public static final OauthScope READ_CURRENT_USER = new OauthScope(Value.READ_CURRENT_USER, "read:current_user"); + public static final OauthScope READ_ORGANIZATION_DISCOVERY_DOMAINS = + new OauthScope(Value.READ_ORGANIZATION_DISCOVERY_DOMAINS, "read:organization_discovery_domains"); - public static final OauthScope DELETE_ORGANIZATION_CONNECTIONS = - new OauthScope(Value.DELETE_ORGANIZATION_CONNECTIONS, "delete:organization_connections"); + public static final OauthScope DELETE_DIRECTORY_PROVISIONINGS = + new OauthScope(Value.DELETE_DIRECTORY_PROVISIONINGS, "delete:directory_provisionings"); public static final OauthScope READ_CLIENT_CREDENTIALS = new OauthScope(Value.READ_CLIENT_CREDENTIALS, "read:client_credentials"); - public static final OauthScope CREATE_ORGANIZATIONS = - new OauthScope(Value.CREATE_ORGANIZATIONS, "create:organizations"); + public static final OauthScope CREATE_EMAIL_PROVIDER = + new OauthScope(Value.CREATE_EMAIL_PROVIDER, "create:email_provider"); + + public static final OauthScope CREATE_SCIM_TOKEN = new OauthScope(Value.CREATE_SCIM_TOKEN, "create:scim_token"); + + public static final OauthScope READ_GUARDIAN_FACTORS = + new OauthScope(Value.READ_GUARDIAN_FACTORS, "read:guardian_factors"); + + public static final OauthScope DELETE_CONNECTION_PROFILES = + new OauthScope(Value.DELETE_CONNECTION_PROFILES, "delete:connection_profiles"); + + public static final OauthScope UPDATE_FLOWS = new OauthScope(Value.UPDATE_FLOWS, "update:flows"); public static final OauthScope READ_ORGANIZATIONS_SUMMARY = new OauthScope(Value.READ_ORGANIZATIONS_SUMMARY, "read:organizations_summary"); - public static final OauthScope DELETE_ORGANIZATIONS = - new OauthScope(Value.DELETE_ORGANIZATIONS, "delete:organizations"); + public static final OauthScope READ_SESSIONS = new OauthScope(Value.READ_SESSIONS, "read:sessions"); - public static final OauthScope READ_SCIM_TOKEN = new OauthScope(Value.READ_SCIM_TOKEN, "read:scim_token"); + public static final OauthScope CREATE_RESOURCE_SERVERS = + new OauthScope(Value.CREATE_RESOURCE_SERVERS, "create:resource_servers"); - public static final OauthScope READ_CONNECTIONS = new OauthScope(Value.READ_CONNECTIONS, "read:connections"); + public static final OauthScope CREATE_FLOWS_VAULT_CONNECTIONS = + new OauthScope(Value.CREATE_FLOWS_VAULT_CONNECTIONS, "create:flows_vault_connections"); - public static final OauthScope READ_SIGNING_KEYS = new OauthScope(Value.READ_SIGNING_KEYS, "read:signing_keys"); + public static final OauthScope READ_BRANDING = new OauthScope(Value.READ_BRANDING, "read:branding"); - public static final OauthScope DELETE_FEDERATED_CONNECTIONS_TOKENS = - new OauthScope(Value.DELETE_FEDERATED_CONNECTIONS_TOKENS, "delete:federated_connections_tokens"); + public static final OauthScope UPDATE_FORMS = new OauthScope(Value.UPDATE_FORMS, "update:forms"); - public static final OauthScope DELETE_CONNECTIONS = new OauthScope(Value.DELETE_CONNECTIONS, "delete:connections"); + public static final OauthScope UPDATE_MFA_POLICIES = + new OauthScope(Value.UPDATE_MFA_POLICIES, "update:mfa_policies"); - public static final OauthScope UPDATE_RESOURCE_SERVERS = - new OauthScope(Value.UPDATE_RESOURCE_SERVERS, "update:resource_servers"); + public static final OauthScope READ_LOGS_USERS = new OauthScope(Value.READ_LOGS_USERS, "read:logs_users"); - public static final OauthScope CREATE_USERS = new OauthScope(Value.CREATE_USERS, "create:users"); + public static final OauthScope READ_ORGANIZATION_CLIENT_GRANTS = + new OauthScope(Value.READ_ORGANIZATION_CLIENT_GRANTS, "read:organization_client_grants"); - public static final OauthScope READ_PHONE_TEMPLATES = - new OauthScope(Value.READ_PHONE_TEMPLATES, "read:phone_templates"); + public static final OauthScope READ_ROLES = new OauthScope(Value.READ_ROLES, "read:roles"); - public static final OauthScope UPDATE_ROLES = new OauthScope(Value.UPDATE_ROLES, "update:roles"); + public static final OauthScope READ_DEVICE_CREDENTIALS = + new OauthScope(Value.READ_DEVICE_CREDENTIALS, "read:device_credentials"); - public static final OauthScope CREATE_SSO_ACCESS_TICKETS = - new OauthScope(Value.CREATE_SSO_ACCESS_TICKETS, "create:sso_access_tickets"); + public static final OauthScope CREATE_ENCRYPTION_KEYS = + new OauthScope(Value.CREATE_ENCRYPTION_KEYS, "create:encryption_keys"); - public static final OauthScope DELETE_GROUPS = new OauthScope(Value.DELETE_GROUPS, "delete:groups"); + public static final OauthScope UPDATE_CURRENT_USER_IDENTITIES = + new OauthScope(Value.UPDATE_CURRENT_USER_IDENTITIES, "update:current_user_identities"); + + public static final OauthScope DELETE_FORMS = new OauthScope(Value.DELETE_FORMS, "delete:forms"); public static final OauthScope READ_SELF_SERVICE_PROFILE_CUSTOM_TEXTS = new OauthScope(Value.READ_SELF_SERVICE_PROFILE_CUSTOM_TEXTS, "read:self_service_profile_custom_texts"); - public static final OauthScope DELETE_SCIM_TOKEN = new OauthScope(Value.DELETE_SCIM_TOKEN, "delete:scim_token"); - - public static final OauthScope DELETE_FORMS = new OauthScope(Value.DELETE_FORMS, "delete:forms"); + public static final OauthScope UPDATE_ORGANIZATION_DISCOVERY_DOMAINS = + new OauthScope(Value.UPDATE_ORGANIZATION_DISCOVERY_DOMAINS, "update:organization_discovery_domains"); - public static final OauthScope READ_SELF_SERVICE_PROFILES = - new OauthScope(Value.READ_SELF_SERVICE_PROFILES, "read:self_service_profiles"); + public static final OauthScope READ_ANOMALY_BLOCKS = + new OauthScope(Value.READ_ANOMALY_BLOCKS, "read:anomaly_blocks"); - public static final OauthScope DELETE_RULES_CONFIGS = - new OauthScope(Value.DELETE_RULES_CONFIGS, "delete:rules_configs"); + public static final OauthScope UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS = new OauthScope( + Value.UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS, "update:client_token_vault_privileged_access"); public static final OauthScope CREATE_FORMS = new OauthScope(Value.CREATE_FORMS, "create:forms"); - public static final OauthScope READ_USER_ATTRIBUTE_PROFILES = - new OauthScope(Value.READ_USER_ATTRIBUTE_PROFILES, "read:user_attribute_profiles"); - - public static final OauthScope READ_DIRECTORY_PROVISIONINGS = - new OauthScope(Value.READ_DIRECTORY_PROVISIONINGS, "read:directory_provisionings"); + public static final OauthScope READ_CLIENT_SUMMARY = + new OauthScope(Value.READ_CLIENT_SUMMARY, "read:client_summary"); public static final OauthScope CREATE_AUTHENTICATION_METHODS = new OauthScope(Value.CREATE_AUTHENTICATION_METHODS, "create:authentication_methods"); - public static final OauthScope CREATE_PHONE_PROVIDERS = - new OauthScope(Value.CREATE_PHONE_PROVIDERS, "create:phone_providers"); + public static final OauthScope READ_DIRECTORY_PROVISIONINGS = + new OauthScope(Value.READ_DIRECTORY_PROVISIONINGS, "read:directory_provisionings"); - public static final OauthScope DELETE_ORGANIZATION_CLIENT_GRANTS = - new OauthScope(Value.DELETE_ORGANIZATION_CLIENT_GRANTS, "delete:organization_client_grants"); + public static final OauthScope CREATE_PHONE_PROVIDERS = + new OauthScope(Value.CREATE_PHONE_PROVIDERS, "create:phone_providers"); - public static final OauthScope CREATE_SCIM_CONFIG = new OauthScope(Value.CREATE_SCIM_CONFIG, "create:scim_config"); + public static final OauthScope CREATE_RULES = new OauthScope(Value.CREATE_RULES, "create:rules"); + + public static final OauthScope READ_EMAIL_TEMPLATES = + new OauthScope(Value.READ_EMAIL_TEMPLATES, "read:email_templates"); + + public static final OauthScope UPDATE_RULES = new OauthScope(Value.UPDATE_RULES, "update:rules"); + + public static final OauthScope UPDATE_FLOWS_VAULT_CONNECTIONS = + new OauthScope(Value.UPDATE_FLOWS_VAULT_CONNECTIONS, "update:flows_vault_connections"); + + public static final OauthScope UPDATE_PHONE_PROVIDERS = + new OauthScope(Value.UPDATE_PHONE_PROVIDERS, "update:phone_providers"); + + public static final OauthScope CREATE_EVENT_STREAMS = + new OauthScope(Value.CREATE_EVENT_STREAMS, "create:event_streams"); + + public static final OauthScope DELETE_SELF_SERVICE_PROFILES = + new OauthScope(Value.DELETE_SELF_SERVICE_PROFILES, "delete:self_service_profiles"); + + public static final OauthScope DELETE_SESSIONS = new OauthScope(Value.DELETE_SESSIONS, "delete:sessions"); public static final OauthScope CREATE_CLIENTS = new OauthScope(Value.CREATE_CLIENTS, "create:clients"); + public static final OauthScope DELETE_LOG_STREAMS = new OauthScope(Value.DELETE_LOG_STREAMS, "delete:log_streams"); + + public static final OauthScope CREATE_USER_ATTRIBUTE_PROFILES = + new OauthScope(Value.CREATE_USER_ATTRIBUTE_PROFILES, "create:user_attribute_profiles"); + public static final OauthScope UPDATE_USERS = new OauthScope(Value.UPDATE_USERS, "update:users"); - public static final OauthScope READ_ORGANIZATION_MEMBERS = - new OauthScope(Value.READ_ORGANIZATION_MEMBERS, "read:organization_members"); + public static final OauthScope READ_GRANTS = new OauthScope(Value.READ_GRANTS, "read:grants"); - public static final OauthScope UPDATE_EVENT_STREAMS = - new OauthScope(Value.UPDATE_EVENT_STREAMS, "update:event_streams"); + public static final OauthScope UPDATE_SIGNING_KEYS = + new OauthScope(Value.UPDATE_SIGNING_KEYS, "update:signing_keys"); - public static final OauthScope UPDATE_CUSTOM_SIGNING_KEYS = - new OauthScope(Value.UPDATE_CUSTOM_SIGNING_KEYS, "update:custom_signing_keys"); + public static final OauthScope CREATE_USER_TICKETS = + new OauthScope(Value.CREATE_USER_TICKETS, "create:user_tickets"); public static final OauthScope READ_LOG_STREAMS = new OauthScope(Value.READ_LOG_STREAMS, "read:log_streams"); - public static final OauthScope UPDATE_LOG_STREAMS = new OauthScope(Value.UPDATE_LOG_STREAMS, "update:log_streams"); + public static final OauthScope UPDATE_BRANDING = new OauthScope(Value.UPDATE_BRANDING, "update:branding"); + + public static final OauthScope UPDATE_CUSTOM_SIGNING_KEYS = + new OauthScope(Value.UPDATE_CUSTOM_SIGNING_KEYS, "update:custom_signing_keys"); public static final OauthScope READ_CLIENTS = new OauthScope(Value.READ_CLIENTS, "read:clients"); - public static final OauthScope DELETE_ENCRYPTION_KEYS = - new OauthScope(Value.DELETE_ENCRYPTION_KEYS, "delete:encryption_keys"); + public static final OauthScope DELETE_GRANTS = new OauthScope(Value.DELETE_GRANTS, "delete:grants"); - public static final OauthScope UPDATE_USER_ATTRIBUTE_PROFILES = - new OauthScope(Value.UPDATE_USER_ATTRIBUTE_PROFILES, "update:user_attribute_profiles"); + public static final OauthScope UPDATE_REFRESH_TOKENS = + new OauthScope(Value.UPDATE_REFRESH_TOKENS, "update:refresh_tokens"); + + public static final OauthScope UPDATE_RULES_CONFIGS = + new OauthScope(Value.UPDATE_RULES_CONFIGS, "update:rules_configs"); + + public static final OauthScope UPDATE_CUSTOM_DOMAINS = + new OauthScope(Value.UPDATE_CUSTOM_DOMAINS, "update:custom_domains"); + + public static final OauthScope READ_RULES_CONFIGS = new OauthScope(Value.READ_RULES_CONFIGS, "read:rules_configs"); + + public static final OauthScope READ_HOOKS = new OauthScope(Value.READ_HOOKS, "read:hooks"); + + public static final OauthScope CREATE_CURRENT_USER_DEVICE_CREDENTIALS = + new OauthScope(Value.CREATE_CURRENT_USER_DEVICE_CREDENTIALS, "create:current_user_device_credentials"); + + public static final OauthScope DELETE_BRANDING = new OauthScope(Value.DELETE_BRANDING, "delete:branding"); + + public static final OauthScope UPDATE_TENANT_SETTINGS = + new OauthScope(Value.UPDATE_TENANT_SETTINGS, "update:tenant_settings"); public static final OauthScope CREATE_CUSTOM_SIGNING_KEYS = new OauthScope(Value.CREATE_CUSTOM_SIGNING_KEYS, "create:custom_signing_keys"); - public static final OauthScope READ_CLIENT_KEYS = new OauthScope(Value.READ_CLIENT_KEYS, "read:client_keys"); + public static final OauthScope READ_AUTHENTICATION_METHODS = + new OauthScope(Value.READ_AUTHENTICATION_METHODS, "read:authentication_methods"); - public static final OauthScope CREATE_EMAIL_PROVIDER = - new OauthScope(Value.CREATE_EMAIL_PROVIDER, "create:email_provider"); + public static final OauthScope UPDATE_ATTACK_PROTECTION = + new OauthScope(Value.UPDATE_ATTACK_PROTECTION, "update:attack_protection"); - public static final OauthScope UPDATE_NETWORK_ACLS = - new OauthScope(Value.UPDATE_NETWORK_ACLS, "update:network_acls"); + public static final OauthScope CREATE_GUARDIAN_ENROLLMENT_TICKETS = + new OauthScope(Value.CREATE_GUARDIAN_ENROLLMENT_TICKETS, "create:guardian_enrollment_tickets"); + + public static final OauthScope DELETE_EMAIL_PROVIDER = + new OauthScope(Value.DELETE_EMAIL_PROVIDER, "delete:email_provider"); + + public static final OauthScope DELETE_CUSTOM_DOMAINS = + new OauthScope(Value.DELETE_CUSTOM_DOMAINS, "delete:custom_domains"); + + public static final OauthScope CREATE_NETWORK_ACLS = + new OauthScope(Value.CREATE_NETWORK_ACLS, "create:network_acls"); public static final OauthScope DELETE_VDCS_TEMPLATES = new OauthScope(Value.DELETE_VDCS_TEMPLATES, "delete:vdcs_templates"); + public static final OauthScope READ_EVENTS = new OauthScope(Value.READ_EVENTS, "read:events"); + public static final OauthScope READ_FLOWS = new OauthScope(Value.READ_FLOWS, "read:flows"); - public static final OauthScope READ_SESSIONS = new OauthScope(Value.READ_SESSIONS, "read:sessions"); + public static final OauthScope READ_FORMS = new OauthScope(Value.READ_FORMS, "read:forms"); - public static final OauthScope CREATE_ORGANIZATION_MEMBER_ROLES = - new OauthScope(Value.CREATE_ORGANIZATION_MEMBER_ROLES, "create:organization_member_roles"); + public static final OauthScope UPDATE_NETWORK_ACLS = + new OauthScope(Value.UPDATE_NETWORK_ACLS, "update:network_acls"); - public static final OauthScope CREATE_DIRECTORY_PROVISIONINGS = - new OauthScope(Value.CREATE_DIRECTORY_PROVISIONINGS, "create:directory_provisionings"); + public static final OauthScope UPDATE_SESSIONS = new OauthScope(Value.UPDATE_SESSIONS, "update:sessions"); + + public static final OauthScope CREATE_HOOKS = new OauthScope(Value.CREATE_HOOKS, "create:hooks"); + + public static final OauthScope READ_CLIENT_KEYS = new OauthScope(Value.READ_CLIENT_KEYS, "read:client_keys"); + + public static final OauthScope CREATE_LOG_STREAMS = new OauthScope(Value.CREATE_LOG_STREAMS, "create:log_streams"); + + public static final OauthScope READ_FEDERATED_CONNECTIONS_TOKENS = + new OauthScope(Value.READ_FEDERATED_CONNECTIONS_TOKENS, "read:federated_connections_tokens"); public static final OauthScope DELETE_ORGANIZATION_MEMBERS = new OauthScope(Value.DELETE_ORGANIZATION_MEMBERS, "delete:organization_members"); - public static final OauthScope UPDATE_FORMS = new OauthScope(Value.UPDATE_FORMS, "update:forms"); + public static final OauthScope READ_ORGANIZATION_MEMBER_ROLES = + new OauthScope(Value.READ_ORGANIZATION_MEMBER_ROLES, "read:organization_member_roles"); - public static final OauthScope CREATE_RESOURCE_SERVERS = - new OauthScope(Value.CREATE_RESOURCE_SERVERS, "create:resource_servers"); + public static final OauthScope DELETE_SCIM_CONFIG = new OauthScope(Value.DELETE_SCIM_CONFIG, "delete:scim_config"); - public static final OauthScope READ_BRANDING = new OauthScope(Value.READ_BRANDING, "read:branding"); + public static final OauthScope UPDATE_HOOKS = new OauthScope(Value.UPDATE_HOOKS, "update:hooks"); - public static final OauthScope UPDATE_MFA_POLICIES = - new OauthScope(Value.UPDATE_MFA_POLICIES, "update:mfa_policies"); + public static final OauthScope READ_MFA_POLICIES = new OauthScope(Value.READ_MFA_POLICIES, "read:mfa_policies"); - public static final OauthScope UPDATE_CURRENT_USER_METADATA = - new OauthScope(Value.UPDATE_CURRENT_USER_METADATA, "update:current_user_metadata"); + public static final OauthScope CREATE_CONNECTION_PROFILES = + new OauthScope(Value.CREATE_CONNECTION_PROFILES, "create:connection_profiles"); - public static final OauthScope READ_FLOWS_VAULT_CONNECTIONS = - new OauthScope(Value.READ_FLOWS_VAULT_CONNECTIONS, "read:flows_vault_connections"); + public static final OauthScope CREATE_ACTIONS = new OauthScope(Value.CREATE_ACTIONS, "create:actions"); - public static final OauthScope READ_ORGANIZATION_CLIENT_GRANTS = - new OauthScope(Value.READ_ORGANIZATION_CLIENT_GRANTS, "read:organization_client_grants"); + public static final OauthScope READ_CLIENT_GRANTS = new OauthScope(Value.READ_CLIENT_GRANTS, "read:client_grants"); - public static final OauthScope UPDATE_CLIENTS = new OauthScope(Value.UPDATE_CLIENTS, "update:clients"); + public static final OauthScope UPDATE_DIRECTORY_PROVISIONINGS = + new OauthScope(Value.UPDATE_DIRECTORY_PROVISIONINGS, "update:directory_provisionings"); - public static final OauthScope DELETE_CLIENT_GRANTS = - new OauthScope(Value.DELETE_CLIENT_GRANTS, "delete:client_grants"); + public static final OauthScope DELETE_USER_ATTRIBUTE_PROFILES = + new OauthScope(Value.DELETE_USER_ATTRIBUTE_PROFILES, "delete:user_attribute_profiles"); - public static final OauthScope CREATE_ENCRYPTION_KEYS = - new OauthScope(Value.CREATE_ENCRYPTION_KEYS, "create:encryption_keys"); + public static final OauthScope READ_FLOWS_VAULT_CONNECTIONS = + new OauthScope(Value.READ_FLOWS_VAULT_CONNECTIONS, "read:flows_vault_connections"); public static final OauthScope UPDATE_ENCRYPTION_KEYS = new OauthScope(Value.UPDATE_ENCRYPTION_KEYS, "update:encryption_keys"); - public static final OauthScope READ_ROLES = new OauthScope(Value.READ_ROLES, "read:roles"); - - public static final OauthScope READ_DEVICE_CREDENTIALS = - new OauthScope(Value.READ_DEVICE_CREDENTIALS, "read:device_credentials"); + public static final OauthScope UPDATE_CLIENT_KEYS = new OauthScope(Value.UPDATE_CLIENT_KEYS, "update:client_keys"); - public static final OauthScope DELETE_DIRECTORY_PROVISIONINGS = - new OauthScope(Value.DELETE_DIRECTORY_PROVISIONINGS, "delete:directory_provisionings"); + public static final OauthScope DELETE_GUARDIAN_ENROLLMENTS = + new OauthScope(Value.DELETE_GUARDIAN_ENROLLMENTS, "delete:guardian_enrollments"); public static final OauthScope DELETE_TOKEN_EXCHANGE_PROFILES = new OauthScope(Value.DELETE_TOKEN_EXCHANGE_PROFILES, "delete:token_exchange_profiles"); - public static final OauthScope UPDATE_ORGANIZATION_DISCOVERY_DOMAINS = - new OauthScope(Value.UPDATE_ORGANIZATION_DISCOVERY_DOMAINS, "update:organization_discovery_domains"); - - public static final OauthScope READ_LOGS = new OauthScope(Value.READ_LOGS, "read:logs"); - public static final OauthScope UPDATE_EMAIL_PROVIDER = new OauthScope(Value.UPDATE_EMAIL_PROVIDER, "update:email_provider"); - public static final OauthScope DELETE_FLOWS_VAULT_CONNECTIONS = - new OauthScope(Value.DELETE_FLOWS_VAULT_CONNECTIONS, "delete:flows_vault_connections"); + public static final OauthScope CREATE_ORGANIZATION_CONNECTIONS = + new OauthScope(Value.CREATE_ORGANIZATION_CONNECTIONS, "create:organization_connections"); - public static final OauthScope DELETE_NETWORK_ACLS = - new OauthScope(Value.DELETE_NETWORK_ACLS, "delete:network_acls"); + public static final OauthScope DELETE_RULES_CONFIGS = + new OauthScope(Value.DELETE_RULES_CONFIGS, "delete:rules_configs"); - public static final OauthScope UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS = - new OauthScope(Value.UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS, "update:self_service_profile_custom_texts"); + public static final OauthScope READ_USER_ATTRIBUTE_PROFILES = + new OauthScope(Value.READ_USER_ATTRIBUTE_PROFILES, "read:user_attribute_profiles"); + + public static final OauthScope READ_EMAIL_PROVIDER = + new OauthScope(Value.READ_EMAIL_PROVIDER, "read:email_provider"); + + public static final OauthScope DELETE_FLOWS_VAULT_CONNECTIONS = + new OauthScope(Value.DELETE_FLOWS_VAULT_CONNECTIONS, "delete:flows_vault_connections"); public static final OauthScope DELETE_ORGANIZATION_DISCOVERY_DOMAINS = new OauthScope(Value.DELETE_ORGANIZATION_DISCOVERY_DOMAINS, "delete:organization_discovery_domains"); @@ -340,258 +415,185 @@ public final class OauthScope { public static final OauthScope UPDATE_CLIENT_GRANTS = new OauthScope(Value.UPDATE_CLIENT_GRANTS, "update:client_grants"); - public static final OauthScope READ_EMAIL_TEMPLATES = - new OauthScope(Value.READ_EMAIL_TEMPLATES, "read:email_templates"); + public static final OauthScope DELETE_ORGANIZATION_MEMBER_ROLES = + new OauthScope(Value.DELETE_ORGANIZATION_MEMBER_ROLES, "delete:organization_member_roles"); public static final OauthScope UPDATE_VDCS_TEMPLATES = new OauthScope(Value.UPDATE_VDCS_TEMPLATES, "update:vdcs_templates"); - public static final OauthScope CREATE_USER_ATTRIBUTE_PROFILES = - new OauthScope(Value.CREATE_USER_ATTRIBUTE_PROFILES, "create:user_attribute_profiles"); + public static final OauthScope READ_ORGANIZATIONS = new OauthScope(Value.READ_ORGANIZATIONS, "read:organizations"); - public static final OauthScope CREATE_ORGANIZATION_INVITATIONS = - new OauthScope(Value.CREATE_ORGANIZATION_INVITATIONS, "create:organization_invitations"); + public static final OauthScope READ_CUSTOM_DOMAINS = + new OauthScope(Value.READ_CUSTOM_DOMAINS, "read:custom_domains"); - public static final OauthScope DELETE_LOG_STREAMS = new OauthScope(Value.DELETE_LOG_STREAMS, "delete:log_streams"); + public static final OauthScope CREATE_SCIM_CONFIG = new OauthScope(Value.CREATE_SCIM_CONFIG, "create:scim_config"); public static final OauthScope DELETE_CUSTOM_SIGNING_KEYS = new OauthScope(Value.DELETE_CUSTOM_SIGNING_KEYS, "delete:custom_signing_keys"); - public static final OauthScope DELETE_RESOURCE_SERVERS = - new OauthScope(Value.DELETE_RESOURCE_SERVERS, "delete:resource_servers"); + public static final OauthScope UPDATE_ORGANIZATIONS = + new OauthScope(Value.UPDATE_ORGANIZATIONS, "update:organizations"); + + public static final OauthScope DELETE_RULES = new OauthScope(Value.DELETE_RULES, "delete:rules"); + + public static final OauthScope READ_USERS = new OauthScope(Value.READ_USERS, "read:users"); public static final OauthScope UPDATE_GUARDIAN_FACTORS = new OauthScope(Value.UPDATE_GUARDIAN_FACTORS, "update:guardian_factors"); - public static final OauthScope DELETE_ORGANIZATION_MEMBER_ROLES = - new OauthScope(Value.DELETE_ORGANIZATION_MEMBER_ROLES, "delete:organization_member_roles"); - - public static final OauthScope READ_USERS = new OauthScope(Value.READ_USERS, "read:users"); + public static final OauthScope DELETE_FLOWS_EXECUTIONS = + new OauthScope(Value.DELETE_FLOWS_EXECUTIONS, "delete:flows_executions"); - public static final OauthScope UPDATE_BRANDING = new OauthScope(Value.UPDATE_BRANDING, "update:branding"); + public static final OauthScope READ_ORGANIZATION_MEMBERS = + new OauthScope(Value.READ_ORGANIZATION_MEMBERS, "read:organization_members"); public static final OauthScope DELETE_SSO_ACCESS_TICKETS = new OauthScope(Value.DELETE_SSO_ACCESS_TICKETS, "delete:sso_access_tickets"); - public static final OauthScope UPDATE_ORGANIZATION_CONNECTIONS = - new OauthScope(Value.UPDATE_ORGANIZATION_CONNECTIONS, "update:organization_connections"); - - public static final OauthScope UPDATE_CUSTOM_DOMAINS = - new OauthScope(Value.UPDATE_CUSTOM_DOMAINS, "update:custom_domains"); - - public static final OauthScope READ_NETWORK_ACLS = new OauthScope(Value.READ_NETWORK_ACLS, "read:network_acls"); - - public static final OauthScope DELETE_EMAIL_PROVIDER = - new OauthScope(Value.DELETE_EMAIL_PROVIDER, "delete:email_provider"); - - public static final OauthScope READ_FORMS = new OauthScope(Value.READ_FORMS, "read:forms"); + public static final OauthScope UPDATE_LOG_STREAMS = new OauthScope(Value.UPDATE_LOG_STREAMS, "update:log_streams"); - public static final OauthScope CREATE_GUARDIAN_ENROLLMENT_TICKETS = - new OauthScope(Value.CREATE_GUARDIAN_ENROLLMENT_TICKETS, "create:guardian_enrollment_tickets"); + public static final OauthScope DELETE_CURRENT_USER_DEVICE_CREDENTIALS = + new OauthScope(Value.DELETE_CURRENT_USER_DEVICE_CREDENTIALS, "delete:current_user_device_credentials"); public static final OauthScope READ_EVENT_STREAMS = new OauthScope(Value.READ_EVENT_STREAMS, "read:event_streams"); - public static final OauthScope CREATE_NETWORK_ACLS = - new OauthScope(Value.CREATE_NETWORK_ACLS, "create:network_acls"); + public static final OauthScope DELETE_ENCRYPTION_KEYS = + new OauthScope(Value.DELETE_ENCRYPTION_KEYS, "delete:encryption_keys"); - public static final OauthScope DELETE_CUSTOM_DOMAINS = - new OauthScope(Value.DELETE_CUSTOM_DOMAINS, "delete:custom_domains"); + public static final OauthScope UPDATE_AUTHENTICATION_METHODS = + new OauthScope(Value.UPDATE_AUTHENTICATION_METHODS, "update:authentication_methods"); - public static final OauthScope CREATE_SCIM_TOKEN = new OauthScope(Value.CREATE_SCIM_TOKEN, "create:scim_token"); + public static final OauthScope DELETE_ANOMALY_BLOCKS = + new OauthScope(Value.DELETE_ANOMALY_BLOCKS, "delete:anomaly_blocks"); - public static final OauthScope UPDATE_SESSIONS = new OauthScope(Value.UPDATE_SESSIONS, "update:sessions"); + public static final OauthScope DELETE_USERS = new OauthScope(Value.DELETE_USERS, "delete:users"); - public static final OauthScope DELETE_CONNECTION_PROFILES = - new OauthScope(Value.DELETE_CONNECTION_PROFILES, "delete:connection_profiles"); + public static final OauthScope READ_ATTACK_PROTECTION = + new OauthScope(Value.READ_ATTACK_PROTECTION, "read:attack_protection"); - public static final OauthScope UPDATE_CONNECTIONS = new OauthScope(Value.UPDATE_CONNECTIONS, "update:connections"); + public static final OauthScope READ_ORGANIZATION_CONNECTIONS = + new OauthScope(Value.READ_ORGANIZATION_CONNECTIONS, "read:organization_connections"); + + public static final OauthScope CREATE_CONNECTIONS = new OauthScope(Value.CREATE_CONNECTIONS, "create:connections"); public static final OauthScope DELETE_DEVICE_CREDENTIALS = new OauthScope(Value.DELETE_DEVICE_CREDENTIALS, "delete:device_credentials"); - public static final OauthScope READ_GUARDIAN_FACTORS = - new OauthScope(Value.READ_GUARDIAN_FACTORS, "read:guardian_factors"); + public static final OauthScope READ_RULES = new OauthScope(Value.READ_RULES, "read:rules"); public static final OauthScope READ_TENANT_SETTINGS = new OauthScope(Value.READ_TENANT_SETTINGS, "read:tenant_settings"); - public static final OauthScope DELETE_SCIM_CONFIG = new OauthScope(Value.DELETE_SCIM_CONFIG, "delete:scim_config"); + public static final OauthScope UPDATE_PROMPTS = new OauthScope(Value.UPDATE_PROMPTS, "update:prompts"); - public static final OauthScope DELETE_RULES = new OauthScope(Value.DELETE_RULES, "delete:rules"); + public static final OauthScope CREATE_EMAIL_TEMPLATES = + new OauthScope(Value.CREATE_EMAIL_TEMPLATES, "create:email_templates"); - public static final OauthScope READ_ORGANIZATION_MEMBER_ROLES = - new OauthScope(Value.READ_ORGANIZATION_MEMBER_ROLES, "read:organization_member_roles"); + public static final OauthScope UPDATE_CONNECTIONS = new OauthScope(Value.UPDATE_CONNECTIONS, "update:connections"); - public static final OauthScope READ_FEDERATED_CONNECTIONS_TOKENS = - new OauthScope(Value.READ_FEDERATED_CONNECTIONS_TOKENS, "read:federated_connections_tokens"); - - public static final OauthScope UPDATE_FLOWS = new OauthScope(Value.UPDATE_FLOWS, "update:flows"); - - public static final OauthScope CREATE_LOG_STREAMS = new OauthScope(Value.CREATE_LOG_STREAMS, "create:log_streams"); - - public static final OauthScope CREATE_CONNECTION_PROFILES = - new OauthScope(Value.CREATE_CONNECTION_PROFILES, "create:connection_profiles"); + public static final OauthScope CREATE_CLIENT_CREDENTIALS = + new OauthScope(Value.CREATE_CLIENT_CREDENTIALS, "create:client_credentials"); - public static final OauthScope CREATE_FLOWS_VAULT_CONNECTIONS = - new OauthScope(Value.CREATE_FLOWS_VAULT_CONNECTIONS, "create:flows_vault_connections"); + public static final OauthScope READ_SIGNING_KEYS = new OauthScope(Value.READ_SIGNING_KEYS, "read:signing_keys"); - public static final OauthScope UPDATE_DIRECTORY_PROVISIONINGS = - new OauthScope(Value.UPDATE_DIRECTORY_PROVISIONINGS, "update:directory_provisionings"); + public static final OauthScope DELETE_CONNECTIONS = new OauthScope(Value.DELETE_CONNECTIONS, "delete:connections"); - public static final OauthScope DELETE_USER_ATTRIBUTE_PROFILES = - new OauthScope(Value.DELETE_USER_ATTRIBUTE_PROFILES, "delete:user_attribute_profiles"); + public static final OauthScope UPDATE_RESOURCE_SERVERS = + new OauthScope(Value.UPDATE_RESOURCE_SERVERS, "update:resource_servers"); - public static final OauthScope READ_CLIENT_GRANTS = new OauthScope(Value.READ_CLIENT_GRANTS, "read:client_grants"); + public static final OauthScope DELETE_PHONE_TEMPLATES = + new OauthScope(Value.DELETE_PHONE_TEMPLATES, "delete:phone_templates"); public static final OauthScope CREATE_TOKEN_EXCHANGE_PROFILES = new OauthScope(Value.CREATE_TOKEN_EXCHANGE_PROFILES, "create:token_exchange_profiles"); - public static final OauthScope READ_LOGS_USERS = new OauthScope(Value.READ_LOGS_USERS, "read:logs_users"); - - public static final OauthScope READ_RULES = new OauthScope(Value.READ_RULES, "read:rules"); - - public static final OauthScope DELETE_GUARDIAN_ENROLLMENTS = - new OauthScope(Value.DELETE_GUARDIAN_ENROLLMENTS, "delete:guardian_enrollments"); + public static final OauthScope DELETE_SCIM_TOKEN = new OauthScope(Value.DELETE_SCIM_TOKEN, "delete:scim_token"); - public static final OauthScope UPDATE_CLIENT_KEYS = new OauthScope(Value.UPDATE_CLIENT_KEYS, "update:client_keys"); + public static final OauthScope UPDATE_CLIENT_CREDENTIALS = + new OauthScope(Value.UPDATE_CLIENT_CREDENTIALS, "update:client_credentials"); - public static final OauthScope UPDATE_CURRENT_USER_IDENTITIES = - new OauthScope(Value.UPDATE_CURRENT_USER_IDENTITIES, "update:current_user_identities"); + public static final OauthScope CREATE_ORGANIZATION_MEMBERS = + new OauthScope(Value.CREATE_ORGANIZATION_MEMBERS, "create:organization_members"); - public static final OauthScope CREATE_ORGANIZATION_CONNECTIONS = - new OauthScope(Value.CREATE_ORGANIZATION_CONNECTIONS, "create:organization_connections"); + public static final OauthScope UPDATE_CONNECTION_PROFILES = + new OauthScope(Value.UPDATE_CONNECTION_PROFILES, "update:connection_profiles"); - public static final OauthScope READ_EMAIL_PROVIDER = - new OauthScope(Value.READ_EMAIL_PROVIDER, "read:email_provider"); + public static final OauthScope READ_PROMPTS = new OauthScope(Value.READ_PROMPTS, "read:prompts"); - public static final OauthScope READ_FLOWS_EXECUTIONS = - new OauthScope(Value.READ_FLOWS_EXECUTIONS, "read:flows_executions"); + public static final OauthScope UPDATE_USERS_APP_METADATA = + new OauthScope(Value.UPDATE_USERS_APP_METADATA, "update:users_app_metadata"); - public static final OauthScope DELETE_CLIENTS = new OauthScope(Value.DELETE_CLIENTS, "delete:clients"); + public static final OauthScope DELETE_NETWORK_ACLS = + new OauthScope(Value.DELETE_NETWORK_ACLS, "delete:network_acls"); public static final OauthScope CREATE_ROLE_MEMBERS = new OauthScope(Value.CREATE_ROLE_MEMBERS, "create:role_members"); - public static final OauthScope CREATE_FLOWS = new OauthScope(Value.CREATE_FLOWS, "create:flows"); - - public static final OauthScope DELETE_HOOKS = new OauthScope(Value.DELETE_HOOKS, "delete:hooks"); + public static final OauthScope UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS = + new OauthScope(Value.UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS, "update:self_service_profile_custom_texts"); public static final OauthScope DELETE_CURRENT_USER = new OauthScope(Value.DELETE_CURRENT_USER, "delete:current_user"); - public static final OauthScope READ_ORGANIZATIONS = new OauthScope(Value.READ_ORGANIZATIONS, "read:organizations"); - - public static final OauthScope DELETE_ROLES = new OauthScope(Value.DELETE_ROLES, "delete:roles"); + public static final OauthScope READ_LOGS = new OauthScope(Value.READ_LOGS, "read:logs"); public static final OauthScope READ_CONNECTION_PROFILES = new OauthScope(Value.READ_CONNECTION_PROFILES, "read:connection_profiles"); + public static final OauthScope DELETE_EVENT_STREAMS = + new OauthScope(Value.DELETE_EVENT_STREAMS, "delete:event_streams"); + public static final OauthScope UPDATE_PHONE_TEMPLATES = new OauthScope(Value.UPDATE_PHONE_TEMPLATES, "update:phone_templates"); - public static final OauthScope READ_STATS = new OauthScope(Value.READ_STATS, "read:stats"); - - public static final OauthScope READ_CUSTOM_DOMAINS = - new OauthScope(Value.READ_CUSTOM_DOMAINS, "read:custom_domains"); - - public static final OauthScope READ_TOKEN_EXCHANGE_PROFILES = - new OauthScope(Value.READ_TOKEN_EXCHANGE_PROFILES, "read:token_exchange_profiles"); - public static final OauthScope READ_GUARDIAN_ENROLLMENTS = new OauthScope(Value.READ_GUARDIAN_ENROLLMENTS, "read:guardian_enrollments"); - public static final OauthScope UPDATE_ORGANIZATIONS = - new OauthScope(Value.UPDATE_ORGANIZATIONS, "update:organizations"); - - public static final OauthScope UPDATE_SELF_SERVICE_PROFILES = - new OauthScope(Value.UPDATE_SELF_SERVICE_PROFILES, "update:self_service_profiles"); - - public static final OauthScope CREATE_ORGANIZATION_CLIENT_GRANTS = - new OauthScope(Value.CREATE_ORGANIZATION_CLIENT_GRANTS, "create:organization_client_grants"); - - public static final OauthScope DELETE_FLOWS_EXECUTIONS = - new OauthScope(Value.DELETE_FLOWS_EXECUTIONS, "delete:flows_executions"); + public static final OauthScope DELETE_FLOWS = new OauthScope(Value.DELETE_FLOWS, "delete:flows"); - public static final OauthScope UPDATE_CONNECTIONS_KEYS = - new OauthScope(Value.UPDATE_CONNECTIONS_KEYS, "update:connections_keys"); + public static final OauthScope READ_STATS = new OauthScope(Value.READ_STATS, "read:stats"); - public static final OauthScope UPDATE_EVENT_DELIVERIES = - new OauthScope(Value.UPDATE_EVENT_DELIVERIES, "update:event_deliveries"); + public static final OauthScope DELETE_ROLES = new OauthScope(Value.DELETE_ROLES, "delete:roles"); - public static final OauthScope DELETE_CURRENT_USER_DEVICE_CREDENTIALS = - new OauthScope(Value.DELETE_CURRENT_USER_DEVICE_CREDENTIALS, "delete:current_user_device_credentials"); + public static final OauthScope READ_ENCRYPTION_KEYS = + new OauthScope(Value.READ_ENCRYPTION_KEYS, "read:encryption_keys"); - public static final OauthScope READ_VDCS_TEMPLATES = - new OauthScope(Value.READ_VDCS_TEMPLATES, "read:vdcs_templates"); + public static final OauthScope CREATE_ORGANIZATION_INVITATIONS = + new OauthScope(Value.CREATE_ORGANIZATION_INVITATIONS, "create:organization_invitations"); - public static final OauthScope READ_PHONE_PROVIDERS = - new OauthScope(Value.READ_PHONE_PROVIDERS, "read:phone_providers"); + public static final OauthScope DELETE_HOOKS = new OauthScope(Value.DELETE_HOOKS, "delete:hooks"); - public static final OauthScope CREATE_CLIENT_GRANTS = - new OauthScope(Value.CREATE_CLIENT_GRANTS, "create:client_grants"); + public static final OauthScope CREATE_PHONE_TEMPLATES = + new OauthScope(Value.CREATE_PHONE_TEMPLATES, "create:phone_templates"); - public static final OauthScope DELETE_ANOMALY_BLOCKS = - new OauthScope(Value.DELETE_ANOMALY_BLOCKS, "delete:anomaly_blocks"); + public static final OauthScope READ_TOKEN_EXCHANGE_PROFILES = + new OauthScope(Value.READ_TOKEN_EXCHANGE_PROFILES, "read:token_exchange_profiles"); - public static final OauthScope READ_CONNECTIONS_KEYS = - new OauthScope(Value.READ_CONNECTIONS_KEYS, "read:connections_keys"); + public static final OauthScope UPDATE_CONNECTIONS_KEYS = + new OauthScope(Value.UPDATE_CONNECTIONS_KEYS, "update:connections_keys"); - public static final OauthScope READ_ACTIONS = new OauthScope(Value.READ_ACTIONS, "read:actions"); + public static final OauthScope DELETE_RESOURCE_SERVERS = + new OauthScope(Value.DELETE_RESOURCE_SERVERS, "delete:resource_servers"); public static final OauthScope READ_RESOURCE_SERVERS = new OauthScope(Value.READ_RESOURCE_SERVERS, "read:resource_servers"); - public static final OauthScope UPDATE_TOKEN_EXCHANGE_PROFILES = - new OauthScope(Value.UPDATE_TOKEN_EXCHANGE_PROFILES, "update:token_exchange_profiles"); - - public static final OauthScope DELETE_ROLE_MEMBERS = - new OauthScope(Value.DELETE_ROLE_MEMBERS, "delete:role_members"); - - public static final OauthScope READ_ORGANIZATION_CONNECTIONS = - new OauthScope(Value.READ_ORGANIZATION_CONNECTIONS, "read:organization_connections"); - - public static final OauthScope UPDATE_PROMPTS = new OauthScope(Value.UPDATE_PROMPTS, "update:prompts"); - - public static final OauthScope CREATE_HOOKS = new OauthScope(Value.CREATE_HOOKS, "create:hooks"); - - public static final OauthScope CREATE_CONNECTIONS = new OauthScope(Value.CREATE_CONNECTIONS, "create:connections"); - - public static final OauthScope CREATE_EMAIL_TEMPLATES = - new OauthScope(Value.CREATE_EMAIL_TEMPLATES, "create:email_templates"); - - public static final OauthScope UPDATE_ATTACK_PROTECTION = - new OauthScope(Value.UPDATE_ATTACK_PROTECTION, "update:attack_protection"); - - public static final OauthScope READ_MFA_POLICIES = new OauthScope(Value.READ_MFA_POLICIES, "read:mfa_policies"); - - public static final OauthScope UPDATE_HOOKS = new OauthScope(Value.UPDATE_HOOKS, "update:hooks"); - - public static final OauthScope DELETE_USERS = new OauthScope(Value.DELETE_USERS, "delete:users"); - - public static final OauthScope CREATE_CLIENT_CREDENTIALS = - new OauthScope(Value.CREATE_CLIENT_CREDENTIALS, "create:client_credentials"); - - public static final OauthScope UPDATE_CLIENT_CREDENTIALS = - new OauthScope(Value.UPDATE_CLIENT_CREDENTIALS, "update:client_credentials"); - - public static final OauthScope CREATE_ACTIONS = new OauthScope(Value.CREATE_ACTIONS, "create:actions"); - - public static final OauthScope READ_EVENT_DELIVERIES = - new OauthScope(Value.READ_EVENT_DELIVERIES, "read:event_deliveries"); + public static final OauthScope UPDATE_EVENT_DELIVERIES = + new OauthScope(Value.UPDATE_EVENT_DELIVERIES, "update:event_deliveries"); - public static final OauthScope DELETE_PHONE_TEMPLATES = - new OauthScope(Value.DELETE_PHONE_TEMPLATES, "delete:phone_templates"); + public static final OauthScope UPDATE_ORGANIZATION_CONNECTIONS = + new OauthScope(Value.UPDATE_ORGANIZATION_CONNECTIONS, "update:organization_connections"); - public static final OauthScope READ_REFRESH_TOKENS = - new OauthScope(Value.READ_REFRESH_TOKENS, "read:refresh_tokens"); + public static final OauthScope READ_VDCS_TEMPLATES = + new OauthScope(Value.READ_VDCS_TEMPLATES, "read:vdcs_templates"); - public static final OauthScope UPDATE_EMAIL_TEMPLATES = - new OauthScope(Value.UPDATE_EMAIL_TEMPLATES, "update:email_templates"); + public static final OauthScope READ_ORGANIZATION_INVITATIONS = + new OauthScope(Value.READ_ORGANIZATION_INVITATIONS, "read:organization_invitations"); - public static final OauthScope READ_ROLE_MEMBERS = new OauthScope(Value.READ_ROLE_MEMBERS, "read:role_members"); + public static final OauthScope READ_PHONE_PROVIDERS = + new OauthScope(Value.READ_PHONE_PROVIDERS, "read:phone_providers"); - public static final OauthScope CREATE_ORGANIZATION_MEMBERS = - new OauthScope(Value.CREATE_ORGANIZATION_MEMBERS, "create:organization_members"); + public static final OauthScope READ_NETWORK_ACLS = new OauthScope(Value.READ_NETWORK_ACLS, "read:network_acls"); private final Value value; @@ -624,446 +626,448 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case READ_AUTHENTICATION_METHODS: - return visitor.visitReadAuthenticationMethods(); - case UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS: - return visitor.visitUpdateClientTokenVaultPrivilegedAccess(); - case UPDATE_USERS_APP_METADATA: - return visitor.visitUpdateUsersAppMetadata(); - case READ_ANOMALY_BLOCKS: - return visitor.visitReadAnomalyBlocks(); - case READ_CLIENT_SUMMARY: - return visitor.visitReadClientSummary(); + case DELETE_ACTIONS: + return visitor.visitDeleteActions(); + case READ_CONNECTIONS_KEYS: + return visitor.visitReadConnectionsKeys(); + case READ_GROUPS: + return visitor.visitReadGroups(); + case READ_ACTIONS: + return visitor.visitReadActions(); + case DELETE_ROLE_MEMBERS: + return visitor.visitDeleteRoleMembers(); + case CREATE_CLIENT_GRANTS: + return visitor.visitCreateClientGrants(); + case UPDATE_TOKEN_EXCHANGE_PROFILES: + return visitor.visitUpdateTokenExchangeProfiles(); + case READ_CURRENT_USER: + return visitor.visitReadCurrentUser(); + case READ_SCIM_TOKEN: + return visitor.visitReadScimToken(); + case UPDATE_ROLES: + return visitor.visitUpdateRoles(); + case CREATE_ORGANIZATIONS: + return visitor.visitCreateOrganizations(); + case READ_CONNECTIONS: + return visitor.visitReadConnections(); + case CREATE_DIRECTORY_PROVISIONINGS: + return visitor.visitCreateDirectoryProvisionings(); + case DELETE_ORGANIZATIONS: + return visitor.visitDeleteOrganizations(); + case CREATE_ORGANIZATION_MEMBER_ROLES: + return visitor.visitCreateOrganizationMemberRoles(); + case DELETE_CLIENT_GRANTS: + return visitor.visitDeleteClientGrants(); + case UPDATE_CURRENT_USER_METADATA: + return visitor.visitUpdateCurrentUserMetadata(); + case READ_EVENT_DELIVERIES: + return visitor.visitReadEventDeliveries(); + case DELETE_PHONE_PROVIDERS: + return visitor.visitDeletePhoneProviders(); + case UPDATE_CLIENTS: + return visitor.visitUpdateClients(); + case READ_REFRESH_TOKENS: + return visitor.visitReadRefreshTokens(); + case CREATE_SSO_ACCESS_TICKETS: + return visitor.visitCreateSsoAccessTickets(); + case UPDATE_EMAIL_TEMPLATES: + return visitor.visitUpdateEmailTemplates(); + case CREATE_USERS: + return visitor.visitCreateUsers(); + case READ_PHONE_TEMPLATES: + return visitor.visitReadPhoneTemplates(); + case DELETE_GROUPS: + return visitor.visitDeleteGroups(); + case DELETE_ORGANIZATION_CONNECTIONS: + return visitor.visitDeleteOrganizationConnections(); + case READ_ROLE_MEMBERS: + return visitor.visitReadRoleMembers(); + case DELETE_FEDERATED_CONNECTIONS_TOKENS: + return visitor.visitDeleteFederatedConnectionsTokens(); + case READ_SELF_SERVICE_PROFILES: + return visitor.visitReadSelfServiceProfiles(); + case CREATE_ORGANIZATION_DISCOVERY_DOMAINS: + return visitor.visitCreateOrganizationDiscoveryDomains(); case READ_SCIM_CONFIG: return visitor.visitReadScimConfig(); - case CREATE_RULES: - return visitor.visitCreateRules(); case UPDATE_SCIM_CONFIG: return visitor.visitUpdateScimConfig(); - case READ_PROMPTS: - return visitor.visitReadPrompts(); - case CREATE_ORGANIZATION_DISCOVERY_DOMAINS: - return visitor.visitCreateOrganizationDiscoveryDomains(); - case CREATE_PHONE_TEMPLATES: - return visitor.visitCreatePhoneTemplates(); - case UPDATE_PHONE_PROVIDERS: - return visitor.visitUpdatePhoneProviders(); - case CREATE_ROLES: - return visitor.visitCreateRoles(); + case DELETE_CLIENTS: + return visitor.visitDeleteClients(); + case READ_FLOWS_EXECUTIONS: + return visitor.visitReadFlowsExecutions(); case DELETE_AUTHENTICATION_METHODS: return visitor.visitDeleteAuthenticationMethods(); case CREATE_CONNECTIONS_KEYS: return visitor.visitCreateConnectionsKeys(); - case UPDATE_RULES: - return visitor.visitUpdateRules(); - case UPDATE_FLOWS_VAULT_CONNECTIONS: - return visitor.visitUpdateFlowsVaultConnections(); - case READ_ENCRYPTION_KEYS: - return visitor.visitReadEncryptionKeys(); - case DELETE_SESSIONS: - return visitor.visitDeleteSessions(); - case UPDATE_ACTIONS: - return visitor.visitUpdateActions(); - case CREATE_EVENT_STREAMS: - return visitor.visitCreateEventStreams(); - case DELETE_EVENT_STREAMS: - return visitor.visitDeleteEventStreams(); - case DELETE_FLOWS: - return visitor.visitDeleteFlows(); - case DELETE_PHONE_PROVIDERS: - return visitor.visitDeletePhoneProviders(); - case DELETE_SELF_SERVICE_PROFILES: - return visitor.visitDeleteSelfServiceProfiles(); - case READ_GROUP_MEMBERS: - return visitor.visitReadGroupMembers(); + case DELETE_ORGANIZATION_CLIENT_GRANTS: + return visitor.visitDeleteOrganizationClientGrants(); + case UPDATE_SELF_SERVICE_PROFILES: + return visitor.visitUpdateSelfServiceProfiles(); + case CREATE_ROLES: + return visitor.visitCreateRoles(); case CREATE_SIGNING_KEYS: return visitor.visitCreateSigningKeys(); - case UPDATE_SIGNING_KEYS: - return visitor.visitUpdateSigningKeys(); - case CREATE_USER_TICKETS: - return visitor.visitCreateUserTickets(); - case DELETE_GRANTS: - return visitor.visitDeleteGrants(); - case DELETE_REFRESH_TOKENS: - return visitor.visitDeleteRefreshTokens(); - case READ_RULES_CONFIGS: - return visitor.visitReadRulesConfigs(); - case CREATE_SELF_SERVICE_PROFILES: - return visitor.visitCreateSelfServiceProfiles(); - case UPDATE_REFRESH_TOKENS: - return visitor.visitUpdateRefreshTokens(); - case READ_USER_IDP_TOKENS: - return visitor.visitReadUserIdpTokens(); + case UPDATE_EVENT_STREAMS: + return visitor.visitUpdateEventStreams(); + case READ_GROUP_MEMBERS: + return visitor.visitReadGroupMembers(); + case UPDATE_ACTIONS: + return visitor.visitUpdateActions(); + case CREATE_FLOWS: + return visitor.visitCreateFlows(); case READ_CUSTOM_SIGNING_KEYS: return visitor.visitReadCustomSigningKeys(); - case READ_HOOKS: - return visitor.visitReadHooks(); - case CREATE_CURRENT_USER_DEVICE_CREDENTIALS: - return visitor.visitCreateCurrentUserDeviceCredentials(); - case DELETE_BRANDING: - return visitor.visitDeleteBranding(); case DELETE_CLIENT_CREDENTIALS: return visitor.visitDeleteClientCredentials(); - case UPDATE_TENANT_SETTINGS: - return visitor.visitUpdateTenantSettings(); - case READ_ORGANIZATION_INVITATIONS: - return visitor.visitReadOrganizationInvitations(); - case READ_GRANTS: - return visitor.visitReadGrants(); case DELETE_ORGANIZATION_INVITATIONS: return visitor.visitDeleteOrganizationInvitations(); - case UPDATE_RULES_CONFIGS: - return visitor.visitUpdateRulesConfigs(); - case UPDATE_CONNECTION_PROFILES: - return visitor.visitUpdateConnectionProfiles(); - case READ_GROUPS: - return visitor.visitReadGroups(); - case DELETE_ACTIONS: - return visitor.visitDeleteActions(); - case UPDATE_AUTHENTICATION_METHODS: - return visitor.visitUpdateAuthenticationMethods(); + case CREATE_ORGANIZATION_CLIENT_GRANTS: + return visitor.visitCreateOrganizationClientGrants(); + case READ_USER_IDP_TOKENS: + return visitor.visitReadUserIdpTokens(); + case DELETE_REFRESH_TOKENS: + return visitor.visitDeleteRefreshTokens(); + case CREATE_SELF_SERVICE_PROFILES: + return visitor.visitCreateSelfServiceProfiles(); + case UPDATE_USER_ATTRIBUTE_PROFILES: + return visitor.visitUpdateUserAttributeProfiles(); case CREATE_VDCS_TEMPLATES: return visitor.visitCreateVdcsTemplates(); - case READ_ATTACK_PROTECTION: - return visitor.visitReadAttackProtection(); - case READ_ORGANIZATION_DISCOVERY_DOMAINS: - return visitor.visitReadOrganizationDiscoveryDomains(); case CREATE_CUSTOM_DOMAINS: return visitor.visitCreateCustomDomains(); - case READ_CURRENT_USER: - return visitor.visitReadCurrentUser(); - case DELETE_ORGANIZATION_CONNECTIONS: - return visitor.visitDeleteOrganizationConnections(); + case READ_ORGANIZATION_DISCOVERY_DOMAINS: + return visitor.visitReadOrganizationDiscoveryDomains(); + case DELETE_DIRECTORY_PROVISIONINGS: + return visitor.visitDeleteDirectoryProvisionings(); case READ_CLIENT_CREDENTIALS: return visitor.visitReadClientCredentials(); - case CREATE_ORGANIZATIONS: - return visitor.visitCreateOrganizations(); + case CREATE_EMAIL_PROVIDER: + return visitor.visitCreateEmailProvider(); + case CREATE_SCIM_TOKEN: + return visitor.visitCreateScimToken(); + case READ_GUARDIAN_FACTORS: + return visitor.visitReadGuardianFactors(); + case DELETE_CONNECTION_PROFILES: + return visitor.visitDeleteConnectionProfiles(); + case UPDATE_FLOWS: + return visitor.visitUpdateFlows(); case READ_ORGANIZATIONS_SUMMARY: return visitor.visitReadOrganizationsSummary(); - case DELETE_ORGANIZATIONS: - return visitor.visitDeleteOrganizations(); - case READ_SCIM_TOKEN: - return visitor.visitReadScimToken(); - case READ_CONNECTIONS: - return visitor.visitReadConnections(); - case READ_SIGNING_KEYS: - return visitor.visitReadSigningKeys(); - case DELETE_FEDERATED_CONNECTIONS_TOKENS: - return visitor.visitDeleteFederatedConnectionsTokens(); - case DELETE_CONNECTIONS: - return visitor.visitDeleteConnections(); - case UPDATE_RESOURCE_SERVERS: - return visitor.visitUpdateResourceServers(); - case CREATE_USERS: - return visitor.visitCreateUsers(); - case READ_PHONE_TEMPLATES: - return visitor.visitReadPhoneTemplates(); - case UPDATE_ROLES: - return visitor.visitUpdateRoles(); - case CREATE_SSO_ACCESS_TICKETS: - return visitor.visitCreateSsoAccessTickets(); - case DELETE_GROUPS: - return visitor.visitDeleteGroups(); - case READ_SELF_SERVICE_PROFILE_CUSTOM_TEXTS: - return visitor.visitReadSelfServiceProfileCustomTexts(); - case DELETE_SCIM_TOKEN: - return visitor.visitDeleteScimToken(); + case READ_SESSIONS: + return visitor.visitReadSessions(); + case CREATE_RESOURCE_SERVERS: + return visitor.visitCreateResourceServers(); + case CREATE_FLOWS_VAULT_CONNECTIONS: + return visitor.visitCreateFlowsVaultConnections(); + case READ_BRANDING: + return visitor.visitReadBranding(); + case UPDATE_FORMS: + return visitor.visitUpdateForms(); + case UPDATE_MFA_POLICIES: + return visitor.visitUpdateMfaPolicies(); + case READ_LOGS_USERS: + return visitor.visitReadLogsUsers(); + case READ_ORGANIZATION_CLIENT_GRANTS: + return visitor.visitReadOrganizationClientGrants(); + case READ_ROLES: + return visitor.visitReadRoles(); + case READ_DEVICE_CREDENTIALS: + return visitor.visitReadDeviceCredentials(); + case CREATE_ENCRYPTION_KEYS: + return visitor.visitCreateEncryptionKeys(); + case UPDATE_CURRENT_USER_IDENTITIES: + return visitor.visitUpdateCurrentUserIdentities(); case DELETE_FORMS: return visitor.visitDeleteForms(); - case READ_SELF_SERVICE_PROFILES: - return visitor.visitReadSelfServiceProfiles(); - case DELETE_RULES_CONFIGS: - return visitor.visitDeleteRulesConfigs(); + case READ_SELF_SERVICE_PROFILE_CUSTOM_TEXTS: + return visitor.visitReadSelfServiceProfileCustomTexts(); + case UPDATE_ORGANIZATION_DISCOVERY_DOMAINS: + return visitor.visitUpdateOrganizationDiscoveryDomains(); + case READ_ANOMALY_BLOCKS: + return visitor.visitReadAnomalyBlocks(); + case UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS: + return visitor.visitUpdateClientTokenVaultPrivilegedAccess(); case CREATE_FORMS: return visitor.visitCreateForms(); - case READ_USER_ATTRIBUTE_PROFILES: - return visitor.visitReadUserAttributeProfiles(); - case READ_DIRECTORY_PROVISIONINGS: - return visitor.visitReadDirectoryProvisionings(); + case READ_CLIENT_SUMMARY: + return visitor.visitReadClientSummary(); case CREATE_AUTHENTICATION_METHODS: return visitor.visitCreateAuthenticationMethods(); + case READ_DIRECTORY_PROVISIONINGS: + return visitor.visitReadDirectoryProvisionings(); case CREATE_PHONE_PROVIDERS: return visitor.visitCreatePhoneProviders(); - case DELETE_ORGANIZATION_CLIENT_GRANTS: - return visitor.visitDeleteOrganizationClientGrants(); - case CREATE_SCIM_CONFIG: - return visitor.visitCreateScimConfig(); + case CREATE_RULES: + return visitor.visitCreateRules(); + case READ_EMAIL_TEMPLATES: + return visitor.visitReadEmailTemplates(); + case UPDATE_RULES: + return visitor.visitUpdateRules(); + case UPDATE_FLOWS_VAULT_CONNECTIONS: + return visitor.visitUpdateFlowsVaultConnections(); + case UPDATE_PHONE_PROVIDERS: + return visitor.visitUpdatePhoneProviders(); + case CREATE_EVENT_STREAMS: + return visitor.visitCreateEventStreams(); + case DELETE_SELF_SERVICE_PROFILES: + return visitor.visitDeleteSelfServiceProfiles(); + case DELETE_SESSIONS: + return visitor.visitDeleteSessions(); case CREATE_CLIENTS: return visitor.visitCreateClients(); + case DELETE_LOG_STREAMS: + return visitor.visitDeleteLogStreams(); + case CREATE_USER_ATTRIBUTE_PROFILES: + return visitor.visitCreateUserAttributeProfiles(); case UPDATE_USERS: return visitor.visitUpdateUsers(); - case READ_ORGANIZATION_MEMBERS: - return visitor.visitReadOrganizationMembers(); - case UPDATE_EVENT_STREAMS: - return visitor.visitUpdateEventStreams(); - case UPDATE_CUSTOM_SIGNING_KEYS: - return visitor.visitUpdateCustomSigningKeys(); + case READ_GRANTS: + return visitor.visitReadGrants(); + case UPDATE_SIGNING_KEYS: + return visitor.visitUpdateSigningKeys(); + case CREATE_USER_TICKETS: + return visitor.visitCreateUserTickets(); case READ_LOG_STREAMS: return visitor.visitReadLogStreams(); - case UPDATE_LOG_STREAMS: - return visitor.visitUpdateLogStreams(); + case UPDATE_BRANDING: + return visitor.visitUpdateBranding(); + case UPDATE_CUSTOM_SIGNING_KEYS: + return visitor.visitUpdateCustomSigningKeys(); case READ_CLIENTS: return visitor.visitReadClients(); - case DELETE_ENCRYPTION_KEYS: - return visitor.visitDeleteEncryptionKeys(); - case UPDATE_USER_ATTRIBUTE_PROFILES: - return visitor.visitUpdateUserAttributeProfiles(); + case DELETE_GRANTS: + return visitor.visitDeleteGrants(); + case UPDATE_REFRESH_TOKENS: + return visitor.visitUpdateRefreshTokens(); + case UPDATE_RULES_CONFIGS: + return visitor.visitUpdateRulesConfigs(); + case UPDATE_CUSTOM_DOMAINS: + return visitor.visitUpdateCustomDomains(); + case READ_RULES_CONFIGS: + return visitor.visitReadRulesConfigs(); + case READ_HOOKS: + return visitor.visitReadHooks(); + case CREATE_CURRENT_USER_DEVICE_CREDENTIALS: + return visitor.visitCreateCurrentUserDeviceCredentials(); + case DELETE_BRANDING: + return visitor.visitDeleteBranding(); + case UPDATE_TENANT_SETTINGS: + return visitor.visitUpdateTenantSettings(); case CREATE_CUSTOM_SIGNING_KEYS: return visitor.visitCreateCustomSigningKeys(); - case READ_CLIENT_KEYS: - return visitor.visitReadClientKeys(); - case CREATE_EMAIL_PROVIDER: - return visitor.visitCreateEmailProvider(); - case UPDATE_NETWORK_ACLS: - return visitor.visitUpdateNetworkAcls(); - case DELETE_VDCS_TEMPLATES: + case READ_AUTHENTICATION_METHODS: + return visitor.visitReadAuthenticationMethods(); + case UPDATE_ATTACK_PROTECTION: + return visitor.visitUpdateAttackProtection(); + case CREATE_GUARDIAN_ENROLLMENT_TICKETS: + return visitor.visitCreateGuardianEnrollmentTickets(); + case DELETE_EMAIL_PROVIDER: + return visitor.visitDeleteEmailProvider(); + case DELETE_CUSTOM_DOMAINS: + return visitor.visitDeleteCustomDomains(); + case CREATE_NETWORK_ACLS: + return visitor.visitCreateNetworkAcls(); + case DELETE_VDCS_TEMPLATES: return visitor.visitDeleteVdcsTemplates(); + case READ_EVENTS: + return visitor.visitReadEvents(); case READ_FLOWS: return visitor.visitReadFlows(); - case READ_SESSIONS: - return visitor.visitReadSessions(); - case CREATE_ORGANIZATION_MEMBER_ROLES: - return visitor.visitCreateOrganizationMemberRoles(); - case CREATE_DIRECTORY_PROVISIONINGS: - return visitor.visitCreateDirectoryProvisionings(); + case READ_FORMS: + return visitor.visitReadForms(); + case UPDATE_NETWORK_ACLS: + return visitor.visitUpdateNetworkAcls(); + case UPDATE_SESSIONS: + return visitor.visitUpdateSessions(); + case CREATE_HOOKS: + return visitor.visitCreateHooks(); + case READ_CLIENT_KEYS: + return visitor.visitReadClientKeys(); + case CREATE_LOG_STREAMS: + return visitor.visitCreateLogStreams(); + case READ_FEDERATED_CONNECTIONS_TOKENS: + return visitor.visitReadFederatedConnectionsTokens(); case DELETE_ORGANIZATION_MEMBERS: return visitor.visitDeleteOrganizationMembers(); - case UPDATE_FORMS: - return visitor.visitUpdateForms(); - case CREATE_RESOURCE_SERVERS: - return visitor.visitCreateResourceServers(); - case READ_BRANDING: - return visitor.visitReadBranding(); - case UPDATE_MFA_POLICIES: - return visitor.visitUpdateMfaPolicies(); - case UPDATE_CURRENT_USER_METADATA: - return visitor.visitUpdateCurrentUserMetadata(); + case READ_ORGANIZATION_MEMBER_ROLES: + return visitor.visitReadOrganizationMemberRoles(); + case DELETE_SCIM_CONFIG: + return visitor.visitDeleteScimConfig(); + case UPDATE_HOOKS: + return visitor.visitUpdateHooks(); + case READ_MFA_POLICIES: + return visitor.visitReadMfaPolicies(); + case CREATE_CONNECTION_PROFILES: + return visitor.visitCreateConnectionProfiles(); + case CREATE_ACTIONS: + return visitor.visitCreateActions(); + case READ_CLIENT_GRANTS: + return visitor.visitReadClientGrants(); + case UPDATE_DIRECTORY_PROVISIONINGS: + return visitor.visitUpdateDirectoryProvisionings(); + case DELETE_USER_ATTRIBUTE_PROFILES: + return visitor.visitDeleteUserAttributeProfiles(); case READ_FLOWS_VAULT_CONNECTIONS: return visitor.visitReadFlowsVaultConnections(); - case READ_ORGANIZATION_CLIENT_GRANTS: - return visitor.visitReadOrganizationClientGrants(); - case UPDATE_CLIENTS: - return visitor.visitUpdateClients(); - case DELETE_CLIENT_GRANTS: - return visitor.visitDeleteClientGrants(); - case CREATE_ENCRYPTION_KEYS: - return visitor.visitCreateEncryptionKeys(); case UPDATE_ENCRYPTION_KEYS: return visitor.visitUpdateEncryptionKeys(); - case READ_ROLES: - return visitor.visitReadRoles(); - case READ_DEVICE_CREDENTIALS: - return visitor.visitReadDeviceCredentials(); - case DELETE_DIRECTORY_PROVISIONINGS: - return visitor.visitDeleteDirectoryProvisionings(); + case UPDATE_CLIENT_KEYS: + return visitor.visitUpdateClientKeys(); + case DELETE_GUARDIAN_ENROLLMENTS: + return visitor.visitDeleteGuardianEnrollments(); case DELETE_TOKEN_EXCHANGE_PROFILES: return visitor.visitDeleteTokenExchangeProfiles(); - case UPDATE_ORGANIZATION_DISCOVERY_DOMAINS: - return visitor.visitUpdateOrganizationDiscoveryDomains(); - case READ_LOGS: - return visitor.visitReadLogs(); case UPDATE_EMAIL_PROVIDER: return visitor.visitUpdateEmailProvider(); + case CREATE_ORGANIZATION_CONNECTIONS: + return visitor.visitCreateOrganizationConnections(); + case DELETE_RULES_CONFIGS: + return visitor.visitDeleteRulesConfigs(); + case READ_USER_ATTRIBUTE_PROFILES: + return visitor.visitReadUserAttributeProfiles(); + case READ_EMAIL_PROVIDER: + return visitor.visitReadEmailProvider(); case DELETE_FLOWS_VAULT_CONNECTIONS: return visitor.visitDeleteFlowsVaultConnections(); - case DELETE_NETWORK_ACLS: - return visitor.visitDeleteNetworkAcls(); - case UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS: - return visitor.visitUpdateSelfServiceProfileCustomTexts(); case DELETE_ORGANIZATION_DISCOVERY_DOMAINS: return visitor.visitDeleteOrganizationDiscoveryDomains(); case UPDATE_CLIENT_GRANTS: return visitor.visitUpdateClientGrants(); - case READ_EMAIL_TEMPLATES: - return visitor.visitReadEmailTemplates(); + case DELETE_ORGANIZATION_MEMBER_ROLES: + return visitor.visitDeleteOrganizationMemberRoles(); case UPDATE_VDCS_TEMPLATES: return visitor.visitUpdateVdcsTemplates(); - case CREATE_USER_ATTRIBUTE_PROFILES: - return visitor.visitCreateUserAttributeProfiles(); - case CREATE_ORGANIZATION_INVITATIONS: - return visitor.visitCreateOrganizationInvitations(); - case DELETE_LOG_STREAMS: - return visitor.visitDeleteLogStreams(); + case READ_ORGANIZATIONS: + return visitor.visitReadOrganizations(); + case READ_CUSTOM_DOMAINS: + return visitor.visitReadCustomDomains(); + case CREATE_SCIM_CONFIG: + return visitor.visitCreateScimConfig(); case DELETE_CUSTOM_SIGNING_KEYS: return visitor.visitDeleteCustomSigningKeys(); - case DELETE_RESOURCE_SERVERS: - return visitor.visitDeleteResourceServers(); - case UPDATE_GUARDIAN_FACTORS: - return visitor.visitUpdateGuardianFactors(); - case DELETE_ORGANIZATION_MEMBER_ROLES: - return visitor.visitDeleteOrganizationMemberRoles(); + case UPDATE_ORGANIZATIONS: + return visitor.visitUpdateOrganizations(); + case DELETE_RULES: + return visitor.visitDeleteRules(); case READ_USERS: return visitor.visitReadUsers(); - case UPDATE_BRANDING: - return visitor.visitUpdateBranding(); + case UPDATE_GUARDIAN_FACTORS: + return visitor.visitUpdateGuardianFactors(); + case DELETE_FLOWS_EXECUTIONS: + return visitor.visitDeleteFlowsExecutions(); + case READ_ORGANIZATION_MEMBERS: + return visitor.visitReadOrganizationMembers(); case DELETE_SSO_ACCESS_TICKETS: return visitor.visitDeleteSsoAccessTickets(); - case UPDATE_ORGANIZATION_CONNECTIONS: - return visitor.visitUpdateOrganizationConnections(); - case UPDATE_CUSTOM_DOMAINS: - return visitor.visitUpdateCustomDomains(); - case READ_NETWORK_ACLS: - return visitor.visitReadNetworkAcls(); - case DELETE_EMAIL_PROVIDER: - return visitor.visitDeleteEmailProvider(); - case READ_FORMS: - return visitor.visitReadForms(); - case CREATE_GUARDIAN_ENROLLMENT_TICKETS: - return visitor.visitCreateGuardianEnrollmentTickets(); + case UPDATE_LOG_STREAMS: + return visitor.visitUpdateLogStreams(); + case DELETE_CURRENT_USER_DEVICE_CREDENTIALS: + return visitor.visitDeleteCurrentUserDeviceCredentials(); case READ_EVENT_STREAMS: return visitor.visitReadEventStreams(); - case CREATE_NETWORK_ACLS: - return visitor.visitCreateNetworkAcls(); - case DELETE_CUSTOM_DOMAINS: - return visitor.visitDeleteCustomDomains(); - case CREATE_SCIM_TOKEN: - return visitor.visitCreateScimToken(); - case UPDATE_SESSIONS: - return visitor.visitUpdateSessions(); - case DELETE_CONNECTION_PROFILES: - return visitor.visitDeleteConnectionProfiles(); - case UPDATE_CONNECTIONS: - return visitor.visitUpdateConnections(); + case DELETE_ENCRYPTION_KEYS: + return visitor.visitDeleteEncryptionKeys(); + case UPDATE_AUTHENTICATION_METHODS: + return visitor.visitUpdateAuthenticationMethods(); + case DELETE_ANOMALY_BLOCKS: + return visitor.visitDeleteAnomalyBlocks(); + case DELETE_USERS: + return visitor.visitDeleteUsers(); + case READ_ATTACK_PROTECTION: + return visitor.visitReadAttackProtection(); + case READ_ORGANIZATION_CONNECTIONS: + return visitor.visitReadOrganizationConnections(); + case CREATE_CONNECTIONS: + return visitor.visitCreateConnections(); case DELETE_DEVICE_CREDENTIALS: return visitor.visitDeleteDeviceCredentials(); - case READ_GUARDIAN_FACTORS: - return visitor.visitReadGuardianFactors(); + case READ_RULES: + return visitor.visitReadRules(); case READ_TENANT_SETTINGS: return visitor.visitReadTenantSettings(); - case DELETE_SCIM_CONFIG: - return visitor.visitDeleteScimConfig(); - case DELETE_RULES: - return visitor.visitDeleteRules(); - case READ_ORGANIZATION_MEMBER_ROLES: - return visitor.visitReadOrganizationMemberRoles(); - case READ_FEDERATED_CONNECTIONS_TOKENS: - return visitor.visitReadFederatedConnectionsTokens(); - case UPDATE_FLOWS: - return visitor.visitUpdateFlows(); - case CREATE_LOG_STREAMS: - return visitor.visitCreateLogStreams(); - case CREATE_CONNECTION_PROFILES: - return visitor.visitCreateConnectionProfiles(); - case CREATE_FLOWS_VAULT_CONNECTIONS: - return visitor.visitCreateFlowsVaultConnections(); - case UPDATE_DIRECTORY_PROVISIONINGS: - return visitor.visitUpdateDirectoryProvisionings(); - case DELETE_USER_ATTRIBUTE_PROFILES: - return visitor.visitDeleteUserAttributeProfiles(); - case READ_CLIENT_GRANTS: - return visitor.visitReadClientGrants(); + case UPDATE_PROMPTS: + return visitor.visitUpdatePrompts(); + case CREATE_EMAIL_TEMPLATES: + return visitor.visitCreateEmailTemplates(); + case UPDATE_CONNECTIONS: + return visitor.visitUpdateConnections(); + case CREATE_CLIENT_CREDENTIALS: + return visitor.visitCreateClientCredentials(); + case READ_SIGNING_KEYS: + return visitor.visitReadSigningKeys(); + case DELETE_CONNECTIONS: + return visitor.visitDeleteConnections(); + case UPDATE_RESOURCE_SERVERS: + return visitor.visitUpdateResourceServers(); + case DELETE_PHONE_TEMPLATES: + return visitor.visitDeletePhoneTemplates(); case CREATE_TOKEN_EXCHANGE_PROFILES: return visitor.visitCreateTokenExchangeProfiles(); - case READ_LOGS_USERS: - return visitor.visitReadLogsUsers(); - case READ_RULES: - return visitor.visitReadRules(); - case DELETE_GUARDIAN_ENROLLMENTS: - return visitor.visitDeleteGuardianEnrollments(); - case UPDATE_CLIENT_KEYS: - return visitor.visitUpdateClientKeys(); - case UPDATE_CURRENT_USER_IDENTITIES: - return visitor.visitUpdateCurrentUserIdentities(); - case CREATE_ORGANIZATION_CONNECTIONS: - return visitor.visitCreateOrganizationConnections(); - case READ_EMAIL_PROVIDER: - return visitor.visitReadEmailProvider(); - case READ_FLOWS_EXECUTIONS: - return visitor.visitReadFlowsExecutions(); - case DELETE_CLIENTS: - return visitor.visitDeleteClients(); + case DELETE_SCIM_TOKEN: + return visitor.visitDeleteScimToken(); + case UPDATE_CLIENT_CREDENTIALS: + return visitor.visitUpdateClientCredentials(); + case CREATE_ORGANIZATION_MEMBERS: + return visitor.visitCreateOrganizationMembers(); + case UPDATE_CONNECTION_PROFILES: + return visitor.visitUpdateConnectionProfiles(); + case READ_PROMPTS: + return visitor.visitReadPrompts(); + case UPDATE_USERS_APP_METADATA: + return visitor.visitUpdateUsersAppMetadata(); + case DELETE_NETWORK_ACLS: + return visitor.visitDeleteNetworkAcls(); case CREATE_ROLE_MEMBERS: return visitor.visitCreateRoleMembers(); - case CREATE_FLOWS: - return visitor.visitCreateFlows(); - case DELETE_HOOKS: - return visitor.visitDeleteHooks(); + case UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS: + return visitor.visitUpdateSelfServiceProfileCustomTexts(); case DELETE_CURRENT_USER: return visitor.visitDeleteCurrentUser(); - case READ_ORGANIZATIONS: - return visitor.visitReadOrganizations(); - case DELETE_ROLES: - return visitor.visitDeleteRoles(); - case READ_CONNECTION_PROFILES: + case READ_LOGS: + return visitor.visitReadLogs(); + case READ_CONNECTION_PROFILES: return visitor.visitReadConnectionProfiles(); + case DELETE_EVENT_STREAMS: + return visitor.visitDeleteEventStreams(); case UPDATE_PHONE_TEMPLATES: return visitor.visitUpdatePhoneTemplates(); + case READ_GUARDIAN_ENROLLMENTS: + return visitor.visitReadGuardianEnrollments(); + case DELETE_FLOWS: + return visitor.visitDeleteFlows(); case READ_STATS: return visitor.visitReadStats(); - case READ_CUSTOM_DOMAINS: - return visitor.visitReadCustomDomains(); + case DELETE_ROLES: + return visitor.visitDeleteRoles(); + case READ_ENCRYPTION_KEYS: + return visitor.visitReadEncryptionKeys(); + case CREATE_ORGANIZATION_INVITATIONS: + return visitor.visitCreateOrganizationInvitations(); + case DELETE_HOOKS: + return visitor.visitDeleteHooks(); + case CREATE_PHONE_TEMPLATES: + return visitor.visitCreatePhoneTemplates(); case READ_TOKEN_EXCHANGE_PROFILES: return visitor.visitReadTokenExchangeProfiles(); - case READ_GUARDIAN_ENROLLMENTS: - return visitor.visitReadGuardianEnrollments(); - case UPDATE_ORGANIZATIONS: - return visitor.visitUpdateOrganizations(); - case UPDATE_SELF_SERVICE_PROFILES: - return visitor.visitUpdateSelfServiceProfiles(); - case CREATE_ORGANIZATION_CLIENT_GRANTS: - return visitor.visitCreateOrganizationClientGrants(); - case DELETE_FLOWS_EXECUTIONS: - return visitor.visitDeleteFlowsExecutions(); case UPDATE_CONNECTIONS_KEYS: return visitor.visitUpdateConnectionsKeys(); + case DELETE_RESOURCE_SERVERS: + return visitor.visitDeleteResourceServers(); + case READ_RESOURCE_SERVERS: + return visitor.visitReadResourceServers(); case UPDATE_EVENT_DELIVERIES: return visitor.visitUpdateEventDeliveries(); - case DELETE_CURRENT_USER_DEVICE_CREDENTIALS: - return visitor.visitDeleteCurrentUserDeviceCredentials(); + case UPDATE_ORGANIZATION_CONNECTIONS: + return visitor.visitUpdateOrganizationConnections(); case READ_VDCS_TEMPLATES: return visitor.visitReadVdcsTemplates(); + case READ_ORGANIZATION_INVITATIONS: + return visitor.visitReadOrganizationInvitations(); case READ_PHONE_PROVIDERS: return visitor.visitReadPhoneProviders(); - case CREATE_CLIENT_GRANTS: - return visitor.visitCreateClientGrants(); - case DELETE_ANOMALY_BLOCKS: - return visitor.visitDeleteAnomalyBlocks(); - case READ_CONNECTIONS_KEYS: - return visitor.visitReadConnectionsKeys(); - case READ_ACTIONS: - return visitor.visitReadActions(); - case READ_RESOURCE_SERVERS: - return visitor.visitReadResourceServers(); - case UPDATE_TOKEN_EXCHANGE_PROFILES: - return visitor.visitUpdateTokenExchangeProfiles(); - case DELETE_ROLE_MEMBERS: - return visitor.visitDeleteRoleMembers(); - case READ_ORGANIZATION_CONNECTIONS: - return visitor.visitReadOrganizationConnections(); - case UPDATE_PROMPTS: - return visitor.visitUpdatePrompts(); - case CREATE_HOOKS: - return visitor.visitCreateHooks(); - case CREATE_CONNECTIONS: - return visitor.visitCreateConnections(); - case CREATE_EMAIL_TEMPLATES: - return visitor.visitCreateEmailTemplates(); - case UPDATE_ATTACK_PROTECTION: - return visitor.visitUpdateAttackProtection(); - case READ_MFA_POLICIES: - return visitor.visitReadMfaPolicies(); - case UPDATE_HOOKS: - return visitor.visitUpdateHooks(); - case DELETE_USERS: - return visitor.visitDeleteUsers(); - case CREATE_CLIENT_CREDENTIALS: - return visitor.visitCreateClientCredentials(); - case UPDATE_CLIENT_CREDENTIALS: - return visitor.visitUpdateClientCredentials(); - case CREATE_ACTIONS: - return visitor.visitCreateActions(); - case READ_EVENT_DELIVERIES: - return visitor.visitReadEventDeliveries(); - case DELETE_PHONE_TEMPLATES: - return visitor.visitDeletePhoneTemplates(); - case READ_REFRESH_TOKENS: - return visitor.visitReadRefreshTokens(); - case UPDATE_EMAIL_TEMPLATES: - return visitor.visitUpdateEmailTemplates(); - case READ_ROLE_MEMBERS: - return visitor.visitReadRoleMembers(); - case CREATE_ORGANIZATION_MEMBERS: - return visitor.visitCreateOrganizationMembers(); + case READ_NETWORK_ACLS: + return visitor.visitReadNetworkAcls(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -1073,446 +1077,448 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static OauthScope valueOf(String value) { switch (value) { - case "read:authentication_methods": - return READ_AUTHENTICATION_METHODS; - case "update:client_token_vault_privileged_access": - return UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS; - case "update:users_app_metadata": - return UPDATE_USERS_APP_METADATA; - case "read:anomaly_blocks": - return READ_ANOMALY_BLOCKS; - case "read:client_summary": - return READ_CLIENT_SUMMARY; + case "delete:actions": + return DELETE_ACTIONS; + case "read:connections_keys": + return READ_CONNECTIONS_KEYS; + case "read:groups": + return READ_GROUPS; + case "read:actions": + return READ_ACTIONS; + case "delete:role_members": + return DELETE_ROLE_MEMBERS; + case "create:client_grants": + return CREATE_CLIENT_GRANTS; + case "update:token_exchange_profiles": + return UPDATE_TOKEN_EXCHANGE_PROFILES; + case "read:current_user": + return READ_CURRENT_USER; + case "read:scim_token": + return READ_SCIM_TOKEN; + case "update:roles": + return UPDATE_ROLES; + case "create:organizations": + return CREATE_ORGANIZATIONS; + case "read:connections": + return READ_CONNECTIONS; + case "create:directory_provisionings": + return CREATE_DIRECTORY_PROVISIONINGS; + case "delete:organizations": + return DELETE_ORGANIZATIONS; + case "create:organization_member_roles": + return CREATE_ORGANIZATION_MEMBER_ROLES; + case "delete:client_grants": + return DELETE_CLIENT_GRANTS; + case "update:current_user_metadata": + return UPDATE_CURRENT_USER_METADATA; + case "read:event_deliveries": + return READ_EVENT_DELIVERIES; + case "delete:phone_providers": + return DELETE_PHONE_PROVIDERS; + case "update:clients": + return UPDATE_CLIENTS; + case "read:refresh_tokens": + return READ_REFRESH_TOKENS; + case "create:sso_access_tickets": + return CREATE_SSO_ACCESS_TICKETS; + case "update:email_templates": + return UPDATE_EMAIL_TEMPLATES; + case "create:users": + return CREATE_USERS; + case "read:phone_templates": + return READ_PHONE_TEMPLATES; + case "delete:groups": + return DELETE_GROUPS; + case "delete:organization_connections": + return DELETE_ORGANIZATION_CONNECTIONS; + case "read:role_members": + return READ_ROLE_MEMBERS; + case "delete:federated_connections_tokens": + return DELETE_FEDERATED_CONNECTIONS_TOKENS; + case "read:self_service_profiles": + return READ_SELF_SERVICE_PROFILES; + case "create:organization_discovery_domains": + return CREATE_ORGANIZATION_DISCOVERY_DOMAINS; case "read:scim_config": return READ_SCIM_CONFIG; - case "create:rules": - return CREATE_RULES; case "update:scim_config": return UPDATE_SCIM_CONFIG; - case "read:prompts": - return READ_PROMPTS; - case "create:organization_discovery_domains": - return CREATE_ORGANIZATION_DISCOVERY_DOMAINS; - case "create:phone_templates": - return CREATE_PHONE_TEMPLATES; - case "update:phone_providers": - return UPDATE_PHONE_PROVIDERS; - case "create:roles": - return CREATE_ROLES; + case "delete:clients": + return DELETE_CLIENTS; + case "read:flows_executions": + return READ_FLOWS_EXECUTIONS; case "delete:authentication_methods": return DELETE_AUTHENTICATION_METHODS; case "create:connections_keys": return CREATE_CONNECTIONS_KEYS; - case "update:rules": - return UPDATE_RULES; - case "update:flows_vault_connections": - return UPDATE_FLOWS_VAULT_CONNECTIONS; - case "read:encryption_keys": - return READ_ENCRYPTION_KEYS; - case "delete:sessions": - return DELETE_SESSIONS; - case "update:actions": - return UPDATE_ACTIONS; - case "create:event_streams": - return CREATE_EVENT_STREAMS; - case "delete:event_streams": - return DELETE_EVENT_STREAMS; - case "delete:flows": - return DELETE_FLOWS; - case "delete:phone_providers": - return DELETE_PHONE_PROVIDERS; - case "delete:self_service_profiles": - return DELETE_SELF_SERVICE_PROFILES; - case "read:group_members": - return READ_GROUP_MEMBERS; + case "delete:organization_client_grants": + return DELETE_ORGANIZATION_CLIENT_GRANTS; + case "update:self_service_profiles": + return UPDATE_SELF_SERVICE_PROFILES; + case "create:roles": + return CREATE_ROLES; case "create:signing_keys": return CREATE_SIGNING_KEYS; - case "update:signing_keys": - return UPDATE_SIGNING_KEYS; - case "create:user_tickets": - return CREATE_USER_TICKETS; - case "delete:grants": - return DELETE_GRANTS; - case "delete:refresh_tokens": - return DELETE_REFRESH_TOKENS; - case "read:rules_configs": - return READ_RULES_CONFIGS; - case "create:self_service_profiles": - return CREATE_SELF_SERVICE_PROFILES; - case "update:refresh_tokens": - return UPDATE_REFRESH_TOKENS; - case "read:user_idp_tokens": - return READ_USER_IDP_TOKENS; + case "update:event_streams": + return UPDATE_EVENT_STREAMS; + case "read:group_members": + return READ_GROUP_MEMBERS; + case "update:actions": + return UPDATE_ACTIONS; + case "create:flows": + return CREATE_FLOWS; case "read:custom_signing_keys": return READ_CUSTOM_SIGNING_KEYS; - case "read:hooks": - return READ_HOOKS; - case "create:current_user_device_credentials": - return CREATE_CURRENT_USER_DEVICE_CREDENTIALS; - case "delete:branding": - return DELETE_BRANDING; case "delete:client_credentials": return DELETE_CLIENT_CREDENTIALS; - case "update:tenant_settings": - return UPDATE_TENANT_SETTINGS; - case "read:organization_invitations": - return READ_ORGANIZATION_INVITATIONS; - case "read:grants": - return READ_GRANTS; case "delete:organization_invitations": return DELETE_ORGANIZATION_INVITATIONS; - case "update:rules_configs": - return UPDATE_RULES_CONFIGS; - case "update:connection_profiles": - return UPDATE_CONNECTION_PROFILES; - case "read:groups": - return READ_GROUPS; - case "delete:actions": - return DELETE_ACTIONS; - case "update:authentication_methods": - return UPDATE_AUTHENTICATION_METHODS; - case "create:vdcs_templates": + case "create:organization_client_grants": + return CREATE_ORGANIZATION_CLIENT_GRANTS; + case "read:user_idp_tokens": + return READ_USER_IDP_TOKENS; + case "delete:refresh_tokens": + return DELETE_REFRESH_TOKENS; + case "create:self_service_profiles": + return CREATE_SELF_SERVICE_PROFILES; + case "update:user_attribute_profiles": + return UPDATE_USER_ATTRIBUTE_PROFILES; + case "create:vdcs_templates": return CREATE_VDCS_TEMPLATES; - case "read:attack_protection": - return READ_ATTACK_PROTECTION; - case "read:organization_discovery_domains": - return READ_ORGANIZATION_DISCOVERY_DOMAINS; case "create:custom_domains": return CREATE_CUSTOM_DOMAINS; - case "read:current_user": - return READ_CURRENT_USER; - case "delete:organization_connections": - return DELETE_ORGANIZATION_CONNECTIONS; + case "read:organization_discovery_domains": + return READ_ORGANIZATION_DISCOVERY_DOMAINS; + case "delete:directory_provisionings": + return DELETE_DIRECTORY_PROVISIONINGS; case "read:client_credentials": return READ_CLIENT_CREDENTIALS; - case "create:organizations": - return CREATE_ORGANIZATIONS; + case "create:email_provider": + return CREATE_EMAIL_PROVIDER; + case "create:scim_token": + return CREATE_SCIM_TOKEN; + case "read:guardian_factors": + return READ_GUARDIAN_FACTORS; + case "delete:connection_profiles": + return DELETE_CONNECTION_PROFILES; + case "update:flows": + return UPDATE_FLOWS; case "read:organizations_summary": return READ_ORGANIZATIONS_SUMMARY; - case "delete:organizations": - return DELETE_ORGANIZATIONS; - case "read:scim_token": - return READ_SCIM_TOKEN; - case "read:connections": - return READ_CONNECTIONS; - case "read:signing_keys": - return READ_SIGNING_KEYS; - case "delete:federated_connections_tokens": - return DELETE_FEDERATED_CONNECTIONS_TOKENS; - case "delete:connections": - return DELETE_CONNECTIONS; - case "update:resource_servers": - return UPDATE_RESOURCE_SERVERS; - case "create:users": - return CREATE_USERS; - case "read:phone_templates": - return READ_PHONE_TEMPLATES; - case "update:roles": - return UPDATE_ROLES; - case "create:sso_access_tickets": - return CREATE_SSO_ACCESS_TICKETS; - case "delete:groups": - return DELETE_GROUPS; - case "read:self_service_profile_custom_texts": - return READ_SELF_SERVICE_PROFILE_CUSTOM_TEXTS; - case "delete:scim_token": - return DELETE_SCIM_TOKEN; + case "read:sessions": + return READ_SESSIONS; + case "create:resource_servers": + return CREATE_RESOURCE_SERVERS; + case "create:flows_vault_connections": + return CREATE_FLOWS_VAULT_CONNECTIONS; + case "read:branding": + return READ_BRANDING; + case "update:forms": + return UPDATE_FORMS; + case "update:mfa_policies": + return UPDATE_MFA_POLICIES; + case "read:logs_users": + return READ_LOGS_USERS; + case "read:organization_client_grants": + return READ_ORGANIZATION_CLIENT_GRANTS; + case "read:roles": + return READ_ROLES; + case "read:device_credentials": + return READ_DEVICE_CREDENTIALS; + case "create:encryption_keys": + return CREATE_ENCRYPTION_KEYS; + case "update:current_user_identities": + return UPDATE_CURRENT_USER_IDENTITIES; case "delete:forms": return DELETE_FORMS; - case "read:self_service_profiles": - return READ_SELF_SERVICE_PROFILES; - case "delete:rules_configs": - return DELETE_RULES_CONFIGS; + case "read:self_service_profile_custom_texts": + return READ_SELF_SERVICE_PROFILE_CUSTOM_TEXTS; + case "update:organization_discovery_domains": + return UPDATE_ORGANIZATION_DISCOVERY_DOMAINS; + case "read:anomaly_blocks": + return READ_ANOMALY_BLOCKS; + case "update:client_token_vault_privileged_access": + return UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS; case "create:forms": return CREATE_FORMS; - case "read:user_attribute_profiles": - return READ_USER_ATTRIBUTE_PROFILES; - case "read:directory_provisionings": - return READ_DIRECTORY_PROVISIONINGS; + case "read:client_summary": + return READ_CLIENT_SUMMARY; case "create:authentication_methods": return CREATE_AUTHENTICATION_METHODS; + case "read:directory_provisionings": + return READ_DIRECTORY_PROVISIONINGS; case "create:phone_providers": return CREATE_PHONE_PROVIDERS; - case "delete:organization_client_grants": - return DELETE_ORGANIZATION_CLIENT_GRANTS; - case "create:scim_config": - return CREATE_SCIM_CONFIG; + case "create:rules": + return CREATE_RULES; + case "read:email_templates": + return READ_EMAIL_TEMPLATES; + case "update:rules": + return UPDATE_RULES; + case "update:flows_vault_connections": + return UPDATE_FLOWS_VAULT_CONNECTIONS; + case "update:phone_providers": + return UPDATE_PHONE_PROVIDERS; + case "create:event_streams": + return CREATE_EVENT_STREAMS; + case "delete:self_service_profiles": + return DELETE_SELF_SERVICE_PROFILES; + case "delete:sessions": + return DELETE_SESSIONS; case "create:clients": return CREATE_CLIENTS; + case "delete:log_streams": + return DELETE_LOG_STREAMS; + case "create:user_attribute_profiles": + return CREATE_USER_ATTRIBUTE_PROFILES; case "update:users": return UPDATE_USERS; - case "read:organization_members": - return READ_ORGANIZATION_MEMBERS; - case "update:event_streams": - return UPDATE_EVENT_STREAMS; - case "update:custom_signing_keys": - return UPDATE_CUSTOM_SIGNING_KEYS; + case "read:grants": + return READ_GRANTS; + case "update:signing_keys": + return UPDATE_SIGNING_KEYS; + case "create:user_tickets": + return CREATE_USER_TICKETS; case "read:log_streams": return READ_LOG_STREAMS; - case "update:log_streams": - return UPDATE_LOG_STREAMS; + case "update:branding": + return UPDATE_BRANDING; + case "update:custom_signing_keys": + return UPDATE_CUSTOM_SIGNING_KEYS; case "read:clients": return READ_CLIENTS; - case "delete:encryption_keys": - return DELETE_ENCRYPTION_KEYS; - case "update:user_attribute_profiles": - return UPDATE_USER_ATTRIBUTE_PROFILES; + case "delete:grants": + return DELETE_GRANTS; + case "update:refresh_tokens": + return UPDATE_REFRESH_TOKENS; + case "update:rules_configs": + return UPDATE_RULES_CONFIGS; + case "update:custom_domains": + return UPDATE_CUSTOM_DOMAINS; + case "read:rules_configs": + return READ_RULES_CONFIGS; + case "read:hooks": + return READ_HOOKS; + case "create:current_user_device_credentials": + return CREATE_CURRENT_USER_DEVICE_CREDENTIALS; + case "delete:branding": + return DELETE_BRANDING; + case "update:tenant_settings": + return UPDATE_TENANT_SETTINGS; case "create:custom_signing_keys": return CREATE_CUSTOM_SIGNING_KEYS; - case "read:client_keys": - return READ_CLIENT_KEYS; - case "create:email_provider": - return CREATE_EMAIL_PROVIDER; - case "update:network_acls": - return UPDATE_NETWORK_ACLS; + case "read:authentication_methods": + return READ_AUTHENTICATION_METHODS; + case "update:attack_protection": + return UPDATE_ATTACK_PROTECTION; + case "create:guardian_enrollment_tickets": + return CREATE_GUARDIAN_ENROLLMENT_TICKETS; + case "delete:email_provider": + return DELETE_EMAIL_PROVIDER; + case "delete:custom_domains": + return DELETE_CUSTOM_DOMAINS; + case "create:network_acls": + return CREATE_NETWORK_ACLS; case "delete:vdcs_templates": return DELETE_VDCS_TEMPLATES; + case "read:events": + return READ_EVENTS; case "read:flows": return READ_FLOWS; - case "read:sessions": - return READ_SESSIONS; - case "create:organization_member_roles": - return CREATE_ORGANIZATION_MEMBER_ROLES; - case "create:directory_provisionings": - return CREATE_DIRECTORY_PROVISIONINGS; + case "read:forms": + return READ_FORMS; + case "update:network_acls": + return UPDATE_NETWORK_ACLS; + case "update:sessions": + return UPDATE_SESSIONS; + case "create:hooks": + return CREATE_HOOKS; + case "read:client_keys": + return READ_CLIENT_KEYS; + case "create:log_streams": + return CREATE_LOG_STREAMS; + case "read:federated_connections_tokens": + return READ_FEDERATED_CONNECTIONS_TOKENS; case "delete:organization_members": return DELETE_ORGANIZATION_MEMBERS; - case "update:forms": - return UPDATE_FORMS; - case "create:resource_servers": - return CREATE_RESOURCE_SERVERS; - case "read:branding": - return READ_BRANDING; - case "update:mfa_policies": - return UPDATE_MFA_POLICIES; - case "update:current_user_metadata": - return UPDATE_CURRENT_USER_METADATA; + case "read:organization_member_roles": + return READ_ORGANIZATION_MEMBER_ROLES; + case "delete:scim_config": + return DELETE_SCIM_CONFIG; + case "update:hooks": + return UPDATE_HOOKS; + case "read:mfa_policies": + return READ_MFA_POLICIES; + case "create:connection_profiles": + return CREATE_CONNECTION_PROFILES; + case "create:actions": + return CREATE_ACTIONS; + case "read:client_grants": + return READ_CLIENT_GRANTS; + case "update:directory_provisionings": + return UPDATE_DIRECTORY_PROVISIONINGS; + case "delete:user_attribute_profiles": + return DELETE_USER_ATTRIBUTE_PROFILES; case "read:flows_vault_connections": return READ_FLOWS_VAULT_CONNECTIONS; - case "read:organization_client_grants": - return READ_ORGANIZATION_CLIENT_GRANTS; - case "update:clients": - return UPDATE_CLIENTS; - case "delete:client_grants": - return DELETE_CLIENT_GRANTS; - case "create:encryption_keys": - return CREATE_ENCRYPTION_KEYS; case "update:encryption_keys": return UPDATE_ENCRYPTION_KEYS; - case "read:roles": - return READ_ROLES; - case "read:device_credentials": - return READ_DEVICE_CREDENTIALS; - case "delete:directory_provisionings": - return DELETE_DIRECTORY_PROVISIONINGS; + case "update:client_keys": + return UPDATE_CLIENT_KEYS; + case "delete:guardian_enrollments": + return DELETE_GUARDIAN_ENROLLMENTS; case "delete:token_exchange_profiles": return DELETE_TOKEN_EXCHANGE_PROFILES; - case "update:organization_discovery_domains": - return UPDATE_ORGANIZATION_DISCOVERY_DOMAINS; - case "read:logs": - return READ_LOGS; case "update:email_provider": return UPDATE_EMAIL_PROVIDER; - case "delete:flows_vault_connections": - return DELETE_FLOWS_VAULT_CONNECTIONS; - case "delete:network_acls": - return DELETE_NETWORK_ACLS; - case "update:self_service_profile_custom_texts": - return UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS; + case "create:organization_connections": + return CREATE_ORGANIZATION_CONNECTIONS; + case "delete:rules_configs": + return DELETE_RULES_CONFIGS; + case "read:user_attribute_profiles": + return READ_USER_ATTRIBUTE_PROFILES; + case "read:email_provider": + return READ_EMAIL_PROVIDER; + case "delete:flows_vault_connections": + return DELETE_FLOWS_VAULT_CONNECTIONS; case "delete:organization_discovery_domains": return DELETE_ORGANIZATION_DISCOVERY_DOMAINS; case "update:client_grants": return UPDATE_CLIENT_GRANTS; - case "read:email_templates": - return READ_EMAIL_TEMPLATES; + case "delete:organization_member_roles": + return DELETE_ORGANIZATION_MEMBER_ROLES; case "update:vdcs_templates": return UPDATE_VDCS_TEMPLATES; - case "create:user_attribute_profiles": - return CREATE_USER_ATTRIBUTE_PROFILES; - case "create:organization_invitations": - return CREATE_ORGANIZATION_INVITATIONS; - case "delete:log_streams": - return DELETE_LOG_STREAMS; + case "read:organizations": + return READ_ORGANIZATIONS; + case "read:custom_domains": + return READ_CUSTOM_DOMAINS; + case "create:scim_config": + return CREATE_SCIM_CONFIG; case "delete:custom_signing_keys": return DELETE_CUSTOM_SIGNING_KEYS; - case "delete:resource_servers": - return DELETE_RESOURCE_SERVERS; - case "update:guardian_factors": - return UPDATE_GUARDIAN_FACTORS; - case "delete:organization_member_roles": - return DELETE_ORGANIZATION_MEMBER_ROLES; + case "update:organizations": + return UPDATE_ORGANIZATIONS; + case "delete:rules": + return DELETE_RULES; case "read:users": return READ_USERS; - case "update:branding": - return UPDATE_BRANDING; + case "update:guardian_factors": + return UPDATE_GUARDIAN_FACTORS; + case "delete:flows_executions": + return DELETE_FLOWS_EXECUTIONS; + case "read:organization_members": + return READ_ORGANIZATION_MEMBERS; case "delete:sso_access_tickets": return DELETE_SSO_ACCESS_TICKETS; - case "update:organization_connections": - return UPDATE_ORGANIZATION_CONNECTIONS; - case "update:custom_domains": - return UPDATE_CUSTOM_DOMAINS; - case "read:network_acls": - return READ_NETWORK_ACLS; - case "delete:email_provider": - return DELETE_EMAIL_PROVIDER; - case "read:forms": - return READ_FORMS; - case "create:guardian_enrollment_tickets": - return CREATE_GUARDIAN_ENROLLMENT_TICKETS; + case "update:log_streams": + return UPDATE_LOG_STREAMS; + case "delete:current_user_device_credentials": + return DELETE_CURRENT_USER_DEVICE_CREDENTIALS; case "read:event_streams": return READ_EVENT_STREAMS; - case "create:network_acls": - return CREATE_NETWORK_ACLS; - case "delete:custom_domains": - return DELETE_CUSTOM_DOMAINS; - case "create:scim_token": - return CREATE_SCIM_TOKEN; - case "update:sessions": - return UPDATE_SESSIONS; - case "delete:connection_profiles": - return DELETE_CONNECTION_PROFILES; - case "update:connections": - return UPDATE_CONNECTIONS; + case "delete:encryption_keys": + return DELETE_ENCRYPTION_KEYS; + case "update:authentication_methods": + return UPDATE_AUTHENTICATION_METHODS; + case "delete:anomaly_blocks": + return DELETE_ANOMALY_BLOCKS; + case "delete:users": + return DELETE_USERS; + case "read:attack_protection": + return READ_ATTACK_PROTECTION; + case "read:organization_connections": + return READ_ORGANIZATION_CONNECTIONS; + case "create:connections": + return CREATE_CONNECTIONS; case "delete:device_credentials": return DELETE_DEVICE_CREDENTIALS; - case "read:guardian_factors": - return READ_GUARDIAN_FACTORS; + case "read:rules": + return READ_RULES; case "read:tenant_settings": return READ_TENANT_SETTINGS; - case "delete:scim_config": - return DELETE_SCIM_CONFIG; - case "delete:rules": - return DELETE_RULES; - case "read:organization_member_roles": - return READ_ORGANIZATION_MEMBER_ROLES; - case "read:federated_connections_tokens": - return READ_FEDERATED_CONNECTIONS_TOKENS; - case "update:flows": - return UPDATE_FLOWS; - case "create:log_streams": - return CREATE_LOG_STREAMS; - case "create:connection_profiles": - return CREATE_CONNECTION_PROFILES; - case "create:flows_vault_connections": - return CREATE_FLOWS_VAULT_CONNECTIONS; - case "update:directory_provisionings": - return UPDATE_DIRECTORY_PROVISIONINGS; - case "delete:user_attribute_profiles": - return DELETE_USER_ATTRIBUTE_PROFILES; - case "read:client_grants": - return READ_CLIENT_GRANTS; + case "update:prompts": + return UPDATE_PROMPTS; + case "create:email_templates": + return CREATE_EMAIL_TEMPLATES; + case "update:connections": + return UPDATE_CONNECTIONS; + case "create:client_credentials": + return CREATE_CLIENT_CREDENTIALS; + case "read:signing_keys": + return READ_SIGNING_KEYS; + case "delete:connections": + return DELETE_CONNECTIONS; + case "update:resource_servers": + return UPDATE_RESOURCE_SERVERS; + case "delete:phone_templates": + return DELETE_PHONE_TEMPLATES; case "create:token_exchange_profiles": return CREATE_TOKEN_EXCHANGE_PROFILES; - case "read:logs_users": - return READ_LOGS_USERS; - case "read:rules": - return READ_RULES; - case "delete:guardian_enrollments": - return DELETE_GUARDIAN_ENROLLMENTS; - case "update:client_keys": - return UPDATE_CLIENT_KEYS; - case "update:current_user_identities": - return UPDATE_CURRENT_USER_IDENTITIES; - case "create:organization_connections": - return CREATE_ORGANIZATION_CONNECTIONS; - case "read:email_provider": - return READ_EMAIL_PROVIDER; - case "read:flows_executions": - return READ_FLOWS_EXECUTIONS; - case "delete:clients": - return DELETE_CLIENTS; + case "delete:scim_token": + return DELETE_SCIM_TOKEN; + case "update:client_credentials": + return UPDATE_CLIENT_CREDENTIALS; + case "create:organization_members": + return CREATE_ORGANIZATION_MEMBERS; + case "update:connection_profiles": + return UPDATE_CONNECTION_PROFILES; + case "read:prompts": + return READ_PROMPTS; + case "update:users_app_metadata": + return UPDATE_USERS_APP_METADATA; + case "delete:network_acls": + return DELETE_NETWORK_ACLS; case "create:role_members": return CREATE_ROLE_MEMBERS; - case "create:flows": - return CREATE_FLOWS; - case "delete:hooks": - return DELETE_HOOKS; + case "update:self_service_profile_custom_texts": + return UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS; case "delete:current_user": return DELETE_CURRENT_USER; - case "read:organizations": - return READ_ORGANIZATIONS; - case "delete:roles": - return DELETE_ROLES; + case "read:logs": + return READ_LOGS; case "read:connection_profiles": return READ_CONNECTION_PROFILES; + case "delete:event_streams": + return DELETE_EVENT_STREAMS; case "update:phone_templates": return UPDATE_PHONE_TEMPLATES; + case "read:guardian_enrollments": + return READ_GUARDIAN_ENROLLMENTS; + case "delete:flows": + return DELETE_FLOWS; case "read:stats": return READ_STATS; - case "read:custom_domains": - return READ_CUSTOM_DOMAINS; + case "delete:roles": + return DELETE_ROLES; + case "read:encryption_keys": + return READ_ENCRYPTION_KEYS; + case "create:organization_invitations": + return CREATE_ORGANIZATION_INVITATIONS; + case "delete:hooks": + return DELETE_HOOKS; + case "create:phone_templates": + return CREATE_PHONE_TEMPLATES; case "read:token_exchange_profiles": return READ_TOKEN_EXCHANGE_PROFILES; - case "read:guardian_enrollments": - return READ_GUARDIAN_ENROLLMENTS; - case "update:organizations": - return UPDATE_ORGANIZATIONS; - case "update:self_service_profiles": - return UPDATE_SELF_SERVICE_PROFILES; - case "create:organization_client_grants": - return CREATE_ORGANIZATION_CLIENT_GRANTS; - case "delete:flows_executions": - return DELETE_FLOWS_EXECUTIONS; case "update:connections_keys": return UPDATE_CONNECTIONS_KEYS; + case "delete:resource_servers": + return DELETE_RESOURCE_SERVERS; + case "read:resource_servers": + return READ_RESOURCE_SERVERS; case "update:event_deliveries": return UPDATE_EVENT_DELIVERIES; - case "delete:current_user_device_credentials": - return DELETE_CURRENT_USER_DEVICE_CREDENTIALS; + case "update:organization_connections": + return UPDATE_ORGANIZATION_CONNECTIONS; case "read:vdcs_templates": return READ_VDCS_TEMPLATES; + case "read:organization_invitations": + return READ_ORGANIZATION_INVITATIONS; case "read:phone_providers": return READ_PHONE_PROVIDERS; - case "create:client_grants": - return CREATE_CLIENT_GRANTS; - case "delete:anomaly_blocks": - return DELETE_ANOMALY_BLOCKS; - case "read:connections_keys": - return READ_CONNECTIONS_KEYS; - case "read:actions": - return READ_ACTIONS; - case "read:resource_servers": - return READ_RESOURCE_SERVERS; - case "update:token_exchange_profiles": - return UPDATE_TOKEN_EXCHANGE_PROFILES; - case "delete:role_members": - return DELETE_ROLE_MEMBERS; - case "read:organization_connections": - return READ_ORGANIZATION_CONNECTIONS; - case "update:prompts": - return UPDATE_PROMPTS; - case "create:hooks": - return CREATE_HOOKS; - case "create:connections": - return CREATE_CONNECTIONS; - case "create:email_templates": - return CREATE_EMAIL_TEMPLATES; - case "update:attack_protection": - return UPDATE_ATTACK_PROTECTION; - case "read:mfa_policies": - return READ_MFA_POLICIES; - case "update:hooks": - return UPDATE_HOOKS; - case "delete:users": - return DELETE_USERS; - case "create:client_credentials": - return CREATE_CLIENT_CREDENTIALS; - case "update:client_credentials": - return UPDATE_CLIENT_CREDENTIALS; - case "create:actions": - return CREATE_ACTIONS; - case "read:event_deliveries": - return READ_EVENT_DELIVERIES; - case "delete:phone_templates": - return DELETE_PHONE_TEMPLATES; - case "read:refresh_tokens": - return READ_REFRESH_TOKENS; - case "update:email_templates": - return UPDATE_EMAIL_TEMPLATES; - case "read:role_members": - return READ_ROLE_MEMBERS; - case "create:organization_members": - return CREATE_ORGANIZATION_MEMBERS; + case "read:network_acls": + return READ_NETWORK_ACLS; default: return new OauthScope(Value.UNKNOWN, value); } @@ -1677,6 +1683,8 @@ public enum Value { DELETE_EVENT_STREAMS, + READ_EVENTS, + READ_FEDERATED_CONNECTIONS_TOKENS, DELETE_FEDERATED_CONNECTIONS_TOKENS, @@ -2121,6 +2129,8 @@ public interface Visitor { T visitDeleteEventStreams(); + T visitReadEvents(); + T visitReadFederatedConnectionsTokens(); T visitDeleteFederatedConnectionsTokens(); diff --git a/src/main/java/com/auth0/client/mgmt/types/PartialGroupsEnum.java b/src/main/java/com/auth0/client/mgmt/types/PartialGroupsEnum.java index a41bb5c0f..acf3de7a4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PartialGroupsEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/PartialGroupsEnum.java @@ -9,13 +9,13 @@ public final class PartialGroupsEnum { public static final PartialGroupsEnum SIGNUP_ID = new PartialGroupsEnum(Value.SIGNUP_ID, "signup-id"); - public static final PartialGroupsEnum PASSKEYS = new PartialGroupsEnum(Value.PASSKEYS, "passkeys"); - public static final PartialGroupsEnum LOGIN = new PartialGroupsEnum(Value.LOGIN, "login"); public static final PartialGroupsEnum SIGNUP_PASSWORD = new PartialGroupsEnum(Value.SIGNUP_PASSWORD, "signup-password"); + public static final PartialGroupsEnum LOGIN_ID = new PartialGroupsEnum(Value.LOGIN_ID, "login-id"); + public static final PartialGroupsEnum SIGNUP = new PartialGroupsEnum(Value.SIGNUP, "signup"); public static final PartialGroupsEnum CUSTOMIZED_CONSENT = @@ -27,7 +27,7 @@ public final class PartialGroupsEnum { public static final PartialGroupsEnum LOGIN_PASSWORDLESS = new PartialGroupsEnum(Value.LOGIN_PASSWORDLESS, "login-passwordless"); - public static final PartialGroupsEnum LOGIN_ID = new PartialGroupsEnum(Value.LOGIN_ID, "login-id"); + public static final PartialGroupsEnum PASSKEYS = new PartialGroupsEnum(Value.PASSKEYS, "passkeys"); private final Value value; @@ -63,12 +63,12 @@ public T visit(Visitor visitor) { switch (value) { case SIGNUP_ID: return visitor.visitSignupId(); - case PASSKEYS: - return visitor.visitPasskeys(); case LOGIN: return visitor.visitLogin(); case SIGNUP_PASSWORD: return visitor.visitSignupPassword(); + case LOGIN_ID: + return visitor.visitLoginId(); case SIGNUP: return visitor.visitSignup(); case CUSTOMIZED_CONSENT: @@ -77,8 +77,8 @@ public T visit(Visitor visitor) { return visitor.visitLoginPassword(); case LOGIN_PASSWORDLESS: return visitor.visitLoginPasswordless(); - case LOGIN_ID: - return visitor.visitLoginId(); + case PASSKEYS: + return visitor.visitPasskeys(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -90,12 +90,12 @@ public static PartialGroupsEnum valueOf(String value) { switch (value) { case "signup-id": return SIGNUP_ID; - case "passkeys": - return PASSKEYS; case "login": return LOGIN; case "signup-password": return SIGNUP_PASSWORD; + case "login-id": + return LOGIN_ID; case "signup": return SIGNUP; case "customized-consent": @@ -104,8 +104,8 @@ public static PartialGroupsEnum valueOf(String value) { return LOGIN_PASSWORD; case "login-passwordless": return LOGIN_PASSWORDLESS; - case "login-id": - return LOGIN_ID; + case "passkeys": + return PASSKEYS; default: return new PartialGroupsEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/PasswordCharacterTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/PasswordCharacterTypeEnum.java index 6e19cafe7..42fd7e949 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PasswordCharacterTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/PasswordCharacterTypeEnum.java @@ -12,11 +12,11 @@ public final class PasswordCharacterTypeEnum { public static final PasswordCharacterTypeEnum LOWERCASE = new PasswordCharacterTypeEnum(Value.LOWERCASE, "lowercase"); - public static final PasswordCharacterTypeEnum SPECIAL = new PasswordCharacterTypeEnum(Value.SPECIAL, "special"); - public static final PasswordCharacterTypeEnum UPPERCASE = new PasswordCharacterTypeEnum(Value.UPPERCASE, "uppercase"); + public static final PasswordCharacterTypeEnum SPECIAL = new PasswordCharacterTypeEnum(Value.SPECIAL, "special"); + private final Value value; private final String string; @@ -54,10 +54,10 @@ public T visit(Visitor visitor) { return visitor.visitNumber(); case LOWERCASE: return visitor.visitLowercase(); - case SPECIAL: - return visitor.visitSpecial(); case UPPERCASE: return visitor.visitUppercase(); + case SPECIAL: + return visitor.visitSpecial(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -71,10 +71,10 @@ public static PasswordCharacterTypeEnum valueOf(String value) { return NUMBER; case "lowercase": return LOWERCASE; - case "special": - return SPECIAL; case "uppercase": return UPPERCASE; + case "special": + return SPECIAL; default: return new PasswordCharacterTypeEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderConfiguration.java index 7d13e70b7..c9a3cabf3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderConfiguration.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = PhoneProviderConfiguration.Deserializer.class) @@ -81,13 +82,19 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("sid") + && ((Map) value).containsKey("delivery_methods")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TwilioProviderConfiguration.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CustomProviderConfiguration.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("delivery_methods")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CustomProviderConfiguration.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderCredentials.java b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderCredentials.java index 6861f7eeb..0c73d09d6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderCredentials.java +++ b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderCredentials.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = PhoneProviderCredentials.Deserializer.class) @@ -81,9 +82,11 @@ static final class Deserializer extends StdDeserializer && ((Map) value).containsKey("auth_token")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TwilioProviderCredentials.class)); + } catch (RuntimeException e) { + } } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, CustomProviderCredentials.class)); diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateNotificationTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateNotificationTypeEnum.java index 7a64e0b1e..e07536efb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateNotificationTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateNotificationTypeEnum.java @@ -13,12 +13,12 @@ public final class PhoneTemplateNotificationTypeEnum { public static final PhoneTemplateNotificationTypeEnum OTP_VERIFY = new PhoneTemplateNotificationTypeEnum(Value.OTP_VERIFY, "otp_verify"); - public static final PhoneTemplateNotificationTypeEnum BLOCKED_ACCOUNT = - new PhoneTemplateNotificationTypeEnum(Value.BLOCKED_ACCOUNT, "blocked_account"); - public static final PhoneTemplateNotificationTypeEnum OTP_ENROLL = new PhoneTemplateNotificationTypeEnum(Value.OTP_ENROLL, "otp_enroll"); + public static final PhoneTemplateNotificationTypeEnum BLOCKED_ACCOUNT = + new PhoneTemplateNotificationTypeEnum(Value.BLOCKED_ACCOUNT, "blocked_account"); + public static final PhoneTemplateNotificationTypeEnum PASSWORD_BREACH = new PhoneTemplateNotificationTypeEnum(Value.PASSWORD_BREACH, "password_breach"); @@ -59,10 +59,10 @@ public T visit(Visitor visitor) { return visitor.visitChangePassword(); case OTP_VERIFY: return visitor.visitOtpVerify(); - case BLOCKED_ACCOUNT: - return visitor.visitBlockedAccount(); case OTP_ENROLL: return visitor.visitOtpEnroll(); + case BLOCKED_ACCOUNT: + return visitor.visitBlockedAccount(); case PASSWORD_BREACH: return visitor.visitPasswordBreach(); case UNKNOWN: @@ -78,10 +78,10 @@ public static PhoneTemplateNotificationTypeEnum valueOf(String value) { return CHANGE_PASSWORD; case "otp_verify": return OTP_VERIFY; - case "blocked_account": - return BLOCKED_ACCOUNT; case "otp_enroll": return OTP_ENROLL; + case "blocked_account": + return BLOCKED_ACCOUNT; case "password_breach": return PASSWORD_BREACH; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/PostConnectionKeysAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/PostConnectionKeysAlgEnum.java index 061807054..4ee78c8ec 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PostConnectionKeysAlgEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/PostConnectionKeysAlgEnum.java @@ -9,18 +9,18 @@ public final class PostConnectionKeysAlgEnum { public static final PostConnectionKeysAlgEnum RS512 = new PostConnectionKeysAlgEnum(Value.RS512, "RS512"); - public static final PostConnectionKeysAlgEnum PS256 = new PostConnectionKeysAlgEnum(Value.PS256, "PS256"); - - public static final PostConnectionKeysAlgEnum ES256 = new PostConnectionKeysAlgEnum(Value.ES256, "ES256"); - public static final PostConnectionKeysAlgEnum PS384 = new PostConnectionKeysAlgEnum(Value.PS384, "PS384"); public static final PostConnectionKeysAlgEnum ES384 = new PostConnectionKeysAlgEnum(Value.ES384, "ES384"); - public static final PostConnectionKeysAlgEnum RS256 = new PostConnectionKeysAlgEnum(Value.RS256, "RS256"); + public static final PostConnectionKeysAlgEnum PS256 = new PostConnectionKeysAlgEnum(Value.PS256, "PS256"); + + public static final PostConnectionKeysAlgEnum ES256 = new PostConnectionKeysAlgEnum(Value.ES256, "ES256"); public static final PostConnectionKeysAlgEnum RS384 = new PostConnectionKeysAlgEnum(Value.RS384, "RS384"); + public static final PostConnectionKeysAlgEnum RS256 = new PostConnectionKeysAlgEnum(Value.RS256, "RS256"); + private final Value value; private final String string; @@ -56,18 +56,18 @@ public T visit(Visitor visitor) { switch (value) { case RS512: return visitor.visitRs512(); - case PS256: - return visitor.visitPs256(); - case ES256: - return visitor.visitEs256(); case PS384: return visitor.visitPs384(); case ES384: return visitor.visitEs384(); - case RS256: - return visitor.visitRs256(); + case PS256: + return visitor.visitPs256(); + case ES256: + return visitor.visitEs256(); case RS384: return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -79,18 +79,18 @@ public static PostConnectionKeysAlgEnum valueOf(String value) { switch (value) { case "RS512": return RS512; - case "PS256": - return PS256; - case "ES256": - return ES256; case "PS384": return PS384; case "ES384": return ES384; - case "RS256": - return RS256; + case "PS256": + return PS256; + case "ES256": + return ES256; case "RS384": return RS384; + case "RS256": + return RS256; default: return new PostConnectionKeysAlgEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/PromptGroupNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/PromptGroupNameEnum.java index 2f838ba30..705e62ea9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PromptGroupNameEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/PromptGroupNameEnum.java @@ -7,6 +7,10 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class PromptGroupNameEnum { + public static final PromptGroupNameEnum MFA_VOICE = new PromptGroupNameEnum(Value.MFA_VOICE, "mfa-voice"); + + public static final PromptGroupNameEnum INVITATION = new PromptGroupNameEnum(Value.INVITATION, "invitation"); + public static final PromptGroupNameEnum MFA_PUSH = new PromptGroupNameEnum(Value.MFA_PUSH, "mfa-push"); public static final PromptGroupNameEnum CAPTCHA = new PromptGroupNameEnum(Value.CAPTCHA, "captcha"); @@ -14,10 +18,6 @@ public final class PromptGroupNameEnum { public static final PromptGroupNameEnum EMAIL_IDENTIFIER_CHALLENGE = new PromptGroupNameEnum(Value.EMAIL_IDENTIFIER_CHALLENGE, "email-identifier-challenge"); - public static final PromptGroupNameEnum INVITATION = new PromptGroupNameEnum(Value.INVITATION, "invitation"); - - public static final PromptGroupNameEnum MFA_VOICE = new PromptGroupNameEnum(Value.MFA_VOICE, "mfa-voice"); - public static final PromptGroupNameEnum SIGNUP = new PromptGroupNameEnum(Value.SIGNUP, "signup"); public static final PromptGroupNameEnum CUSTOMIZED_CONSENT = @@ -26,34 +26,32 @@ public final class PromptGroupNameEnum { public static final PromptGroupNameEnum BRUTE_FORCE_PROTECTION = new PromptGroupNameEnum(Value.BRUTE_FORCE_PROTECTION, "brute-force-protection"); + public static final PromptGroupNameEnum PHONE_IDENTIFIER_ENROLLMENT = + new PromptGroupNameEnum(Value.PHONE_IDENTIFIER_ENROLLMENT, "phone-identifier-enrollment"); + public static final PromptGroupNameEnum MFA = new PromptGroupNameEnum(Value.MFA, "mfa"); public static final PromptGroupNameEnum COMMON = new PromptGroupNameEnum(Value.COMMON, "common"); - public static final PromptGroupNameEnum MFA_PHONE = new PromptGroupNameEnum(Value.MFA_PHONE, "mfa-phone"); - - public static final PromptGroupNameEnum CUSTOM_FORM = new PromptGroupNameEnum(Value.CUSTOM_FORM, "custom-form"); - public static final PromptGroupNameEnum LOGOUT = new PromptGroupNameEnum(Value.LOGOUT, "logout"); - public static final PromptGroupNameEnum PHONE_IDENTIFIER_ENROLLMENT = - new PromptGroupNameEnum(Value.PHONE_IDENTIFIER_ENROLLMENT, "phone-identifier-enrollment"); + public static final PromptGroupNameEnum MFA_PHONE = new PromptGroupNameEnum(Value.MFA_PHONE, "mfa-phone"); - public static final PromptGroupNameEnum LOGIN_PASSWORD = - new PromptGroupNameEnum(Value.LOGIN_PASSWORD, "login-password"); + public static final PromptGroupNameEnum CUSTOM_FORM = new PromptGroupNameEnum(Value.CUSTOM_FORM, "custom-form"); public static final PromptGroupNameEnum LOGIN_EMAIL_VERIFICATION = new PromptGroupNameEnum(Value.LOGIN_EMAIL_VERIFICATION, "login-email-verification"); - public static final PromptGroupNameEnum ORGANIZATIONS = - new PromptGroupNameEnum(Value.ORGANIZATIONS, "organizations"); - public static final PromptGroupNameEnum LOGIN_ID = new PromptGroupNameEnum(Value.LOGIN_ID, "login-id"); public static final PromptGroupNameEnum ASYNC_APPROVAL_FLOW = new PromptGroupNameEnum(Value.ASYNC_APPROVAL_FLOW, "async-approval-flow"); - public static final PromptGroupNameEnum MFA_OTP = new PromptGroupNameEnum(Value.MFA_OTP, "mfa-otp"); + public static final PromptGroupNameEnum LOGIN_PASSWORD = + new PromptGroupNameEnum(Value.LOGIN_PASSWORD, "login-password"); + + public static final PromptGroupNameEnum ORGANIZATIONS = + new PromptGroupNameEnum(Value.ORGANIZATIONS, "organizations"); public static final PromptGroupNameEnum STATUS = new PromptGroupNameEnum(Value.STATUS, "status"); @@ -64,36 +62,38 @@ public final class PromptGroupNameEnum { public static final PromptGroupNameEnum SIGNUP_ID = new PromptGroupNameEnum(Value.SIGNUP_ID, "signup-id"); - public static final PromptGroupNameEnum LOGIN_PASSWORDLESS = - new PromptGroupNameEnum(Value.LOGIN_PASSWORDLESS, "login-passwordless"); - - public static final PromptGroupNameEnum MFA_SMS = new PromptGroupNameEnum(Value.MFA_SMS, "mfa-sms"); - - public static final PromptGroupNameEnum MFA_WEBAUTHN = new PromptGroupNameEnum(Value.MFA_WEBAUTHN, "mfa-webauthn"); + public static final PromptGroupNameEnum MFA_OTP = new PromptGroupNameEnum(Value.MFA_OTP, "mfa-otp"); public static final PromptGroupNameEnum RESET_PASSWORD = new PromptGroupNameEnum(Value.RESET_PASSWORD, "reset-password"); - public static final PromptGroupNameEnum MFA_RECOVERY_CODE = - new PromptGroupNameEnum(Value.MFA_RECOVERY_CODE, "mfa-recovery-code"); + public static final PromptGroupNameEnum MFA_SMS = new PromptGroupNameEnum(Value.MFA_SMS, "mfa-sms"); + + public static final PromptGroupNameEnum LOGIN_PASSWORDLESS = + new PromptGroupNameEnum(Value.LOGIN_PASSWORDLESS, "login-passwordless"); + + public static final PromptGroupNameEnum MFA_WEBAUTHN = new PromptGroupNameEnum(Value.MFA_WEBAUTHN, "mfa-webauthn"); public static final PromptGroupNameEnum EMAIL_VERIFICATION = new PromptGroupNameEnum(Value.EMAIL_VERIFICATION, "email-verification"); - public static final PromptGroupNameEnum PASSKEYS = new PromptGroupNameEnum(Value.PASSKEYS, "passkeys"); - public static final PromptGroupNameEnum LOGIN = new PromptGroupNameEnum(Value.LOGIN, "login"); public static final PromptGroupNameEnum SIGNUP_PASSWORD = new PromptGroupNameEnum(Value.SIGNUP_PASSWORD, "signup-password"); + public static final PromptGroupNameEnum MFA_RECOVERY_CODE = + new PromptGroupNameEnum(Value.MFA_RECOVERY_CODE, "mfa-recovery-code"); + + public static final PromptGroupNameEnum MFA_EMAIL = new PromptGroupNameEnum(Value.MFA_EMAIL, "mfa-email"); + + public static final PromptGroupNameEnum PASSKEYS = new PromptGroupNameEnum(Value.PASSKEYS, "passkeys"); + public static final PromptGroupNameEnum PHONE_IDENTIFIER_CHALLENGE = new PromptGroupNameEnum(Value.PHONE_IDENTIFIER_CHALLENGE, "phone-identifier-challenge"); public static final PromptGroupNameEnum DEVICE_FLOW = new PromptGroupNameEnum(Value.DEVICE_FLOW, "device-flow"); - public static final PromptGroupNameEnum MFA_EMAIL = new PromptGroupNameEnum(Value.MFA_EMAIL, "mfa-email"); - private final Value value; private final String string; @@ -126,46 +126,44 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case MFA_VOICE: + return visitor.visitMfaVoice(); + case INVITATION: + return visitor.visitInvitation(); case MFA_PUSH: return visitor.visitMfaPush(); case CAPTCHA: return visitor.visitCaptcha(); case EMAIL_IDENTIFIER_CHALLENGE: return visitor.visitEmailIdentifierChallenge(); - case INVITATION: - return visitor.visitInvitation(); - case MFA_VOICE: - return visitor.visitMfaVoice(); case SIGNUP: return visitor.visitSignup(); case CUSTOMIZED_CONSENT: return visitor.visitCustomizedConsent(); case BRUTE_FORCE_PROTECTION: return visitor.visitBruteForceProtection(); + case PHONE_IDENTIFIER_ENROLLMENT: + return visitor.visitPhoneIdentifierEnrollment(); case MFA: return visitor.visitMfa(); case COMMON: return visitor.visitCommon(); + case LOGOUT: + return visitor.visitLogout(); case MFA_PHONE: return visitor.visitMfaPhone(); case CUSTOM_FORM: return visitor.visitCustomForm(); - case LOGOUT: - return visitor.visitLogout(); - case PHONE_IDENTIFIER_ENROLLMENT: - return visitor.visitPhoneIdentifierEnrollment(); - case LOGIN_PASSWORD: - return visitor.visitLoginPassword(); case LOGIN_EMAIL_VERIFICATION: return visitor.visitLoginEmailVerification(); - case ORGANIZATIONS: - return visitor.visitOrganizations(); case LOGIN_ID: return visitor.visitLoginId(); case ASYNC_APPROVAL_FLOW: return visitor.visitAsyncApprovalFlow(); - case MFA_OTP: - return visitor.visitMfaOtp(); + case LOGIN_PASSWORD: + return visitor.visitLoginPassword(); + case ORGANIZATIONS: + return visitor.visitOrganizations(); case STATUS: return visitor.visitStatus(); case EMAIL_OTP_CHALLENGE: @@ -174,30 +172,32 @@ public T visit(Visitor visitor) { return visitor.visitConsent(); case SIGNUP_ID: return visitor.visitSignupId(); - case LOGIN_PASSWORDLESS: - return visitor.visitLoginPasswordless(); + case MFA_OTP: + return visitor.visitMfaOtp(); + case RESET_PASSWORD: + return visitor.visitResetPassword(); case MFA_SMS: return visitor.visitMfaSms(); + case LOGIN_PASSWORDLESS: + return visitor.visitLoginPasswordless(); case MFA_WEBAUTHN: return visitor.visitMfaWebauthn(); - case RESET_PASSWORD: - return visitor.visitResetPassword(); - case MFA_RECOVERY_CODE: - return visitor.visitMfaRecoveryCode(); case EMAIL_VERIFICATION: return visitor.visitEmailVerification(); - case PASSKEYS: - return visitor.visitPasskeys(); case LOGIN: return visitor.visitLogin(); case SIGNUP_PASSWORD: return visitor.visitSignupPassword(); + case MFA_RECOVERY_CODE: + return visitor.visitMfaRecoveryCode(); + case MFA_EMAIL: + return visitor.visitMfaEmail(); + case PASSKEYS: + return visitor.visitPasskeys(); case PHONE_IDENTIFIER_CHALLENGE: return visitor.visitPhoneIdentifierChallenge(); case DEVICE_FLOW: return visitor.visitDeviceFlow(); - case MFA_EMAIL: - return visitor.visitMfaEmail(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -207,46 +207,44 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static PromptGroupNameEnum valueOf(String value) { switch (value) { + case "mfa-voice": + return MFA_VOICE; + case "invitation": + return INVITATION; case "mfa-push": return MFA_PUSH; case "captcha": return CAPTCHA; case "email-identifier-challenge": return EMAIL_IDENTIFIER_CHALLENGE; - case "invitation": - return INVITATION; - case "mfa-voice": - return MFA_VOICE; case "signup": return SIGNUP; case "customized-consent": return CUSTOMIZED_CONSENT; case "brute-force-protection": return BRUTE_FORCE_PROTECTION; + case "phone-identifier-enrollment": + return PHONE_IDENTIFIER_ENROLLMENT; case "mfa": return MFA; case "common": return COMMON; + case "logout": + return LOGOUT; case "mfa-phone": return MFA_PHONE; case "custom-form": return CUSTOM_FORM; - case "logout": - return LOGOUT; - case "phone-identifier-enrollment": - return PHONE_IDENTIFIER_ENROLLMENT; - case "login-password": - return LOGIN_PASSWORD; case "login-email-verification": return LOGIN_EMAIL_VERIFICATION; - case "organizations": - return ORGANIZATIONS; case "login-id": return LOGIN_ID; case "async-approval-flow": return ASYNC_APPROVAL_FLOW; - case "mfa-otp": - return MFA_OTP; + case "login-password": + return LOGIN_PASSWORD; + case "organizations": + return ORGANIZATIONS; case "status": return STATUS; case "email-otp-challenge": @@ -255,30 +253,32 @@ public static PromptGroupNameEnum valueOf(String value) { return CONSENT; case "signup-id": return SIGNUP_ID; - case "login-passwordless": - return LOGIN_PASSWORDLESS; + case "mfa-otp": + return MFA_OTP; + case "reset-password": + return RESET_PASSWORD; case "mfa-sms": return MFA_SMS; + case "login-passwordless": + return LOGIN_PASSWORDLESS; case "mfa-webauthn": return MFA_WEBAUTHN; - case "reset-password": - return RESET_PASSWORD; - case "mfa-recovery-code": - return MFA_RECOVERY_CODE; case "email-verification": return EMAIL_VERIFICATION; - case "passkeys": - return PASSKEYS; case "login": return LOGIN; case "signup-password": return SIGNUP_PASSWORD; + case "mfa-recovery-code": + return MFA_RECOVERY_CODE; + case "mfa-email": + return MFA_EMAIL; + case "passkeys": + return PASSKEYS; case "phone-identifier-challenge": return PHONE_IDENTIFIER_CHALLENGE; case "device-flow": return DEVICE_FLOW; - case "mfa-email": - return MFA_EMAIL; default: return new PromptGroupNameEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/PromptLanguageEnum.java b/src/main/java/com/auth0/client/mgmt/types/PromptLanguageEnum.java index 28a262cee..b463cdc24 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PromptLanguageEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/PromptLanguageEnum.java @@ -7,169 +7,169 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class PromptLanguageEnum { - public static final PromptLanguageEnum AZ = new PromptLanguageEnum(Value.AZ, "az"); + public static final PromptLanguageEnum EN = new PromptLanguageEnum(Value.EN, "en"); - public static final PromptLanguageEnum MK = new PromptLanguageEnum(Value.MK, "mk"); + public static final PromptLanguageEnum NB = new PromptLanguageEnum(Value.NB, "nb"); - public static final PromptLanguageEnum CA_ES = new PromptLanguageEnum(Value.CA_ES, "ca-ES"); + public static final PromptLanguageEnum HI = new PromptLanguageEnum(Value.HI, "hi"); - public static final PromptLanguageEnum ML = new PromptLanguageEnum(Value.ML, "ml"); + public static final PromptLanguageEnum BS = new PromptLanguageEnum(Value.BS, "bs"); - public static final PromptLanguageEnum TR = new PromptLanguageEnum(Value.TR, "tr"); + public static final PromptLanguageEnum DA = new PromptLanguageEnum(Value.DA, "da"); - public static final PromptLanguageEnum GU = new PromptLanguageEnum(Value.GU, "gu"); + public static final PromptLanguageEnum LT = new PromptLanguageEnum(Value.LT, "lt"); - public static final PromptLanguageEnum ES_AR = new PromptLanguageEnum(Value.ES_AR, "es-AR"); + public static final PromptLanguageEnum LV = new PromptLanguageEnum(Value.LV, "lv"); - public static final PromptLanguageEnum ID = new PromptLanguageEnum(Value.ID, "id"); + public static final PromptLanguageEnum ES_MX = new PromptLanguageEnum(Value.ES_MX, "es-MX"); - public static final PromptLanguageEnum CNR = new PromptLanguageEnum(Value.CNR, "cnr"); + public static final PromptLanguageEnum RO = new PromptLanguageEnum(Value.RO, "ro"); - public static final PromptLanguageEnum MN = new PromptLanguageEnum(Value.MN, "mn"); + public static final PromptLanguageEnum UK = new PromptLanguageEnum(Value.UK, "uk"); - public static final PromptLanguageEnum FI = new PromptLanguageEnum(Value.FI, "fi"); + public static final PromptLanguageEnum ES = new PromptLanguageEnum(Value.ES, "es"); - public static final PromptLanguageEnum PL = new PromptLanguageEnum(Value.PL, "pl"); + public static final PromptLanguageEnum KK = new PromptLanguageEnum(Value.KK, "kk"); - public static final PromptLanguageEnum EN_CA = new PromptLanguageEnum(Value.EN_CA, "en-CA"); + public static final PromptLanguageEnum DE = new PromptLanguageEnum(Value.DE, "de"); - public static final PromptLanguageEnum AR_EG = new PromptLanguageEnum(Value.AR_EG, "ar-EG"); + public static final PromptLanguageEnum ET = new PromptLanguageEnum(Value.ET, "et"); - public static final PromptLanguageEnum MR = new PromptLanguageEnum(Value.MR, "mr"); + public static final PromptLanguageEnum HR = new PromptLanguageEnum(Value.HR, "hr"); - public static final PromptLanguageEnum MS = new PromptLanguageEnum(Value.MS, "ms"); + public static final PromptLanguageEnum KN = new PromptLanguageEnum(Value.KN, "kn"); - public static final PromptLanguageEnum PT_PT = new PromptLanguageEnum(Value.PT_PT, "pt-PT"); + public static final PromptLanguageEnum ZGH = new PromptLanguageEnum(Value.ZGH, "zgh"); - public static final PromptLanguageEnum SK = new PromptLanguageEnum(Value.SK, "sk"); + public static final PromptLanguageEnum TA = new PromptLanguageEnum(Value.TA, "ta"); - public static final PromptLanguageEnum SL = new PromptLanguageEnum(Value.SL, "sl"); + public static final PromptLanguageEnum RU = new PromptLanguageEnum(Value.RU, "ru"); - public static final PromptLanguageEnum CS = new PromptLanguageEnum(Value.CS, "cs"); + public static final PromptLanguageEnum AM = new PromptLanguageEnum(Value.AM, "am"); - public static final PromptLanguageEnum UR = new PromptLanguageEnum(Value.UR, "ur"); + public static final PromptLanguageEnum JA = new PromptLanguageEnum(Value.JA, "ja"); - public static final PromptLanguageEnum HU = new PromptLanguageEnum(Value.HU, "hu"); + public static final PromptLanguageEnum KO = new PromptLanguageEnum(Value.KO, "ko"); - public static final PromptLanguageEnum TE = new PromptLanguageEnum(Value.TE, "te"); + public static final PromptLanguageEnum NL = new PromptLanguageEnum(Value.NL, "nl"); - public static final PromptLanguageEnum ZH_CN = new PromptLanguageEnum(Value.ZH_CN, "zh-CN"); + public static final PromptLanguageEnum ZH_MO = new PromptLanguageEnum(Value.ZH_MO, "zh-MO"); - public static final PromptLanguageEnum AR_SA = new PromptLanguageEnum(Value.AR_SA, "ar-SA"); + public static final PromptLanguageEnum VI = new PromptLanguageEnum(Value.VI, "vi"); - public static final PromptLanguageEnum SO = new PromptLanguageEnum(Value.SO, "so"); + public static final PromptLanguageEnum NN = new PromptLanguageEnum(Value.NN, "nn"); - public static final PromptLanguageEnum FR = new PromptLanguageEnum(Value.FR, "fr"); + public static final PromptLanguageEnum BG = new PromptLanguageEnum(Value.BG, "bg"); - public static final PromptLanguageEnum NO = new PromptLanguageEnum(Value.NO, "no"); + public static final PromptLanguageEnum GL_ES = new PromptLanguageEnum(Value.GL_ES, "gl-ES"); - public static final PromptLanguageEnum ZH_TW = new PromptLanguageEnum(Value.ZH_TW, "zh-TW"); + public static final PromptLanguageEnum SR = new PromptLanguageEnum(Value.SR, "sr"); - public static final PromptLanguageEnum AR = new PromptLanguageEnum(Value.AR, "ar"); + public static final PromptLanguageEnum ES419 = new PromptLanguageEnum(Value.ES419, "es-419"); - public static final PromptLanguageEnum PT = new PromptLanguageEnum(Value.PT, "pt"); + public static final PromptLanguageEnum TH = new PromptLanguageEnum(Value.TH, "th"); - public static final PromptLanguageEnum MY = new PromptLanguageEnum(Value.MY, "my"); + public static final PromptLanguageEnum ZH_HK = new PromptLanguageEnum(Value.ZH_HK, "zh-HK"); - public static final PromptLanguageEnum SQ = new PromptLanguageEnum(Value.SQ, "sq"); + public static final PromptLanguageEnum EU_ES = new PromptLanguageEnum(Value.EU_ES, "eu-ES"); - public static final PromptLanguageEnum HY = new PromptLanguageEnum(Value.HY, "hy"); + public static final PromptLanguageEnum TL = new PromptLanguageEnum(Value.TL, "tl"); - public static final PromptLanguageEnum FR_FR = new PromptLanguageEnum(Value.FR_FR, "fr-FR"); + public static final PromptLanguageEnum HE = new PromptLanguageEnum(Value.HE, "he"); - public static final PromptLanguageEnum CY = new PromptLanguageEnum(Value.CY, "cy"); + public static final PromptLanguageEnum SV = new PromptLanguageEnum(Value.SV, "sv"); - public static final PromptLanguageEnum PA = new PromptLanguageEnum(Value.PA, "pa"); + public static final PromptLanguageEnum IT = new PromptLanguageEnum(Value.IT, "it"); - public static final PromptLanguageEnum KA = new PromptLanguageEnum(Value.KA, "ka"); + public static final PromptLanguageEnum EL = new PromptLanguageEnum(Value.EL, "el"); - public static final PromptLanguageEnum IS = new PromptLanguageEnum(Value.IS, "is"); + public static final PromptLanguageEnum FR_CA = new PromptLanguageEnum(Value.FR_CA, "fr-CA"); - public static final PromptLanguageEnum FA = new PromptLanguageEnum(Value.FA, "fa"); + public static final PromptLanguageEnum AZ = new PromptLanguageEnum(Value.AZ, "az"); - public static final PromptLanguageEnum BN = new PromptLanguageEnum(Value.BN, "bn"); + public static final PromptLanguageEnum ML = new PromptLanguageEnum(Value.ML, "ml"); - public static final PromptLanguageEnum PT_BR = new PromptLanguageEnum(Value.PT_BR, "pt-BR"); + public static final PromptLanguageEnum MK = new PromptLanguageEnum(Value.MK, "mk"); - public static final PromptLanguageEnum SW = new PromptLanguageEnum(Value.SW, "sw"); + public static final PromptLanguageEnum CA_ES = new PromptLanguageEnum(Value.CA_ES, "ca-ES"); - public static final PromptLanguageEnum HI = new PromptLanguageEnum(Value.HI, "hi"); + public static final PromptLanguageEnum GU = new PromptLanguageEnum(Value.GU, "gu"); - public static final PromptLanguageEnum EN = new PromptLanguageEnum(Value.EN, "en"); + public static final PromptLanguageEnum ES_AR = new PromptLanguageEnum(Value.ES_AR, "es-AR"); - public static final PromptLanguageEnum NB = new PromptLanguageEnum(Value.NB, "nb"); + public static final PromptLanguageEnum ID = new PromptLanguageEnum(Value.ID, "id"); - public static final PromptLanguageEnum DA = new PromptLanguageEnum(Value.DA, "da"); + public static final PromptLanguageEnum TR = new PromptLanguageEnum(Value.TR, "tr"); - public static final PromptLanguageEnum LT = new PromptLanguageEnum(Value.LT, "lt"); + public static final PromptLanguageEnum FI = new PromptLanguageEnum(Value.FI, "fi"); - public static final PromptLanguageEnum BS = new PromptLanguageEnum(Value.BS, "bs"); + public static final PromptLanguageEnum CNR = new PromptLanguageEnum(Value.CNR, "cnr"); - public static final PromptLanguageEnum ES_MX = new PromptLanguageEnum(Value.ES_MX, "es-MX"); + public static final PromptLanguageEnum MN = new PromptLanguageEnum(Value.MN, "mn"); - public static final PromptLanguageEnum LV = new PromptLanguageEnum(Value.LV, "lv"); + public static final PromptLanguageEnum AR_EG = new PromptLanguageEnum(Value.AR_EG, "ar-EG"); - public static final PromptLanguageEnum RO = new PromptLanguageEnum(Value.RO, "ro"); + public static final PromptLanguageEnum PL = new PromptLanguageEnum(Value.PL, "pl"); - public static final PromptLanguageEnum UK = new PromptLanguageEnum(Value.UK, "uk"); + public static final PromptLanguageEnum EN_CA = new PromptLanguageEnum(Value.EN_CA, "en-CA"); - public static final PromptLanguageEnum DE = new PromptLanguageEnum(Value.DE, "de"); + public static final PromptLanguageEnum MS = new PromptLanguageEnum(Value.MS, "ms"); - public static final PromptLanguageEnum ES = new PromptLanguageEnum(Value.ES, "es"); + public static final PromptLanguageEnum PT_PT = new PromptLanguageEnum(Value.PT_PT, "pt-PT"); - public static final PromptLanguageEnum KK = new PromptLanguageEnum(Value.KK, "kk"); + public static final PromptLanguageEnum SK = new PromptLanguageEnum(Value.SK, "sk"); - public static final PromptLanguageEnum ET = new PromptLanguageEnum(Value.ET, "et"); + public static final PromptLanguageEnum MR = new PromptLanguageEnum(Value.MR, "mr"); - public static final PromptLanguageEnum TA = new PromptLanguageEnum(Value.TA, "ta"); + public static final PromptLanguageEnum SL = new PromptLanguageEnum(Value.SL, "sl"); - public static final PromptLanguageEnum HR = new PromptLanguageEnum(Value.HR, "hr"); + public static final PromptLanguageEnum CS = new PromptLanguageEnum(Value.CS, "cs"); - public static final PromptLanguageEnum KN = new PromptLanguageEnum(Value.KN, "kn"); + public static final PromptLanguageEnum UR = new PromptLanguageEnum(Value.UR, "ur"); - public static final PromptLanguageEnum ZGH = new PromptLanguageEnum(Value.ZGH, "zgh"); + public static final PromptLanguageEnum AR_SA = new PromptLanguageEnum(Value.AR_SA, "ar-SA"); - public static final PromptLanguageEnum AM = new PromptLanguageEnum(Value.AM, "am"); + public static final PromptLanguageEnum HU = new PromptLanguageEnum(Value.HU, "hu"); - public static final PromptLanguageEnum JA = new PromptLanguageEnum(Value.JA, "ja"); + public static final PromptLanguageEnum TE = new PromptLanguageEnum(Value.TE, "te"); - public static final PromptLanguageEnum KO = new PromptLanguageEnum(Value.KO, "ko"); + public static final PromptLanguageEnum ZH_CN = new PromptLanguageEnum(Value.ZH_CN, "zh-CN"); - public static final PromptLanguageEnum RU = new PromptLanguageEnum(Value.RU, "ru"); + public static final PromptLanguageEnum SO = new PromptLanguageEnum(Value.SO, "so"); - public static final PromptLanguageEnum NL = new PromptLanguageEnum(Value.NL, "nl"); + public static final PromptLanguageEnum AR = new PromptLanguageEnum(Value.AR, "ar"); - public static final PromptLanguageEnum ZH_MO = new PromptLanguageEnum(Value.ZH_MO, "zh-MO"); + public static final PromptLanguageEnum PT = new PromptLanguageEnum(Value.PT, "pt"); - public static final PromptLanguageEnum VI = new PromptLanguageEnum(Value.VI, "vi"); + public static final PromptLanguageEnum FR = new PromptLanguageEnum(Value.FR, "fr"); - public static final PromptLanguageEnum BG = new PromptLanguageEnum(Value.BG, "bg"); + public static final PromptLanguageEnum NO = new PromptLanguageEnum(Value.NO, "no"); - public static final PromptLanguageEnum NN = new PromptLanguageEnum(Value.NN, "nn"); + public static final PromptLanguageEnum ZH_TW = new PromptLanguageEnum(Value.ZH_TW, "zh-TW"); - public static final PromptLanguageEnum GL_ES = new PromptLanguageEnum(Value.GL_ES, "gl-ES"); + public static final PromptLanguageEnum HY = new PromptLanguageEnum(Value.HY, "hy"); - public static final PromptLanguageEnum TH = new PromptLanguageEnum(Value.TH, "th"); + public static final PromptLanguageEnum MY = new PromptLanguageEnum(Value.MY, "my"); - public static final PromptLanguageEnum SR = new PromptLanguageEnum(Value.SR, "sr"); + public static final PromptLanguageEnum SQ = new PromptLanguageEnum(Value.SQ, "sq"); - public static final PromptLanguageEnum ES419 = new PromptLanguageEnum(Value.ES419, "es-419"); + public static final PromptLanguageEnum PA = new PromptLanguageEnum(Value.PA, "pa"); - public static final PromptLanguageEnum HE = new PromptLanguageEnum(Value.HE, "he"); + public static final PromptLanguageEnum FR_FR = new PromptLanguageEnum(Value.FR_FR, "fr-FR"); - public static final PromptLanguageEnum ZH_HK = new PromptLanguageEnum(Value.ZH_HK, "zh-HK"); + public static final PromptLanguageEnum CY = new PromptLanguageEnum(Value.CY, "cy"); - public static final PromptLanguageEnum EU_ES = new PromptLanguageEnum(Value.EU_ES, "eu-ES"); + public static final PromptLanguageEnum IS = new PromptLanguageEnum(Value.IS, "is"); - public static final PromptLanguageEnum TL = new PromptLanguageEnum(Value.TL, "tl"); + public static final PromptLanguageEnum FA = new PromptLanguageEnum(Value.FA, "fa"); - public static final PromptLanguageEnum IT = new PromptLanguageEnum(Value.IT, "it"); + public static final PromptLanguageEnum KA = new PromptLanguageEnum(Value.KA, "ka"); - public static final PromptLanguageEnum SV = new PromptLanguageEnum(Value.SV, "sv"); + public static final PromptLanguageEnum BN = new PromptLanguageEnum(Value.BN, "bn"); - public static final PromptLanguageEnum FR_CA = new PromptLanguageEnum(Value.FR_CA, "fr-CA"); + public static final PromptLanguageEnum SW = new PromptLanguageEnum(Value.SW, "sw"); - public static final PromptLanguageEnum EL = new PromptLanguageEnum(Value.EL, "el"); + public static final PromptLanguageEnum PT_BR = new PromptLanguageEnum(Value.PT_BR, "pt-BR"); private final Value value; @@ -203,170 +203,170 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case EN: + return visitor.visitEn(); + case NB: + return visitor.visitNb(); + case HI: + return visitor.visitHi(); + case BS: + return visitor.visitBs(); + case DA: + return visitor.visitDa(); + case LT: + return visitor.visitLt(); + case LV: + return visitor.visitLv(); + case ES_MX: + return visitor.visitEsMx(); + case RO: + return visitor.visitRo(); + case UK: + return visitor.visitUk(); + case ES: + return visitor.visitEs(); + case KK: + return visitor.visitKk(); + case DE: + return visitor.visitDe(); + case ET: + return visitor.visitEt(); + case HR: + return visitor.visitHr(); + case KN: + return visitor.visitKn(); + case ZGH: + return visitor.visitZgh(); + case TA: + return visitor.visitTa(); + case RU: + return visitor.visitRu(); + case AM: + return visitor.visitAm(); + case JA: + return visitor.visitJa(); + case KO: + return visitor.visitKo(); + case NL: + return visitor.visitNl(); + case ZH_MO: + return visitor.visitZhMo(); + case VI: + return visitor.visitVi(); + case NN: + return visitor.visitNn(); + case BG: + return visitor.visitBg(); + case GL_ES: + return visitor.visitGlEs(); + case SR: + return visitor.visitSr(); + case ES419: + return visitor.visitEs419(); + case TH: + return visitor.visitTh(); + case ZH_HK: + return visitor.visitZhHk(); + case EU_ES: + return visitor.visitEuEs(); + case TL: + return visitor.visitTl(); + case HE: + return visitor.visitHe(); + case SV: + return visitor.visitSv(); + case IT: + return visitor.visitIt(); + case EL: + return visitor.visitEl(); + case FR_CA: + return visitor.visitFrCa(); case AZ: return visitor.visitAz(); + case ML: + return visitor.visitMl(); case MK: return visitor.visitMk(); case CA_ES: return visitor.visitCaEs(); - case ML: - return visitor.visitMl(); - case TR: - return visitor.visitTr(); case GU: return visitor.visitGu(); case ES_AR: return visitor.visitEsAr(); case ID: return visitor.visitId(); + case TR: + return visitor.visitTr(); + case FI: + return visitor.visitFi(); case CNR: return visitor.visitCnr(); case MN: return visitor.visitMn(); - case FI: - return visitor.visitFi(); + case AR_EG: + return visitor.visitArEg(); case PL: return visitor.visitPl(); case EN_CA: return visitor.visitEnCa(); - case AR_EG: - return visitor.visitArEg(); - case MR: - return visitor.visitMr(); case MS: return visitor.visitMs(); case PT_PT: return visitor.visitPtPt(); case SK: return visitor.visitSk(); + case MR: + return visitor.visitMr(); case SL: return visitor.visitSl(); case CS: return visitor.visitCs(); case UR: return visitor.visitUr(); + case AR_SA: + return visitor.visitArSa(); case HU: return visitor.visitHu(); case TE: return visitor.visitTe(); case ZH_CN: return visitor.visitZhCn(); - case AR_SA: - return visitor.visitArSa(); case SO: return visitor.visitSo(); + case AR: + return visitor.visitAr(); + case PT: + return visitor.visitPt(); case FR: return visitor.visitFr(); case NO: return visitor.visitNo(); case ZH_TW: return visitor.visitZhTw(); - case AR: - return visitor.visitAr(); - case PT: - return visitor.visitPt(); + case HY: + return visitor.visitHy(); case MY: return visitor.visitMy(); case SQ: return visitor.visitSq(); - case HY: - return visitor.visitHy(); + case PA: + return visitor.visitPa(); case FR_FR: return visitor.visitFrFr(); case CY: return visitor.visitCy(); - case PA: - return visitor.visitPa(); - case KA: - return visitor.visitKa(); case IS: return visitor.visitIs(); case FA: return visitor.visitFa(); + case KA: + return visitor.visitKa(); case BN: return visitor.visitBn(); - case PT_BR: - return visitor.visitPtBr(); case SW: return visitor.visitSw(); - case HI: - return visitor.visitHi(); - case EN: - return visitor.visitEn(); - case NB: - return visitor.visitNb(); - case DA: - return visitor.visitDa(); - case LT: - return visitor.visitLt(); - case BS: - return visitor.visitBs(); - case ES_MX: - return visitor.visitEsMx(); - case LV: - return visitor.visitLv(); - case RO: - return visitor.visitRo(); - case UK: - return visitor.visitUk(); - case DE: - return visitor.visitDe(); - case ES: - return visitor.visitEs(); - case KK: - return visitor.visitKk(); - case ET: - return visitor.visitEt(); - case TA: - return visitor.visitTa(); - case HR: - return visitor.visitHr(); - case KN: - return visitor.visitKn(); - case ZGH: - return visitor.visitZgh(); - case AM: - return visitor.visitAm(); - case JA: - return visitor.visitJa(); - case KO: - return visitor.visitKo(); - case RU: - return visitor.visitRu(); - case NL: - return visitor.visitNl(); - case ZH_MO: - return visitor.visitZhMo(); - case VI: - return visitor.visitVi(); - case BG: - return visitor.visitBg(); - case NN: - return visitor.visitNn(); - case GL_ES: - return visitor.visitGlEs(); - case TH: - return visitor.visitTh(); - case SR: - return visitor.visitSr(); - case ES419: - return visitor.visitEs419(); - case HE: - return visitor.visitHe(); - case ZH_HK: - return visitor.visitZhHk(); - case EU_ES: - return visitor.visitEuEs(); - case TL: - return visitor.visitTl(); - case IT: - return visitor.visitIt(); - case SV: - return visitor.visitSv(); - case FR_CA: - return visitor.visitFrCa(); - case EL: - return visitor.visitEl(); + case PT_BR: + return visitor.visitPtBr(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -376,170 +376,170 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static PromptLanguageEnum valueOf(String value) { switch (value) { + case "en": + return EN; + case "nb": + return NB; + case "hi": + return HI; + case "bs": + return BS; + case "da": + return DA; + case "lt": + return LT; + case "lv": + return LV; + case "es-MX": + return ES_MX; + case "ro": + return RO; + case "uk": + return UK; + case "es": + return ES; + case "kk": + return KK; + case "de": + return DE; + case "et": + return ET; + case "hr": + return HR; + case "kn": + return KN; + case "zgh": + return ZGH; + case "ta": + return TA; + case "ru": + return RU; + case "am": + return AM; + case "ja": + return JA; + case "ko": + return KO; + case "nl": + return NL; + case "zh-MO": + return ZH_MO; + case "vi": + return VI; + case "nn": + return NN; + case "bg": + return BG; + case "gl-ES": + return GL_ES; + case "sr": + return SR; + case "es-419": + return ES419; + case "th": + return TH; + case "zh-HK": + return ZH_HK; + case "eu-ES": + return EU_ES; + case "tl": + return TL; + case "he": + return HE; + case "sv": + return SV; + case "it": + return IT; + case "el": + return EL; + case "fr-CA": + return FR_CA; case "az": return AZ; + case "ml": + return ML; case "mk": return MK; case "ca-ES": return CA_ES; - case "ml": - return ML; - case "tr": - return TR; case "gu": return GU; case "es-AR": return ES_AR; case "id": return ID; + case "tr": + return TR; + case "fi": + return FI; case "cnr": return CNR; case "mn": return MN; - case "fi": - return FI; + case "ar-EG": + return AR_EG; case "pl": return PL; case "en-CA": return EN_CA; - case "ar-EG": - return AR_EG; - case "mr": - return MR; case "ms": return MS; case "pt-PT": return PT_PT; case "sk": return SK; + case "mr": + return MR; case "sl": return SL; case "cs": return CS; case "ur": return UR; + case "ar-SA": + return AR_SA; case "hu": return HU; case "te": return TE; case "zh-CN": return ZH_CN; - case "ar-SA": - return AR_SA; case "so": return SO; + case "ar": + return AR; + case "pt": + return PT; case "fr": return FR; case "no": return NO; case "zh-TW": return ZH_TW; - case "ar": - return AR; - case "pt": - return PT; + case "hy": + return HY; case "my": return MY; case "sq": return SQ; - case "hy": - return HY; + case "pa": + return PA; case "fr-FR": return FR_FR; case "cy": return CY; - case "pa": - return PA; - case "ka": - return KA; case "is": return IS; case "fa": return FA; + case "ka": + return KA; case "bn": return BN; - case "pt-BR": - return PT_BR; case "sw": return SW; - case "hi": - return HI; - case "en": - return EN; - case "nb": - return NB; - case "da": - return DA; - case "lt": - return LT; - case "bs": - return BS; - case "es-MX": - return ES_MX; - case "lv": - return LV; - case "ro": - return RO; - case "uk": - return UK; - case "de": - return DE; - case "es": - return ES; - case "kk": - return KK; - case "et": - return ET; - case "ta": - return TA; - case "hr": - return HR; - case "kn": - return KN; - case "zgh": - return ZGH; - case "am": - return AM; - case "ja": - return JA; - case "ko": - return KO; - case "ru": - return RU; - case "nl": - return NL; - case "zh-MO": - return ZH_MO; - case "vi": - return VI; - case "bg": - return BG; - case "nn": - return NN; - case "gl-ES": - return GL_ES; - case "th": - return TH; - case "sr": - return SR; - case "es-419": - return ES419; - case "he": - return HE; - case "zh-HK": - return ZH_HK; - case "eu-ES": - return EU_ES; - case "tl": - return TL; - case "it": - return IT; - case "sv": - return SV; - case "fr-CA": - return FR_CA; - case "el": - return EL; + case "pt-BR": + return PT_BR; default: return new PromptLanguageEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredentialAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredentialAlgorithmEnum.java index 01c10d3ed..b5a18c765 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredentialAlgorithmEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredentialAlgorithmEnum.java @@ -10,12 +10,12 @@ public final class PublicKeyCredentialAlgorithmEnum { public static final PublicKeyCredentialAlgorithmEnum PS256 = new PublicKeyCredentialAlgorithmEnum(Value.PS256, "PS256"); - public static final PublicKeyCredentialAlgorithmEnum RS256 = - new PublicKeyCredentialAlgorithmEnum(Value.RS256, "RS256"); - public static final PublicKeyCredentialAlgorithmEnum RS384 = new PublicKeyCredentialAlgorithmEnum(Value.RS384, "RS384"); + public static final PublicKeyCredentialAlgorithmEnum RS256 = + new PublicKeyCredentialAlgorithmEnum(Value.RS256, "RS256"); + private final Value value; private final String string; @@ -51,10 +51,10 @@ public T visit(Visitor visitor) { switch (value) { case PS256: return visitor.visitPs256(); - case RS256: - return visitor.visitRs256(); case RS384: return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -66,10 +66,10 @@ public static PublicKeyCredentialAlgorithmEnum valueOf(String value) { switch (value) { case "PS256": return PS256; - case "RS256": - return RS256; case "RS384": return RS384; + case "RS256": + return RS256; default: return new PublicKeyCredentialAlgorithmEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java index 0250de3ab..81b18e6c3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java @@ -62,6 +62,8 @@ public final class ResourceServer { private final Optional subjectTypeAuthorization; + private final OptionalNullable authorizationPolicy; + private final Optional clientId; private final Map additionalProperties; @@ -86,6 +88,7 @@ private ResourceServer( OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, + OptionalNullable authorizationPolicy, Optional clientId, Map additionalProperties) { this.id = id; @@ -107,6 +110,7 @@ private ResourceServer( this.authorizationDetails = authorizationDetails; this.proofOfPossession = proofOfPossession; this.subjectTypeAuthorization = subjectTypeAuthorization; + this.authorizationPolicy = authorizationPolicy; this.clientId = clientId; this.additionalProperties = additionalProperties; } @@ -258,6 +262,15 @@ public Optional getSubjectTypeAuthorizat return subjectTypeAuthorization; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + public OptionalNullable getAuthorizationPolicy() { + if (authorizationPolicy == null) { + return OptionalNullable.absent(); + } + return authorizationPolicy; + } + /** * @return The client ID of the client that this resource server is linked to */ @@ -290,6 +303,12 @@ private OptionalNullable _getProofOfPossession( return proofOfPossession; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + private OptionalNullable _getAuthorizationPolicy() { + return authorizationPolicy; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -321,6 +340,7 @@ private boolean equalTo(ResourceServer other) { && authorizationDetails.equals(other.authorizationDetails) && proofOfPossession.equals(other.proofOfPossession) && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) + && authorizationPolicy.equals(other.authorizationPolicy) && clientId.equals(other.clientId); } @@ -346,6 +366,7 @@ public int hashCode() { this.authorizationDetails, this.proofOfPossession, this.subjectTypeAuthorization, + this.authorizationPolicy, this.clientId); } @@ -398,6 +419,8 @@ public static final class Builder { private Optional subjectTypeAuthorization = Optional.empty(); + private OptionalNullable authorizationPolicy = OptionalNullable.absent(); + private Optional clientId = Optional.empty(); @JsonAnySetter @@ -425,6 +448,7 @@ public Builder from(ResourceServer other) { authorizationDetails(other.getAuthorizationDetails()); proofOfPossession(other.getProofOfPossession()); subjectTypeAuthorization(other.getSubjectTypeAuthorization()); + authorizationPolicy(other.getAuthorizationPolicy()); clientId(other.getClientId()); return this; } @@ -761,6 +785,39 @@ public Builder subjectTypeAuthorization(ResourceServerSubjectTypeAuthorization s return this; } + @JsonSetter(value = "authorization_policy", nulls = Nulls.SKIP) + public Builder authorizationPolicy( + @Nullable OptionalNullable authorizationPolicy) { + this.authorizationPolicy = authorizationPolicy; + return this; + } + + public Builder authorizationPolicy(ResourceServerAuthorizationPolicy authorizationPolicy) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy); + return this; + } + + public Builder authorizationPolicy(Optional authorizationPolicy) { + if (authorizationPolicy.isPresent()) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } else { + this.authorizationPolicy = OptionalNullable.absent(); + } + return this; + } + + public Builder authorizationPolicy( + com.auth0.client.mgmt.core.Nullable authorizationPolicy) { + if (authorizationPolicy.isNull()) { + this.authorizationPolicy = OptionalNullable.ofNull(); + } else if (authorizationPolicy.isEmpty()) { + this.authorizationPolicy = OptionalNullable.absent(); + } else { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } + return this; + } + /** *

The client ID of the client that this resource server is linked to

*/ @@ -796,6 +853,7 @@ public ResourceServer build() { authorizationDetails, proofOfPossession, subjectTypeAuthorization, + authorizationPolicy, clientId, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerAuthorizationPolicy.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAuthorizationPolicy.java new file mode 100644 index 000000000..5613c7ee2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAuthorizationPolicy.java @@ -0,0 +1,129 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ResourceServerAuthorizationPolicy.Builder.class) +public final class ResourceServerAuthorizationPolicy { + private final String policyId; + + private final Map additionalProperties; + + private ResourceServerAuthorizationPolicy(String policyId, Map additionalProperties) { + this.policyId = policyId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the authorization policy to apply. + */ + @JsonProperty("policy_id") + public String getPolicyId() { + return policyId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ResourceServerAuthorizationPolicy && equalTo((ResourceServerAuthorizationPolicy) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ResourceServerAuthorizationPolicy other) { + return policyId.equals(other.policyId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.policyId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PolicyIdStage builder() { + return new Builder(); + } + + public interface PolicyIdStage { + /** + *

The ID of the authorization policy to apply.

+ */ + _FinalStage policyId(@NotNull String policyId); + + Builder from(ResourceServerAuthorizationPolicy other); + } + + public interface _FinalStage { + ResourceServerAuthorizationPolicy build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PolicyIdStage, _FinalStage { + private String policyId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ResourceServerAuthorizationPolicy other) { + policyId(other.getPolicyId()); + return this; + } + + /** + *

The ID of the authorization policy to apply.

+ *

The ID of the authorization policy to apply.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("policy_id") + public _FinalStage policyId(@NotNull String policyId) { + this.policyId = Objects.requireNonNull(policyId, "policyId must not be null"); + return this; + } + + @java.lang.Override + public ResourceServerAuthorizationPolicy build() { + return new ResourceServerAuthorizationPolicy(policyId, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectResponseEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectResponseEnum.java index 41d95ba20..d22a870f0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectResponseEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectResponseEnum.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ResourceServerTokenDialectResponseEnum { - public static final ResourceServerTokenDialectResponseEnum RFC9068PROFILE = - new ResourceServerTokenDialectResponseEnum(Value.RFC9068PROFILE, "rfc9068_profile"); - public static final ResourceServerTokenDialectResponseEnum ACCESS_TOKEN_AUTHZ = new ResourceServerTokenDialectResponseEnum(Value.ACCESS_TOKEN_AUTHZ, "access_token_authz"); + public static final ResourceServerTokenDialectResponseEnum RFC9068PROFILE = + new ResourceServerTokenDialectResponseEnum(Value.RFC9068PROFILE, "rfc9068_profile"); + public static final ResourceServerTokenDialectResponseEnum RFC9068PROFILE_AUTHZ = new ResourceServerTokenDialectResponseEnum(Value.RFC9068PROFILE_AUTHZ, "rfc9068_profile_authz"); @@ -52,10 +52,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case RFC9068PROFILE: - return visitor.visitRfc9068Profile(); case ACCESS_TOKEN_AUTHZ: return visitor.visitAccessTokenAuthz(); + case RFC9068PROFILE: + return visitor.visitRfc9068Profile(); case RFC9068PROFILE_AUTHZ: return visitor.visitRfc9068ProfileAuthz(); case ACCESS_TOKEN: @@ -69,10 +69,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ResourceServerTokenDialectResponseEnum valueOf(String value) { switch (value) { - case "rfc9068_profile": - return RFC9068PROFILE; case "access_token_authz": return ACCESS_TOKEN_AUTHZ; + case "rfc9068_profile": + return RFC9068PROFILE; case "rfc9068_profile_authz": return RFC9068PROFILE_AUTHZ; case "access_token": diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectSchemaEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectSchemaEnum.java index 8124b2690..b01110977 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectSchemaEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectSchemaEnum.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ResourceServerTokenDialectSchemaEnum { - public static final ResourceServerTokenDialectSchemaEnum RFC9068PROFILE = - new ResourceServerTokenDialectSchemaEnum(Value.RFC9068PROFILE, "rfc9068_profile"); - public static final ResourceServerTokenDialectSchemaEnum ACCESS_TOKEN_AUTHZ = new ResourceServerTokenDialectSchemaEnum(Value.ACCESS_TOKEN_AUTHZ, "access_token_authz"); + public static final ResourceServerTokenDialectSchemaEnum RFC9068PROFILE = + new ResourceServerTokenDialectSchemaEnum(Value.RFC9068PROFILE, "rfc9068_profile"); + public static final ResourceServerTokenDialectSchemaEnum RFC9068PROFILE_AUTHZ = new ResourceServerTokenDialectSchemaEnum(Value.RFC9068PROFILE_AUTHZ, "rfc9068_profile_authz"); @@ -52,10 +52,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case RFC9068PROFILE: - return visitor.visitRfc9068Profile(); case ACCESS_TOKEN_AUTHZ: return visitor.visitAccessTokenAuthz(); + case RFC9068PROFILE: + return visitor.visitRfc9068Profile(); case RFC9068PROFILE_AUTHZ: return visitor.visitRfc9068ProfileAuthz(); case ACCESS_TOKEN: @@ -69,10 +69,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ResourceServerTokenDialectSchemaEnum valueOf(String value) { switch (value) { - case "rfc9068_profile": - return RFC9068PROFILE; case "access_token_authz": return ACCESS_TOKEN_AUTHZ; + case "rfc9068_profile": + return RFC9068PROFILE; case "rfc9068_profile_authz": return RFC9068PROFILE_AUTHZ; case "access_token": diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionAlgorithmEnum.java index ad694adff..b12f67688 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionAlgorithmEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionAlgorithmEnum.java @@ -10,12 +10,12 @@ public final class ResourceServerTokenEncryptionAlgorithmEnum { public static final ResourceServerTokenEncryptionAlgorithmEnum RSA_OAEP256 = new ResourceServerTokenEncryptionAlgorithmEnum(Value.RSA_OAEP256, "RSA-OAEP-256"); - public static final ResourceServerTokenEncryptionAlgorithmEnum RSA_OAEP512 = - new ResourceServerTokenEncryptionAlgorithmEnum(Value.RSA_OAEP512, "RSA-OAEP-512"); - public static final ResourceServerTokenEncryptionAlgorithmEnum RSA_OAEP384 = new ResourceServerTokenEncryptionAlgorithmEnum(Value.RSA_OAEP384, "RSA-OAEP-384"); + public static final ResourceServerTokenEncryptionAlgorithmEnum RSA_OAEP512 = + new ResourceServerTokenEncryptionAlgorithmEnum(Value.RSA_OAEP512, "RSA-OAEP-512"); + private final Value value; private final String string; @@ -51,10 +51,10 @@ public T visit(Visitor visitor) { switch (value) { case RSA_OAEP256: return visitor.visitRsaOaep256(); - case RSA_OAEP512: - return visitor.visitRsaOaep512(); case RSA_OAEP384: return visitor.visitRsaOaep384(); + case RSA_OAEP512: + return visitor.visitRsaOaep512(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -66,10 +66,10 @@ public static ResourceServerTokenEncryptionAlgorithmEnum valueOf(String value) { switch (value) { case "RSA-OAEP-256": return RSA_OAEP256; - case "RSA-OAEP-512": - return RSA_OAEP512; case "RSA-OAEP-384": return RSA_OAEP384; + case "RSA-OAEP-512": + return RSA_OAEP512; default: return new ResourceServerTokenEncryptionAlgorithmEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/RevokeRefreshTokensRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/RevokeRefreshTokensRequestContent.java new file mode 100644 index 000000000..07c1fa6a1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/RevokeRefreshTokensRequestContent.java @@ -0,0 +1,172 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = RevokeRefreshTokensRequestContent.Builder.class) +public final class RevokeRefreshTokensRequestContent { + private final Optional> ids; + + private final Optional userId; + + private final Optional clientId; + + private final Map additionalProperties; + + private RevokeRefreshTokensRequestContent( + Optional> ids, + Optional userId, + Optional clientId, + Map additionalProperties) { + this.ids = ids; + this.userId = userId; + this.clientId = clientId; + this.additionalProperties = additionalProperties; + } + + /** + * @return Array of refresh token IDs to revoke. Limited to 100 at a time. + */ + @JsonProperty("ids") + public Optional> getIds() { + return ids; + } + + /** + * @return Revoke all refresh tokens for this user. + */ + @JsonProperty("user_id") + public Optional getUserId() { + return userId; + } + + /** + * @return Revoke all refresh tokens for this client. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RevokeRefreshTokensRequestContent && equalTo((RevokeRefreshTokensRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(RevokeRefreshTokensRequestContent other) { + return ids.equals(other.ids) && userId.equals(other.userId) && clientId.equals(other.clientId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.ids, this.userId, this.clientId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> ids = Optional.empty(); + + private Optional userId = Optional.empty(); + + private Optional clientId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(RevokeRefreshTokensRequestContent other) { + ids(other.getIds()); + userId(other.getUserId()); + clientId(other.getClientId()); + return this; + } + + /** + *

Array of refresh token IDs to revoke. Limited to 100 at a time.

+ */ + @JsonSetter(value = "ids", nulls = Nulls.SKIP) + public Builder ids(Optional> ids) { + this.ids = ids; + return this; + } + + public Builder ids(List ids) { + this.ids = Optional.ofNullable(ids); + return this; + } + + /** + *

Revoke all refresh tokens for this user.

+ */ + @JsonSetter(value = "user_id", nulls = Nulls.SKIP) + public Builder userId(Optional userId) { + this.userId = userId; + return this; + } + + public Builder userId(String userId) { + this.userId = Optional.ofNullable(userId); + return this; + } + + /** + *

Revoke all refresh tokens for this client.

+ */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + public RevokeRefreshTokensRequestContent build() { + return new RevokeRefreshTokensRequestContent(ids, userId, clientId, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/RotateConnectionKeysSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/RotateConnectionKeysSigningAlgEnum.java index 0977570d3..4a5b73d35 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RotateConnectionKeysSigningAlgEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/RotateConnectionKeysSigningAlgEnum.java @@ -10,24 +10,24 @@ public final class RotateConnectionKeysSigningAlgEnum { public static final RotateConnectionKeysSigningAlgEnum RS512 = new RotateConnectionKeysSigningAlgEnum(Value.RS512, "RS512"); - public static final RotateConnectionKeysSigningAlgEnum PS256 = - new RotateConnectionKeysSigningAlgEnum(Value.PS256, "PS256"); - - public static final RotateConnectionKeysSigningAlgEnum ES256 = - new RotateConnectionKeysSigningAlgEnum(Value.ES256, "ES256"); - public static final RotateConnectionKeysSigningAlgEnum PS384 = new RotateConnectionKeysSigningAlgEnum(Value.PS384, "PS384"); public static final RotateConnectionKeysSigningAlgEnum ES384 = new RotateConnectionKeysSigningAlgEnum(Value.ES384, "ES384"); - public static final RotateConnectionKeysSigningAlgEnum RS256 = - new RotateConnectionKeysSigningAlgEnum(Value.RS256, "RS256"); + public static final RotateConnectionKeysSigningAlgEnum PS256 = + new RotateConnectionKeysSigningAlgEnum(Value.PS256, "PS256"); + + public static final RotateConnectionKeysSigningAlgEnum ES256 = + new RotateConnectionKeysSigningAlgEnum(Value.ES256, "ES256"); public static final RotateConnectionKeysSigningAlgEnum RS384 = new RotateConnectionKeysSigningAlgEnum(Value.RS384, "RS384"); + public static final RotateConnectionKeysSigningAlgEnum RS256 = + new RotateConnectionKeysSigningAlgEnum(Value.RS256, "RS256"); + private final Value value; private final String string; @@ -63,18 +63,18 @@ public T visit(Visitor visitor) { switch (value) { case RS512: return visitor.visitRs512(); - case PS256: - return visitor.visitPs256(); - case ES256: - return visitor.visitEs256(); case PS384: return visitor.visitPs384(); case ES384: return visitor.visitEs384(); - case RS256: - return visitor.visitRs256(); + case PS256: + return visitor.visitPs256(); + case ES256: + return visitor.visitEs256(); case RS384: return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -86,18 +86,18 @@ public static RotateConnectionKeysSigningAlgEnum valueOf(String value) { switch (value) { case "RS512": return RS512; - case "PS256": - return PS256; - case "ES256": - return ES256; case "PS384": return PS384; case "ES384": return ES384; - case "RS256": - return RS256; + case "PS256": + return PS256; + case "ES256": + return ES256; case "RS384": return RS384; + case "RS256": + return RS256; default: return new RotateConnectionKeysSigningAlgEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ScreenGroupNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/ScreenGroupNameEnum.java index 35e2d631c..a0d72482f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ScreenGroupNameEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ScreenGroupNameEnum.java @@ -7,189 +7,81 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ScreenGroupNameEnum { - public static final ScreenGroupNameEnum MFA_PHONE_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_PHONE_CHALLENGE, "mfa-phone-challenge"); - - public static final ScreenGroupNameEnum MFA_VOICE_ENROLLMENT = - new ScreenGroupNameEnum(Value.MFA_VOICE_ENROLLMENT, "mfa-voice-enrollment"); - - public static final ScreenGroupNameEnum ASYNC_APPROVAL_WRONG_USER = - new ScreenGroupNameEnum(Value.ASYNC_APPROVAL_WRONG_USER, "async-approval-wrong-user"); - - public static final ScreenGroupNameEnum SIGNUP = new ScreenGroupNameEnum(Value.SIGNUP, "signup"); - - public static final ScreenGroupNameEnum MFA_PUSH_WELCOME = - new ScreenGroupNameEnum(Value.MFA_PUSH_WELCOME, "mfa-push-welcome"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_EMAIL = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_EMAIL, "reset-password-email"); - - public static final ScreenGroupNameEnum LOGOUT_ABORTED = - new ScreenGroupNameEnum(Value.LOGOUT_ABORTED, "logout-aborted"); - - public static final ScreenGroupNameEnum REDEEM_TICKET = - new ScreenGroupNameEnum(Value.REDEEM_TICKET, "redeem-ticket"); - - public static final ScreenGroupNameEnum MFA_RECOVERY_CODE_ENROLLMENT = - new ScreenGroupNameEnum(Value.MFA_RECOVERY_CODE_ENROLLMENT, "mfa-recovery-code-enrollment"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_SMS_CHALLENGE = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_SMS_CHALLENGE, "reset-password-mfa-sms-challenge"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE = new ScreenGroupNameEnum( - Value.RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE, "reset-password-mfa-webauthn-roaming-challenge"); - - public static final ScreenGroupNameEnum PHONE_IDENTIFIER_ENROLLMENT = - new ScreenGroupNameEnum(Value.PHONE_IDENTIFIER_ENROLLMENT, "phone-identifier-enrollment"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_ERROR = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_ERROR, "reset-password-error"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH = new ScreenGroupNameEnum( - Value.RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH, "reset-password-mfa-push-challenge-push"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_VOICE_CHALLENGE = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_VOICE_CHALLENGE, "reset-password-mfa-voice-challenge"); - - public static final ScreenGroupNameEnum MFA_PUSH_SUCCESS = - new ScreenGroupNameEnum(Value.MFA_PUSH_SUCCESS, "mfa-push-success"); - - public static final ScreenGroupNameEnum ASYNC_APPROVAL_ACCEPTED = - new ScreenGroupNameEnum(Value.ASYNC_APPROVAL_ACCEPTED, "async-approval-accepted"); - - public static final ScreenGroupNameEnum DEVICE_CODE_ACTIVATION_ALLOWED = - new ScreenGroupNameEnum(Value.DEVICE_CODE_ACTIVATION_ALLOWED, "device-code-activation-allowed"); - - public static final ScreenGroupNameEnum INTERSTITIAL_CAPTCHA = - new ScreenGroupNameEnum(Value.INTERSTITIAL_CAPTCHA, "interstitial-captcha"); - - public static final ScreenGroupNameEnum LOGIN_PASSWORD = - new ScreenGroupNameEnum(Value.LOGIN_PASSWORD, "login-password"); - - public static final ScreenGroupNameEnum BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS = new ScreenGroupNameEnum( - Value.BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS, "brute-force-protection-unblock-success"); - - public static final ScreenGroupNameEnum EMAIL_OTP_CHALLENGE = - new ScreenGroupNameEnum(Value.EMAIL_OTP_CHALLENGE, "email-otp-challenge"); - - public static final ScreenGroupNameEnum LOGIN_PASSWORDLESS_EMAIL_LINK = - new ScreenGroupNameEnum(Value.LOGIN_PASSWORDLESS_EMAIL_LINK, "login-passwordless-email-link"); - - public static final ScreenGroupNameEnum CONSENT = new ScreenGroupNameEnum(Value.CONSENT, "consent"); - - public static final ScreenGroupNameEnum MFA_WEBAUTHN_ROAMING_ENROLLMENT = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_ROAMING_ENROLLMENT, "mfa-webauthn-roaming-enrollment"); - - public static final ScreenGroupNameEnum BRUTE_FORCE_PROTECTION_UNBLOCK = - new ScreenGroupNameEnum(Value.BRUTE_FORCE_PROTECTION_UNBLOCK, "brute-force-protection-unblock"); - - public static final ScreenGroupNameEnum SIGNUP_ID = new ScreenGroupNameEnum(Value.SIGNUP_ID, "signup-id"); - - public static final ScreenGroupNameEnum MFA_OTP_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_OTP_CHALLENGE, "mfa-otp-challenge"); - - public static final ScreenGroupNameEnum MFA_WEBAUTHN_PLATFORM_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_PLATFORM_CHALLENGE, "mfa-webauthn-platform-challenge"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE = new ScreenGroupNameEnum( - Value.RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE, "reset-password-mfa-recovery-code-challenge"); - - public static final ScreenGroupNameEnum ORGANIZATION_SELECTION = - new ScreenGroupNameEnum(Value.ORGANIZATION_SELECTION, "organization-selection"); - - public static final ScreenGroupNameEnum ASYNC_APPROVAL_ERROR = - new ScreenGroupNameEnum(Value.ASYNC_APPROVAL_ERROR, "async-approval-error"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_PHONE_CHALLENGE = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_PHONE_CHALLENGE, "reset-password-mfa-phone-challenge"); - - public static final ScreenGroupNameEnum MFA_RECOVERY_CODE_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_RECOVERY_CODE_CHALLENGE, "mfa-recovery-code-challenge"); - - public static final ScreenGroupNameEnum MFA_OTP_ENROLLMENT_CODE = - new ScreenGroupNameEnum(Value.MFA_OTP_ENROLLMENT_CODE, "mfa-otp-enrollment-code"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE = new ScreenGroupNameEnum( - Value.RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE, "reset-password-mfa-webauthn-platform-challenge"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_SUCCESS = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_SUCCESS, "reset-password-success"); - - public static final ScreenGroupNameEnum ASYNC_APPROVAL_DENIED = - new ScreenGroupNameEnum(Value.ASYNC_APPROVAL_DENIED, "async-approval-denied"); - - public static final ScreenGroupNameEnum LOGIN_PASSWORDLESS_SMS_OTP = - new ScreenGroupNameEnum(Value.LOGIN_PASSWORDLESS_SMS_OTP, "login-passwordless-sms-otp"); - - public static final ScreenGroupNameEnum DEVICE_CODE_CONFIRMATION = - new ScreenGroupNameEnum(Value.DEVICE_CODE_CONFIRMATION, "device-code-confirmation"); - - public static final ScreenGroupNameEnum MFA_WEBAUTHN_CHANGE_KEY_NICKNAME = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_CHANGE_KEY_NICKNAME, "mfa-webauthn-change-key-nickname"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_EMAIL_CHALLENGE = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_EMAIL_CHALLENGE, "reset-password-mfa-email-challenge"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_REQUEST = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_REQUEST, "reset-password-request"); - - public static final ScreenGroupNameEnum MFA_EMAIL_LIST = - new ScreenGroupNameEnum(Value.MFA_EMAIL_LIST, "mfa-email-list"); + public static final ScreenGroupNameEnum MFA_EMAIL_CHALLENGE = + new ScreenGroupNameEnum(Value.MFA_EMAIL_CHALLENGE, "mfa-email-challenge"); public static final ScreenGroupNameEnum EMAIL_IDENTIFIER_CHALLENGE = new ScreenGroupNameEnum(Value.EMAIL_IDENTIFIER_CHALLENGE, "email-identifier-challenge"); - public static final ScreenGroupNameEnum MFA_WEBAUTHN_ERROR = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_ERROR, "mfa-webauthn-error"); - public static final ScreenGroupNameEnum MFA_PUSH_ENROLLMENT_QR = new ScreenGroupNameEnum(Value.MFA_PUSH_ENROLLMENT_QR, "mfa-push-enrollment-qr"); public static final ScreenGroupNameEnum MFA_DETECT_BROWSER_CAPABILITIES = new ScreenGroupNameEnum(Value.MFA_DETECT_BROWSER_CAPABILITIES, "mfa-detect-browser-capabilities"); - public static final ScreenGroupNameEnum LOGOUT_COMPLETE = - new ScreenGroupNameEnum(Value.LOGOUT_COMPLETE, "logout-complete"); + public static final ScreenGroupNameEnum MFA_WEBAUTHN_ERROR = + new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_ERROR, "mfa-webauthn-error"); + + public static final ScreenGroupNameEnum MFA_EMAIL_LIST = + new ScreenGroupNameEnum(Value.MFA_EMAIL_LIST, "mfa-email-list"); public static final ScreenGroupNameEnum CUSTOMIZED_CONSENT = new ScreenGroupNameEnum(Value.CUSTOMIZED_CONSENT, "customized-consent"); + public static final ScreenGroupNameEnum LOGOUT_COMPLETE = + new ScreenGroupNameEnum(Value.LOGOUT_COMPLETE, "logout-complete"); + + public static final ScreenGroupNameEnum MFA_SMS_ENROLLMENT = + new ScreenGroupNameEnum(Value.MFA_SMS_ENROLLMENT, "mfa-sms-enrollment"); + public static final ScreenGroupNameEnum MFA_OTP_ENROLLMENT_QR = new ScreenGroupNameEnum(Value.MFA_OTP_ENROLLMENT_QR, "mfa-otp-enrollment-qr"); public static final ScreenGroupNameEnum MFA_SMS_LIST = new ScreenGroupNameEnum(Value.MFA_SMS_LIST, "mfa-sms-list"); + public static final ScreenGroupNameEnum RESET_PASSWORD_REQUEST = + new ScreenGroupNameEnum(Value.RESET_PASSWORD_REQUEST, "reset-password-request"); + public static final ScreenGroupNameEnum DEVICE_CODE_ACTIVATION_DENIED = new ScreenGroupNameEnum(Value.DEVICE_CODE_ACTIVATION_DENIED, "device-code-activation-denied"); - public static final ScreenGroupNameEnum MFA_SMS_ENROLLMENT = - new ScreenGroupNameEnum(Value.MFA_SMS_ENROLLMENT, "mfa-sms-enrollment"); - - public static final ScreenGroupNameEnum CUSTOM_FORM = new ScreenGroupNameEnum(Value.CUSTOM_FORM, "custom-form"); - public static final ScreenGroupNameEnum LOGOUT = new ScreenGroupNameEnum(Value.LOGOUT, "logout"); public static final ScreenGroupNameEnum MFA_LOGIN_OPTIONS = new ScreenGroupNameEnum(Value.MFA_LOGIN_OPTIONS, "mfa-login-options"); - public static final ScreenGroupNameEnum MFA_VOICE_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_VOICE_CHALLENGE, "mfa-voice-challenge"); + public static final ScreenGroupNameEnum CUSTOM_FORM = new ScreenGroupNameEnum(Value.CUSTOM_FORM, "custom-form"); - public static final ScreenGroupNameEnum PASSKEY_ENROLLMENT_LOCAL = - new ScreenGroupNameEnum(Value.PASSKEY_ENROLLMENT_LOCAL, "passkey-enrollment-local"); + public static final ScreenGroupNameEnum MFA_PHONE_ENROLLMENT = + new ScreenGroupNameEnum(Value.MFA_PHONE_ENROLLMENT, "mfa-phone-enrollment"); public static final ScreenGroupNameEnum LOGIN_EMAIL_VERIFICATION = new ScreenGroupNameEnum(Value.LOGIN_EMAIL_VERIFICATION, "login-email-verification"); public static final ScreenGroupNameEnum LOGIN_ID = new ScreenGroupNameEnum(Value.LOGIN_ID, "login-id"); + public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE = new ScreenGroupNameEnum( + Value.RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE, "reset-password-mfa-recovery-code-challenge"); + + public static final ScreenGroupNameEnum PASSKEY_ENROLLMENT_LOCAL = + new ScreenGroupNameEnum(Value.PASSKEY_ENROLLMENT_LOCAL, "passkey-enrollment-local"); + + public static final ScreenGroupNameEnum MFA_VOICE_CHALLENGE = + new ScreenGroupNameEnum(Value.MFA_VOICE_CHALLENGE, "mfa-voice-challenge"); + + public static final ScreenGroupNameEnum MFA_PUSH_ENROLLMENT_CODE = + new ScreenGroupNameEnum(Value.MFA_PUSH_ENROLLMENT_CODE, "mfa-push-enrollment-code"); + public static final ScreenGroupNameEnum MFA_WEBAUTHN_ROAMING_CHALLENGE = new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_ROAMING_CHALLENGE, "mfa-webauthn-roaming-challenge"); + public static final ScreenGroupNameEnum DEVICE_CODE_ACTIVATION = + new ScreenGroupNameEnum(Value.DEVICE_CODE_ACTIVATION, "device-code-activation"); + public static final ScreenGroupNameEnum STATUS = new ScreenGroupNameEnum(Value.STATUS, "status"); - public static final ScreenGroupNameEnum MFA_PUSH_ENROLLMENT_CODE = - new ScreenGroupNameEnum(Value.MFA_PUSH_ENROLLMENT_CODE, "mfa-push-enrollment-code"); + public static final ScreenGroupNameEnum MFA_PUSH_LIST = + new ScreenGroupNameEnum(Value.MFA_PUSH_LIST, "mfa-push-list"); public static final ScreenGroupNameEnum BRUTE_FORCE_PROTECTION_UNBLOCK_FAILURE = new ScreenGroupNameEnum( Value.BRUTE_FORCE_PROTECTION_UNBLOCK_FAILURE, "brute-force-protection-unblock-failure"); @@ -197,14 +89,8 @@ public final class ScreenGroupNameEnum { public static final ScreenGroupNameEnum MFA_ENROLL_RESULT = new ScreenGroupNameEnum(Value.MFA_ENROLL_RESULT, "mfa-enroll-result"); - public static final ScreenGroupNameEnum MFA_PUSH_LIST = - new ScreenGroupNameEnum(Value.MFA_PUSH_LIST, "mfa-push-list"); - - public static final ScreenGroupNameEnum PRE_LOGIN_ORGANIZATION_PICKER = - new ScreenGroupNameEnum(Value.PRE_LOGIN_ORGANIZATION_PICKER, "pre-login-organization-picker"); - - public static final ScreenGroupNameEnum MFA_PHONE_ENROLLMENT = - new ScreenGroupNameEnum(Value.MFA_PHONE_ENROLLMENT, "mfa-phone-enrollment"); + public static final ScreenGroupNameEnum RESET_PASSWORD = + new ScreenGroupNameEnum(Value.RESET_PASSWORD, "reset-password"); public static final ScreenGroupNameEnum MFA_RECOVERY_CODE_CHALLENGE_NEW_CODE = new ScreenGroupNameEnum(Value.MFA_RECOVERY_CODE_CHALLENGE_NEW_CODE, "mfa-recovery-code-challenge-new-code"); @@ -212,71 +98,185 @@ public final class ScreenGroupNameEnum { public static final ScreenGroupNameEnum EMAIL_VERIFICATION_RESULT = new ScreenGroupNameEnum(Value.EMAIL_VERIFICATION_RESULT, "email-verification-result"); - public static final ScreenGroupNameEnum DEVICE_CODE_ACTIVATION = - new ScreenGroupNameEnum(Value.DEVICE_CODE_ACTIVATION, "device-code-activation"); - - public static final ScreenGroupNameEnum MFA_WEBAUTHN_PLATFORM_ENROLLMENT = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_PLATFORM_ENROLLMENT, "mfa-webauthn-platform-enrollment"); + public static final ScreenGroupNameEnum PRE_LOGIN_ORGANIZATION_PICKER = + new ScreenGroupNameEnum(Value.PRE_LOGIN_ORGANIZATION_PICKER, "pre-login-organization-picker"); public static final ScreenGroupNameEnum MFA_SMS_CHALLENGE = new ScreenGroupNameEnum(Value.MFA_SMS_CHALLENGE, "mfa-sms-challenge"); - public static final ScreenGroupNameEnum ORGANIZATION_PICKER = - new ScreenGroupNameEnum(Value.ORGANIZATION_PICKER, "organization-picker"); - public static final ScreenGroupNameEnum MFA_WEBAUTHN_ENROLLMENT_SUCCESS = new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_ENROLLMENT_SUCCESS, "mfa-webauthn-enrollment-success"); - public static final ScreenGroupNameEnum RESET_PASSWORD = - new ScreenGroupNameEnum(Value.RESET_PASSWORD, "reset-password"); + public static final ScreenGroupNameEnum LOGIN_PASSWORDLESS_EMAIL_CODE = + new ScreenGroupNameEnum(Value.LOGIN_PASSWORDLESS_EMAIL_CODE, "login-passwordless-email-code"); - public static final ScreenGroupNameEnum PASSKEY_ENROLLMENT = - new ScreenGroupNameEnum(Value.PASSKEY_ENROLLMENT, "passkey-enrollment"); + public static final ScreenGroupNameEnum MFA_PUSH_CHALLENGE_PUSH = + new ScreenGroupNameEnum(Value.MFA_PUSH_CHALLENGE_PUSH, "mfa-push-challenge-push"); public static final ScreenGroupNameEnum LOGIN = new ScreenGroupNameEnum(Value.LOGIN, "login"); - public static final ScreenGroupNameEnum LOGIN_PASSWORDLESS_EMAIL_CODE = - new ScreenGroupNameEnum(Value.LOGIN_PASSWORDLESS_EMAIL_CODE, "login-passwordless-email-code"); - public static final ScreenGroupNameEnum SIGNUP_PASSWORD = new ScreenGroupNameEnum(Value.SIGNUP_PASSWORD, "signup-password"); - public static final ScreenGroupNameEnum PHONE_IDENTIFIER_CHALLENGE = - new ScreenGroupNameEnum(Value.PHONE_IDENTIFIER_CHALLENGE, "phone-identifier-challenge"); + public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_OTP_CHALLENGE = + new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_OTP_CHALLENGE, "reset-password-mfa-otp-challenge"); - public static final ScreenGroupNameEnum MFA_PUSH_CHALLENGE_PUSH = - new ScreenGroupNameEnum(Value.MFA_PUSH_CHALLENGE_PUSH, "mfa-push-challenge-push"); + public static final ScreenGroupNameEnum MFA_COUNTRY_CODES = + new ScreenGroupNameEnum(Value.MFA_COUNTRY_CODES, "mfa-country-codes"); public static final ScreenGroupNameEnum MFA_BEGIN_ENROLL_OPTIONS = new ScreenGroupNameEnum(Value.MFA_BEGIN_ENROLL_OPTIONS, "mfa-begin-enroll-options"); - public static final ScreenGroupNameEnum MFA_EMAIL_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_EMAIL_CHALLENGE, "mfa-email-challenge"); + public static final ScreenGroupNameEnum PASSKEY_ENROLLMENT = + new ScreenGroupNameEnum(Value.PASSKEY_ENROLLMENT, "passkey-enrollment"); + + public static final ScreenGroupNameEnum ORGANIZATION_PICKER = + new ScreenGroupNameEnum(Value.ORGANIZATION_PICKER, "organization-picker"); + + public static final ScreenGroupNameEnum PHONE_IDENTIFIER_CHALLENGE = + new ScreenGroupNameEnum(Value.PHONE_IDENTIFIER_CHALLENGE, "phone-identifier-challenge"); public static final ScreenGroupNameEnum ACCEPT_INVITATION = new ScreenGroupNameEnum(Value.ACCEPT_INVITATION, "accept-invitation"); + public static final ScreenGroupNameEnum MFA_WEBAUTHN_PLATFORM_ENROLLMENT = + new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_PLATFORM_ENROLLMENT, "mfa-webauthn-platform-enrollment"); + public static final ScreenGroupNameEnum MFA_WEBAUTHN_NOT_AVAILABLE_ERROR = new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_NOT_AVAILABLE_ERROR, "mfa-webauthn-not-available-error"); - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_OTP_CHALLENGE = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_OTP_CHALLENGE, "reset-password-mfa-otp-challenge"); + public static final ScreenGroupNameEnum LOGOUT_ABORTED = + new ScreenGroupNameEnum(Value.LOGOUT_ABORTED, "logout-aborted"); - public static final ScreenGroupNameEnum MFA_COUNTRY_CODES = - new ScreenGroupNameEnum(Value.MFA_COUNTRY_CODES, "mfa-country-codes"); + public static final ScreenGroupNameEnum RESET_PASSWORD_EMAIL = + new ScreenGroupNameEnum(Value.RESET_PASSWORD_EMAIL, "reset-password-email"); - private final Value value; + public static final ScreenGroupNameEnum MFA_PHONE_CHALLENGE = + new ScreenGroupNameEnum(Value.MFA_PHONE_CHALLENGE, "mfa-phone-challenge"); - private final String string; + public static final ScreenGroupNameEnum SIGNUP = new ScreenGroupNameEnum(Value.SIGNUP, "signup"); - ScreenGroupNameEnum(Value value, String string) { - this.value = value; - this.string = string; - } + public static final ScreenGroupNameEnum MFA_PUSH_WELCOME = + new ScreenGroupNameEnum(Value.MFA_PUSH_WELCOME, "mfa-push-welcome"); - public Value getEnumValue() { - return value; - } + public static final ScreenGroupNameEnum MFA_VOICE_ENROLLMENT = + new ScreenGroupNameEnum(Value.MFA_VOICE_ENROLLMENT, "mfa-voice-enrollment"); + + public static final ScreenGroupNameEnum PHONE_IDENTIFIER_ENROLLMENT = + new ScreenGroupNameEnum(Value.PHONE_IDENTIFIER_ENROLLMENT, "phone-identifier-enrollment"); + + public static final ScreenGroupNameEnum ASYNC_APPROVAL_WRONG_USER = + new ScreenGroupNameEnum(Value.ASYNC_APPROVAL_WRONG_USER, "async-approval-wrong-user"); + + public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_SMS_CHALLENGE = + new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_SMS_CHALLENGE, "reset-password-mfa-sms-challenge"); + + public static final ScreenGroupNameEnum REDEEM_TICKET = + new ScreenGroupNameEnum(Value.REDEEM_TICKET, "redeem-ticket"); + + public static final ScreenGroupNameEnum MFA_RECOVERY_CODE_ENROLLMENT = + new ScreenGroupNameEnum(Value.MFA_RECOVERY_CODE_ENROLLMENT, "mfa-recovery-code-enrollment"); + + public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE = new ScreenGroupNameEnum( + Value.RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE, "reset-password-mfa-webauthn-roaming-challenge"); + + public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH = new ScreenGroupNameEnum( + Value.RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH, "reset-password-mfa-push-challenge-push"); + + public static final ScreenGroupNameEnum LOGIN_PASSWORD = + new ScreenGroupNameEnum(Value.LOGIN_PASSWORD, "login-password"); + + public static final ScreenGroupNameEnum RESET_PASSWORD_ERROR = + new ScreenGroupNameEnum(Value.RESET_PASSWORD_ERROR, "reset-password-error"); + + public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_VOICE_CHALLENGE = + new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_VOICE_CHALLENGE, "reset-password-mfa-voice-challenge"); + + public static final ScreenGroupNameEnum MFA_PUSH_SUCCESS = + new ScreenGroupNameEnum(Value.MFA_PUSH_SUCCESS, "mfa-push-success"); + + public static final ScreenGroupNameEnum INTERSTITIAL_CAPTCHA = + new ScreenGroupNameEnum(Value.INTERSTITIAL_CAPTCHA, "interstitial-captcha"); + + public static final ScreenGroupNameEnum ASYNC_APPROVAL_ACCEPTED = + new ScreenGroupNameEnum(Value.ASYNC_APPROVAL_ACCEPTED, "async-approval-accepted"); + + public static final ScreenGroupNameEnum DEVICE_CODE_ACTIVATION_ALLOWED = + new ScreenGroupNameEnum(Value.DEVICE_CODE_ACTIVATION_ALLOWED, "device-code-activation-allowed"); + + public static final ScreenGroupNameEnum MFA_WEBAUTHN_ROAMING_ENROLLMENT = + new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_ROAMING_ENROLLMENT, "mfa-webauthn-roaming-enrollment"); + + public static final ScreenGroupNameEnum BRUTE_FORCE_PROTECTION_UNBLOCK = + new ScreenGroupNameEnum(Value.BRUTE_FORCE_PROTECTION_UNBLOCK, "brute-force-protection-unblock"); + + public static final ScreenGroupNameEnum EMAIL_OTP_CHALLENGE = + new ScreenGroupNameEnum(Value.EMAIL_OTP_CHALLENGE, "email-otp-challenge"); + + public static final ScreenGroupNameEnum ASYNC_APPROVAL_ERROR = + new ScreenGroupNameEnum(Value.ASYNC_APPROVAL_ERROR, "async-approval-error"); + + public static final ScreenGroupNameEnum CONSENT = new ScreenGroupNameEnum(Value.CONSENT, "consent"); + + public static final ScreenGroupNameEnum BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS = new ScreenGroupNameEnum( + Value.BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS, "brute-force-protection-unblock-success"); + + public static final ScreenGroupNameEnum SIGNUP_ID = new ScreenGroupNameEnum(Value.SIGNUP_ID, "signup-id"); + + public static final ScreenGroupNameEnum MFA_OTP_CHALLENGE = + new ScreenGroupNameEnum(Value.MFA_OTP_CHALLENGE, "mfa-otp-challenge"); + + public static final ScreenGroupNameEnum MFA_WEBAUTHN_PLATFORM_CHALLENGE = + new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_PLATFORM_CHALLENGE, "mfa-webauthn-platform-challenge"); + + public static final ScreenGroupNameEnum ORGANIZATION_SELECTION = + new ScreenGroupNameEnum(Value.ORGANIZATION_SELECTION, "organization-selection"); + + public static final ScreenGroupNameEnum LOGIN_PASSWORDLESS_EMAIL_LINK = + new ScreenGroupNameEnum(Value.LOGIN_PASSWORDLESS_EMAIL_LINK, "login-passwordless-email-link"); + + public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE = new ScreenGroupNameEnum( + Value.RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE, "reset-password-mfa-webauthn-platform-challenge"); + + public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_PHONE_CHALLENGE = + new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_PHONE_CHALLENGE, "reset-password-mfa-phone-challenge"); + + public static final ScreenGroupNameEnum MFA_OTP_ENROLLMENT_CODE = + new ScreenGroupNameEnum(Value.MFA_OTP_ENROLLMENT_CODE, "mfa-otp-enrollment-code"); + + public static final ScreenGroupNameEnum MFA_RECOVERY_CODE_CHALLENGE = + new ScreenGroupNameEnum(Value.MFA_RECOVERY_CODE_CHALLENGE, "mfa-recovery-code-challenge"); + + public static final ScreenGroupNameEnum DEVICE_CODE_CONFIRMATION = + new ScreenGroupNameEnum(Value.DEVICE_CODE_CONFIRMATION, "device-code-confirmation"); + + public static final ScreenGroupNameEnum RESET_PASSWORD_SUCCESS = + new ScreenGroupNameEnum(Value.RESET_PASSWORD_SUCCESS, "reset-password-success"); + + public static final ScreenGroupNameEnum MFA_WEBAUTHN_CHANGE_KEY_NICKNAME = + new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_CHANGE_KEY_NICKNAME, "mfa-webauthn-change-key-nickname"); + + public static final ScreenGroupNameEnum LOGIN_PASSWORDLESS_SMS_OTP = + new ScreenGroupNameEnum(Value.LOGIN_PASSWORDLESS_SMS_OTP, "login-passwordless-sms-otp"); + + public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_EMAIL_CHALLENGE = + new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_EMAIL_CHALLENGE, "reset-password-mfa-email-challenge"); + + public static final ScreenGroupNameEnum ASYNC_APPROVAL_DENIED = + new ScreenGroupNameEnum(Value.ASYNC_APPROVAL_DENIED, "async-approval-denied"); + + private final Value value; + + private final String string; + + ScreenGroupNameEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } @java.lang.Override @JsonValue @@ -297,184 +297,184 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case MFA_PHONE_CHALLENGE: - return visitor.visitMfaPhoneChallenge(); - case MFA_VOICE_ENROLLMENT: - return visitor.visitMfaVoiceEnrollment(); - case ASYNC_APPROVAL_WRONG_USER: - return visitor.visitAsyncApprovalWrongUser(); - case SIGNUP: - return visitor.visitSignup(); - case MFA_PUSH_WELCOME: - return visitor.visitMfaPushWelcome(); - case RESET_PASSWORD_EMAIL: - return visitor.visitResetPasswordEmail(); - case LOGOUT_ABORTED: - return visitor.visitLogoutAborted(); - case REDEEM_TICKET: - return visitor.visitRedeemTicket(); - case MFA_RECOVERY_CODE_ENROLLMENT: - return visitor.visitMfaRecoveryCodeEnrollment(); - case RESET_PASSWORD_MFA_SMS_CHALLENGE: - return visitor.visitResetPasswordMfaSmsChallenge(); - case RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE: - return visitor.visitResetPasswordMfaWebauthnRoamingChallenge(); - case PHONE_IDENTIFIER_ENROLLMENT: - return visitor.visitPhoneIdentifierEnrollment(); - case RESET_PASSWORD_ERROR: - return visitor.visitResetPasswordError(); - case RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH: - return visitor.visitResetPasswordMfaPushChallengePush(); - case RESET_PASSWORD_MFA_VOICE_CHALLENGE: - return visitor.visitResetPasswordMfaVoiceChallenge(); - case MFA_PUSH_SUCCESS: - return visitor.visitMfaPushSuccess(); - case ASYNC_APPROVAL_ACCEPTED: - return visitor.visitAsyncApprovalAccepted(); - case DEVICE_CODE_ACTIVATION_ALLOWED: - return visitor.visitDeviceCodeActivationAllowed(); - case INTERSTITIAL_CAPTCHA: - return visitor.visitInterstitialCaptcha(); - case LOGIN_PASSWORD: - return visitor.visitLoginPassword(); - case BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS: - return visitor.visitBruteForceProtectionUnblockSuccess(); - case EMAIL_OTP_CHALLENGE: - return visitor.visitEmailOtpChallenge(); - case LOGIN_PASSWORDLESS_EMAIL_LINK: - return visitor.visitLoginPasswordlessEmailLink(); - case CONSENT: - return visitor.visitConsent(); - case MFA_WEBAUTHN_ROAMING_ENROLLMENT: - return visitor.visitMfaWebauthnRoamingEnrollment(); - case BRUTE_FORCE_PROTECTION_UNBLOCK: - return visitor.visitBruteForceProtectionUnblock(); - case SIGNUP_ID: - return visitor.visitSignupId(); - case MFA_OTP_CHALLENGE: - return visitor.visitMfaOtpChallenge(); - case MFA_WEBAUTHN_PLATFORM_CHALLENGE: - return visitor.visitMfaWebauthnPlatformChallenge(); - case RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE: - return visitor.visitResetPasswordMfaRecoveryCodeChallenge(); - case ORGANIZATION_SELECTION: - return visitor.visitOrganizationSelection(); - case ASYNC_APPROVAL_ERROR: - return visitor.visitAsyncApprovalError(); - case RESET_PASSWORD_MFA_PHONE_CHALLENGE: - return visitor.visitResetPasswordMfaPhoneChallenge(); - case MFA_RECOVERY_CODE_CHALLENGE: - return visitor.visitMfaRecoveryCodeChallenge(); - case MFA_OTP_ENROLLMENT_CODE: - return visitor.visitMfaOtpEnrollmentCode(); - case RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE: - return visitor.visitResetPasswordMfaWebauthnPlatformChallenge(); - case RESET_PASSWORD_SUCCESS: - return visitor.visitResetPasswordSuccess(); - case ASYNC_APPROVAL_DENIED: - return visitor.visitAsyncApprovalDenied(); - case LOGIN_PASSWORDLESS_SMS_OTP: - return visitor.visitLoginPasswordlessSmsOtp(); - case DEVICE_CODE_CONFIRMATION: - return visitor.visitDeviceCodeConfirmation(); - case MFA_WEBAUTHN_CHANGE_KEY_NICKNAME: - return visitor.visitMfaWebauthnChangeKeyNickname(); - case RESET_PASSWORD_MFA_EMAIL_CHALLENGE: - return visitor.visitResetPasswordMfaEmailChallenge(); - case RESET_PASSWORD_REQUEST: - return visitor.visitResetPasswordRequest(); - case MFA_EMAIL_LIST: - return visitor.visitMfaEmailList(); + case MFA_EMAIL_CHALLENGE: + return visitor.visitMfaEmailChallenge(); case EMAIL_IDENTIFIER_CHALLENGE: return visitor.visitEmailIdentifierChallenge(); - case MFA_WEBAUTHN_ERROR: - return visitor.visitMfaWebauthnError(); case MFA_PUSH_ENROLLMENT_QR: return visitor.visitMfaPushEnrollmentQr(); case MFA_DETECT_BROWSER_CAPABILITIES: return visitor.visitMfaDetectBrowserCapabilities(); - case LOGOUT_COMPLETE: - return visitor.visitLogoutComplete(); + case MFA_WEBAUTHN_ERROR: + return visitor.visitMfaWebauthnError(); + case MFA_EMAIL_LIST: + return visitor.visitMfaEmailList(); case CUSTOMIZED_CONSENT: return visitor.visitCustomizedConsent(); + case LOGOUT_COMPLETE: + return visitor.visitLogoutComplete(); + case MFA_SMS_ENROLLMENT: + return visitor.visitMfaSmsEnrollment(); case MFA_OTP_ENROLLMENT_QR: return visitor.visitMfaOtpEnrollmentQr(); case MFA_SMS_LIST: return visitor.visitMfaSmsList(); + case RESET_PASSWORD_REQUEST: + return visitor.visitResetPasswordRequest(); case DEVICE_CODE_ACTIVATION_DENIED: return visitor.visitDeviceCodeActivationDenied(); - case MFA_SMS_ENROLLMENT: - return visitor.visitMfaSmsEnrollment(); - case CUSTOM_FORM: - return visitor.visitCustomForm(); case LOGOUT: return visitor.visitLogout(); case MFA_LOGIN_OPTIONS: return visitor.visitMfaLoginOptions(); - case MFA_VOICE_CHALLENGE: - return visitor.visitMfaVoiceChallenge(); - case PASSKEY_ENROLLMENT_LOCAL: - return visitor.visitPasskeyEnrollmentLocal(); + case CUSTOM_FORM: + return visitor.visitCustomForm(); + case MFA_PHONE_ENROLLMENT: + return visitor.visitMfaPhoneEnrollment(); case LOGIN_EMAIL_VERIFICATION: return visitor.visitLoginEmailVerification(); case LOGIN_ID: return visitor.visitLoginId(); + case RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE: + return visitor.visitResetPasswordMfaRecoveryCodeChallenge(); + case PASSKEY_ENROLLMENT_LOCAL: + return visitor.visitPasskeyEnrollmentLocal(); + case MFA_VOICE_CHALLENGE: + return visitor.visitMfaVoiceChallenge(); + case MFA_PUSH_ENROLLMENT_CODE: + return visitor.visitMfaPushEnrollmentCode(); case MFA_WEBAUTHN_ROAMING_CHALLENGE: return visitor.visitMfaWebauthnRoamingChallenge(); + case DEVICE_CODE_ACTIVATION: + return visitor.visitDeviceCodeActivation(); case STATUS: return visitor.visitStatus(); - case MFA_PUSH_ENROLLMENT_CODE: - return visitor.visitMfaPushEnrollmentCode(); + case MFA_PUSH_LIST: + return visitor.visitMfaPushList(); case BRUTE_FORCE_PROTECTION_UNBLOCK_FAILURE: return visitor.visitBruteForceProtectionUnblockFailure(); case MFA_ENROLL_RESULT: return visitor.visitMfaEnrollResult(); - case MFA_PUSH_LIST: - return visitor.visitMfaPushList(); - case PRE_LOGIN_ORGANIZATION_PICKER: - return visitor.visitPreLoginOrganizationPicker(); - case MFA_PHONE_ENROLLMENT: - return visitor.visitMfaPhoneEnrollment(); + case RESET_PASSWORD: + return visitor.visitResetPassword(); case MFA_RECOVERY_CODE_CHALLENGE_NEW_CODE: return visitor.visitMfaRecoveryCodeChallengeNewCode(); case EMAIL_VERIFICATION_RESULT: return visitor.visitEmailVerificationResult(); - case DEVICE_CODE_ACTIVATION: - return visitor.visitDeviceCodeActivation(); - case MFA_WEBAUTHN_PLATFORM_ENROLLMENT: - return visitor.visitMfaWebauthnPlatformEnrollment(); + case PRE_LOGIN_ORGANIZATION_PICKER: + return visitor.visitPreLoginOrganizationPicker(); case MFA_SMS_CHALLENGE: return visitor.visitMfaSmsChallenge(); - case ORGANIZATION_PICKER: - return visitor.visitOrganizationPicker(); case MFA_WEBAUTHN_ENROLLMENT_SUCCESS: return visitor.visitMfaWebauthnEnrollmentSuccess(); - case RESET_PASSWORD: - return visitor.visitResetPassword(); - case PASSKEY_ENROLLMENT: - return visitor.visitPasskeyEnrollment(); - case LOGIN: - return visitor.visitLogin(); case LOGIN_PASSWORDLESS_EMAIL_CODE: return visitor.visitLoginPasswordlessEmailCode(); - case SIGNUP_PASSWORD: - return visitor.visitSignupPassword(); - case PHONE_IDENTIFIER_CHALLENGE: - return visitor.visitPhoneIdentifierChallenge(); case MFA_PUSH_CHALLENGE_PUSH: return visitor.visitMfaPushChallengePush(); + case LOGIN: + return visitor.visitLogin(); + case SIGNUP_PASSWORD: + return visitor.visitSignupPassword(); + case RESET_PASSWORD_MFA_OTP_CHALLENGE: + return visitor.visitResetPasswordMfaOtpChallenge(); + case MFA_COUNTRY_CODES: + return visitor.visitMfaCountryCodes(); case MFA_BEGIN_ENROLL_OPTIONS: return visitor.visitMfaBeginEnrollOptions(); - case MFA_EMAIL_CHALLENGE: - return visitor.visitMfaEmailChallenge(); + case PASSKEY_ENROLLMENT: + return visitor.visitPasskeyEnrollment(); + case ORGANIZATION_PICKER: + return visitor.visitOrganizationPicker(); + case PHONE_IDENTIFIER_CHALLENGE: + return visitor.visitPhoneIdentifierChallenge(); case ACCEPT_INVITATION: return visitor.visitAcceptInvitation(); + case MFA_WEBAUTHN_PLATFORM_ENROLLMENT: + return visitor.visitMfaWebauthnPlatformEnrollment(); case MFA_WEBAUTHN_NOT_AVAILABLE_ERROR: return visitor.visitMfaWebauthnNotAvailableError(); - case RESET_PASSWORD_MFA_OTP_CHALLENGE: - return visitor.visitResetPasswordMfaOtpChallenge(); - case MFA_COUNTRY_CODES: - return visitor.visitMfaCountryCodes(); + case LOGOUT_ABORTED: + return visitor.visitLogoutAborted(); + case RESET_PASSWORD_EMAIL: + return visitor.visitResetPasswordEmail(); + case MFA_PHONE_CHALLENGE: + return visitor.visitMfaPhoneChallenge(); + case SIGNUP: + return visitor.visitSignup(); + case MFA_PUSH_WELCOME: + return visitor.visitMfaPushWelcome(); + case MFA_VOICE_ENROLLMENT: + return visitor.visitMfaVoiceEnrollment(); + case PHONE_IDENTIFIER_ENROLLMENT: + return visitor.visitPhoneIdentifierEnrollment(); + case ASYNC_APPROVAL_WRONG_USER: + return visitor.visitAsyncApprovalWrongUser(); + case RESET_PASSWORD_MFA_SMS_CHALLENGE: + return visitor.visitResetPasswordMfaSmsChallenge(); + case REDEEM_TICKET: + return visitor.visitRedeemTicket(); + case MFA_RECOVERY_CODE_ENROLLMENT: + return visitor.visitMfaRecoveryCodeEnrollment(); + case RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE: + return visitor.visitResetPasswordMfaWebauthnRoamingChallenge(); + case RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH: + return visitor.visitResetPasswordMfaPushChallengePush(); + case LOGIN_PASSWORD: + return visitor.visitLoginPassword(); + case RESET_PASSWORD_ERROR: + return visitor.visitResetPasswordError(); + case RESET_PASSWORD_MFA_VOICE_CHALLENGE: + return visitor.visitResetPasswordMfaVoiceChallenge(); + case MFA_PUSH_SUCCESS: + return visitor.visitMfaPushSuccess(); + case INTERSTITIAL_CAPTCHA: + return visitor.visitInterstitialCaptcha(); + case ASYNC_APPROVAL_ACCEPTED: + return visitor.visitAsyncApprovalAccepted(); + case DEVICE_CODE_ACTIVATION_ALLOWED: + return visitor.visitDeviceCodeActivationAllowed(); + case MFA_WEBAUTHN_ROAMING_ENROLLMENT: + return visitor.visitMfaWebauthnRoamingEnrollment(); + case BRUTE_FORCE_PROTECTION_UNBLOCK: + return visitor.visitBruteForceProtectionUnblock(); + case EMAIL_OTP_CHALLENGE: + return visitor.visitEmailOtpChallenge(); + case ASYNC_APPROVAL_ERROR: + return visitor.visitAsyncApprovalError(); + case CONSENT: + return visitor.visitConsent(); + case BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS: + return visitor.visitBruteForceProtectionUnblockSuccess(); + case SIGNUP_ID: + return visitor.visitSignupId(); + case MFA_OTP_CHALLENGE: + return visitor.visitMfaOtpChallenge(); + case MFA_WEBAUTHN_PLATFORM_CHALLENGE: + return visitor.visitMfaWebauthnPlatformChallenge(); + case ORGANIZATION_SELECTION: + return visitor.visitOrganizationSelection(); + case LOGIN_PASSWORDLESS_EMAIL_LINK: + return visitor.visitLoginPasswordlessEmailLink(); + case RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE: + return visitor.visitResetPasswordMfaWebauthnPlatformChallenge(); + case RESET_PASSWORD_MFA_PHONE_CHALLENGE: + return visitor.visitResetPasswordMfaPhoneChallenge(); + case MFA_OTP_ENROLLMENT_CODE: + return visitor.visitMfaOtpEnrollmentCode(); + case MFA_RECOVERY_CODE_CHALLENGE: + return visitor.visitMfaRecoveryCodeChallenge(); + case DEVICE_CODE_CONFIRMATION: + return visitor.visitDeviceCodeConfirmation(); + case RESET_PASSWORD_SUCCESS: + return visitor.visitResetPasswordSuccess(); + case MFA_WEBAUTHN_CHANGE_KEY_NICKNAME: + return visitor.visitMfaWebauthnChangeKeyNickname(); + case LOGIN_PASSWORDLESS_SMS_OTP: + return visitor.visitLoginPasswordlessSmsOtp(); + case RESET_PASSWORD_MFA_EMAIL_CHALLENGE: + return visitor.visitResetPasswordMfaEmailChallenge(); + case ASYNC_APPROVAL_DENIED: + return visitor.visitAsyncApprovalDenied(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -484,184 +484,184 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ScreenGroupNameEnum valueOf(String value) { switch (value) { - case "mfa-phone-challenge": - return MFA_PHONE_CHALLENGE; - case "mfa-voice-enrollment": - return MFA_VOICE_ENROLLMENT; - case "async-approval-wrong-user": - return ASYNC_APPROVAL_WRONG_USER; - case "signup": - return SIGNUP; - case "mfa-push-welcome": - return MFA_PUSH_WELCOME; - case "reset-password-email": - return RESET_PASSWORD_EMAIL; - case "logout-aborted": - return LOGOUT_ABORTED; - case "redeem-ticket": - return REDEEM_TICKET; - case "mfa-recovery-code-enrollment": - return MFA_RECOVERY_CODE_ENROLLMENT; - case "reset-password-mfa-sms-challenge": - return RESET_PASSWORD_MFA_SMS_CHALLENGE; - case "reset-password-mfa-webauthn-roaming-challenge": - return RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE; - case "phone-identifier-enrollment": - return PHONE_IDENTIFIER_ENROLLMENT; - case "reset-password-error": - return RESET_PASSWORD_ERROR; - case "reset-password-mfa-push-challenge-push": - return RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH; - case "reset-password-mfa-voice-challenge": - return RESET_PASSWORD_MFA_VOICE_CHALLENGE; - case "mfa-push-success": - return MFA_PUSH_SUCCESS; - case "async-approval-accepted": - return ASYNC_APPROVAL_ACCEPTED; - case "device-code-activation-allowed": - return DEVICE_CODE_ACTIVATION_ALLOWED; - case "interstitial-captcha": - return INTERSTITIAL_CAPTCHA; - case "login-password": - return LOGIN_PASSWORD; - case "brute-force-protection-unblock-success": - return BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS; - case "email-otp-challenge": - return EMAIL_OTP_CHALLENGE; - case "login-passwordless-email-link": - return LOGIN_PASSWORDLESS_EMAIL_LINK; - case "consent": - return CONSENT; - case "mfa-webauthn-roaming-enrollment": - return MFA_WEBAUTHN_ROAMING_ENROLLMENT; - case "brute-force-protection-unblock": - return BRUTE_FORCE_PROTECTION_UNBLOCK; - case "signup-id": - return SIGNUP_ID; - case "mfa-otp-challenge": - return MFA_OTP_CHALLENGE; - case "mfa-webauthn-platform-challenge": - return MFA_WEBAUTHN_PLATFORM_CHALLENGE; - case "reset-password-mfa-recovery-code-challenge": - return RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE; - case "organization-selection": - return ORGANIZATION_SELECTION; - case "async-approval-error": - return ASYNC_APPROVAL_ERROR; - case "reset-password-mfa-phone-challenge": - return RESET_PASSWORD_MFA_PHONE_CHALLENGE; - case "mfa-recovery-code-challenge": - return MFA_RECOVERY_CODE_CHALLENGE; - case "mfa-otp-enrollment-code": - return MFA_OTP_ENROLLMENT_CODE; - case "reset-password-mfa-webauthn-platform-challenge": - return RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE; - case "reset-password-success": - return RESET_PASSWORD_SUCCESS; - case "async-approval-denied": - return ASYNC_APPROVAL_DENIED; - case "login-passwordless-sms-otp": - return LOGIN_PASSWORDLESS_SMS_OTP; - case "device-code-confirmation": - return DEVICE_CODE_CONFIRMATION; - case "mfa-webauthn-change-key-nickname": - return MFA_WEBAUTHN_CHANGE_KEY_NICKNAME; - case "reset-password-mfa-email-challenge": - return RESET_PASSWORD_MFA_EMAIL_CHALLENGE; - case "reset-password-request": - return RESET_PASSWORD_REQUEST; - case "mfa-email-list": - return MFA_EMAIL_LIST; + case "mfa-email-challenge": + return MFA_EMAIL_CHALLENGE; case "email-identifier-challenge": return EMAIL_IDENTIFIER_CHALLENGE; - case "mfa-webauthn-error": - return MFA_WEBAUTHN_ERROR; case "mfa-push-enrollment-qr": return MFA_PUSH_ENROLLMENT_QR; case "mfa-detect-browser-capabilities": return MFA_DETECT_BROWSER_CAPABILITIES; - case "logout-complete": - return LOGOUT_COMPLETE; + case "mfa-webauthn-error": + return MFA_WEBAUTHN_ERROR; + case "mfa-email-list": + return MFA_EMAIL_LIST; case "customized-consent": return CUSTOMIZED_CONSENT; + case "logout-complete": + return LOGOUT_COMPLETE; + case "mfa-sms-enrollment": + return MFA_SMS_ENROLLMENT; case "mfa-otp-enrollment-qr": return MFA_OTP_ENROLLMENT_QR; case "mfa-sms-list": return MFA_SMS_LIST; + case "reset-password-request": + return RESET_PASSWORD_REQUEST; case "device-code-activation-denied": return DEVICE_CODE_ACTIVATION_DENIED; - case "mfa-sms-enrollment": - return MFA_SMS_ENROLLMENT; - case "custom-form": - return CUSTOM_FORM; case "logout": return LOGOUT; case "mfa-login-options": return MFA_LOGIN_OPTIONS; - case "mfa-voice-challenge": - return MFA_VOICE_CHALLENGE; - case "passkey-enrollment-local": - return PASSKEY_ENROLLMENT_LOCAL; + case "custom-form": + return CUSTOM_FORM; + case "mfa-phone-enrollment": + return MFA_PHONE_ENROLLMENT; case "login-email-verification": return LOGIN_EMAIL_VERIFICATION; case "login-id": return LOGIN_ID; + case "reset-password-mfa-recovery-code-challenge": + return RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE; + case "passkey-enrollment-local": + return PASSKEY_ENROLLMENT_LOCAL; + case "mfa-voice-challenge": + return MFA_VOICE_CHALLENGE; + case "mfa-push-enrollment-code": + return MFA_PUSH_ENROLLMENT_CODE; case "mfa-webauthn-roaming-challenge": return MFA_WEBAUTHN_ROAMING_CHALLENGE; + case "device-code-activation": + return DEVICE_CODE_ACTIVATION; case "status": return STATUS; - case "mfa-push-enrollment-code": - return MFA_PUSH_ENROLLMENT_CODE; + case "mfa-push-list": + return MFA_PUSH_LIST; case "brute-force-protection-unblock-failure": return BRUTE_FORCE_PROTECTION_UNBLOCK_FAILURE; case "mfa-enroll-result": return MFA_ENROLL_RESULT; - case "mfa-push-list": - return MFA_PUSH_LIST; - case "pre-login-organization-picker": - return PRE_LOGIN_ORGANIZATION_PICKER; - case "mfa-phone-enrollment": - return MFA_PHONE_ENROLLMENT; + case "reset-password": + return RESET_PASSWORD; case "mfa-recovery-code-challenge-new-code": return MFA_RECOVERY_CODE_CHALLENGE_NEW_CODE; case "email-verification-result": return EMAIL_VERIFICATION_RESULT; - case "device-code-activation": - return DEVICE_CODE_ACTIVATION; - case "mfa-webauthn-platform-enrollment": - return MFA_WEBAUTHN_PLATFORM_ENROLLMENT; + case "pre-login-organization-picker": + return PRE_LOGIN_ORGANIZATION_PICKER; case "mfa-sms-challenge": return MFA_SMS_CHALLENGE; - case "organization-picker": - return ORGANIZATION_PICKER; case "mfa-webauthn-enrollment-success": return MFA_WEBAUTHN_ENROLLMENT_SUCCESS; - case "reset-password": - return RESET_PASSWORD; - case "passkey-enrollment": - return PASSKEY_ENROLLMENT; - case "login": - return LOGIN; case "login-passwordless-email-code": return LOGIN_PASSWORDLESS_EMAIL_CODE; - case "signup-password": - return SIGNUP_PASSWORD; - case "phone-identifier-challenge": - return PHONE_IDENTIFIER_CHALLENGE; case "mfa-push-challenge-push": return MFA_PUSH_CHALLENGE_PUSH; + case "login": + return LOGIN; + case "signup-password": + return SIGNUP_PASSWORD; + case "reset-password-mfa-otp-challenge": + return RESET_PASSWORD_MFA_OTP_CHALLENGE; + case "mfa-country-codes": + return MFA_COUNTRY_CODES; case "mfa-begin-enroll-options": return MFA_BEGIN_ENROLL_OPTIONS; - case "mfa-email-challenge": - return MFA_EMAIL_CHALLENGE; + case "passkey-enrollment": + return PASSKEY_ENROLLMENT; + case "organization-picker": + return ORGANIZATION_PICKER; + case "phone-identifier-challenge": + return PHONE_IDENTIFIER_CHALLENGE; case "accept-invitation": return ACCEPT_INVITATION; + case "mfa-webauthn-platform-enrollment": + return MFA_WEBAUTHN_PLATFORM_ENROLLMENT; case "mfa-webauthn-not-available-error": return MFA_WEBAUTHN_NOT_AVAILABLE_ERROR; - case "reset-password-mfa-otp-challenge": - return RESET_PASSWORD_MFA_OTP_CHALLENGE; - case "mfa-country-codes": - return MFA_COUNTRY_CODES; + case "logout-aborted": + return LOGOUT_ABORTED; + case "reset-password-email": + return RESET_PASSWORD_EMAIL; + case "mfa-phone-challenge": + return MFA_PHONE_CHALLENGE; + case "signup": + return SIGNUP; + case "mfa-push-welcome": + return MFA_PUSH_WELCOME; + case "mfa-voice-enrollment": + return MFA_VOICE_ENROLLMENT; + case "phone-identifier-enrollment": + return PHONE_IDENTIFIER_ENROLLMENT; + case "async-approval-wrong-user": + return ASYNC_APPROVAL_WRONG_USER; + case "reset-password-mfa-sms-challenge": + return RESET_PASSWORD_MFA_SMS_CHALLENGE; + case "redeem-ticket": + return REDEEM_TICKET; + case "mfa-recovery-code-enrollment": + return MFA_RECOVERY_CODE_ENROLLMENT; + case "reset-password-mfa-webauthn-roaming-challenge": + return RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE; + case "reset-password-mfa-push-challenge-push": + return RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH; + case "login-password": + return LOGIN_PASSWORD; + case "reset-password-error": + return RESET_PASSWORD_ERROR; + case "reset-password-mfa-voice-challenge": + return RESET_PASSWORD_MFA_VOICE_CHALLENGE; + case "mfa-push-success": + return MFA_PUSH_SUCCESS; + case "interstitial-captcha": + return INTERSTITIAL_CAPTCHA; + case "async-approval-accepted": + return ASYNC_APPROVAL_ACCEPTED; + case "device-code-activation-allowed": + return DEVICE_CODE_ACTIVATION_ALLOWED; + case "mfa-webauthn-roaming-enrollment": + return MFA_WEBAUTHN_ROAMING_ENROLLMENT; + case "brute-force-protection-unblock": + return BRUTE_FORCE_PROTECTION_UNBLOCK; + case "email-otp-challenge": + return EMAIL_OTP_CHALLENGE; + case "async-approval-error": + return ASYNC_APPROVAL_ERROR; + case "consent": + return CONSENT; + case "brute-force-protection-unblock-success": + return BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS; + case "signup-id": + return SIGNUP_ID; + case "mfa-otp-challenge": + return MFA_OTP_CHALLENGE; + case "mfa-webauthn-platform-challenge": + return MFA_WEBAUTHN_PLATFORM_CHALLENGE; + case "organization-selection": + return ORGANIZATION_SELECTION; + case "login-passwordless-email-link": + return LOGIN_PASSWORDLESS_EMAIL_LINK; + case "reset-password-mfa-webauthn-platform-challenge": + return RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE; + case "reset-password-mfa-phone-challenge": + return RESET_PASSWORD_MFA_PHONE_CHALLENGE; + case "mfa-otp-enrollment-code": + return MFA_OTP_ENROLLMENT_CODE; + case "mfa-recovery-code-challenge": + return MFA_RECOVERY_CODE_CHALLENGE; + case "device-code-confirmation": + return DEVICE_CODE_CONFIRMATION; + case "reset-password-success": + return RESET_PASSWORD_SUCCESS; + case "mfa-webauthn-change-key-nickname": + return MFA_WEBAUTHN_CHANGE_KEY_NICKNAME; + case "login-passwordless-sms-otp": + return LOGIN_PASSWORDLESS_SMS_OTP; + case "reset-password-mfa-email-challenge": + return RESET_PASSWORD_MFA_EMAIL_CHALLENGE; + case "async-approval-denied": + return ASYNC_APPROVAL_DENIED; default: return new ScreenGroupNameEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/SearchEngineVersionsEnum.java b/src/main/java/com/auth0/client/mgmt/types/SearchEngineVersionsEnum.java index 5a1e7fbf1..a888d256b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SearchEngineVersionsEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/SearchEngineVersionsEnum.java @@ -7,10 +7,10 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class SearchEngineVersionsEnum { - public static final SearchEngineVersionsEnum V1 = new SearchEngineVersionsEnum(Value.V1, "v1"); - public static final SearchEngineVersionsEnum V2 = new SearchEngineVersionsEnum(Value.V2, "v2"); + public static final SearchEngineVersionsEnum V1 = new SearchEngineVersionsEnum(Value.V1, "v1"); + public static final SearchEngineVersionsEnum V3 = new SearchEngineVersionsEnum(Value.V3, "v3"); private final Value value; @@ -46,10 +46,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case V1: - return visitor.visitV1(); case V2: return visitor.visitV2(); + case V1: + return visitor.visitV1(); case V3: return visitor.visitV3(); case UNKNOWN: @@ -61,10 +61,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static SearchEngineVersionsEnum valueOf(String value) { switch (value) { - case "v1": - return V1; case "v2": return V2; + case "v1": + return V1; case "v3": return V3; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfile.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfile.java index 6e22be292..90d93b5ca 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfile.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfile.java @@ -90,7 +90,7 @@ public Optional getDescription() { } /** - * @return List of attributes to be mapped that will be shown to the user during the SS-SSO flow. + * @return List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow. */ @JsonProperty("user_attributes") public Optional> getUserAttributes() { @@ -119,7 +119,7 @@ public Optional getBranding() { } /** - * @return List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate] + * @return List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate] */ @JsonProperty("allowed_strategies") public Optional> getAllowedStrategies() { @@ -261,7 +261,7 @@ public Builder description(String description) { } /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

+ *

List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow.

*/ @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) public Builder userAttributes(Optional> userAttributes) { @@ -314,7 +314,7 @@ public Builder branding(SelfServiceProfileBrandingProperties branding) { } /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

+ *

List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

*/ @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) public Builder allowedStrategies(Optional> allowedStrategies) { diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileAllowedStrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileAllowedStrategyEnum.java index 2e24e7d56..5318d4989 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileAllowedStrategyEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileAllowedStrategyEnum.java @@ -19,24 +19,24 @@ public final class SelfServiceProfileAllowedStrategyEnum { public static final SelfServiceProfileAllowedStrategyEnum SAMLP = new SelfServiceProfileAllowedStrategyEnum(Value.SAMLP, "samlp"); - public static final SelfServiceProfileAllowedStrategyEnum GOOGLE_APPS = - new SelfServiceProfileAllowedStrategyEnum(Value.GOOGLE_APPS, "google-apps"); - - public static final SelfServiceProfileAllowedStrategyEnum KEYCLOAK_SAMLP = - new SelfServiceProfileAllowedStrategyEnum(Value.KEYCLOAK_SAMLP, "keycloak-samlp"); - public static final SelfServiceProfileAllowedStrategyEnum WAAD = new SelfServiceProfileAllowedStrategyEnum(Value.WAAD, "waad"); public static final SelfServiceProfileAllowedStrategyEnum AUTH0SAMLP = new SelfServiceProfileAllowedStrategyEnum(Value.AUTH0SAMLP, "auth0-samlp"); + public static final SelfServiceProfileAllowedStrategyEnum KEYCLOAK_SAMLP = + new SelfServiceProfileAllowedStrategyEnum(Value.KEYCLOAK_SAMLP, "keycloak-samlp"); + public static final SelfServiceProfileAllowedStrategyEnum OIDC = new SelfServiceProfileAllowedStrategyEnum(Value.OIDC, "oidc"); public static final SelfServiceProfileAllowedStrategyEnum ADFS = new SelfServiceProfileAllowedStrategyEnum(Value.ADFS, "adfs"); + public static final SelfServiceProfileAllowedStrategyEnum GOOGLE_APPS = + new SelfServiceProfileAllowedStrategyEnum(Value.GOOGLE_APPS, "google-apps"); + private final Value value; private final String string; @@ -78,18 +78,18 @@ public T visit(Visitor visitor) { return visitor.visitOkta(); case SAMLP: return visitor.visitSamlp(); - case GOOGLE_APPS: - return visitor.visitGoogleApps(); - case KEYCLOAK_SAMLP: - return visitor.visitKeycloakSamlp(); case WAAD: return visitor.visitWaad(); case AUTH0SAMLP: return visitor.visitAuth0Samlp(); + case KEYCLOAK_SAMLP: + return visitor.visitKeycloakSamlp(); case OIDC: return visitor.visitOidc(); case ADFS: return visitor.visitAdfs(); + case GOOGLE_APPS: + return visitor.visitGoogleApps(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -107,18 +107,18 @@ public static SelfServiceProfileAllowedStrategyEnum valueOf(String value) { return OKTA; case "samlp": return SAMLP; - case "google-apps": - return GOOGLE_APPS; - case "keycloak-samlp": - return KEYCLOAK_SAMLP; case "waad": return WAAD; case "auth0-samlp": return AUTH0SAMLP; + case "keycloak-samlp": + return KEYCLOAK_SAMLP; case "oidc": return OIDC; case "adfs": return ADFS; + case "google-apps": + return GOOGLE_APPS; default: return new SelfServiceProfileAllowedStrategyEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionConfig.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionConfig.java index 19cd02a78..dbf18618a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionConfig.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionConfig.java @@ -56,7 +56,7 @@ private SelfServiceProfileSsoTicketConnectionConfig( } /** - * @return The name of the connection that will be created as a part of the SSO flow. + * @return The name of the connection that will be created as a part of the Self-Service Enterprise Configuration flow. */ @JsonProperty("name") public String getName() { @@ -145,7 +145,7 @@ public static NameStage builder() { public interface NameStage { /** - *

The name of the connection that will be created as a part of the SSO flow.

+ *

The name of the connection that will be created as a part of the Self-Service Enterprise Configuration flow.

*/ _FinalStage name(@NotNull String name); @@ -224,8 +224,8 @@ public Builder from(SelfServiceProfileSsoTicketConnectionConfig other) { } /** - *

The name of the connection that will be created as a part of the SSO flow.

- *

The name of the connection that will be created as a part of the SSO flow.

+ *

The name of the connection that will be created as a part of the Self-Service Enterprise Configuration flow.

+ *

The name of the connection that will be created as a part of the Self-Service Enterprise Configuration flow.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainAliasesConfig.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainAliasesConfig.java index 6ef8089c7..d5c2328fb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainAliasesConfig.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainAliasesConfig.java @@ -43,7 +43,7 @@ public SelfServiceProfileSsoTicketDomainVerificationEnum getDomainVerification() } /** - * @return List of domains that will be submitted for verification during the self-service SSO flow. + * @return List of domains that will be submitted for verification during the Self-Service Enterprise Configuration flow. */ @JsonProperty("pending_domains") public Optional> getPendingDomains() { @@ -94,7 +94,7 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); /** - *

List of domains that will be submitted for verification during the self-service SSO flow.

+ *

List of domains that will be submitted for verification during the Self-Service Enterprise Configuration flow.

*/ _FinalStage pendingDomains(Optional> pendingDomains); @@ -128,7 +128,7 @@ public _FinalStage domainVerification( } /** - *

List of domains that will be submitted for verification during the self-service SSO flow.

+ *

List of domains that will be submitted for verification during the Self-Service Enterprise Configuration flow.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -138,7 +138,7 @@ public _FinalStage pendingDomains(List pendingDomains) { } /** - *

List of domains that will be submitted for verification during the self-service SSO flow.

+ *

List of domains that will be submitted for verification during the Self-Service Enterprise Configuration flow.

*/ @java.lang.Override @JsonSetter(value = "pending_domains", nulls = Nulls.SKIP) diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainVerificationEnum.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainVerificationEnum.java index dcb54f647..6bbf0ebf6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainVerificationEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainVerificationEnum.java @@ -10,12 +10,12 @@ public final class SelfServiceProfileSsoTicketDomainVerificationEnum { public static final SelfServiceProfileSsoTicketDomainVerificationEnum REQUIRED = new SelfServiceProfileSsoTicketDomainVerificationEnum(Value.REQUIRED, "required"); - public static final SelfServiceProfileSsoTicketDomainVerificationEnum NONE = - new SelfServiceProfileSsoTicketDomainVerificationEnum(Value.NONE, "none"); - public static final SelfServiceProfileSsoTicketDomainVerificationEnum OPTIONAL = new SelfServiceProfileSsoTicketDomainVerificationEnum(Value.OPTIONAL, "optional"); + public static final SelfServiceProfileSsoTicketDomainVerificationEnum NONE = + new SelfServiceProfileSsoTicketDomainVerificationEnum(Value.NONE, "none"); + private final Value value; private final String string; @@ -51,10 +51,10 @@ public T visit(Visitor visitor) { switch (value) { case REQUIRED: return visitor.visitRequired(); - case NONE: - return visitor.visitNone(); case OPTIONAL: return visitor.visitOptional(); + case NONE: + return visitor.visitNone(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -66,10 +66,10 @@ public static SelfServiceProfileSsoTicketDomainVerificationEnum valueOf(String v switch (value) { case "required": return REQUIRED; - case "none": - return NONE; case "optional": return OPTIONAL; + case "none": + return NONE; default: return new SelfServiceProfileSsoTicketDomainVerificationEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum.java index 81075f195..814ea7f2d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum.java @@ -10,12 +10,12 @@ public final class SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum { public static final SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum WSFED = new SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum(Value.WSFED, "wsfed"); - public static final SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum SAMLP = - new SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum(Value.SAMLP, "samlp"); - public static final SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum OAUTH2 = new SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum(Value.OAUTH2, "oauth2"); + public static final SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum SAMLP = + new SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum(Value.SAMLP, "samlp"); + private final Value value; private final String string; @@ -52,10 +52,10 @@ public T visit(Visitor visitor) { switch (value) { case WSFED: return visitor.visitWsfed(); - case SAMLP: - return visitor.visitSamlp(); case OAUTH2: return visitor.visitOauth2(); + case SAMLP: + return visitor.visitSamlp(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -67,10 +67,10 @@ public static SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum valueOf( switch (value) { case "wsfed": return WSFED; - case "samlp": - return SAMLP; case "oauth2": return OAUTH2; + case "samlp": + return SAMLP; default: return new SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketProvisioningScopeEnum.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketProvisioningScopeEnum.java index ab374f842..3e8d9a79f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketProvisioningScopeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketProvisioningScopeEnum.java @@ -7,15 +7,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class SelfServiceProfileSsoTicketProvisioningScopeEnum { - public static final SelfServiceProfileSsoTicketProvisioningScopeEnum PATCH_USERS = - new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.PATCH_USERS, "patch:users"); - public static final SelfServiceProfileSsoTicketProvisioningScopeEnum DELETE_USERS = new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.DELETE_USERS, "delete:users"); - public static final SelfServiceProfileSsoTicketProvisioningScopeEnum GET_GROUPS = - new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.GET_GROUPS, "get:groups"); - public static final SelfServiceProfileSsoTicketProvisioningScopeEnum DELETE_GROUPS = new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.DELETE_GROUPS, "delete:groups"); @@ -37,6 +31,12 @@ public final class SelfServiceProfileSsoTicketProvisioningScopeEnum { public static final SelfServiceProfileSsoTicketProvisioningScopeEnum PUT_GROUPS = new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.PUT_GROUPS, "put:groups"); + public static final SelfServiceProfileSsoTicketProvisioningScopeEnum GET_GROUPS = + new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.GET_GROUPS, "get:groups"); + + public static final SelfServiceProfileSsoTicketProvisioningScopeEnum PATCH_USERS = + new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.PATCH_USERS, "patch:users"); + private final Value value; private final String string; @@ -70,12 +70,8 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case PATCH_USERS: - return visitor.visitPatchUsers(); case DELETE_USERS: return visitor.visitDeleteUsers(); - case GET_GROUPS: - return visitor.visitGetGroups(); case DELETE_GROUPS: return visitor.visitDeleteGroups(); case GET_USERS: @@ -90,6 +86,10 @@ public T visit(Visitor visitor) { return visitor.visitPatchGroups(); case PUT_GROUPS: return visitor.visitPutGroups(); + case GET_GROUPS: + return visitor.visitGetGroups(); + case PATCH_USERS: + return visitor.visitPatchUsers(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -99,12 +99,8 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static SelfServiceProfileSsoTicketProvisioningScopeEnum valueOf(String value) { switch (value) { - case "patch:users": - return PATCH_USERS; case "delete:users": return DELETE_USERS; - case "get:groups": - return GET_GROUPS; case "delete:groups": return DELETE_GROUPS; case "get:users": @@ -119,6 +115,10 @@ public static SelfServiceProfileSsoTicketProvisioningScopeEnum valueOf(String va return PATCH_GROUPS; case "put:groups": return PUT_GROUPS; + case "get:groups": + return GET_GROUPS; + case "patch:users": + return PATCH_USERS; default: return new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/SignupStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/SignupStatusEnum.java index cb5d82bd1..5363171bc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SignupStatusEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/SignupStatusEnum.java @@ -7,10 +7,10 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class SignupStatusEnum { - public static final SignupStatusEnum INACTIVE = new SignupStatusEnum(Value.INACTIVE, "inactive"); - public static final SignupStatusEnum REQUIRED = new SignupStatusEnum(Value.REQUIRED, "required"); + public static final SignupStatusEnum INACTIVE = new SignupStatusEnum(Value.INACTIVE, "inactive"); + public static final SignupStatusEnum OPTIONAL = new SignupStatusEnum(Value.OPTIONAL, "optional"); private final Value value; @@ -45,10 +45,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case INACTIVE: - return visitor.visitInactive(); case REQUIRED: return visitor.visitRequired(); + case INACTIVE: + return visitor.visitInactive(); case OPTIONAL: return visitor.visitOptional(); case UNKNOWN: @@ -60,10 +60,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static SignupStatusEnum valueOf(String value) { switch (value) { - case "inactive": - return INACTIVE; case "required": return REQUIRED; + case "inactive": + return INACTIVE; case "optional": return OPTIONAL; default: diff --git a/src/main/java/com/auth0/client/mgmt/types/SubscribeEventsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/SubscribeEventsRequestParameters.java new file mode 100644 index 000000000..0b83c82fd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SubscribeEventsRequestParameters.java @@ -0,0 +1,245 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SubscribeEventsRequestParameters.Builder.class) +public final class SubscribeEventsRequestParameters { + private final OptionalNullable from; + + private final OptionalNullable fromTimestamp; + + private final OptionalNullable eventType; + + private final Map additionalProperties; + + private SubscribeEventsRequestParameters( + OptionalNullable from, + OptionalNullable fromTimestamp, + OptionalNullable eventType, + Map additionalProperties) { + this.from = from; + this.fromTimestamp = fromTimestamp; + this.eventType = eventType; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque token representing position in the stream. If not provided, stream will start from the latest events. + */ + @JsonIgnore + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return RFC-3339 timestamp indicating where to start streaming events from. This should only be used on the initial query when a cursor may not be available. Subsequent requests should use the cursor (from) as it will be more accurate. + */ + @JsonIgnore + public OptionalNullable getFromTimestamp() { + if (fromTimestamp == null) { + return OptionalNullable.absent(); + } + return fromTimestamp; + } + + /** + * @return Event type(s) to listen for. Specify multiple times for multiple types (e.g., ?event_type=user.created&event_type=user.updated). If not provided, all event types will be streamed. + */ + @JsonIgnore + public OptionalNullable getEventType() { + if (eventType == null) { + return OptionalNullable.absent(); + } + return eventType; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SubscribeEventsRequestParameters && equalTo((SubscribeEventsRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SubscribeEventsRequestParameters other) { + return from.equals(other.from) + && fromTimestamp.equals(other.fromTimestamp) + && eventType.equals(other.eventType); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.from, this.fromTimestamp, this.eventType); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable fromTimestamp = OptionalNullable.absent(); + + private OptionalNullable eventType = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SubscribeEventsRequestParameters other) { + from(other.getFrom()); + fromTimestamp(other.getFromTimestamp()); + eventType(other.getEventType()); + return this; + } + + /** + *

Opaque token representing position in the stream. If not provided, stream will start from the latest events.

+ */ + @JsonSetter(value = "from", nulls = Nulls.SKIP) + public Builder from(@Nullable OptionalNullable from) { + this.from = from; + return this; + } + + public Builder from(String from) { + this.from = OptionalNullable.of(from); + return this; + } + + public Builder from(Optional from) { + if (from.isPresent()) { + this.from = OptionalNullable.of(from.get()); + } else { + this.from = OptionalNullable.absent(); + } + return this; + } + + public Builder from(com.auth0.client.mgmt.core.Nullable from) { + if (from.isNull()) { + this.from = OptionalNullable.ofNull(); + } else if (from.isEmpty()) { + this.from = OptionalNullable.absent(); + } else { + this.from = OptionalNullable.of(from.get()); + } + return this; + } + + /** + *

RFC-3339 timestamp indicating where to start streaming events from. This should only be used on the initial query when a cursor may not be available. Subsequent requests should use the cursor (from) as it will be more accurate.

+ */ + @JsonSetter(value = "from_timestamp", nulls = Nulls.SKIP) + public Builder fromTimestamp(@Nullable OptionalNullable fromTimestamp) { + this.fromTimestamp = fromTimestamp; + return this; + } + + public Builder fromTimestamp(String fromTimestamp) { + this.fromTimestamp = OptionalNullable.of(fromTimestamp); + return this; + } + + public Builder fromTimestamp(Optional fromTimestamp) { + if (fromTimestamp.isPresent()) { + this.fromTimestamp = OptionalNullable.of(fromTimestamp.get()); + } else { + this.fromTimestamp = OptionalNullable.absent(); + } + return this; + } + + public Builder fromTimestamp(com.auth0.client.mgmt.core.Nullable fromTimestamp) { + if (fromTimestamp.isNull()) { + this.fromTimestamp = OptionalNullable.ofNull(); + } else if (fromTimestamp.isEmpty()) { + this.fromTimestamp = OptionalNullable.absent(); + } else { + this.fromTimestamp = OptionalNullable.of(fromTimestamp.get()); + } + return this; + } + + /** + *

Event type(s) to listen for. Specify multiple times for multiple types (e.g., ?event_type=user.created&event_type=user.updated). If not provided, all event types will be streamed.

+ */ + @JsonSetter(value = "event_type", nulls = Nulls.SKIP) + public Builder eventType(@Nullable OptionalNullable eventType) { + this.eventType = eventType; + return this; + } + + public Builder eventType(EventStreamSubscribeEventsEventTypeParam eventType) { + this.eventType = OptionalNullable.of(eventType); + return this; + } + + public Builder eventType(Optional eventType) { + if (eventType.isPresent()) { + this.eventType = OptionalNullable.of(eventType.get()); + } else { + this.eventType = OptionalNullable.absent(); + } + return this; + } + + public Builder eventType( + com.auth0.client.mgmt.core.Nullable eventType) { + if (eventType.isNull()) { + this.eventType = OptionalNullable.ofNull(); + } else if (eventType.isEmpty()) { + this.eventType = OptionalNullable.absent(); + } else { + this.eventType = OptionalNullable.of(eventType.get()); + } + return this; + } + + public SubscribeEventsRequestParameters build() { + return new SubscribeEventsRequestParameters(from, fromTimestamp, eventType, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/SupportedLocales.java b/src/main/java/com/auth0/client/mgmt/types/SupportedLocales.java index e8fbb9554..313040d88 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SupportedLocales.java +++ b/src/main/java/com/auth0/client/mgmt/types/SupportedLocales.java @@ -7,169 +7,169 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class SupportedLocales { - public static final SupportedLocales AZ = new SupportedLocales(Value.AZ, "az"); + public static final SupportedLocales EN = new SupportedLocales(Value.EN, "en"); - public static final SupportedLocales MK = new SupportedLocales(Value.MK, "mk"); + public static final SupportedLocales NB = new SupportedLocales(Value.NB, "nb"); - public static final SupportedLocales CA_ES = new SupportedLocales(Value.CA_ES, "ca-ES"); + public static final SupportedLocales HI = new SupportedLocales(Value.HI, "hi"); - public static final SupportedLocales ML = new SupportedLocales(Value.ML, "ml"); + public static final SupportedLocales BS = new SupportedLocales(Value.BS, "bs"); - public static final SupportedLocales TR = new SupportedLocales(Value.TR, "tr"); + public static final SupportedLocales DA = new SupportedLocales(Value.DA, "da"); - public static final SupportedLocales GU = new SupportedLocales(Value.GU, "gu"); + public static final SupportedLocales LT = new SupportedLocales(Value.LT, "lt"); - public static final SupportedLocales ES_AR = new SupportedLocales(Value.ES_AR, "es-AR"); + public static final SupportedLocales LV = new SupportedLocales(Value.LV, "lv"); - public static final SupportedLocales ID = new SupportedLocales(Value.ID, "id"); + public static final SupportedLocales ES_MX = new SupportedLocales(Value.ES_MX, "es-MX"); - public static final SupportedLocales CNR = new SupportedLocales(Value.CNR, "cnr"); + public static final SupportedLocales RO = new SupportedLocales(Value.RO, "ro"); - public static final SupportedLocales MN = new SupportedLocales(Value.MN, "mn"); + public static final SupportedLocales UK = new SupportedLocales(Value.UK, "uk"); - public static final SupportedLocales FI = new SupportedLocales(Value.FI, "fi"); + public static final SupportedLocales ES = new SupportedLocales(Value.ES, "es"); - public static final SupportedLocales PL = new SupportedLocales(Value.PL, "pl"); + public static final SupportedLocales KK = new SupportedLocales(Value.KK, "kk"); - public static final SupportedLocales EN_CA = new SupportedLocales(Value.EN_CA, "en-CA"); + public static final SupportedLocales DE = new SupportedLocales(Value.DE, "de"); - public static final SupportedLocales AR_EG = new SupportedLocales(Value.AR_EG, "ar-EG"); + public static final SupportedLocales ET = new SupportedLocales(Value.ET, "et"); - public static final SupportedLocales MR = new SupportedLocales(Value.MR, "mr"); + public static final SupportedLocales HR = new SupportedLocales(Value.HR, "hr"); - public static final SupportedLocales MS = new SupportedLocales(Value.MS, "ms"); + public static final SupportedLocales KN = new SupportedLocales(Value.KN, "kn"); - public static final SupportedLocales PT_PT = new SupportedLocales(Value.PT_PT, "pt-PT"); + public static final SupportedLocales ZGH = new SupportedLocales(Value.ZGH, "zgh"); - public static final SupportedLocales SK = new SupportedLocales(Value.SK, "sk"); + public static final SupportedLocales TA = new SupportedLocales(Value.TA, "ta"); - public static final SupportedLocales SL = new SupportedLocales(Value.SL, "sl"); + public static final SupportedLocales RU = new SupportedLocales(Value.RU, "ru"); - public static final SupportedLocales CS = new SupportedLocales(Value.CS, "cs"); + public static final SupportedLocales AM = new SupportedLocales(Value.AM, "am"); - public static final SupportedLocales UR = new SupportedLocales(Value.UR, "ur"); + public static final SupportedLocales JA = new SupportedLocales(Value.JA, "ja"); - public static final SupportedLocales HU = new SupportedLocales(Value.HU, "hu"); + public static final SupportedLocales KO = new SupportedLocales(Value.KO, "ko"); - public static final SupportedLocales TE = new SupportedLocales(Value.TE, "te"); + public static final SupportedLocales NL = new SupportedLocales(Value.NL, "nl"); - public static final SupportedLocales ZH_CN = new SupportedLocales(Value.ZH_CN, "zh-CN"); + public static final SupportedLocales ZH_MO = new SupportedLocales(Value.ZH_MO, "zh-MO"); - public static final SupportedLocales AR_SA = new SupportedLocales(Value.AR_SA, "ar-SA"); + public static final SupportedLocales VI = new SupportedLocales(Value.VI, "vi"); - public static final SupportedLocales SO = new SupportedLocales(Value.SO, "so"); + public static final SupportedLocales NN = new SupportedLocales(Value.NN, "nn"); - public static final SupportedLocales FR = new SupportedLocales(Value.FR, "fr"); + public static final SupportedLocales BG = new SupportedLocales(Value.BG, "bg"); - public static final SupportedLocales NO = new SupportedLocales(Value.NO, "no"); + public static final SupportedLocales GL_ES = new SupportedLocales(Value.GL_ES, "gl-ES"); - public static final SupportedLocales ZH_TW = new SupportedLocales(Value.ZH_TW, "zh-TW"); + public static final SupportedLocales SR = new SupportedLocales(Value.SR, "sr"); - public static final SupportedLocales AR = new SupportedLocales(Value.AR, "ar"); + public static final SupportedLocales ES419 = new SupportedLocales(Value.ES419, "es-419"); - public static final SupportedLocales PT = new SupportedLocales(Value.PT, "pt"); + public static final SupportedLocales TH = new SupportedLocales(Value.TH, "th"); - public static final SupportedLocales MY = new SupportedLocales(Value.MY, "my"); + public static final SupportedLocales ZH_HK = new SupportedLocales(Value.ZH_HK, "zh-HK"); - public static final SupportedLocales SQ = new SupportedLocales(Value.SQ, "sq"); + public static final SupportedLocales EU_ES = new SupportedLocales(Value.EU_ES, "eu-ES"); - public static final SupportedLocales HY = new SupportedLocales(Value.HY, "hy"); + public static final SupportedLocales TL = new SupportedLocales(Value.TL, "tl"); - public static final SupportedLocales FR_FR = new SupportedLocales(Value.FR_FR, "fr-FR"); + public static final SupportedLocales HE = new SupportedLocales(Value.HE, "he"); - public static final SupportedLocales CY = new SupportedLocales(Value.CY, "cy"); + public static final SupportedLocales SV = new SupportedLocales(Value.SV, "sv"); - public static final SupportedLocales PA = new SupportedLocales(Value.PA, "pa"); + public static final SupportedLocales IT = new SupportedLocales(Value.IT, "it"); - public static final SupportedLocales KA = new SupportedLocales(Value.KA, "ka"); + public static final SupportedLocales EL = new SupportedLocales(Value.EL, "el"); - public static final SupportedLocales IS = new SupportedLocales(Value.IS, "is"); + public static final SupportedLocales FR_CA = new SupportedLocales(Value.FR_CA, "fr-CA"); - public static final SupportedLocales FA = new SupportedLocales(Value.FA, "fa"); + public static final SupportedLocales AZ = new SupportedLocales(Value.AZ, "az"); - public static final SupportedLocales BN = new SupportedLocales(Value.BN, "bn"); + public static final SupportedLocales ML = new SupportedLocales(Value.ML, "ml"); - public static final SupportedLocales PT_BR = new SupportedLocales(Value.PT_BR, "pt-BR"); + public static final SupportedLocales MK = new SupportedLocales(Value.MK, "mk"); - public static final SupportedLocales SW = new SupportedLocales(Value.SW, "sw"); + public static final SupportedLocales CA_ES = new SupportedLocales(Value.CA_ES, "ca-ES"); - public static final SupportedLocales HI = new SupportedLocales(Value.HI, "hi"); + public static final SupportedLocales GU = new SupportedLocales(Value.GU, "gu"); - public static final SupportedLocales EN = new SupportedLocales(Value.EN, "en"); + public static final SupportedLocales ES_AR = new SupportedLocales(Value.ES_AR, "es-AR"); - public static final SupportedLocales NB = new SupportedLocales(Value.NB, "nb"); + public static final SupportedLocales ID = new SupportedLocales(Value.ID, "id"); - public static final SupportedLocales DA = new SupportedLocales(Value.DA, "da"); + public static final SupportedLocales TR = new SupportedLocales(Value.TR, "tr"); - public static final SupportedLocales LT = new SupportedLocales(Value.LT, "lt"); + public static final SupportedLocales FI = new SupportedLocales(Value.FI, "fi"); - public static final SupportedLocales BS = new SupportedLocales(Value.BS, "bs"); + public static final SupportedLocales CNR = new SupportedLocales(Value.CNR, "cnr"); - public static final SupportedLocales ES_MX = new SupportedLocales(Value.ES_MX, "es-MX"); + public static final SupportedLocales MN = new SupportedLocales(Value.MN, "mn"); - public static final SupportedLocales LV = new SupportedLocales(Value.LV, "lv"); + public static final SupportedLocales AR_EG = new SupportedLocales(Value.AR_EG, "ar-EG"); - public static final SupportedLocales RO = new SupportedLocales(Value.RO, "ro"); + public static final SupportedLocales PL = new SupportedLocales(Value.PL, "pl"); - public static final SupportedLocales UK = new SupportedLocales(Value.UK, "uk"); + public static final SupportedLocales EN_CA = new SupportedLocales(Value.EN_CA, "en-CA"); - public static final SupportedLocales DE = new SupportedLocales(Value.DE, "de"); + public static final SupportedLocales MS = new SupportedLocales(Value.MS, "ms"); - public static final SupportedLocales ES = new SupportedLocales(Value.ES, "es"); + public static final SupportedLocales PT_PT = new SupportedLocales(Value.PT_PT, "pt-PT"); - public static final SupportedLocales KK = new SupportedLocales(Value.KK, "kk"); + public static final SupportedLocales SK = new SupportedLocales(Value.SK, "sk"); - public static final SupportedLocales ET = new SupportedLocales(Value.ET, "et"); + public static final SupportedLocales MR = new SupportedLocales(Value.MR, "mr"); - public static final SupportedLocales TA = new SupportedLocales(Value.TA, "ta"); + public static final SupportedLocales SL = new SupportedLocales(Value.SL, "sl"); - public static final SupportedLocales HR = new SupportedLocales(Value.HR, "hr"); + public static final SupportedLocales CS = new SupportedLocales(Value.CS, "cs"); - public static final SupportedLocales KN = new SupportedLocales(Value.KN, "kn"); + public static final SupportedLocales UR = new SupportedLocales(Value.UR, "ur"); - public static final SupportedLocales ZGH = new SupportedLocales(Value.ZGH, "zgh"); + public static final SupportedLocales AR_SA = new SupportedLocales(Value.AR_SA, "ar-SA"); - public static final SupportedLocales AM = new SupportedLocales(Value.AM, "am"); + public static final SupportedLocales HU = new SupportedLocales(Value.HU, "hu"); - public static final SupportedLocales JA = new SupportedLocales(Value.JA, "ja"); + public static final SupportedLocales TE = new SupportedLocales(Value.TE, "te"); - public static final SupportedLocales KO = new SupportedLocales(Value.KO, "ko"); + public static final SupportedLocales ZH_CN = new SupportedLocales(Value.ZH_CN, "zh-CN"); - public static final SupportedLocales RU = new SupportedLocales(Value.RU, "ru"); + public static final SupportedLocales SO = new SupportedLocales(Value.SO, "so"); - public static final SupportedLocales NL = new SupportedLocales(Value.NL, "nl"); + public static final SupportedLocales AR = new SupportedLocales(Value.AR, "ar"); - public static final SupportedLocales ZH_MO = new SupportedLocales(Value.ZH_MO, "zh-MO"); + public static final SupportedLocales PT = new SupportedLocales(Value.PT, "pt"); - public static final SupportedLocales VI = new SupportedLocales(Value.VI, "vi"); + public static final SupportedLocales FR = new SupportedLocales(Value.FR, "fr"); - public static final SupportedLocales BG = new SupportedLocales(Value.BG, "bg"); + public static final SupportedLocales NO = new SupportedLocales(Value.NO, "no"); - public static final SupportedLocales NN = new SupportedLocales(Value.NN, "nn"); + public static final SupportedLocales ZH_TW = new SupportedLocales(Value.ZH_TW, "zh-TW"); - public static final SupportedLocales GL_ES = new SupportedLocales(Value.GL_ES, "gl-ES"); + public static final SupportedLocales HY = new SupportedLocales(Value.HY, "hy"); - public static final SupportedLocales TH = new SupportedLocales(Value.TH, "th"); + public static final SupportedLocales MY = new SupportedLocales(Value.MY, "my"); - public static final SupportedLocales SR = new SupportedLocales(Value.SR, "sr"); + public static final SupportedLocales SQ = new SupportedLocales(Value.SQ, "sq"); - public static final SupportedLocales ES419 = new SupportedLocales(Value.ES419, "es-419"); + public static final SupportedLocales PA = new SupportedLocales(Value.PA, "pa"); - public static final SupportedLocales HE = new SupportedLocales(Value.HE, "he"); + public static final SupportedLocales FR_FR = new SupportedLocales(Value.FR_FR, "fr-FR"); - public static final SupportedLocales ZH_HK = new SupportedLocales(Value.ZH_HK, "zh-HK"); + public static final SupportedLocales CY = new SupportedLocales(Value.CY, "cy"); - public static final SupportedLocales EU_ES = new SupportedLocales(Value.EU_ES, "eu-ES"); + public static final SupportedLocales IS = new SupportedLocales(Value.IS, "is"); - public static final SupportedLocales TL = new SupportedLocales(Value.TL, "tl"); + public static final SupportedLocales FA = new SupportedLocales(Value.FA, "fa"); - public static final SupportedLocales IT = new SupportedLocales(Value.IT, "it"); + public static final SupportedLocales KA = new SupportedLocales(Value.KA, "ka"); - public static final SupportedLocales SV = new SupportedLocales(Value.SV, "sv"); + public static final SupportedLocales BN = new SupportedLocales(Value.BN, "bn"); - public static final SupportedLocales FR_CA = new SupportedLocales(Value.FR_CA, "fr-CA"); + public static final SupportedLocales SW = new SupportedLocales(Value.SW, "sw"); - public static final SupportedLocales EL = new SupportedLocales(Value.EL, "el"); + public static final SupportedLocales PT_BR = new SupportedLocales(Value.PT_BR, "pt-BR"); private final Value value; @@ -203,170 +203,170 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case EN: + return visitor.visitEn(); + case NB: + return visitor.visitNb(); + case HI: + return visitor.visitHi(); + case BS: + return visitor.visitBs(); + case DA: + return visitor.visitDa(); + case LT: + return visitor.visitLt(); + case LV: + return visitor.visitLv(); + case ES_MX: + return visitor.visitEsMx(); + case RO: + return visitor.visitRo(); + case UK: + return visitor.visitUk(); + case ES: + return visitor.visitEs(); + case KK: + return visitor.visitKk(); + case DE: + return visitor.visitDe(); + case ET: + return visitor.visitEt(); + case HR: + return visitor.visitHr(); + case KN: + return visitor.visitKn(); + case ZGH: + return visitor.visitZgh(); + case TA: + return visitor.visitTa(); + case RU: + return visitor.visitRu(); + case AM: + return visitor.visitAm(); + case JA: + return visitor.visitJa(); + case KO: + return visitor.visitKo(); + case NL: + return visitor.visitNl(); + case ZH_MO: + return visitor.visitZhMo(); + case VI: + return visitor.visitVi(); + case NN: + return visitor.visitNn(); + case BG: + return visitor.visitBg(); + case GL_ES: + return visitor.visitGlEs(); + case SR: + return visitor.visitSr(); + case ES419: + return visitor.visitEs419(); + case TH: + return visitor.visitTh(); + case ZH_HK: + return visitor.visitZhHk(); + case EU_ES: + return visitor.visitEuEs(); + case TL: + return visitor.visitTl(); + case HE: + return visitor.visitHe(); + case SV: + return visitor.visitSv(); + case IT: + return visitor.visitIt(); + case EL: + return visitor.visitEl(); + case FR_CA: + return visitor.visitFrCa(); case AZ: return visitor.visitAz(); + case ML: + return visitor.visitMl(); case MK: return visitor.visitMk(); case CA_ES: return visitor.visitCaEs(); - case ML: - return visitor.visitMl(); - case TR: - return visitor.visitTr(); case GU: return visitor.visitGu(); case ES_AR: return visitor.visitEsAr(); case ID: return visitor.visitId(); + case TR: + return visitor.visitTr(); + case FI: + return visitor.visitFi(); case CNR: return visitor.visitCnr(); case MN: return visitor.visitMn(); - case FI: - return visitor.visitFi(); + case AR_EG: + return visitor.visitArEg(); case PL: return visitor.visitPl(); case EN_CA: return visitor.visitEnCa(); - case AR_EG: - return visitor.visitArEg(); - case MR: - return visitor.visitMr(); case MS: return visitor.visitMs(); case PT_PT: return visitor.visitPtPt(); case SK: return visitor.visitSk(); + case MR: + return visitor.visitMr(); case SL: return visitor.visitSl(); case CS: return visitor.visitCs(); case UR: return visitor.visitUr(); + case AR_SA: + return visitor.visitArSa(); case HU: return visitor.visitHu(); case TE: return visitor.visitTe(); case ZH_CN: return visitor.visitZhCn(); - case AR_SA: - return visitor.visitArSa(); case SO: return visitor.visitSo(); + case AR: + return visitor.visitAr(); + case PT: + return visitor.visitPt(); case FR: return visitor.visitFr(); case NO: return visitor.visitNo(); case ZH_TW: return visitor.visitZhTw(); - case AR: - return visitor.visitAr(); - case PT: - return visitor.visitPt(); + case HY: + return visitor.visitHy(); case MY: return visitor.visitMy(); case SQ: return visitor.visitSq(); - case HY: - return visitor.visitHy(); + case PA: + return visitor.visitPa(); case FR_FR: return visitor.visitFrFr(); case CY: return visitor.visitCy(); - case PA: - return visitor.visitPa(); - case KA: - return visitor.visitKa(); case IS: return visitor.visitIs(); case FA: return visitor.visitFa(); + case KA: + return visitor.visitKa(); case BN: return visitor.visitBn(); - case PT_BR: - return visitor.visitPtBr(); case SW: return visitor.visitSw(); - case HI: - return visitor.visitHi(); - case EN: - return visitor.visitEn(); - case NB: - return visitor.visitNb(); - case DA: - return visitor.visitDa(); - case LT: - return visitor.visitLt(); - case BS: - return visitor.visitBs(); - case ES_MX: - return visitor.visitEsMx(); - case LV: - return visitor.visitLv(); - case RO: - return visitor.visitRo(); - case UK: - return visitor.visitUk(); - case DE: - return visitor.visitDe(); - case ES: - return visitor.visitEs(); - case KK: - return visitor.visitKk(); - case ET: - return visitor.visitEt(); - case TA: - return visitor.visitTa(); - case HR: - return visitor.visitHr(); - case KN: - return visitor.visitKn(); - case ZGH: - return visitor.visitZgh(); - case AM: - return visitor.visitAm(); - case JA: - return visitor.visitJa(); - case KO: - return visitor.visitKo(); - case RU: - return visitor.visitRu(); - case NL: - return visitor.visitNl(); - case ZH_MO: - return visitor.visitZhMo(); - case VI: - return visitor.visitVi(); - case BG: - return visitor.visitBg(); - case NN: - return visitor.visitNn(); - case GL_ES: - return visitor.visitGlEs(); - case TH: - return visitor.visitTh(); - case SR: - return visitor.visitSr(); - case ES419: - return visitor.visitEs419(); - case HE: - return visitor.visitHe(); - case ZH_HK: - return visitor.visitZhHk(); - case EU_ES: - return visitor.visitEuEs(); - case TL: - return visitor.visitTl(); - case IT: - return visitor.visitIt(); - case SV: - return visitor.visitSv(); - case FR_CA: - return visitor.visitFrCa(); - case EL: - return visitor.visitEl(); + case PT_BR: + return visitor.visitPtBr(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -376,170 +376,170 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static SupportedLocales valueOf(String value) { switch (value) { + case "en": + return EN; + case "nb": + return NB; + case "hi": + return HI; + case "bs": + return BS; + case "da": + return DA; + case "lt": + return LT; + case "lv": + return LV; + case "es-MX": + return ES_MX; + case "ro": + return RO; + case "uk": + return UK; + case "es": + return ES; + case "kk": + return KK; + case "de": + return DE; + case "et": + return ET; + case "hr": + return HR; + case "kn": + return KN; + case "zgh": + return ZGH; + case "ta": + return TA; + case "ru": + return RU; + case "am": + return AM; + case "ja": + return JA; + case "ko": + return KO; + case "nl": + return NL; + case "zh-MO": + return ZH_MO; + case "vi": + return VI; + case "nn": + return NN; + case "bg": + return BG; + case "gl-ES": + return GL_ES; + case "sr": + return SR; + case "es-419": + return ES419; + case "th": + return TH; + case "zh-HK": + return ZH_HK; + case "eu-ES": + return EU_ES; + case "tl": + return TL; + case "he": + return HE; + case "sv": + return SV; + case "it": + return IT; + case "el": + return EL; + case "fr-CA": + return FR_CA; case "az": return AZ; + case "ml": + return ML; case "mk": return MK; case "ca-ES": return CA_ES; - case "ml": - return ML; - case "tr": - return TR; case "gu": return GU; case "es-AR": return ES_AR; case "id": return ID; + case "tr": + return TR; + case "fi": + return FI; case "cnr": return CNR; case "mn": return MN; - case "fi": - return FI; + case "ar-EG": + return AR_EG; case "pl": return PL; case "en-CA": return EN_CA; - case "ar-EG": - return AR_EG; - case "mr": - return MR; case "ms": return MS; case "pt-PT": return PT_PT; case "sk": return SK; + case "mr": + return MR; case "sl": return SL; case "cs": return CS; case "ur": return UR; + case "ar-SA": + return AR_SA; case "hu": return HU; case "te": return TE; case "zh-CN": return ZH_CN; - case "ar-SA": - return AR_SA; case "so": return SO; + case "ar": + return AR; + case "pt": + return PT; case "fr": return FR; case "no": return NO; case "zh-TW": return ZH_TW; - case "ar": - return AR; - case "pt": - return PT; + case "hy": + return HY; case "my": return MY; case "sq": return SQ; - case "hy": - return HY; + case "pa": + return PA; case "fr-FR": return FR_FR; case "cy": return CY; - case "pa": - return PA; - case "ka": - return KA; case "is": return IS; case "fa": return FA; + case "ka": + return KA; case "bn": return BN; - case "pt-BR": - return PT_BR; case "sw": return SW; - case "hi": - return HI; - case "en": - return EN; - case "nb": - return NB; - case "da": - return DA; - case "lt": - return LT; - case "bs": - return BS; - case "es-MX": - return ES_MX; - case "lv": - return LV; - case "ro": - return RO; - case "uk": - return UK; - case "de": - return DE; - case "es": - return ES; - case "kk": - return KK; - case "et": - return ET; - case "ta": - return TA; - case "hr": - return HR; - case "kn": - return KN; - case "zgh": - return ZGH; - case "am": - return AM; - case "ja": - return JA; - case "ko": - return KO; - case "ru": - return RU; - case "nl": - return NL; - case "zh-MO": - return ZH_MO; - case "vi": - return VI; - case "bg": - return BG; - case "nn": - return NN; - case "gl-ES": - return GL_ES; - case "th": - return TH; - case "sr": - return SR; - case "es-419": - return ES419; - case "he": - return HE; - case "zh-HK": - return ZH_HK; - case "eu-ES": - return EU_ES; - case "tl": - return TL; - case "it": - return IT; - case "sv": - return SV; - case "fr-CA": - return FR_CA; - case "el": - return EL; + case "pt-BR": + return PT_BR; default: return new SupportedLocales(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/SynchronizeGroupsEnum.java b/src/main/java/com/auth0/client/mgmt/types/SynchronizeGroupsEnum.java index df35dff6d..5220b0274 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SynchronizeGroupsEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/SynchronizeGroupsEnum.java @@ -9,10 +9,10 @@ public final class SynchronizeGroupsEnum { public static final SynchronizeGroupsEnum ALL = new SynchronizeGroupsEnum(Value.ALL, "all"); - public static final SynchronizeGroupsEnum OFF = new SynchronizeGroupsEnum(Value.OFF, "off"); - public static final SynchronizeGroupsEnum SELECTED = new SynchronizeGroupsEnum(Value.SELECTED, "selected"); + public static final SynchronizeGroupsEnum OFF = new SynchronizeGroupsEnum(Value.OFF, "off"); + private final Value value; private final String string; @@ -48,10 +48,10 @@ public T visit(Visitor visitor) { switch (value) { case ALL: return visitor.visitAll(); - case OFF: - return visitor.visitOff(); case SELECTED: return visitor.visitSelected(); + case OFF: + return visitor.visitOff(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -63,10 +63,10 @@ public static SynchronizeGroupsEnum valueOf(String value) { switch (value) { case "all": return ALL; - case "off": - return OFF; case "selected": return SELECTED; + case "off": + return OFF; default: return new SynchronizeGroupsEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsDynamicClientRegistrationSecurityMode.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsDynamicClientRegistrationSecurityMode.java index 0897fb2f2..49749764a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsDynamicClientRegistrationSecurityMode.java +++ b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsDynamicClientRegistrationSecurityMode.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class TenantSettingsDynamicClientRegistrationSecurityMode { - public static final TenantSettingsDynamicClientRegistrationSecurityMode STRICT = - new TenantSettingsDynamicClientRegistrationSecurityMode(Value.STRICT, "strict"); - public static final TenantSettingsDynamicClientRegistrationSecurityMode PERMISSIVE = new TenantSettingsDynamicClientRegistrationSecurityMode(Value.PERMISSIVE, "permissive"); + public static final TenantSettingsDynamicClientRegistrationSecurityMode STRICT = + new TenantSettingsDynamicClientRegistrationSecurityMode(Value.STRICT, "strict"); + private final Value value; private final String string; @@ -46,10 +46,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case STRICT: - return visitor.visitStrict(); case PERMISSIVE: return visitor.visitPermissive(); + case STRICT: + return visitor.visitStrict(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -59,10 +59,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static TenantSettingsDynamicClientRegistrationSecurityMode valueOf(String value) { switch (value) { - case "strict": - return STRICT; case "permissive": return PERMISSIVE; + case "strict": + return STRICT; default: return new TenantSettingsDynamicClientRegistrationSecurityMode(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSupportedLocalesEnum.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSupportedLocalesEnum.java index 957135a61..28b5a6d2b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSupportedLocalesEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSupportedLocalesEnum.java @@ -7,188 +7,188 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class TenantSettingsSupportedLocalesEnum { - public static final TenantSettingsSupportedLocalesEnum AZ = new TenantSettingsSupportedLocalesEnum(Value.AZ, "az"); + public static final TenantSettingsSupportedLocalesEnum EN = new TenantSettingsSupportedLocalesEnum(Value.EN, "en"); - public static final TenantSettingsSupportedLocalesEnum MK = new TenantSettingsSupportedLocalesEnum(Value.MK, "mk"); + public static final TenantSettingsSupportedLocalesEnum NB = new TenantSettingsSupportedLocalesEnum(Value.NB, "nb"); - public static final TenantSettingsSupportedLocalesEnum CA_ES = - new TenantSettingsSupportedLocalesEnum(Value.CA_ES, "ca-ES"); + public static final TenantSettingsSupportedLocalesEnum HI = new TenantSettingsSupportedLocalesEnum(Value.HI, "hi"); - public static final TenantSettingsSupportedLocalesEnum ML = new TenantSettingsSupportedLocalesEnum(Value.ML, "ml"); + public static final TenantSettingsSupportedLocalesEnum BS = new TenantSettingsSupportedLocalesEnum(Value.BS, "bs"); - public static final TenantSettingsSupportedLocalesEnum TR = new TenantSettingsSupportedLocalesEnum(Value.TR, "tr"); + public static final TenantSettingsSupportedLocalesEnum DA = new TenantSettingsSupportedLocalesEnum(Value.DA, "da"); - public static final TenantSettingsSupportedLocalesEnum GU = new TenantSettingsSupportedLocalesEnum(Value.GU, "gu"); + public static final TenantSettingsSupportedLocalesEnum LT = new TenantSettingsSupportedLocalesEnum(Value.LT, "lt"); - public static final TenantSettingsSupportedLocalesEnum ES_AR = - new TenantSettingsSupportedLocalesEnum(Value.ES_AR, "es-AR"); + public static final TenantSettingsSupportedLocalesEnum LV = new TenantSettingsSupportedLocalesEnum(Value.LV, "lv"); - public static final TenantSettingsSupportedLocalesEnum ID = new TenantSettingsSupportedLocalesEnum(Value.ID, "id"); + public static final TenantSettingsSupportedLocalesEnum ES_MX = + new TenantSettingsSupportedLocalesEnum(Value.ES_MX, "es-MX"); - public static final TenantSettingsSupportedLocalesEnum CNR = - new TenantSettingsSupportedLocalesEnum(Value.CNR, "cnr"); + public static final TenantSettingsSupportedLocalesEnum RO = new TenantSettingsSupportedLocalesEnum(Value.RO, "ro"); - public static final TenantSettingsSupportedLocalesEnum MN = new TenantSettingsSupportedLocalesEnum(Value.MN, "mn"); + public static final TenantSettingsSupportedLocalesEnum UK = new TenantSettingsSupportedLocalesEnum(Value.UK, "uk"); - public static final TenantSettingsSupportedLocalesEnum FI = new TenantSettingsSupportedLocalesEnum(Value.FI, "fi"); + public static final TenantSettingsSupportedLocalesEnum ES = new TenantSettingsSupportedLocalesEnum(Value.ES, "es"); - public static final TenantSettingsSupportedLocalesEnum PL = new TenantSettingsSupportedLocalesEnum(Value.PL, "pl"); + public static final TenantSettingsSupportedLocalesEnum KK = new TenantSettingsSupportedLocalesEnum(Value.KK, "kk"); - public static final TenantSettingsSupportedLocalesEnum EN_CA = - new TenantSettingsSupportedLocalesEnum(Value.EN_CA, "en-CA"); + public static final TenantSettingsSupportedLocalesEnum DE = new TenantSettingsSupportedLocalesEnum(Value.DE, "de"); - public static final TenantSettingsSupportedLocalesEnum AR_EG = - new TenantSettingsSupportedLocalesEnum(Value.AR_EG, "ar-EG"); + public static final TenantSettingsSupportedLocalesEnum ET = new TenantSettingsSupportedLocalesEnum(Value.ET, "et"); - public static final TenantSettingsSupportedLocalesEnum MR = new TenantSettingsSupportedLocalesEnum(Value.MR, "mr"); + public static final TenantSettingsSupportedLocalesEnum HR = new TenantSettingsSupportedLocalesEnum(Value.HR, "hr"); - public static final TenantSettingsSupportedLocalesEnum MS = new TenantSettingsSupportedLocalesEnum(Value.MS, "ms"); + public static final TenantSettingsSupportedLocalesEnum KN = new TenantSettingsSupportedLocalesEnum(Value.KN, "kn"); - public static final TenantSettingsSupportedLocalesEnum PT_PT = - new TenantSettingsSupportedLocalesEnum(Value.PT_PT, "pt-PT"); + public static final TenantSettingsSupportedLocalesEnum ZGH = + new TenantSettingsSupportedLocalesEnum(Value.ZGH, "zgh"); - public static final TenantSettingsSupportedLocalesEnum SK = new TenantSettingsSupportedLocalesEnum(Value.SK, "sk"); + public static final TenantSettingsSupportedLocalesEnum TA = new TenantSettingsSupportedLocalesEnum(Value.TA, "ta"); - public static final TenantSettingsSupportedLocalesEnum SL = new TenantSettingsSupportedLocalesEnum(Value.SL, "sl"); + public static final TenantSettingsSupportedLocalesEnum RU = new TenantSettingsSupportedLocalesEnum(Value.RU, "ru"); - public static final TenantSettingsSupportedLocalesEnum CS = new TenantSettingsSupportedLocalesEnum(Value.CS, "cs"); + public static final TenantSettingsSupportedLocalesEnum AM = new TenantSettingsSupportedLocalesEnum(Value.AM, "am"); - public static final TenantSettingsSupportedLocalesEnum UR = new TenantSettingsSupportedLocalesEnum(Value.UR, "ur"); + public static final TenantSettingsSupportedLocalesEnum JA = new TenantSettingsSupportedLocalesEnum(Value.JA, "ja"); - public static final TenantSettingsSupportedLocalesEnum HU = new TenantSettingsSupportedLocalesEnum(Value.HU, "hu"); + public static final TenantSettingsSupportedLocalesEnum KO = new TenantSettingsSupportedLocalesEnum(Value.KO, "ko"); - public static final TenantSettingsSupportedLocalesEnum TE = new TenantSettingsSupportedLocalesEnum(Value.TE, "te"); + public static final TenantSettingsSupportedLocalesEnum NL = new TenantSettingsSupportedLocalesEnum(Value.NL, "nl"); - public static final TenantSettingsSupportedLocalesEnum ZH_CN = - new TenantSettingsSupportedLocalesEnum(Value.ZH_CN, "zh-CN"); + public static final TenantSettingsSupportedLocalesEnum ZH_MO = + new TenantSettingsSupportedLocalesEnum(Value.ZH_MO, "zh-MO"); - public static final TenantSettingsSupportedLocalesEnum AR_SA = - new TenantSettingsSupportedLocalesEnum(Value.AR_SA, "ar-SA"); + public static final TenantSettingsSupportedLocalesEnum VI = new TenantSettingsSupportedLocalesEnum(Value.VI, "vi"); - public static final TenantSettingsSupportedLocalesEnum SO = new TenantSettingsSupportedLocalesEnum(Value.SO, "so"); + public static final TenantSettingsSupportedLocalesEnum NN = new TenantSettingsSupportedLocalesEnum(Value.NN, "nn"); - public static final TenantSettingsSupportedLocalesEnum FR = new TenantSettingsSupportedLocalesEnum(Value.FR, "fr"); + public static final TenantSettingsSupportedLocalesEnum BG = new TenantSettingsSupportedLocalesEnum(Value.BG, "bg"); - public static final TenantSettingsSupportedLocalesEnum NO = new TenantSettingsSupportedLocalesEnum(Value.NO, "no"); + public static final TenantSettingsSupportedLocalesEnum GL_ES = + new TenantSettingsSupportedLocalesEnum(Value.GL_ES, "gl-ES"); - public static final TenantSettingsSupportedLocalesEnum ZH_TW = - new TenantSettingsSupportedLocalesEnum(Value.ZH_TW, "zh-TW"); + public static final TenantSettingsSupportedLocalesEnum SR = new TenantSettingsSupportedLocalesEnum(Value.SR, "sr"); - public static final TenantSettingsSupportedLocalesEnum AR = new TenantSettingsSupportedLocalesEnum(Value.AR, "ar"); + public static final TenantSettingsSupportedLocalesEnum ES419 = + new TenantSettingsSupportedLocalesEnum(Value.ES419, "es-419"); - public static final TenantSettingsSupportedLocalesEnum PT = new TenantSettingsSupportedLocalesEnum(Value.PT, "pt"); + public static final TenantSettingsSupportedLocalesEnum TH = new TenantSettingsSupportedLocalesEnum(Value.TH, "th"); - public static final TenantSettingsSupportedLocalesEnum MY = new TenantSettingsSupportedLocalesEnum(Value.MY, "my"); + public static final TenantSettingsSupportedLocalesEnum ZH_HK = + new TenantSettingsSupportedLocalesEnum(Value.ZH_HK, "zh-HK"); - public static final TenantSettingsSupportedLocalesEnum SQ = new TenantSettingsSupportedLocalesEnum(Value.SQ, "sq"); + public static final TenantSettingsSupportedLocalesEnum EU_ES = + new TenantSettingsSupportedLocalesEnum(Value.EU_ES, "eu-ES"); - public static final TenantSettingsSupportedLocalesEnum HY = new TenantSettingsSupportedLocalesEnum(Value.HY, "hy"); + public static final TenantSettingsSupportedLocalesEnum TL = new TenantSettingsSupportedLocalesEnum(Value.TL, "tl"); - public static final TenantSettingsSupportedLocalesEnum FR_FR = - new TenantSettingsSupportedLocalesEnum(Value.FR_FR, "fr-FR"); + public static final TenantSettingsSupportedLocalesEnum HE = new TenantSettingsSupportedLocalesEnum(Value.HE, "he"); - public static final TenantSettingsSupportedLocalesEnum CY = new TenantSettingsSupportedLocalesEnum(Value.CY, "cy"); + public static final TenantSettingsSupportedLocalesEnum SV = new TenantSettingsSupportedLocalesEnum(Value.SV, "sv"); - public static final TenantSettingsSupportedLocalesEnum PA = new TenantSettingsSupportedLocalesEnum(Value.PA, "pa"); + public static final TenantSettingsSupportedLocalesEnum IT = new TenantSettingsSupportedLocalesEnum(Value.IT, "it"); - public static final TenantSettingsSupportedLocalesEnum KA = new TenantSettingsSupportedLocalesEnum(Value.KA, "ka"); + public static final TenantSettingsSupportedLocalesEnum EL = new TenantSettingsSupportedLocalesEnum(Value.EL, "el"); - public static final TenantSettingsSupportedLocalesEnum IS = new TenantSettingsSupportedLocalesEnum(Value.IS, "is"); + public static final TenantSettingsSupportedLocalesEnum FR_CA = + new TenantSettingsSupportedLocalesEnum(Value.FR_CA, "fr-CA"); - public static final TenantSettingsSupportedLocalesEnum FA = new TenantSettingsSupportedLocalesEnum(Value.FA, "fa"); + public static final TenantSettingsSupportedLocalesEnum AZ = new TenantSettingsSupportedLocalesEnum(Value.AZ, "az"); - public static final TenantSettingsSupportedLocalesEnum BN = new TenantSettingsSupportedLocalesEnum(Value.BN, "bn"); + public static final TenantSettingsSupportedLocalesEnum ML = new TenantSettingsSupportedLocalesEnum(Value.ML, "ml"); - public static final TenantSettingsSupportedLocalesEnum PT_BR = - new TenantSettingsSupportedLocalesEnum(Value.PT_BR, "pt-BR"); + public static final TenantSettingsSupportedLocalesEnum MK = new TenantSettingsSupportedLocalesEnum(Value.MK, "mk"); - public static final TenantSettingsSupportedLocalesEnum SW = new TenantSettingsSupportedLocalesEnum(Value.SW, "sw"); + public static final TenantSettingsSupportedLocalesEnum CA_ES = + new TenantSettingsSupportedLocalesEnum(Value.CA_ES, "ca-ES"); - public static final TenantSettingsSupportedLocalesEnum HI = new TenantSettingsSupportedLocalesEnum(Value.HI, "hi"); + public static final TenantSettingsSupportedLocalesEnum GU = new TenantSettingsSupportedLocalesEnum(Value.GU, "gu"); - public static final TenantSettingsSupportedLocalesEnum EN = new TenantSettingsSupportedLocalesEnum(Value.EN, "en"); + public static final TenantSettingsSupportedLocalesEnum ES_AR = + new TenantSettingsSupportedLocalesEnum(Value.ES_AR, "es-AR"); - public static final TenantSettingsSupportedLocalesEnum NB = new TenantSettingsSupportedLocalesEnum(Value.NB, "nb"); + public static final TenantSettingsSupportedLocalesEnum ID = new TenantSettingsSupportedLocalesEnum(Value.ID, "id"); - public static final TenantSettingsSupportedLocalesEnum DA = new TenantSettingsSupportedLocalesEnum(Value.DA, "da"); + public static final TenantSettingsSupportedLocalesEnum TR = new TenantSettingsSupportedLocalesEnum(Value.TR, "tr"); - public static final TenantSettingsSupportedLocalesEnum LT = new TenantSettingsSupportedLocalesEnum(Value.LT, "lt"); + public static final TenantSettingsSupportedLocalesEnum FI = new TenantSettingsSupportedLocalesEnum(Value.FI, "fi"); - public static final TenantSettingsSupportedLocalesEnum BS = new TenantSettingsSupportedLocalesEnum(Value.BS, "bs"); + public static final TenantSettingsSupportedLocalesEnum CNR = + new TenantSettingsSupportedLocalesEnum(Value.CNR, "cnr"); - public static final TenantSettingsSupportedLocalesEnum ES_MX = - new TenantSettingsSupportedLocalesEnum(Value.ES_MX, "es-MX"); + public static final TenantSettingsSupportedLocalesEnum MN = new TenantSettingsSupportedLocalesEnum(Value.MN, "mn"); - public static final TenantSettingsSupportedLocalesEnum LV = new TenantSettingsSupportedLocalesEnum(Value.LV, "lv"); + public static final TenantSettingsSupportedLocalesEnum AR_EG = + new TenantSettingsSupportedLocalesEnum(Value.AR_EG, "ar-EG"); - public static final TenantSettingsSupportedLocalesEnum RO = new TenantSettingsSupportedLocalesEnum(Value.RO, "ro"); + public static final TenantSettingsSupportedLocalesEnum PL = new TenantSettingsSupportedLocalesEnum(Value.PL, "pl"); - public static final TenantSettingsSupportedLocalesEnum UK = new TenantSettingsSupportedLocalesEnum(Value.UK, "uk"); + public static final TenantSettingsSupportedLocalesEnum EN_CA = + new TenantSettingsSupportedLocalesEnum(Value.EN_CA, "en-CA"); - public static final TenantSettingsSupportedLocalesEnum DE = new TenantSettingsSupportedLocalesEnum(Value.DE, "de"); + public static final TenantSettingsSupportedLocalesEnum MS = new TenantSettingsSupportedLocalesEnum(Value.MS, "ms"); - public static final TenantSettingsSupportedLocalesEnum ES = new TenantSettingsSupportedLocalesEnum(Value.ES, "es"); + public static final TenantSettingsSupportedLocalesEnum PT_PT = + new TenantSettingsSupportedLocalesEnum(Value.PT_PT, "pt-PT"); - public static final TenantSettingsSupportedLocalesEnum KK = new TenantSettingsSupportedLocalesEnum(Value.KK, "kk"); + public static final TenantSettingsSupportedLocalesEnum SK = new TenantSettingsSupportedLocalesEnum(Value.SK, "sk"); - public static final TenantSettingsSupportedLocalesEnum ET = new TenantSettingsSupportedLocalesEnum(Value.ET, "et"); + public static final TenantSettingsSupportedLocalesEnum MR = new TenantSettingsSupportedLocalesEnum(Value.MR, "mr"); - public static final TenantSettingsSupportedLocalesEnum TA = new TenantSettingsSupportedLocalesEnum(Value.TA, "ta"); + public static final TenantSettingsSupportedLocalesEnum SL = new TenantSettingsSupportedLocalesEnum(Value.SL, "sl"); - public static final TenantSettingsSupportedLocalesEnum HR = new TenantSettingsSupportedLocalesEnum(Value.HR, "hr"); + public static final TenantSettingsSupportedLocalesEnum CS = new TenantSettingsSupportedLocalesEnum(Value.CS, "cs"); - public static final TenantSettingsSupportedLocalesEnum KN = new TenantSettingsSupportedLocalesEnum(Value.KN, "kn"); + public static final TenantSettingsSupportedLocalesEnum UR = new TenantSettingsSupportedLocalesEnum(Value.UR, "ur"); - public static final TenantSettingsSupportedLocalesEnum ZGH = - new TenantSettingsSupportedLocalesEnum(Value.ZGH, "zgh"); + public static final TenantSettingsSupportedLocalesEnum AR_SA = + new TenantSettingsSupportedLocalesEnum(Value.AR_SA, "ar-SA"); - public static final TenantSettingsSupportedLocalesEnum AM = new TenantSettingsSupportedLocalesEnum(Value.AM, "am"); + public static final TenantSettingsSupportedLocalesEnum HU = new TenantSettingsSupportedLocalesEnum(Value.HU, "hu"); - public static final TenantSettingsSupportedLocalesEnum JA = new TenantSettingsSupportedLocalesEnum(Value.JA, "ja"); + public static final TenantSettingsSupportedLocalesEnum TE = new TenantSettingsSupportedLocalesEnum(Value.TE, "te"); - public static final TenantSettingsSupportedLocalesEnum KO = new TenantSettingsSupportedLocalesEnum(Value.KO, "ko"); + public static final TenantSettingsSupportedLocalesEnum ZH_CN = + new TenantSettingsSupportedLocalesEnum(Value.ZH_CN, "zh-CN"); - public static final TenantSettingsSupportedLocalesEnum RU = new TenantSettingsSupportedLocalesEnum(Value.RU, "ru"); + public static final TenantSettingsSupportedLocalesEnum SO = new TenantSettingsSupportedLocalesEnum(Value.SO, "so"); - public static final TenantSettingsSupportedLocalesEnum NL = new TenantSettingsSupportedLocalesEnum(Value.NL, "nl"); + public static final TenantSettingsSupportedLocalesEnum AR = new TenantSettingsSupportedLocalesEnum(Value.AR, "ar"); - public static final TenantSettingsSupportedLocalesEnum ZH_MO = - new TenantSettingsSupportedLocalesEnum(Value.ZH_MO, "zh-MO"); + public static final TenantSettingsSupportedLocalesEnum PT = new TenantSettingsSupportedLocalesEnum(Value.PT, "pt"); - public static final TenantSettingsSupportedLocalesEnum VI = new TenantSettingsSupportedLocalesEnum(Value.VI, "vi"); + public static final TenantSettingsSupportedLocalesEnum FR = new TenantSettingsSupportedLocalesEnum(Value.FR, "fr"); - public static final TenantSettingsSupportedLocalesEnum BG = new TenantSettingsSupportedLocalesEnum(Value.BG, "bg"); + public static final TenantSettingsSupportedLocalesEnum NO = new TenantSettingsSupportedLocalesEnum(Value.NO, "no"); - public static final TenantSettingsSupportedLocalesEnum NN = new TenantSettingsSupportedLocalesEnum(Value.NN, "nn"); + public static final TenantSettingsSupportedLocalesEnum ZH_TW = + new TenantSettingsSupportedLocalesEnum(Value.ZH_TW, "zh-TW"); - public static final TenantSettingsSupportedLocalesEnum GL_ES = - new TenantSettingsSupportedLocalesEnum(Value.GL_ES, "gl-ES"); + public static final TenantSettingsSupportedLocalesEnum HY = new TenantSettingsSupportedLocalesEnum(Value.HY, "hy"); - public static final TenantSettingsSupportedLocalesEnum TH = new TenantSettingsSupportedLocalesEnum(Value.TH, "th"); + public static final TenantSettingsSupportedLocalesEnum MY = new TenantSettingsSupportedLocalesEnum(Value.MY, "my"); - public static final TenantSettingsSupportedLocalesEnum SR = new TenantSettingsSupportedLocalesEnum(Value.SR, "sr"); + public static final TenantSettingsSupportedLocalesEnum SQ = new TenantSettingsSupportedLocalesEnum(Value.SQ, "sq"); - public static final TenantSettingsSupportedLocalesEnum ES419 = - new TenantSettingsSupportedLocalesEnum(Value.ES419, "es-419"); + public static final TenantSettingsSupportedLocalesEnum PA = new TenantSettingsSupportedLocalesEnum(Value.PA, "pa"); - public static final TenantSettingsSupportedLocalesEnum HE = new TenantSettingsSupportedLocalesEnum(Value.HE, "he"); + public static final TenantSettingsSupportedLocalesEnum FR_FR = + new TenantSettingsSupportedLocalesEnum(Value.FR_FR, "fr-FR"); - public static final TenantSettingsSupportedLocalesEnum ZH_HK = - new TenantSettingsSupportedLocalesEnum(Value.ZH_HK, "zh-HK"); + public static final TenantSettingsSupportedLocalesEnum CY = new TenantSettingsSupportedLocalesEnum(Value.CY, "cy"); - public static final TenantSettingsSupportedLocalesEnum EU_ES = - new TenantSettingsSupportedLocalesEnum(Value.EU_ES, "eu-ES"); + public static final TenantSettingsSupportedLocalesEnum IS = new TenantSettingsSupportedLocalesEnum(Value.IS, "is"); - public static final TenantSettingsSupportedLocalesEnum TL = new TenantSettingsSupportedLocalesEnum(Value.TL, "tl"); + public static final TenantSettingsSupportedLocalesEnum FA = new TenantSettingsSupportedLocalesEnum(Value.FA, "fa"); - public static final TenantSettingsSupportedLocalesEnum IT = new TenantSettingsSupportedLocalesEnum(Value.IT, "it"); + public static final TenantSettingsSupportedLocalesEnum KA = new TenantSettingsSupportedLocalesEnum(Value.KA, "ka"); - public static final TenantSettingsSupportedLocalesEnum SV = new TenantSettingsSupportedLocalesEnum(Value.SV, "sv"); + public static final TenantSettingsSupportedLocalesEnum BN = new TenantSettingsSupportedLocalesEnum(Value.BN, "bn"); - public static final TenantSettingsSupportedLocalesEnum FR_CA = - new TenantSettingsSupportedLocalesEnum(Value.FR_CA, "fr-CA"); + public static final TenantSettingsSupportedLocalesEnum SW = new TenantSettingsSupportedLocalesEnum(Value.SW, "sw"); - public static final TenantSettingsSupportedLocalesEnum EL = new TenantSettingsSupportedLocalesEnum(Value.EL, "el"); + public static final TenantSettingsSupportedLocalesEnum PT_BR = + new TenantSettingsSupportedLocalesEnum(Value.PT_BR, "pt-BR"); private final Value value; @@ -223,170 +223,170 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case AZ: - return visitor.visitAz(); - case MK: - return visitor.visitMk(); - case CA_ES: - return visitor.visitCaEs(); - case ML: - return visitor.visitMl(); - case TR: - return visitor.visitTr(); - case GU: - return visitor.visitGu(); - case ES_AR: - return visitor.visitEsAr(); - case ID: - return visitor.visitId(); - case CNR: - return visitor.visitCnr(); - case MN: - return visitor.visitMn(); - case FI: - return visitor.visitFi(); - case PL: - return visitor.visitPl(); - case EN_CA: - return visitor.visitEnCa(); - case AR_EG: - return visitor.visitArEg(); - case MR: - return visitor.visitMr(); - case MS: - return visitor.visitMs(); - case PT_PT: - return visitor.visitPtPt(); - case SK: - return visitor.visitSk(); - case SL: - return visitor.visitSl(); - case CS: - return visitor.visitCs(); - case UR: - return visitor.visitUr(); - case HU: - return visitor.visitHu(); - case TE: - return visitor.visitTe(); - case ZH_CN: - return visitor.visitZhCn(); - case AR_SA: - return visitor.visitArSa(); - case SO: - return visitor.visitSo(); - case FR: - return visitor.visitFr(); - case NO: - return visitor.visitNo(); - case ZH_TW: - return visitor.visitZhTw(); - case AR: - return visitor.visitAr(); - case PT: - return visitor.visitPt(); - case MY: - return visitor.visitMy(); - case SQ: - return visitor.visitSq(); - case HY: - return visitor.visitHy(); - case FR_FR: - return visitor.visitFrFr(); - case CY: - return visitor.visitCy(); - case PA: - return visitor.visitPa(); - case KA: - return visitor.visitKa(); - case IS: - return visitor.visitIs(); - case FA: - return visitor.visitFa(); - case BN: - return visitor.visitBn(); - case PT_BR: - return visitor.visitPtBr(); - case SW: - return visitor.visitSw(); - case HI: - return visitor.visitHi(); case EN: return visitor.visitEn(); case NB: return visitor.visitNb(); + case HI: + return visitor.visitHi(); + case BS: + return visitor.visitBs(); case DA: return visitor.visitDa(); case LT: return visitor.visitLt(); - case BS: - return visitor.visitBs(); - case ES_MX: - return visitor.visitEsMx(); case LV: return visitor.visitLv(); + case ES_MX: + return visitor.visitEsMx(); case RO: return visitor.visitRo(); case UK: return visitor.visitUk(); - case DE: - return visitor.visitDe(); case ES: return visitor.visitEs(); case KK: return visitor.visitKk(); + case DE: + return visitor.visitDe(); case ET: return visitor.visitEt(); - case TA: - return visitor.visitTa(); case HR: return visitor.visitHr(); case KN: return visitor.visitKn(); case ZGH: return visitor.visitZgh(); + case TA: + return visitor.visitTa(); + case RU: + return visitor.visitRu(); case AM: return visitor.visitAm(); case JA: return visitor.visitJa(); case KO: return visitor.visitKo(); - case RU: - return visitor.visitRu(); case NL: return visitor.visitNl(); case ZH_MO: return visitor.visitZhMo(); case VI: return visitor.visitVi(); - case BG: - return visitor.visitBg(); case NN: return visitor.visitNn(); + case BG: + return visitor.visitBg(); case GL_ES: return visitor.visitGlEs(); - case TH: - return visitor.visitTh(); case SR: return visitor.visitSr(); case ES419: return visitor.visitEs419(); - case HE: - return visitor.visitHe(); + case TH: + return visitor.visitTh(); case ZH_HK: return visitor.visitZhHk(); case EU_ES: return visitor.visitEuEs(); case TL: return visitor.visitTl(); - case IT: - return visitor.visitIt(); + case HE: + return visitor.visitHe(); case SV: return visitor.visitSv(); - case FR_CA: - return visitor.visitFrCa(); + case IT: + return visitor.visitIt(); case EL: return visitor.visitEl(); + case FR_CA: + return visitor.visitFrCa(); + case AZ: + return visitor.visitAz(); + case ML: + return visitor.visitMl(); + case MK: + return visitor.visitMk(); + case CA_ES: + return visitor.visitCaEs(); + case GU: + return visitor.visitGu(); + case ES_AR: + return visitor.visitEsAr(); + case ID: + return visitor.visitId(); + case TR: + return visitor.visitTr(); + case FI: + return visitor.visitFi(); + case CNR: + return visitor.visitCnr(); + case MN: + return visitor.visitMn(); + case AR_EG: + return visitor.visitArEg(); + case PL: + return visitor.visitPl(); + case EN_CA: + return visitor.visitEnCa(); + case MS: + return visitor.visitMs(); + case PT_PT: + return visitor.visitPtPt(); + case SK: + return visitor.visitSk(); + case MR: + return visitor.visitMr(); + case SL: + return visitor.visitSl(); + case CS: + return visitor.visitCs(); + case UR: + return visitor.visitUr(); + case AR_SA: + return visitor.visitArSa(); + case HU: + return visitor.visitHu(); + case TE: + return visitor.visitTe(); + case ZH_CN: + return visitor.visitZhCn(); + case SO: + return visitor.visitSo(); + case AR: + return visitor.visitAr(); + case PT: + return visitor.visitPt(); + case FR: + return visitor.visitFr(); + case NO: + return visitor.visitNo(); + case ZH_TW: + return visitor.visitZhTw(); + case HY: + return visitor.visitHy(); + case MY: + return visitor.visitMy(); + case SQ: + return visitor.visitSq(); + case PA: + return visitor.visitPa(); + case FR_FR: + return visitor.visitFrFr(); + case CY: + return visitor.visitCy(); + case IS: + return visitor.visitIs(); + case FA: + return visitor.visitFa(); + case KA: + return visitor.visitKa(); + case BN: + return visitor.visitBn(); + case SW: + return visitor.visitSw(); + case PT_BR: + return visitor.visitPtBr(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -396,170 +396,170 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static TenantSettingsSupportedLocalesEnum valueOf(String value) { switch (value) { + case "en": + return EN; + case "nb": + return NB; + case "hi": + return HI; + case "bs": + return BS; + case "da": + return DA; + case "lt": + return LT; + case "lv": + return LV; + case "es-MX": + return ES_MX; + case "ro": + return RO; + case "uk": + return UK; + case "es": + return ES; + case "kk": + return KK; + case "de": + return DE; + case "et": + return ET; + case "hr": + return HR; + case "kn": + return KN; + case "zgh": + return ZGH; + case "ta": + return TA; + case "ru": + return RU; + case "am": + return AM; + case "ja": + return JA; + case "ko": + return KO; + case "nl": + return NL; + case "zh-MO": + return ZH_MO; + case "vi": + return VI; + case "nn": + return NN; + case "bg": + return BG; + case "gl-ES": + return GL_ES; + case "sr": + return SR; + case "es-419": + return ES419; + case "th": + return TH; + case "zh-HK": + return ZH_HK; + case "eu-ES": + return EU_ES; + case "tl": + return TL; + case "he": + return HE; + case "sv": + return SV; + case "it": + return IT; + case "el": + return EL; + case "fr-CA": + return FR_CA; case "az": return AZ; + case "ml": + return ML; case "mk": return MK; case "ca-ES": return CA_ES; - case "ml": - return ML; - case "tr": - return TR; case "gu": return GU; case "es-AR": return ES_AR; case "id": return ID; + case "tr": + return TR; + case "fi": + return FI; case "cnr": return CNR; case "mn": return MN; - case "fi": - return FI; + case "ar-EG": + return AR_EG; case "pl": return PL; case "en-CA": return EN_CA; - case "ar-EG": - return AR_EG; - case "mr": - return MR; case "ms": return MS; case "pt-PT": return PT_PT; case "sk": return SK; + case "mr": + return MR; case "sl": return SL; case "cs": return CS; case "ur": return UR; + case "ar-SA": + return AR_SA; case "hu": return HU; case "te": return TE; case "zh-CN": return ZH_CN; - case "ar-SA": - return AR_SA; case "so": return SO; + case "ar": + return AR; + case "pt": + return PT; case "fr": return FR; case "no": return NO; case "zh-TW": return ZH_TW; - case "ar": - return AR; - case "pt": - return PT; + case "hy": + return HY; case "my": return MY; case "sq": return SQ; - case "hy": - return HY; + case "pa": + return PA; case "fr-FR": return FR_FR; case "cy": return CY; - case "pa": - return PA; - case "ka": - return KA; case "is": return IS; case "fa": return FA; + case "ka": + return KA; case "bn": return BN; - case "pt-BR": - return PT_BR; case "sw": return SW; - case "hi": - return HI; - case "en": - return EN; - case "nb": - return NB; - case "da": - return DA; - case "lt": - return LT; - case "bs": - return BS; - case "es-MX": - return ES_MX; - case "lv": - return LV; - case "ro": - return RO; - case "uk": - return UK; - case "de": - return DE; - case "es": - return ES; - case "kk": - return KK; - case "et": - return ET; - case "ta": - return TA; - case "hr": - return HR; - case "kn": - return KN; - case "zgh": - return ZGH; - case "am": - return AM; - case "ja": - return JA; - case "ko": - return KO; - case "ru": - return RU; - case "nl": - return NL; - case "zh-MO": - return ZH_MO; - case "vi": - return VI; - case "bg": - return BG; - case "nn": - return NN; - case "gl-ES": - return GL_ES; - case "th": - return TH; - case "sr": - return SR; - case "es-419": - return ES419; - case "he": - return HE; - case "zh-HK": - return ZH_HK; - case "eu-ES": - return EU_ES; - case "tl": - return TL; - case "it": - return IT; - case "sv": - return SV; - case "fr-CA": - return FR_CA; - case "el": - return EL; + case "pt-BR": + return PT_BR; default: return new TenantSettingsSupportedLocalesEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfilesListRequest.java b/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfilesListRequest.java index 880c9aa8c..7cff000d0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfilesListRequest.java +++ b/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfilesListRequest.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -138,7 +141,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UniversalLoginExperienceEnum.java b/src/main/java/com/auth0/client/mgmt/types/UniversalLoginExperienceEnum.java index bd6f45f36..a931bd272 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UniversalLoginExperienceEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/UniversalLoginExperienceEnum.java @@ -7,11 +7,11 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class UniversalLoginExperienceEnum { + public static final UniversalLoginExperienceEnum NEW = new UniversalLoginExperienceEnum(Value.NEW, "new"); + public static final UniversalLoginExperienceEnum CLASSIC = new UniversalLoginExperienceEnum(Value.CLASSIC, "classic"); - public static final UniversalLoginExperienceEnum NEW = new UniversalLoginExperienceEnum(Value.NEW, "new"); - private final Value value; private final String string; @@ -45,10 +45,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case CLASSIC: - return visitor.visitClassic(); case NEW: return visitor.visitNew(); + case CLASSIC: + return visitor.visitClassic(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -58,10 +58,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static UniversalLoginExperienceEnum valueOf(String value) { switch (value) { - case "classic": - return CLASSIC; case "new": return NEW; + case "classic": + return CLASSIC; default: return new UniversalLoginExperienceEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingIdentifiers.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingIdentifiers.java new file mode 100644 index 000000000..ec8bb0e97 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingIdentifiers.java @@ -0,0 +1,194 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateBrandingIdentifiers.Builder.class) +public final class UpdateBrandingIdentifiers { + private final Optional loginDisplay; + + private final Optional otpAutocomplete; + + private final OptionalNullable phoneDisplay; + + private final Map additionalProperties; + + private UpdateBrandingIdentifiers( + Optional loginDisplay, + Optional otpAutocomplete, + OptionalNullable phoneDisplay, + Map additionalProperties) { + this.loginDisplay = loginDisplay; + this.otpAutocomplete = otpAutocomplete; + this.phoneDisplay = phoneDisplay; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("login_display") + public Optional getLoginDisplay() { + return loginDisplay; + } + + /** + * @return Whether OTP autocomplete (autocomplete="one-time-code") is enabled. + */ + @JsonProperty("otp_autocomplete") + public Optional getOtpAutocomplete() { + return otpAutocomplete; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("phone_display") + public OptionalNullable getPhoneDisplay() { + if (phoneDisplay == null) { + return OptionalNullable.absent(); + } + return phoneDisplay; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("phone_display") + private OptionalNullable _getPhoneDisplay() { + return phoneDisplay; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateBrandingIdentifiers && equalTo((UpdateBrandingIdentifiers) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateBrandingIdentifiers other) { + return loginDisplay.equals(other.loginDisplay) + && otpAutocomplete.equals(other.otpAutocomplete) + && phoneDisplay.equals(other.phoneDisplay); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.loginDisplay, this.otpAutocomplete, this.phoneDisplay); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional loginDisplay = Optional.empty(); + + private Optional otpAutocomplete = Optional.empty(); + + private OptionalNullable phoneDisplay = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(UpdateBrandingIdentifiers other) { + loginDisplay(other.getLoginDisplay()); + otpAutocomplete(other.getOtpAutocomplete()); + phoneDisplay(other.getPhoneDisplay()); + return this; + } + + @JsonSetter(value = "login_display", nulls = Nulls.SKIP) + public Builder loginDisplay(Optional loginDisplay) { + this.loginDisplay = loginDisplay; + return this; + } + + public Builder loginDisplay(UpdateBrandingLoginDisplayEnum loginDisplay) { + this.loginDisplay = Optional.ofNullable(loginDisplay); + return this; + } + + /** + *

Whether OTP autocomplete (autocomplete="one-time-code") is enabled.

+ */ + @JsonSetter(value = "otp_autocomplete", nulls = Nulls.SKIP) + public Builder otpAutocomplete(Optional otpAutocomplete) { + this.otpAutocomplete = otpAutocomplete; + return this; + } + + public Builder otpAutocomplete(Boolean otpAutocomplete) { + this.otpAutocomplete = Optional.ofNullable(otpAutocomplete); + return this; + } + + @JsonSetter(value = "phone_display", nulls = Nulls.SKIP) + public Builder phoneDisplay(@Nullable OptionalNullable phoneDisplay) { + this.phoneDisplay = phoneDisplay; + return this; + } + + public Builder phoneDisplay(UpdateBrandingPhoneDisplay phoneDisplay) { + this.phoneDisplay = OptionalNullable.of(phoneDisplay); + return this; + } + + public Builder phoneDisplay(Optional phoneDisplay) { + if (phoneDisplay.isPresent()) { + this.phoneDisplay = OptionalNullable.of(phoneDisplay.get()); + } else { + this.phoneDisplay = OptionalNullable.absent(); + } + return this; + } + + public Builder phoneDisplay(com.auth0.client.mgmt.core.Nullable phoneDisplay) { + if (phoneDisplay.isNull()) { + this.phoneDisplay = OptionalNullable.ofNull(); + } else if (phoneDisplay.isEmpty()) { + this.phoneDisplay = OptionalNullable.absent(); + } else { + this.phoneDisplay = OptionalNullable.of(phoneDisplay.get()); + } + return this; + } + + public UpdateBrandingIdentifiers build() { + return new UpdateBrandingIdentifiers(loginDisplay, otpAutocomplete, phoneDisplay, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingLoginDisplayEnum.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingLoginDisplayEnum.java new file mode 100644 index 000000000..90e20e2f9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingLoginDisplayEnum.java @@ -0,0 +1,86 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class UpdateBrandingLoginDisplayEnum { + public static final UpdateBrandingLoginDisplayEnum SEPARATE = + new UpdateBrandingLoginDisplayEnum(Value.SEPARATE, "separate"); + + public static final UpdateBrandingLoginDisplayEnum UNIFIED = + new UpdateBrandingLoginDisplayEnum(Value.UNIFIED, "unified"); + + private final Value value; + + private final String string; + + UpdateBrandingLoginDisplayEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof UpdateBrandingLoginDisplayEnum + && this.string.equals(((UpdateBrandingLoginDisplayEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SEPARATE: + return visitor.visitSeparate(); + case UNIFIED: + return visitor.visitUnified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static UpdateBrandingLoginDisplayEnum valueOf(String value) { + switch (value) { + case "separate": + return SEPARATE; + case "unified": + return UNIFIED; + default: + return new UpdateBrandingLoginDisplayEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + UNIFIED, + + SEPARATE, + + UNKNOWN + } + + public interface Visitor { + T visitUnified(); + + T visitSeparate(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneDisplay.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneDisplay.java new file mode 100644 index 000000000..e3155ce09 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneDisplay.java @@ -0,0 +1,143 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateBrandingPhoneDisplay.Builder.class) +public final class UpdateBrandingPhoneDisplay { + private final UpdateBrandingPhoneMaskingEnum masking; + + private final UpdateBrandingPhoneFormattingEnum formatting; + + private final Map additionalProperties; + + private UpdateBrandingPhoneDisplay( + UpdateBrandingPhoneMaskingEnum masking, + UpdateBrandingPhoneFormattingEnum formatting, + Map additionalProperties) { + this.masking = masking; + this.formatting = formatting; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("masking") + public UpdateBrandingPhoneMaskingEnum getMasking() { + return masking; + } + + @JsonProperty("formatting") + public UpdateBrandingPhoneFormattingEnum getFormatting() { + return formatting; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateBrandingPhoneDisplay && equalTo((UpdateBrandingPhoneDisplay) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateBrandingPhoneDisplay other) { + return masking.equals(other.masking) && formatting.equals(other.formatting); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.masking, this.formatting); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MaskingStage builder() { + return new Builder(); + } + + public interface MaskingStage { + FormattingStage masking(@NotNull UpdateBrandingPhoneMaskingEnum masking); + + Builder from(UpdateBrandingPhoneDisplay other); + } + + public interface FormattingStage { + _FinalStage formatting(@NotNull UpdateBrandingPhoneFormattingEnum formatting); + } + + public interface _FinalStage { + UpdateBrandingPhoneDisplay build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MaskingStage, FormattingStage, _FinalStage { + private UpdateBrandingPhoneMaskingEnum masking; + + private UpdateBrandingPhoneFormattingEnum formatting; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateBrandingPhoneDisplay other) { + masking(other.getMasking()); + formatting(other.getFormatting()); + return this; + } + + @java.lang.Override + @JsonSetter("masking") + public FormattingStage masking(@NotNull UpdateBrandingPhoneMaskingEnum masking) { + this.masking = Objects.requireNonNull(masking, "masking must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("formatting") + public _FinalStage formatting(@NotNull UpdateBrandingPhoneFormattingEnum formatting) { + this.formatting = Objects.requireNonNull(formatting, "formatting must not be null"); + return this; + } + + @java.lang.Override + public UpdateBrandingPhoneDisplay build() { + return new UpdateBrandingPhoneDisplay(masking, formatting, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneFormattingEnum.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneFormattingEnum.java new file mode 100644 index 000000000..b68274fef --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneFormattingEnum.java @@ -0,0 +1,86 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class UpdateBrandingPhoneFormattingEnum { + public static final UpdateBrandingPhoneFormattingEnum REGIONAL = + new UpdateBrandingPhoneFormattingEnum(Value.REGIONAL, "regional"); + + public static final UpdateBrandingPhoneFormattingEnum INTERNATIONAL = + new UpdateBrandingPhoneFormattingEnum(Value.INTERNATIONAL, "international"); + + private final Value value; + + private final String string; + + UpdateBrandingPhoneFormattingEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof UpdateBrandingPhoneFormattingEnum + && this.string.equals(((UpdateBrandingPhoneFormattingEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case REGIONAL: + return visitor.visitRegional(); + case INTERNATIONAL: + return visitor.visitInternational(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static UpdateBrandingPhoneFormattingEnum valueOf(String value) { + switch (value) { + case "regional": + return REGIONAL; + case "international": + return INTERNATIONAL; + default: + return new UpdateBrandingPhoneFormattingEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + REGIONAL, + + INTERNATIONAL, + + UNKNOWN + } + + public interface Visitor { + T visitRegional(); + + T visitInternational(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneMaskingEnum.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneMaskingEnum.java new file mode 100644 index 000000000..a0a75b1f3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneMaskingEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class UpdateBrandingPhoneMaskingEnum { + public static final UpdateBrandingPhoneMaskingEnum SHOW_ALL = + new UpdateBrandingPhoneMaskingEnum(Value.SHOW_ALL, "show_all"); + + public static final UpdateBrandingPhoneMaskingEnum MASK_DIGITS = + new UpdateBrandingPhoneMaskingEnum(Value.MASK_DIGITS, "mask_digits"); + + public static final UpdateBrandingPhoneMaskingEnum HIDE_COUNTRY_CODE = + new UpdateBrandingPhoneMaskingEnum(Value.HIDE_COUNTRY_CODE, "hide_country_code"); + + private final Value value; + + private final String string; + + UpdateBrandingPhoneMaskingEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof UpdateBrandingPhoneMaskingEnum + && this.string.equals(((UpdateBrandingPhoneMaskingEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHOW_ALL: + return visitor.visitShowAll(); + case MASK_DIGITS: + return visitor.visitMaskDigits(); + case HIDE_COUNTRY_CODE: + return visitor.visitHideCountryCode(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static UpdateBrandingPhoneMaskingEnum valueOf(String value) { + switch (value) { + case "show_all": + return SHOW_ALL; + case "mask_digits": + return MASK_DIGITS; + case "hide_country_code": + return HIDE_COUNTRY_CODE; + default: + return new UpdateBrandingPhoneMaskingEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + SHOW_ALL, + + HIDE_COUNTRY_CODE, + + MASK_DIGITS, + + UNKNOWN + } + + public interface Visitor { + T visitShowAll(); + + T visitHideCountryCode(); + + T visitMaskDigits(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingRequestContent.java index a83c4e249..079ad2bd5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingRequestContent.java @@ -29,6 +29,8 @@ public final class UpdateBrandingRequestContent { private final OptionalNullable logoUrl; + private final OptionalNullable identifiers; + private final OptionalNullable font; private final Map additionalProperties; @@ -37,11 +39,13 @@ private UpdateBrandingRequestContent( OptionalNullable colors, OptionalNullable faviconUrl, OptionalNullable logoUrl, + OptionalNullable identifiers, OptionalNullable font, Map additionalProperties) { this.colors = colors; this.faviconUrl = faviconUrl; this.logoUrl = logoUrl; + this.identifiers = identifiers; this.font = font; this.additionalProperties = additionalProperties; } @@ -79,6 +83,15 @@ public OptionalNullable getLogoUrl() { return logoUrl; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("identifiers") + public OptionalNullable getIdentifiers() { + if (identifiers == null) { + return OptionalNullable.absent(); + } + return identifiers; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("font") public OptionalNullable getFont() { @@ -106,6 +119,12 @@ private OptionalNullable _getLogoUrl() { return logoUrl; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("identifiers") + private OptionalNullable _getIdentifiers() { + return identifiers; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("font") private OptionalNullable _getFont() { @@ -127,12 +146,13 @@ private boolean equalTo(UpdateBrandingRequestContent other) { return colors.equals(other.colors) && faviconUrl.equals(other.faviconUrl) && logoUrl.equals(other.logoUrl) + && identifiers.equals(other.identifiers) && font.equals(other.font); } @java.lang.Override public int hashCode() { - return Objects.hash(this.colors, this.faviconUrl, this.logoUrl, this.font); + return Objects.hash(this.colors, this.faviconUrl, this.logoUrl, this.identifiers, this.font); } @java.lang.Override @@ -152,6 +172,8 @@ public static final class Builder { private OptionalNullable logoUrl = OptionalNullable.absent(); + private OptionalNullable identifiers = OptionalNullable.absent(); + private OptionalNullable font = OptionalNullable.absent(); @JsonAnySetter @@ -163,6 +185,7 @@ public Builder from(UpdateBrandingRequestContent other) { colors(other.getColors()); faviconUrl(other.getFaviconUrl()); logoUrl(other.getLogoUrl()); + identifiers(other.getIdentifiers()); font(other.getFont()); return this; } @@ -266,6 +289,37 @@ public Builder logoUrl(com.auth0.client.mgmt.core.Nullable logoUrl) { return this; } + @JsonSetter(value = "identifiers", nulls = Nulls.SKIP) + public Builder identifiers(@Nullable OptionalNullable identifiers) { + this.identifiers = identifiers; + return this; + } + + public Builder identifiers(UpdateBrandingIdentifiers identifiers) { + this.identifiers = OptionalNullable.of(identifiers); + return this; + } + + public Builder identifiers(Optional identifiers) { + if (identifiers.isPresent()) { + this.identifiers = OptionalNullable.of(identifiers.get()); + } else { + this.identifiers = OptionalNullable.absent(); + } + return this; + } + + public Builder identifiers(com.auth0.client.mgmt.core.Nullable identifiers) { + if (identifiers.isNull()) { + this.identifiers = OptionalNullable.ofNull(); + } else if (identifiers.isEmpty()) { + this.identifiers = OptionalNullable.absent(); + } else { + this.identifiers = OptionalNullable.of(identifiers.get()); + } + return this; + } + @JsonSetter(value = "font", nulls = Nulls.SKIP) public Builder font(@Nullable OptionalNullable font) { this.font = font; @@ -298,7 +352,8 @@ public Builder font(com.auth0.client.mgmt.core.Nullable font } public UpdateBrandingRequestContent build() { - return new UpdateBrandingRequestContent(colors, faviconUrl, logoUrl, font, additionalProperties); + return new UpdateBrandingRequestContent( + colors, faviconUrl, logoUrl, identifiers, font, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingResponseContent.java index 4f4c32661..a6dba99a2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingResponseContent.java @@ -26,6 +26,8 @@ public final class UpdateBrandingResponseContent { private final Optional logoUrl; + private final Optional identifiers; + private final Optional font; private final Map additionalProperties; @@ -34,11 +36,13 @@ private UpdateBrandingResponseContent( Optional colors, Optional faviconUrl, Optional logoUrl, + Optional identifiers, Optional font, Map additionalProperties) { this.colors = colors; this.faviconUrl = faviconUrl; this.logoUrl = logoUrl; + this.identifiers = identifiers; this.font = font; this.additionalProperties = additionalProperties; } @@ -64,6 +68,11 @@ public Optional getLogoUrl() { return logoUrl; } + @JsonProperty("identifiers") + public Optional getIdentifiers() { + return identifiers; + } + @JsonProperty("font") public Optional getFont() { return font; @@ -84,12 +93,13 @@ private boolean equalTo(UpdateBrandingResponseContent other) { return colors.equals(other.colors) && faviconUrl.equals(other.faviconUrl) && logoUrl.equals(other.logoUrl) + && identifiers.equals(other.identifiers) && font.equals(other.font); } @java.lang.Override public int hashCode() { - return Objects.hash(this.colors, this.faviconUrl, this.logoUrl, this.font); + return Objects.hash(this.colors, this.faviconUrl, this.logoUrl, this.identifiers, this.font); } @java.lang.Override @@ -109,6 +119,8 @@ public static final class Builder { private Optional logoUrl = Optional.empty(); + private Optional identifiers = Optional.empty(); + private Optional font = Optional.empty(); @JsonAnySetter @@ -120,6 +132,7 @@ public Builder from(UpdateBrandingResponseContent other) { colors(other.getColors()); faviconUrl(other.getFaviconUrl()); logoUrl(other.getLogoUrl()); + identifiers(other.getIdentifiers()); font(other.getFont()); return this; } @@ -163,6 +176,17 @@ public Builder logoUrl(String logoUrl) { return this; } + @JsonSetter(value = "identifiers", nulls = Nulls.SKIP) + public Builder identifiers(Optional identifiers) { + this.identifiers = identifiers; + return this; + } + + public Builder identifiers(BrandingIdentifiers identifiers) { + this.identifiers = Optional.ofNullable(identifiers); + return this; + } + @JsonSetter(value = "font", nulls = Nulls.SKIP) public Builder font(Optional font) { this.font = font; @@ -175,7 +199,8 @@ public Builder font(BrandingFont font) { } public UpdateBrandingResponseContent build() { - return new UpdateBrandingResponseContent(colors, faviconUrl, logoUrl, font, additionalProperties); + return new UpdateBrandingResponseContent( + colors, faviconUrl, logoUrl, identifiers, font, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java index 2e4ed55c0..016ba440b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java @@ -87,6 +87,14 @@ public final class UpdateConnectionOptions { private final Optional passwordOptions; + private final OptionalNullable> idTokenSignedResponseAlgs; + + private final OptionalNullable tokenEndpointAuthMethod; + + private final OptionalNullable tokenEndpointAuthSigningAlg; + + private final Optional tokenEndpointJwtcaAudFormat; + private final Map additionalProperties; private UpdateConnectionOptions( @@ -121,6 +129,10 @@ private UpdateConnectionOptions( OptionalNullable gatewayAuthentication, OptionalNullable federatedConnectionsAccessTokens, Optional passwordOptions, + OptionalNullable> idTokenSignedResponseAlgs, + OptionalNullable tokenEndpointAuthMethod, + OptionalNullable tokenEndpointAuthSigningAlg, + Optional tokenEndpointJwtcaAudFormat, Map additionalProperties) { this.validation = validation; this.nonPersistentAttrs = nonPersistentAttrs; @@ -153,6 +165,10 @@ private UpdateConnectionOptions( this.gatewayAuthentication = gatewayAuthentication; this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.passwordOptions = passwordOptions; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.additionalProperties = additionalProperties; } @@ -381,6 +397,38 @@ public Optional getPasswordOptions() { return passwordOptions; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("id_token_signed_response_algs") + public OptionalNullable> getIdTokenSignedResponseAlgs() { + if (idTokenSignedResponseAlgs == null) { + return OptionalNullable.absent(); + } + return idTokenSignedResponseAlgs; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_endpoint_auth_method") + public OptionalNullable getTokenEndpointAuthMethod() { + if (tokenEndpointAuthMethod == null) { + return OptionalNullable.absent(); + } + return tokenEndpointAuthMethod; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_endpoint_auth_signing_alg") + public OptionalNullable getTokenEndpointAuthSigningAlg() { + if (tokenEndpointAuthSigningAlg == null) { + return OptionalNullable.absent(); + } + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("validation") private OptionalNullable _getValidation() { @@ -460,6 +508,24 @@ private OptionalNullable _getFederat return federatedConnectionsAccessTokens; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("id_token_signed_response_algs") + private OptionalNullable> _getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_endpoint_auth_method") + private OptionalNullable _getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_endpoint_auth_signing_alg") + private OptionalNullable _getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -502,7 +568,11 @@ private boolean equalTo(UpdateConnectionOptions other) { && setUserRootAttributes.equals(other.setUserRootAttributes) && gatewayAuthentication.equals(other.gatewayAuthentication) && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) - && passwordOptions.equals(other.passwordOptions); + && passwordOptions.equals(other.passwordOptions) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat); } @java.lang.Override @@ -538,7 +608,11 @@ public int hashCode() { this.setUserRootAttributes, this.gatewayAuthentication, this.federatedConnectionsAccessTokens, - this.passwordOptions); + this.passwordOptions, + this.idTokenSignedResponseAlgs, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat); } @java.lang.Override @@ -618,6 +692,17 @@ public static final class Builder { private Optional passwordOptions = Optional.empty(); + private OptionalNullable> idTokenSignedResponseAlgs = + OptionalNullable.absent(); + + private OptionalNullable tokenEndpointAuthMethod = + OptionalNullable.absent(); + + private OptionalNullable tokenEndpointAuthSigningAlg = + OptionalNullable.absent(); + + private Optional tokenEndpointJwtcaAudFormat = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -655,6 +740,10 @@ public Builder from(UpdateConnectionOptions other) { gatewayAuthentication(other.getGatewayAuthentication()); federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); passwordOptions(other.getPasswordOptions()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); return this; } @@ -1306,6 +1395,125 @@ public Builder passwordOptions(ConnectionPasswordOptions passwordOptions) { return this; } + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) + public Builder idTokenSignedResponseAlgs( + @Nullable OptionalNullable> idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + return this; + } + + public Builder idTokenSignedResponseAlgs( + List idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs); + return this; + } + + public Builder idTokenSignedResponseAlgs( + Optional> idTokenSignedResponseAlgs) { + if (idTokenSignedResponseAlgs.isPresent()) { + this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs.get()); + } else { + this.idTokenSignedResponseAlgs = OptionalNullable.absent(); + } + return this; + } + + public Builder idTokenSignedResponseAlgs( + com.auth0.client.mgmt.core.Nullable> + idTokenSignedResponseAlgs) { + if (idTokenSignedResponseAlgs.isNull()) { + this.idTokenSignedResponseAlgs = OptionalNullable.ofNull(); + } else if (idTokenSignedResponseAlgs.isEmpty()) { + this.idTokenSignedResponseAlgs = OptionalNullable.absent(); + } else { + this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs.get()); + } + return this; + } + + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public Builder tokenEndpointAuthMethod( + @Nullable OptionalNullable tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + public Builder tokenEndpointAuthMethod(ConnectionTokenEndpointAuthMethodEnum tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod); + return this; + } + + public Builder tokenEndpointAuthMethod( + Optional tokenEndpointAuthMethod) { + if (tokenEndpointAuthMethod.isPresent()) { + this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod.get()); + } else { + this.tokenEndpointAuthMethod = OptionalNullable.absent(); + } + return this; + } + + public Builder tokenEndpointAuthMethod( + com.auth0.client.mgmt.core.Nullable tokenEndpointAuthMethod) { + if (tokenEndpointAuthMethod.isNull()) { + this.tokenEndpointAuthMethod = OptionalNullable.ofNull(); + } else if (tokenEndpointAuthMethod.isEmpty()) { + this.tokenEndpointAuthMethod = OptionalNullable.absent(); + } else { + this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod.get()); + } + return this; + } + + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public Builder tokenEndpointAuthSigningAlg( + @Nullable OptionalNullable tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + public Builder tokenEndpointAuthSigningAlg( + ConnectionTokenEndpointAuthSigningAlgEnum tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg); + return this; + } + + public Builder tokenEndpointAuthSigningAlg( + Optional tokenEndpointAuthSigningAlg) { + if (tokenEndpointAuthSigningAlg.isPresent()) { + this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg.get()); + } else { + this.tokenEndpointAuthSigningAlg = OptionalNullable.absent(); + } + return this; + } + + public Builder tokenEndpointAuthSigningAlg( + com.auth0.client.mgmt.core.Nullable + tokenEndpointAuthSigningAlg) { + if (tokenEndpointAuthSigningAlg.isNull()) { + this.tokenEndpointAuthSigningAlg = OptionalNullable.ofNull(); + } else if (tokenEndpointAuthSigningAlg.isEmpty()) { + this.tokenEndpointAuthSigningAlg = OptionalNullable.absent(); + } else { + this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg.get()); + } + return this; + } + + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public Builder tokenEndpointJwtcaAudFormat( + Optional tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + public Builder tokenEndpointJwtcaAudFormat( + ConnectionTokenEndpointJwtcaAudFormatEnumOidc tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + public UpdateConnectionOptions build() { return new UpdateConnectionOptions( validation, @@ -1339,6 +1547,10 @@ public UpdateConnectionOptions build() { gatewayAuthentication, federatedConnectionsAccessTokens, passwordOptions, + idTokenSignedResponseAlgs, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultDomainResponseContent.java index ab22c4231..baeff9fb5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultDomainResponseContent.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = UpdateDefaultDomainResponseContent.Deserializer.class) @@ -83,15 +84,24 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("custom_domain_id") + && ((Map) value).containsKey("domain") + && ((Map) value).containsKey("primary") + && ((Map) value).containsKey("status") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, UpdateDefaultCustomDomainResponseContent.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, UpdateDefaultCanonicalDomainResponseContent.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("domain")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, UpdateDefaultCanonicalDomainResponseContent.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionSetup.java b/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionSetup.java index e3e8c4832..8eebc23f9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionSetup.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionSetup.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = UpdateFlowsVaultConnectionSetup.Deserializer.class) @@ -194,72 +195,143 @@ static final class Deserializer extends StdDeserializer + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("api_key") + && ((Map) value).containsKey("base_url")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, FlowsVaultConnectioSetupApiKeyWithBaseUrl.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupApiKey.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("api_key")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupApiKey.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupOauthApp.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("client_id") + && ((Map) value).containsKey("client_secret") + && ((Map) value).containsKey("domain")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupOauthApp.class)); + } catch (RuntimeException e) { + } } try { return of( ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupBigqueryOauthJwt.class)); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupSecretApiKey.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("secret_key")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupSecretApiKey.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupHttpBearer.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("token")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupHttpBearer.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectionHttpBasicAuthSetup.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("username")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, FlowsVaultConnectionHttpBasicAuthSetup.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectionHttpApiKeySetup.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("value") + && ((Map) value).containsKey("in")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectionHttpApiKeySetup.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, FlowsVaultConnectionHttpOauthClientCredentialsSetup.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("client_id") + && ((Map) value).containsKey("client_secret") + && ((Map) value).containsKey("token_endpoint")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, FlowsVaultConnectionHttpOauthClientCredentialsSetup.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupJwt.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("algorithm")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupJwt.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupMailjetApiKey.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("api_key") + && ((Map) value).containsKey("secret_key")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupMailjetApiKey.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupToken.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("token")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupToken.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupWebhook.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("url")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupWebhook.class)); + } catch (RuntimeException e) { + } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupStripeKeyPair.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("private_key") + && ((Map) value).containsKey("public_key")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupStripeKeyPair.class)); + } catch (RuntimeException e) { + } } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupOauthCode.class)); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupTwilioApiKey.class)); - } catch (RuntimeException e) { + if (value instanceof Map + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("account_id") + && ((Map) value).containsKey("api_key")) { + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupTwilioApiKey.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java index e611a7e6c..b0bc9900a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java @@ -54,6 +54,8 @@ public final class UpdateResourceServerRequestContent { private final Optional subjectTypeAuthorization; + private final OptionalNullable authorizationPolicy; + private final Map additionalProperties; private UpdateResourceServerRequestContent( @@ -72,6 +74,7 @@ private UpdateResourceServerRequestContent( OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, + OptionalNullable authorizationPolicy, Map additionalProperties) { this.name = name; this.scopes = scopes; @@ -88,6 +91,7 @@ private UpdateResourceServerRequestContent( this.authorizationDetails = authorizationDetails; this.proofOfPossession = proofOfPossession; this.subjectTypeAuthorization = subjectTypeAuthorization; + this.authorizationPolicy = authorizationPolicy; this.additionalProperties = additionalProperties; } @@ -206,6 +210,15 @@ public Optional getSubjectTypeAuthorizat return subjectTypeAuthorization; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + public OptionalNullable getAuthorizationPolicy() { + if (authorizationPolicy == null) { + return OptionalNullable.absent(); + } + return authorizationPolicy; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") private OptionalNullable _getTokenEncryption() { @@ -230,6 +243,12 @@ private OptionalNullable _getProofOfPossession( return proofOfPossession; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + private OptionalNullable _getAuthorizationPolicy() { + return authorizationPolicy; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -257,7 +276,8 @@ private boolean equalTo(UpdateResourceServerRequestContent other) { && consentPolicy.equals(other.consentPolicy) && authorizationDetails.equals(other.authorizationDetails) && proofOfPossession.equals(other.proofOfPossession) - && subjectTypeAuthorization.equals(other.subjectTypeAuthorization); + && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) + && authorizationPolicy.equals(other.authorizationPolicy); } @java.lang.Override @@ -277,7 +297,8 @@ public int hashCode() { this.consentPolicy, this.authorizationDetails, this.proofOfPossession, - this.subjectTypeAuthorization); + this.subjectTypeAuthorization, + this.authorizationPolicy); } @java.lang.Override @@ -321,6 +342,8 @@ public static final class Builder { private Optional subjectTypeAuthorization = Optional.empty(); + private OptionalNullable authorizationPolicy = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -342,6 +365,7 @@ public Builder from(UpdateResourceServerRequestContent other) { authorizationDetails(other.getAuthorizationDetails()); proofOfPossession(other.getProofOfPossession()); subjectTypeAuthorization(other.getSubjectTypeAuthorization()); + authorizationPolicy(other.getAuthorizationPolicy()); return this; } @@ -621,6 +645,39 @@ public Builder subjectTypeAuthorization(ResourceServerSubjectTypeAuthorization s return this; } + @JsonSetter(value = "authorization_policy", nulls = Nulls.SKIP) + public Builder authorizationPolicy( + @Nullable OptionalNullable authorizationPolicy) { + this.authorizationPolicy = authorizationPolicy; + return this; + } + + public Builder authorizationPolicy(ResourceServerAuthorizationPolicy authorizationPolicy) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy); + return this; + } + + public Builder authorizationPolicy(Optional authorizationPolicy) { + if (authorizationPolicy.isPresent()) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } else { + this.authorizationPolicy = OptionalNullable.absent(); + } + return this; + } + + public Builder authorizationPolicy( + com.auth0.client.mgmt.core.Nullable authorizationPolicy) { + if (authorizationPolicy.isNull()) { + this.authorizationPolicy = OptionalNullable.ofNull(); + } else if (authorizationPolicy.isEmpty()) { + this.authorizationPolicy = OptionalNullable.absent(); + } else { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } + return this; + } + public UpdateResourceServerRequestContent build() { return new UpdateResourceServerRequestContent( name, @@ -638,6 +695,7 @@ public UpdateResourceServerRequestContent build() { authorizationDetails, proofOfPossession, subjectTypeAuthorization, + authorizationPolicy, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java index 08ce5ff08..32d168379 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java @@ -62,6 +62,8 @@ public final class UpdateResourceServerResponseContent { private final Optional subjectTypeAuthorization; + private final OptionalNullable authorizationPolicy; + private final Optional clientId; private final Map additionalProperties; @@ -86,6 +88,7 @@ private UpdateResourceServerResponseContent( OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, + OptionalNullable authorizationPolicy, Optional clientId, Map additionalProperties) { this.id = id; @@ -107,6 +110,7 @@ private UpdateResourceServerResponseContent( this.authorizationDetails = authorizationDetails; this.proofOfPossession = proofOfPossession; this.subjectTypeAuthorization = subjectTypeAuthorization; + this.authorizationPolicy = authorizationPolicy; this.clientId = clientId; this.additionalProperties = additionalProperties; } @@ -258,6 +262,15 @@ public Optional getSubjectTypeAuthorizat return subjectTypeAuthorization; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + public OptionalNullable getAuthorizationPolicy() { + if (authorizationPolicy == null) { + return OptionalNullable.absent(); + } + return authorizationPolicy; + } + /** * @return The client ID of the client that this resource server is linked to */ @@ -290,6 +303,12 @@ private OptionalNullable _getProofOfPossession( return proofOfPossession; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + private OptionalNullable _getAuthorizationPolicy() { + return authorizationPolicy; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -322,6 +341,7 @@ private boolean equalTo(UpdateResourceServerResponseContent other) { && authorizationDetails.equals(other.authorizationDetails) && proofOfPossession.equals(other.proofOfPossession) && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) + && authorizationPolicy.equals(other.authorizationPolicy) && clientId.equals(other.clientId); } @@ -347,6 +367,7 @@ public int hashCode() { this.authorizationDetails, this.proofOfPossession, this.subjectTypeAuthorization, + this.authorizationPolicy, this.clientId); } @@ -399,6 +420,8 @@ public static final class Builder { private Optional subjectTypeAuthorization = Optional.empty(); + private OptionalNullable authorizationPolicy = OptionalNullable.absent(); + private Optional clientId = Optional.empty(); @JsonAnySetter @@ -426,6 +449,7 @@ public Builder from(UpdateResourceServerResponseContent other) { authorizationDetails(other.getAuthorizationDetails()); proofOfPossession(other.getProofOfPossession()); subjectTypeAuthorization(other.getSubjectTypeAuthorization()); + authorizationPolicy(other.getAuthorizationPolicy()); clientId(other.getClientId()); return this; } @@ -762,6 +786,39 @@ public Builder subjectTypeAuthorization(ResourceServerSubjectTypeAuthorization s return this; } + @JsonSetter(value = "authorization_policy", nulls = Nulls.SKIP) + public Builder authorizationPolicy( + @Nullable OptionalNullable authorizationPolicy) { + this.authorizationPolicy = authorizationPolicy; + return this; + } + + public Builder authorizationPolicy(ResourceServerAuthorizationPolicy authorizationPolicy) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy); + return this; + } + + public Builder authorizationPolicy(Optional authorizationPolicy) { + if (authorizationPolicy.isPresent()) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } else { + this.authorizationPolicy = OptionalNullable.absent(); + } + return this; + } + + public Builder authorizationPolicy( + com.auth0.client.mgmt.core.Nullable authorizationPolicy) { + if (authorizationPolicy.isNull()) { + this.authorizationPolicy = OptionalNullable.ofNull(); + } else if (authorizationPolicy.isEmpty()) { + this.authorizationPolicy = OptionalNullable.absent(); + } else { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } + return this; + } + /** *

The client ID of the client that this resource server is linked to

*/ @@ -797,6 +854,7 @@ public UpdateResourceServerResponseContent build() { authorizationDetails, proofOfPossession, subjectTypeAuthorization, + authorizationPolicy, clientId, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileRequestContent.java index 884973cc2..9bc5f1e31 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileRequestContent.java @@ -79,7 +79,7 @@ public OptionalNullable getBranding() { } /** - * @return List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate] + * @return List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate] */ @JsonProperty("allowed_strategies") public Optional> getAllowedStrategies() { @@ -272,7 +272,7 @@ public Builder branding(com.auth0.client.mgmt.core.NullableList of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

+ *

List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

*/ @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) public Builder allowedStrategies(Optional> allowedStrategies) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileResponseContent.java index 3ed9c6d43..f1b0db5e5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileResponseContent.java @@ -90,7 +90,7 @@ public Optional getDescription() { } /** - * @return List of attributes to be mapped that will be shown to the user during the SS-SSO flow. + * @return List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow. */ @JsonProperty("user_attributes") public Optional> getUserAttributes() { @@ -119,7 +119,7 @@ public Optional getBranding() { } /** - * @return List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate] + * @return List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate] */ @JsonProperty("allowed_strategies") public Optional> getAllowedStrategies() { @@ -262,7 +262,7 @@ public Builder description(String description) { } /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

+ *

List of attributes to be mapped that will be shown to the user during the Self-Service Enterprise Configuration flow.

*/ @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) public Builder userAttributes(Optional> userAttributes) { @@ -315,7 +315,7 @@ public Builder branding(SelfServiceProfileBrandingProperties branding) { } /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

+ *

List of IdP strategies that will be shown to users during the Self-Service Enterprise Configuration flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, auth0-samlp, okta-samlp, keycloak-samlp, pingfederate]

*/ @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) public Builder allowedStrategies(Optional> allowedStrategies) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContent.java index eca442c22..f795f0cc2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContent.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; +import java.util.Map; import java.util.Objects; @JsonDeserialize(using = UpdateUniversalLoginTemplateRequestContent.Deserializer.class) @@ -88,10 +89,12 @@ public UpdateUniversalLoginTemplateRequestContent deserialize(JsonParser p, Dese return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); } catch (RuntimeException e) { } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, UpdateUniversalLoginTemplateRequestContentTemplate.class)); - } catch (RuntimeException e) { + if (value instanceof Map && ((Map) value).containsKey("template")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, UpdateUniversalLoginTemplateRequestContentTemplate.class)); + } catch (RuntimeException e) { + } } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateUserAuthenticationMethodResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateUserAuthenticationMethodResponseContent.java index c60ce8098..961c99ae9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateUserAuthenticationMethodResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateUserAuthenticationMethodResponseContent.java @@ -47,6 +47,8 @@ public final class UpdateUserAuthenticationMethodResponseContent { private final Optional relyingPartyIdentifier; + private final Optional confirmed; + private final Optional createdAt; private final Map additionalProperties; @@ -64,6 +66,7 @@ private UpdateUserAuthenticationMethodResponseContent( Optional publicKey, Optional aaguid, Optional relyingPartyIdentifier, + Optional confirmed, Optional createdAt, Map additionalProperties) { this.id = id; @@ -78,6 +81,7 @@ private UpdateUserAuthenticationMethodResponseContent( this.publicKey = publicKey; this.aaguid = aaguid; this.relyingPartyIdentifier = relyingPartyIdentifier; + this.confirmed = confirmed; this.createdAt = createdAt; this.additionalProperties = additionalProperties; } @@ -169,6 +173,14 @@ public Optional getRelyingPartyIdentifier() { return relyingPartyIdentifier; } + /** + * @return Whether the authentication method has been confirmed. + */ + @JsonProperty("confirmed") + public Optional getConfirmed() { + return confirmed; + } + /** * @return Authentication method creation date */ @@ -202,6 +214,7 @@ private boolean equalTo(UpdateUserAuthenticationMethodResponseContent other) { && publicKey.equals(other.publicKey) && aaguid.equals(other.aaguid) && relyingPartyIdentifier.equals(other.relyingPartyIdentifier) + && confirmed.equals(other.confirmed) && createdAt.equals(other.createdAt); } @@ -220,6 +233,7 @@ public int hashCode() { this.publicKey, this.aaguid, this.relyingPartyIdentifier, + this.confirmed, this.createdAt); } @@ -317,6 +331,13 @@ _FinalStage preferredAuthenticationMethod( _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); + /** + *

Whether the authentication method has been confirmed.

+ */ + _FinalStage confirmed(Optional confirmed); + + _FinalStage confirmed(Boolean confirmed); + /** *

Authentication method creation date

*/ @@ -331,6 +352,8 @@ public static final class Builder implements TypeStage, _FinalStage { private Optional createdAt = Optional.empty(); + private Optional confirmed = Optional.empty(); + private Optional relyingPartyIdentifier = Optional.empty(); private Optional aaguid = Optional.empty(); @@ -372,6 +395,7 @@ public Builder from(UpdateUserAuthenticationMethodResponseContent other) { publicKey(other.getPublicKey()); aaguid(other.getAaguid()); relyingPartyIdentifier(other.getRelyingPartyIdentifier()); + confirmed(other.getConfirmed()); createdAt(other.getCreatedAt()); return this; } @@ -403,6 +427,26 @@ public _FinalStage createdAt(Optional createdAt) { return this; } + /** + *

Whether the authentication method has been confirmed.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage confirmed(Boolean confirmed) { + this.confirmed = Optional.ofNullable(confirmed); + return this; + } + + /** + *

Whether the authentication method has been confirmed.

+ */ + @java.lang.Override + @JsonSetter(value = "confirmed", nulls = Nulls.SKIP) + public _FinalStage confirmed(Optional confirmed) { + this.confirmed = confirmed; + return this; + } + /** *

Applies to webauthn authentication methods only. The relying party identifier.

* @return Reference to {@code this} so that method calls can be chained together. @@ -627,6 +671,7 @@ public UpdateUserAuthenticationMethodResponseContent build() { publicKey, aaguid, relyingPartyIdentifier, + confirmed, createdAt, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UserEnrollmentAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/UserEnrollmentAuthMethodEnum.java index 75512a03e..6bfee03c4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserEnrollmentAuthMethodEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserEnrollmentAuthMethodEnum.java @@ -10,6 +10,9 @@ public final class UserEnrollmentAuthMethodEnum { public static final UserEnrollmentAuthMethodEnum WEBAUTHN_PLATFORM = new UserEnrollmentAuthMethodEnum(Value.WEBAUTHN_PLATFORM, "webauthn-platform"); + public static final UserEnrollmentAuthMethodEnum WEBAUTHN_ROAMING = + new UserEnrollmentAuthMethodEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); + public static final UserEnrollmentAuthMethodEnum GUARDIAN = new UserEnrollmentAuthMethodEnum(Value.GUARDIAN, "guardian"); @@ -18,9 +21,6 @@ public final class UserEnrollmentAuthMethodEnum { public static final UserEnrollmentAuthMethodEnum SMS = new UserEnrollmentAuthMethodEnum(Value.SMS, "sms"); - public static final UserEnrollmentAuthMethodEnum WEBAUTHN_ROAMING = - new UserEnrollmentAuthMethodEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); - private final Value value; private final String string; @@ -56,14 +56,14 @@ public T visit(Visitor visitor) { switch (value) { case WEBAUTHN_PLATFORM: return visitor.visitWebauthnPlatform(); + case WEBAUTHN_ROAMING: + return visitor.visitWebauthnRoaming(); case GUARDIAN: return visitor.visitGuardian(); case AUTHENTICATOR: return visitor.visitAuthenticator(); case SMS: return visitor.visitSms(); - case WEBAUTHN_ROAMING: - return visitor.visitWebauthnRoaming(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -75,14 +75,14 @@ public static UserEnrollmentAuthMethodEnum valueOf(String value) { switch (value) { case "webauthn-platform": return WEBAUTHN_PLATFORM; + case "webauthn-roaming": + return WEBAUTHN_ROAMING; case "guardian": return GUARDIAN; case "authenticator": return AUTHENTICATOR; case "sms": return SMS; - case "webauthn-roaming": - return WEBAUTHN_ROAMING; default: return new UserEnrollmentAuthMethodEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UserId.java b/src/main/java/com/auth0/client/mgmt/types/UserId.java index 0348be41b..26d10ab27 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserId.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserId.java @@ -81,13 +81,13 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public UserId deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); } catch (RuntimeException e) { } - if (value instanceof Integer) { - return of((Integer) value); - } throw new JsonParseException(p, "Failed to deserialize"); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/UserIdentityProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/UserIdentityProviderEnum.java index 4897abd71..1a94d77bd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserIdentityProviderEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserIdentityProviderEnum.java @@ -7,129 +7,129 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class UserIdentityProviderEnum { - public static final UserIdentityProviderEnum SHOP = new UserIdentityProviderEnum(Value.SHOP, "shop"); + public static final UserIdentityProviderEnum AD = new UserIdentityProviderEnum(Value.AD, "ad"); - public static final UserIdentityProviderEnum AUTH0OIDC = - new UserIdentityProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); + public static final UserIdentityProviderEnum BAIDU = new UserIdentityProviderEnum(Value.BAIDU, "baidu"); - public static final UserIdentityProviderEnum DWOLLA = new UserIdentityProviderEnum(Value.DWOLLA, "dwolla"); + public static final UserIdentityProviderEnum BITLY = new UserIdentityProviderEnum(Value.BITLY, "bitly"); - public static final UserIdentityProviderEnum OKTA = new UserIdentityProviderEnum(Value.OKTA, "okta"); + public static final UserIdentityProviderEnum PAYPAL_SANDBOX = + new UserIdentityProviderEnum(Value.PAYPAL_SANDBOX, "paypal-sandbox"); - public static final UserIdentityProviderEnum PLANNINGCENTER = - new UserIdentityProviderEnum(Value.PLANNINGCENTER, "planningcenter"); + public static final UserIdentityProviderEnum SAMLP = new UserIdentityProviderEnum(Value.SAMLP, "samlp"); - public static final UserIdentityProviderEnum GOOGLE_OAUTH2 = - new UserIdentityProviderEnum(Value.GOOGLE_OAUTH2, "google-oauth2"); + public static final UserIdentityProviderEnum DROPBOX = new UserIdentityProviderEnum(Value.DROPBOX, "dropbox"); - public static final UserIdentityProviderEnum AUTH0 = new UserIdentityProviderEnum(Value.AUTH0, "auth0"); + public static final UserIdentityProviderEnum VKONTAKTE = new UserIdentityProviderEnum(Value.VKONTAKTE, "vkontakte"); - public static final UserIdentityProviderEnum EXACT = new UserIdentityProviderEnum(Value.EXACT, "exact"); + public static final UserIdentityProviderEnum INSTAGRAM = new UserIdentityProviderEnum(Value.INSTAGRAM, "instagram"); - public static final UserIdentityProviderEnum WORDPRESS = new UserIdentityProviderEnum(Value.WORDPRESS, "wordpress"); + public static final UserIdentityProviderEnum PINGFEDERATE = + new UserIdentityProviderEnum(Value.PINGFEDERATE, "pingfederate"); - public static final UserIdentityProviderEnum FITBIT = new UserIdentityProviderEnum(Value.FITBIT, "fitbit"); + public static final UserIdentityProviderEnum THIRTYSEVENSIGNALS = + new UserIdentityProviderEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); - public static final UserIdentityProviderEnum EVERNOTE = new UserIdentityProviderEnum(Value.EVERNOTE, "evernote"); + public static final UserIdentityProviderEnum WAAD = new UserIdentityProviderEnum(Value.WAAD, "waad"); - public static final UserIdentityProviderEnum SHAREPOINT = - new UserIdentityProviderEnum(Value.SHAREPOINT, "sharepoint"); + public static final UserIdentityProviderEnum OIDC = new UserIdentityProviderEnum(Value.OIDC, "oidc"); - public static final UserIdentityProviderEnum SHOPIFY = new UserIdentityProviderEnum(Value.SHOPIFY, "shopify"); + public static final UserIdentityProviderEnum SALESFORCE_COMMUNITY = + new UserIdentityProviderEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community"); - public static final UserIdentityProviderEnum SALESFORCE_SANDBOX = - new UserIdentityProviderEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); + public static final UserIdentityProviderEnum DACCOUNT = new UserIdentityProviderEnum(Value.DACCOUNT, "daccount"); - public static final UserIdentityProviderEnum FACEBOOK = new UserIdentityProviderEnum(Value.FACEBOOK, "facebook"); + public static final UserIdentityProviderEnum SOUNDCLOUD = + new UserIdentityProviderEnum(Value.SOUNDCLOUD, "soundcloud"); - public static final UserIdentityProviderEnum OAUTH1 = new UserIdentityProviderEnum(Value.OAUTH1, "oauth1"); + public static final UserIdentityProviderEnum EVERNOTE_SANDBOX = + new UserIdentityProviderEnum(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); - public static final UserIdentityProviderEnum APPLE = new UserIdentityProviderEnum(Value.APPLE, "apple"); + public static final UserIdentityProviderEnum OAUTH2 = new UserIdentityProviderEnum(Value.OAUTH2, "oauth2"); - public static final UserIdentityProviderEnum UNTAPPD = new UserIdentityProviderEnum(Value.UNTAPPD, "untappd"); + public static final UserIdentityProviderEnum BOX = new UserIdentityProviderEnum(Value.BOX, "box"); - public static final UserIdentityProviderEnum AMAZON = new UserIdentityProviderEnum(Value.AMAZON, "amazon"); + public static final UserIdentityProviderEnum IP = new UserIdentityProviderEnum(Value.IP, "ip"); - public static final UserIdentityProviderEnum LINE = new UserIdentityProviderEnum(Value.LINE, "line"); + public static final UserIdentityProviderEnum ADFS = new UserIdentityProviderEnum(Value.ADFS, "adfs"); - public static final UserIdentityProviderEnum BITBUCKET = new UserIdentityProviderEnum(Value.BITBUCKET, "bitbucket"); + public static final UserIdentityProviderEnum EMAIL = new UserIdentityProviderEnum(Value.EMAIL, "email"); - public static final UserIdentityProviderEnum GITHUB = new UserIdentityProviderEnum(Value.GITHUB, "github"); + public static final UserIdentityProviderEnum YAHOO = new UserIdentityProviderEnum(Value.YAHOO, "yahoo"); - public static final UserIdentityProviderEnum SALESFORCE = - new UserIdentityProviderEnum(Value.SALESFORCE, "salesforce"); + public static final UserIdentityProviderEnum WEIBO = new UserIdentityProviderEnum(Value.WEIBO, "weibo"); - public static final UserIdentityProviderEnum OFFICE365 = new UserIdentityProviderEnum(Value.OFFICE365, "office365"); + public static final UserIdentityProviderEnum CUSTOM = new UserIdentityProviderEnum(Value.CUSTOM, "custom"); - public static final UserIdentityProviderEnum SMS = new UserIdentityProviderEnum(Value.SMS, "sms"); + public static final UserIdentityProviderEnum PAYPAL = new UserIdentityProviderEnum(Value.PAYPAL, "paypal"); - public static final UserIdentityProviderEnum TWITTER = new UserIdentityProviderEnum(Value.TWITTER, "twitter"); + public static final UserIdentityProviderEnum LINKEDIN = new UserIdentityProviderEnum(Value.LINKEDIN, "linkedin"); - public static final UserIdentityProviderEnum WINDOWSLIVE = - new UserIdentityProviderEnum(Value.WINDOWSLIVE, "windowslive"); + public static final UserIdentityProviderEnum GOOGLE_APPS = + new UserIdentityProviderEnum(Value.GOOGLE_APPS, "google-apps"); - public static final UserIdentityProviderEnum YANDEX = new UserIdentityProviderEnum(Value.YANDEX, "yandex"); + public static final UserIdentityProviderEnum DWOLLA = new UserIdentityProviderEnum(Value.DWOLLA, "dwolla"); - public static final UserIdentityProviderEnum AD = new UserIdentityProviderEnum(Value.AD, "ad"); + public static final UserIdentityProviderEnum SHOP = new UserIdentityProviderEnum(Value.SHOP, "shop"); - public static final UserIdentityProviderEnum BAIDU = new UserIdentityProviderEnum(Value.BAIDU, "baidu"); + public static final UserIdentityProviderEnum AUTH0OIDC = + new UserIdentityProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); - public static final UserIdentityProviderEnum BITLY = new UserIdentityProviderEnum(Value.BITLY, "bitly"); + public static final UserIdentityProviderEnum PLANNINGCENTER = + new UserIdentityProviderEnum(Value.PLANNINGCENTER, "planningcenter"); - public static final UserIdentityProviderEnum PAYPAL_SANDBOX = - new UserIdentityProviderEnum(Value.PAYPAL_SANDBOX, "paypal-sandbox"); + public static final UserIdentityProviderEnum OKTA = new UserIdentityProviderEnum(Value.OKTA, "okta"); - public static final UserIdentityProviderEnum SAMLP = new UserIdentityProviderEnum(Value.SAMLP, "samlp"); + public static final UserIdentityProviderEnum AUTH0 = new UserIdentityProviderEnum(Value.AUTH0, "auth0"); - public static final UserIdentityProviderEnum DROPBOX = new UserIdentityProviderEnum(Value.DROPBOX, "dropbox"); + public static final UserIdentityProviderEnum GOOGLE_OAUTH2 = + new UserIdentityProviderEnum(Value.GOOGLE_OAUTH2, "google-oauth2"); - public static final UserIdentityProviderEnum VKONTAKTE = new UserIdentityProviderEnum(Value.VKONTAKTE, "vkontakte"); + public static final UserIdentityProviderEnum WORDPRESS = new UserIdentityProviderEnum(Value.WORDPRESS, "wordpress"); - public static final UserIdentityProviderEnum PINGFEDERATE = - new UserIdentityProviderEnum(Value.PINGFEDERATE, "pingfederate"); + public static final UserIdentityProviderEnum EXACT = new UserIdentityProviderEnum(Value.EXACT, "exact"); - public static final UserIdentityProviderEnum INSTAGRAM = new UserIdentityProviderEnum(Value.INSTAGRAM, "instagram"); + public static final UserIdentityProviderEnum FITBIT = new UserIdentityProviderEnum(Value.FITBIT, "fitbit"); - public static final UserIdentityProviderEnum THIRTYSEVENSIGNALS = - new UserIdentityProviderEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); + public static final UserIdentityProviderEnum EVERNOTE = new UserIdentityProviderEnum(Value.EVERNOTE, "evernote"); - public static final UserIdentityProviderEnum WAAD = new UserIdentityProviderEnum(Value.WAAD, "waad"); + public static final UserIdentityProviderEnum SHAREPOINT = + new UserIdentityProviderEnum(Value.SHAREPOINT, "sharepoint"); - public static final UserIdentityProviderEnum OIDC = new UserIdentityProviderEnum(Value.OIDC, "oidc"); + public static final UserIdentityProviderEnum SHOPIFY = new UserIdentityProviderEnum(Value.SHOPIFY, "shopify"); - public static final UserIdentityProviderEnum EVERNOTE_SANDBOX = - new UserIdentityProviderEnum(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); + public static final UserIdentityProviderEnum SALESFORCE_SANDBOX = + new UserIdentityProviderEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); - public static final UserIdentityProviderEnum SALESFORCE_COMMUNITY = - new UserIdentityProviderEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community"); + public static final UserIdentityProviderEnum FACEBOOK = new UserIdentityProviderEnum(Value.FACEBOOK, "facebook"); - public static final UserIdentityProviderEnum DACCOUNT = new UserIdentityProviderEnum(Value.DACCOUNT, "daccount"); + public static final UserIdentityProviderEnum APPLE = new UserIdentityProviderEnum(Value.APPLE, "apple"); - public static final UserIdentityProviderEnum SOUNDCLOUD = - new UserIdentityProviderEnum(Value.SOUNDCLOUD, "soundcloud"); + public static final UserIdentityProviderEnum OAUTH1 = new UserIdentityProviderEnum(Value.OAUTH1, "oauth1"); - public static final UserIdentityProviderEnum OAUTH2 = new UserIdentityProviderEnum(Value.OAUTH2, "oauth2"); + public static final UserIdentityProviderEnum AMAZON = new UserIdentityProviderEnum(Value.AMAZON, "amazon"); - public static final UserIdentityProviderEnum BOX = new UserIdentityProviderEnum(Value.BOX, "box"); + public static final UserIdentityProviderEnum LINE = new UserIdentityProviderEnum(Value.LINE, "line"); - public static final UserIdentityProviderEnum IP = new UserIdentityProviderEnum(Value.IP, "ip"); + public static final UserIdentityProviderEnum UNTAPPD = new UserIdentityProviderEnum(Value.UNTAPPD, "untappd"); - public static final UserIdentityProviderEnum ADFS = new UserIdentityProviderEnum(Value.ADFS, "adfs"); + public static final UserIdentityProviderEnum GITHUB = new UserIdentityProviderEnum(Value.GITHUB, "github"); - public static final UserIdentityProviderEnum EMAIL = new UserIdentityProviderEnum(Value.EMAIL, "email"); + public static final UserIdentityProviderEnum SALESFORCE = + new UserIdentityProviderEnum(Value.SALESFORCE, "salesforce"); - public static final UserIdentityProviderEnum CUSTOM = new UserIdentityProviderEnum(Value.CUSTOM, "custom"); + public static final UserIdentityProviderEnum BITBUCKET = new UserIdentityProviderEnum(Value.BITBUCKET, "bitbucket"); - public static final UserIdentityProviderEnum YAHOO = new UserIdentityProviderEnum(Value.YAHOO, "yahoo"); + public static final UserIdentityProviderEnum OFFICE365 = new UserIdentityProviderEnum(Value.OFFICE365, "office365"); - public static final UserIdentityProviderEnum WEIBO = new UserIdentityProviderEnum(Value.WEIBO, "weibo"); + public static final UserIdentityProviderEnum SMS = new UserIdentityProviderEnum(Value.SMS, "sms"); - public static final UserIdentityProviderEnum GOOGLE_APPS = - new UserIdentityProviderEnum(Value.GOOGLE_APPS, "google-apps"); + public static final UserIdentityProviderEnum WINDOWSLIVE = + new UserIdentityProviderEnum(Value.WINDOWSLIVE, "windowslive"); - public static final UserIdentityProviderEnum PAYPAL = new UserIdentityProviderEnum(Value.PAYPAL, "paypal"); + public static final UserIdentityProviderEnum YANDEX = new UserIdentityProviderEnum(Value.YANDEX, "yandex"); - public static final UserIdentityProviderEnum LINKEDIN = new UserIdentityProviderEnum(Value.LINKEDIN, "linkedin"); + public static final UserIdentityProviderEnum TWITTER = new UserIdentityProviderEnum(Value.TWITTER, "twitter"); private final Value value; @@ -164,62 +164,6 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case SHOP: - return visitor.visitShop(); - case AUTH0OIDC: - return visitor.visitAuth0Oidc(); - case DWOLLA: - return visitor.visitDwolla(); - case OKTA: - return visitor.visitOkta(); - case PLANNINGCENTER: - return visitor.visitPlanningcenter(); - case GOOGLE_OAUTH2: - return visitor.visitGoogleOauth2(); - case AUTH0: - return visitor.visitAuth0(); - case EXACT: - return visitor.visitExact(); - case WORDPRESS: - return visitor.visitWordpress(); - case FITBIT: - return visitor.visitFitbit(); - case EVERNOTE: - return visitor.visitEvernote(); - case SHAREPOINT: - return visitor.visitSharepoint(); - case SHOPIFY: - return visitor.visitShopify(); - case SALESFORCE_SANDBOX: - return visitor.visitSalesforceSandbox(); - case FACEBOOK: - return visitor.visitFacebook(); - case OAUTH1: - return visitor.visitOauth1(); - case APPLE: - return visitor.visitApple(); - case UNTAPPD: - return visitor.visitUntappd(); - case AMAZON: - return visitor.visitAmazon(); - case LINE: - return visitor.visitLine(); - case BITBUCKET: - return visitor.visitBitbucket(); - case GITHUB: - return visitor.visitGithub(); - case SALESFORCE: - return visitor.visitSalesforce(); - case OFFICE365: - return visitor.visitOffice365(); - case SMS: - return visitor.visitSms(); - case TWITTER: - return visitor.visitTwitter(); - case WINDOWSLIVE: - return visitor.visitWindowslive(); - case YANDEX: - return visitor.visitYandex(); case AD: return visitor.visitAd(); case BAIDU: @@ -234,24 +178,24 @@ public T visit(Visitor visitor) { return visitor.visitDropbox(); case VKONTAKTE: return visitor.visitVkontakte(); - case PINGFEDERATE: - return visitor.visitPingfederate(); case INSTAGRAM: return visitor.visitInstagram(); + case PINGFEDERATE: + return visitor.visitPingfederate(); case THIRTYSEVENSIGNALS: return visitor.visitThirtysevensignals(); case WAAD: return visitor.visitWaad(); case OIDC: return visitor.visitOidc(); - case EVERNOTE_SANDBOX: - return visitor.visitEvernoteSandbox(); case SALESFORCE_COMMUNITY: return visitor.visitSalesforceCommunity(); case DACCOUNT: return visitor.visitDaccount(); case SOUNDCLOUD: return visitor.visitSoundcloud(); + case EVERNOTE_SANDBOX: + return visitor.visitEvernoteSandbox(); case OAUTH2: return visitor.visitOauth2(); case BOX: @@ -262,18 +206,74 @@ public T visit(Visitor visitor) { return visitor.visitAdfs(); case EMAIL: return visitor.visitEmail(); - case CUSTOM: - return visitor.visitCustom(); case YAHOO: return visitor.visitYahoo(); case WEIBO: return visitor.visitWeibo(); - case GOOGLE_APPS: - return visitor.visitGoogleApps(); + case CUSTOM: + return visitor.visitCustom(); case PAYPAL: return visitor.visitPaypal(); case LINKEDIN: return visitor.visitLinkedin(); + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case DWOLLA: + return visitor.visitDwolla(); + case SHOP: + return visitor.visitShop(); + case AUTH0OIDC: + return visitor.visitAuth0Oidc(); + case PLANNINGCENTER: + return visitor.visitPlanningcenter(); + case OKTA: + return visitor.visitOkta(); + case AUTH0: + return visitor.visitAuth0(); + case GOOGLE_OAUTH2: + return visitor.visitGoogleOauth2(); + case WORDPRESS: + return visitor.visitWordpress(); + case EXACT: + return visitor.visitExact(); + case FITBIT: + return visitor.visitFitbit(); + case EVERNOTE: + return visitor.visitEvernote(); + case SHAREPOINT: + return visitor.visitSharepoint(); + case SHOPIFY: + return visitor.visitShopify(); + case SALESFORCE_SANDBOX: + return visitor.visitSalesforceSandbox(); + case FACEBOOK: + return visitor.visitFacebook(); + case APPLE: + return visitor.visitApple(); + case OAUTH1: + return visitor.visitOauth1(); + case AMAZON: + return visitor.visitAmazon(); + case LINE: + return visitor.visitLine(); + case UNTAPPD: + return visitor.visitUntappd(); + case GITHUB: + return visitor.visitGithub(); + case SALESFORCE: + return visitor.visitSalesforce(); + case BITBUCKET: + return visitor.visitBitbucket(); + case OFFICE365: + return visitor.visitOffice365(); + case SMS: + return visitor.visitSms(); + case WINDOWSLIVE: + return visitor.visitWindowslive(); + case YANDEX: + return visitor.visitYandex(); + case TWITTER: + return visitor.visitTwitter(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -283,62 +283,6 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static UserIdentityProviderEnum valueOf(String value) { switch (value) { - case "shop": - return SHOP; - case "auth0-oidc": - return AUTH0OIDC; - case "dwolla": - return DWOLLA; - case "okta": - return OKTA; - case "planningcenter": - return PLANNINGCENTER; - case "google-oauth2": - return GOOGLE_OAUTH2; - case "auth0": - return AUTH0; - case "exact": - return EXACT; - case "wordpress": - return WORDPRESS; - case "fitbit": - return FITBIT; - case "evernote": - return EVERNOTE; - case "sharepoint": - return SHAREPOINT; - case "shopify": - return SHOPIFY; - case "salesforce-sandbox": - return SALESFORCE_SANDBOX; - case "facebook": - return FACEBOOK; - case "oauth1": - return OAUTH1; - case "apple": - return APPLE; - case "untappd": - return UNTAPPD; - case "amazon": - return AMAZON; - case "line": - return LINE; - case "bitbucket": - return BITBUCKET; - case "github": - return GITHUB; - case "salesforce": - return SALESFORCE; - case "office365": - return OFFICE365; - case "sms": - return SMS; - case "twitter": - return TWITTER; - case "windowslive": - return WINDOWSLIVE; - case "yandex": - return YANDEX; case "ad": return AD; case "baidu": @@ -353,24 +297,24 @@ public static UserIdentityProviderEnum valueOf(String value) { return DROPBOX; case "vkontakte": return VKONTAKTE; - case "pingfederate": - return PINGFEDERATE; case "instagram": return INSTAGRAM; + case "pingfederate": + return PINGFEDERATE; case "thirtysevensignals": return THIRTYSEVENSIGNALS; case "waad": return WAAD; case "oidc": return OIDC; - case "evernote-sandbox": - return EVERNOTE_SANDBOX; case "salesforce-community": return SALESFORCE_COMMUNITY; case "daccount": return DACCOUNT; case "soundcloud": return SOUNDCLOUD; + case "evernote-sandbox": + return EVERNOTE_SANDBOX; case "oauth2": return OAUTH2; case "box": @@ -381,18 +325,74 @@ public static UserIdentityProviderEnum valueOf(String value) { return ADFS; case "email": return EMAIL; - case "custom": - return CUSTOM; case "yahoo": return YAHOO; case "weibo": return WEIBO; - case "google-apps": - return GOOGLE_APPS; + case "custom": + return CUSTOM; case "paypal": return PAYPAL; case "linkedin": return LINKEDIN; + case "google-apps": + return GOOGLE_APPS; + case "dwolla": + return DWOLLA; + case "shop": + return SHOP; + case "auth0-oidc": + return AUTH0OIDC; + case "planningcenter": + return PLANNINGCENTER; + case "okta": + return OKTA; + case "auth0": + return AUTH0; + case "google-oauth2": + return GOOGLE_OAUTH2; + case "wordpress": + return WORDPRESS; + case "exact": + return EXACT; + case "fitbit": + return FITBIT; + case "evernote": + return EVERNOTE; + case "sharepoint": + return SHAREPOINT; + case "shopify": + return SHOPIFY; + case "salesforce-sandbox": + return SALESFORCE_SANDBOX; + case "facebook": + return FACEBOOK; + case "apple": + return APPLE; + case "oauth1": + return OAUTH1; + case "amazon": + return AMAZON; + case "line": + return LINE; + case "untappd": + return UNTAPPD; + case "github": + return GITHUB; + case "salesforce": + return SALESFORCE; + case "bitbucket": + return BITBUCKET; + case "office365": + return OFFICE365; + case "sms": + return SMS; + case "windowslive": + return WINDOWSLIVE; + case "yandex": + return YANDEX; + case "twitter": + return TWITTER; default: return new UserIdentityProviderEnum(Value.UNKNOWN, value); } diff --git a/src/main/java/com/auth0/client/mgmt/users/types/GetUserConnectedAccountsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/GetUserConnectedAccountsRequestParameters.java index ccd02b694..bbfe51874 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/GetUserConnectedAccountsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/GetUserConnectedAccountsRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -139,7 +142,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results to return. Defaults to 10 with a maximum of 20

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/users/types/GetUserGroupsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/GetUserGroupsRequestParameters.java index ded4bb233..6ee63b76a 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/GetUserGroupsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/GetUserGroupsRequestParameters.java @@ -83,6 +83,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -247,7 +250,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListRefreshTokensRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListRefreshTokensRequestParameters.java index 291c81f50..0c2067424 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListRefreshTokensRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListRefreshTokensRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -139,7 +142,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserAuthenticationMethodsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserAuthenticationMethodsRequestParameters.java index 5e5b8d2ee..adfa218aa 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserAuthenticationMethodsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserAuthenticationMethodsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.users.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListUserAuthenticationMethodsRequestParameters.Builder.class) @@ -46,6 +46,9 @@ private ListUserAuthenticationMethodsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -54,6 +57,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -62,6 +68,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -119,7 +128,7 @@ public Builder from(ListUserAuthenticationMethodsRequestParameters other) { *

Page index of the results to return. First page is 0. Default is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -138,7 +147,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -153,7 +162,7 @@ public Builder page(Nullable page) { *

Number of results per page. Default is 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -172,7 +181,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -187,7 +196,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -206,7 +215,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserLogsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserLogsRequestParameters.java index 4d12b6196..cb2089069 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserLogsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserLogsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.users.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListUserLogsRequestParameters.Builder.class) @@ -50,6 +50,9 @@ private ListUserLogsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -58,6 +61,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -77,6 +83,9 @@ public OptionalNullable getSort() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -139,7 +148,7 @@ public Builder from(ListUserLogsRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -158,7 +167,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -173,7 +182,7 @@ public Builder page(Nullable page) { *

Number of results per page. Paging is disabled if parameter not sent.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -192,7 +201,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -207,7 +216,7 @@ public Builder perPage(Nullable perPage) { *

Field to sort by. Use fieldname:1 for ascending order and fieldname:-1 for descending.

*/ @JsonSetter(value = "sort", nulls = Nulls.SKIP) - public Builder sort(@org.jetbrains.annotations.Nullable OptionalNullable sort) { + public Builder sort(@Nullable OptionalNullable sort) { this.sort = sort; return this; } @@ -226,7 +235,7 @@ public Builder sort(Optional sort) { return this; } - public Builder sort(Nullable sort) { + public Builder sort(com.auth0.client.mgmt.core.Nullable sort) { if (sort.isNull()) { this.sort = OptionalNullable.ofNull(); } else if (sort.isEmpty()) { @@ -241,7 +250,7 @@ public Builder sort(Nullable sort) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -260,7 +269,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserOrganizationsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserOrganizationsRequestParameters.java index 67f9f716d..28f64e786 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserOrganizationsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserOrganizationsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.users.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListUserOrganizationsRequestParameters.Builder.class) @@ -46,6 +46,9 @@ private ListUserOrganizationsRequestParameters( */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -54,6 +57,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -62,6 +68,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -119,7 +128,7 @@ public Builder from(ListUserOrganizationsRequestParameters other) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -138,7 +147,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -153,7 +162,7 @@ public Builder page(Nullable page) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -172,7 +181,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -187,7 +196,7 @@ public Builder perPage(Nullable perPage) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -206,7 +215,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserPermissionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserPermissionsRequestParameters.java index 39a2763e2..0aa312f92 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserPermissionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserPermissionsRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.users.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListUserPermissionsRequestParameters.Builder.class) @@ -46,6 +46,9 @@ private ListUserPermissionsRequestParameters( */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -54,6 +57,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -62,6 +68,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -119,7 +128,7 @@ public Builder from(ListUserPermissionsRequestParameters other) { *

Number of results per page.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -138,7 +147,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -153,7 +162,7 @@ public Builder perPage(Nullable perPage) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -172,7 +181,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -187,7 +196,7 @@ public Builder page(Nullable page) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -206,7 +215,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserRolesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserRolesRequestParameters.java index e621bd7ce..72499547f 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserRolesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserRolesRequestParameters.java @@ -3,7 +3,6 @@ */ package com.auth0.client.mgmt.users.types; -import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,6 +17,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListUserRolesRequestParameters.Builder.class) @@ -46,6 +46,9 @@ private ListUserRolesRequestParameters( */ @JsonIgnore public OptionalNullable getPerPage() { + if (perPage == null) { + return OptionalNullable.absent(); + } return perPage; } @@ -54,6 +57,9 @@ public OptionalNullable getPerPage() { */ @JsonIgnore public OptionalNullable getPage() { + if (page == null) { + return OptionalNullable.absent(); + } return page; } @@ -62,6 +68,9 @@ public OptionalNullable getPage() { */ @JsonIgnore public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } return includeTotals; } @@ -118,7 +127,7 @@ public Builder from(ListUserRolesRequestParameters other) { *

Number of results per page.

*/ @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { + public Builder perPage(@Nullable OptionalNullable perPage) { this.perPage = perPage; return this; } @@ -137,7 +146,7 @@ public Builder perPage(Optional perPage) { return this; } - public Builder perPage(Nullable perPage) { + public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { if (perPage.isNull()) { this.perPage = OptionalNullable.ofNull(); } else if (perPage.isEmpty()) { @@ -152,7 +161,7 @@ public Builder perPage(Nullable perPage) { *

Page index of the results to return. First page is 0.

*/ @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { + public Builder page(@Nullable OptionalNullable page) { this.page = page; return this; } @@ -171,7 +180,7 @@ public Builder page(Optional page) { return this; } - public Builder page(Nullable page) { + public Builder page(com.auth0.client.mgmt.core.Nullable page) { if (page.isNull()) { this.page = OptionalNullable.ofNull(); } else if (page.isEmpty()) { @@ -186,7 +195,7 @@ public Builder page(Nullable page) { *

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

*/ @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(OptionalNullable includeTotals) { + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { this.includeTotals = includeTotals; return this; } @@ -205,7 +214,7 @@ public Builder includeTotals(Optional includeTotals) { return this; } - public Builder includeTotals(Nullable includeTotals) { + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { if (includeTotals.isNull()) { this.includeTotals = OptionalNullable.ofNull(); } else if (includeTotals.isEmpty()) { diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserSessionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserSessionsRequestParameters.java index c5d9b1c79..75bf5cd8e 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserSessionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserSessionsRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -138,7 +141,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/ListVerifiableCredentialTemplatesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/ListVerifiableCredentialTemplatesRequestParameters.java index 9e799de72..3d5b0658a 100644 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/ListVerifiableCredentialTemplatesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/ListVerifiableCredentialTemplatesRequestParameters.java @@ -51,6 +51,9 @@ public OptionalNullable getFrom() { */ @JsonIgnore public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } return take; } @@ -139,7 +142,7 @@ public Builder from(com.auth0.client.mgmt.core.Nullable from) { *

Number of results per page. Defaults to 50.

*/ @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(OptionalNullable take) { + public Builder take(@Nullable OptionalNullable take) { this.take = take; return this; } diff --git a/src/test/java/com/auth0/client/mgmt/ActionsExecutionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsExecutionsWireTest.java index 4365fd7d7..166c05b89 100644 --- a/src/test/java/com/auth0/client/mgmt/ActionsExecutionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ActionsExecutionsWireTest.java @@ -110,7 +110,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ActionsModulesVersionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsModulesVersionsWireTest.java index 7e9fc41d7..7fa7b9ed0 100644 --- a/src/test/java/com/auth0/client/mgmt/ActionsModulesVersionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ActionsModulesVersionsWireTest.java @@ -213,7 +213,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ActionsModulesWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsModulesWireTest.java index e8c3b02ff..f772b44ef 100644 --- a/src/test/java/com/auth0/client/mgmt/ActionsModulesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ActionsModulesWireTest.java @@ -541,7 +541,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ActionsTriggersBindingsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsTriggersBindingsWireTest.java index 18057dc2a..a6a673b8f 100644 --- a/src/test/java/com/auth0/client/mgmt/ActionsTriggersBindingsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ActionsTriggersBindingsWireTest.java @@ -172,7 +172,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ActionsTriggersWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsTriggersWireTest.java index 61514fa98..c853c3f0d 100644 --- a/src/test/java/com/auth0/client/mgmt/ActionsTriggersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ActionsTriggersWireTest.java @@ -115,7 +115,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ActionsVersionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsVersionsWireTest.java index ce7add32c..519274b6f 100644 --- a/src/test/java/com/auth0/client/mgmt/ActionsVersionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ActionsVersionsWireTest.java @@ -171,7 +171,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ActionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsWireTest.java index 50015040f..424ad76d6 100644 --- a/src/test/java/com/auth0/client/mgmt/ActionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ActionsWireTest.java @@ -441,7 +441,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/AnomalyBlocksWireTest.java b/src/test/java/com/auth0/client/mgmt/AnomalyBlocksWireTest.java index 091e49ac3..5c53e68a7 100644 --- a/src/test/java/com/auth0/client/mgmt/AnomalyBlocksWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/AnomalyBlocksWireTest.java @@ -65,7 +65,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/AttackProtectionBotDetectionWireTest.java b/src/test/java/com/auth0/client/mgmt/AttackProtectionBotDetectionWireTest.java index ef08312ec..a4190cfc5 100644 --- a/src/test/java/com/auth0/client/mgmt/AttackProtectionBotDetectionWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/AttackProtectionBotDetectionWireTest.java @@ -196,7 +196,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/AttackProtectionBreachedPasswordDetectionWireTest.java b/src/test/java/com/auth0/client/mgmt/AttackProtectionBreachedPasswordDetectionWireTest.java index ca93b7b9c..5af9a45f1 100644 --- a/src/test/java/com/auth0/client/mgmt/AttackProtectionBreachedPasswordDetectionWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/AttackProtectionBreachedPasswordDetectionWireTest.java @@ -221,7 +221,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/AttackProtectionBruteForceProtectionWireTest.java b/src/test/java/com/auth0/client/mgmt/AttackProtectionBruteForceProtectionWireTest.java index ac8b495d8..2a2a45561 100644 --- a/src/test/java/com/auth0/client/mgmt/AttackProtectionBruteForceProtectionWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/AttackProtectionBruteForceProtectionWireTest.java @@ -198,7 +198,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/AttackProtectionCaptchaWireTest.java b/src/test/java/com/auth0/client/mgmt/AttackProtectionCaptchaWireTest.java index 037385971..70931c844 100644 --- a/src/test/java/com/auth0/client/mgmt/AttackProtectionCaptchaWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/AttackProtectionCaptchaWireTest.java @@ -232,7 +232,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/AttackProtectionSuspiciousIpThrottlingWireTest.java b/src/test/java/com/auth0/client/mgmt/AttackProtectionSuspiciousIpThrottlingWireTest.java index 0c3572915..7caa8b9a3 100644 --- a/src/test/java/com/auth0/client/mgmt/AttackProtectionSuspiciousIpThrottlingWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/AttackProtectionSuspiciousIpThrottlingWireTest.java @@ -215,7 +215,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/BrandingPhoneProvidersWireTest.java b/src/test/java/com/auth0/client/mgmt/BrandingPhoneProvidersWireTest.java index 192ab6c2d..24bbe8ac5 100644 --- a/src/test/java/com/auth0/client/mgmt/BrandingPhoneProvidersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/BrandingPhoneProvidersWireTest.java @@ -489,7 +489,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/BrandingPhoneTemplatesWireTest.java b/src/test/java/com/auth0/client/mgmt/BrandingPhoneTemplatesWireTest.java index d8525f792..f4ff1e235 100644 --- a/src/test/java/com/auth0/client/mgmt/BrandingPhoneTemplatesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/BrandingPhoneTemplatesWireTest.java @@ -566,7 +566,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/BrandingTemplatesWireTest.java b/src/test/java/com/auth0/client/mgmt/BrandingTemplatesWireTest.java index 328016220..c09ab153c 100644 --- a/src/test/java/com/auth0/client/mgmt/BrandingTemplatesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/BrandingTemplatesWireTest.java @@ -140,7 +140,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/BrandingThemesWireTest.java b/src/test/java/com/auth0/client/mgmt/BrandingThemesWireTest.java index 1ad2a8c35..8b2772277 100644 --- a/src/test/java/com/auth0/client/mgmt/BrandingThemesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/BrandingThemesWireTest.java @@ -474,7 +474,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/BrandingWireTest.java b/src/test/java/com/auth0/client/mgmt/BrandingWireTest.java index 5757c35b8..55ed3fd66 100644 --- a/src/test/java/com/auth0/client/mgmt/BrandingWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/BrandingWireTest.java @@ -40,7 +40,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"},\"favicon_url\":\"favicon_url\",\"logo_url\":\"logo_url\",\"font\":{\"url\":\"url\"}}")); + "{\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"},\"favicon_url\":\"favicon_url\",\"logo_url\":\"logo_url\",\"identifiers\":{\"login_display\":\"unified\",\"otp_autocomplete\":true,\"phone_display\":{\"masking\":\"show_all\",\"formatting\":\"regional\"}},\"font\":{\"url\":\"url\"}}")); GetBrandingResponseContent response = client.branding().get(); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -57,6 +57,14 @@ public void testGet() throws Exception { + " },\n" + " \"favicon_url\": \"favicon_url\",\n" + " \"logo_url\": \"logo_url\",\n" + + " \"identifiers\": {\n" + + " \"login_display\": \"unified\",\n" + + " \"otp_autocomplete\": true,\n" + + " \"phone_display\": {\n" + + " \"masking\": \"show_all\",\n" + + " \"formatting\": \"regional\"\n" + + " }\n" + + " },\n" + " \"font\": {\n" + " \"url\": \"url\"\n" + " }\n" @@ -98,7 +106,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"},\"favicon_url\":\"favicon_url\",\"logo_url\":\"logo_url\",\"font\":{\"url\":\"url\"}}")); + "{\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"},\"favicon_url\":\"favicon_url\",\"logo_url\":\"logo_url\",\"identifiers\":{\"login_display\":\"unified\",\"otp_autocomplete\":true,\"phone_display\":{\"masking\":\"show_all\",\"formatting\":\"regional\"}},\"font\":{\"url\":\"url\"}}")); UpdateBrandingResponseContent response = client.branding().update(UpdateBrandingRequestContent.builder().build()); RecordedRequest request = server.takeRequest(); @@ -145,6 +153,14 @@ else if (actualJson.has("kind")) + " },\n" + " \"favicon_url\": \"favicon_url\",\n" + " \"logo_url\": \"logo_url\",\n" + + " \"identifiers\": {\n" + + " \"login_display\": \"unified\",\n" + + " \"otp_autocomplete\": true,\n" + + " \"phone_display\": {\n" + + " \"masking\": \"show_all\",\n" + + " \"formatting\": \"regional\"\n" + + " }\n" + + " },\n" + " \"font\": {\n" + " \"url\": \"url\"\n" + " }\n" @@ -196,7 +212,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ClientGrantsOrganizationsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientGrantsOrganizationsWireTest.java index b369e2a8f..ba082da03 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientGrantsOrganizationsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientGrantsOrganizationsWireTest.java @@ -76,7 +76,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java index 399a1a846..0afed0d60 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java @@ -348,7 +348,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java index 50dc2baa5..9e4fa7552 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java @@ -5,8 +5,11 @@ import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.ConnectionForList; +import com.auth0.client.mgmt.types.ConnectionStrategyEnum; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Arrays; +import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -51,6 +54,7 @@ public void testGet() throws Exception { .take(OptionalNullable.of(1)) .fields(OptionalNullable.of("fields")) .includeFields(OptionalNullable.of(true)) + .strategy(Arrays.asList(Optional.of(ConnectionStrategyEnum.AD))) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -78,7 +82,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ClientsCredentialsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientsCredentialsWireTest.java index de0dcec56..2c31982be 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientsCredentialsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientsCredentialsWireTest.java @@ -372,7 +372,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ClientsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientsWireTest.java index 766fea9bc..9daf459cb 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientsWireTest.java @@ -585,7 +585,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java index d20598b30..5fd615de0 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java @@ -409,7 +409,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsClientsWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsClientsWireTest.java index 249f7d76e..cfcb35959 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsClientsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsClientsWireTest.java @@ -122,7 +122,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningSynchronizationsWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningSynchronizationsWireTest.java index 728122b8b..0be8b5310 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningSynchronizationsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningSynchronizationsWireTest.java @@ -101,7 +101,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java index 57635a08f..75257a9eb 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java @@ -412,7 +412,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsKeysWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsKeysWireTest.java index 54ae99454..7783e78b5 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsKeysWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsKeysWireTest.java @@ -237,7 +237,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationTokensWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationTokensWireTest.java index 6b00ca842..75fc31731 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationTokensWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationTokensWireTest.java @@ -207,7 +207,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationWireTest.java index c20dc9372..7ba0ab3b5 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationWireTest.java @@ -374,7 +374,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsUsersWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsUsersWireTest.java index 7451bd971..ab1735dda 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsUsersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsUsersWireTest.java @@ -63,7 +63,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java index e6bb6919e..d94c4962d 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java @@ -5,6 +5,7 @@ import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.ConnectionForList; import com.auth0.client.mgmt.types.ConnectionIdentityProviderEnum; +import com.auth0.client.mgmt.types.ConnectionStrategyEnum; import com.auth0.client.mgmt.types.CreateConnectionRequestContent; import com.auth0.client.mgmt.types.CreateConnectionResponseContent; import com.auth0.client.mgmt.types.GetConnectionRequestParameters; @@ -14,6 +15,8 @@ import com.auth0.client.mgmt.types.UpdateConnectionResponseContent; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Arrays; +import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -56,6 +59,7 @@ public void testList() throws Exception { .name(OptionalNullable.of("name")) .fields(OptionalNullable.of("fields")) .includeFields(OptionalNullable.of(true)) + .strategy(Arrays.asList(Optional.of(ConnectionStrategyEnum.AD))) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -392,7 +396,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java b/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java index 6e2855a23..0249aef2a 100644 --- a/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java @@ -768,7 +768,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/DeviceCredentialsWireTest.java b/src/test/java/com/auth0/client/mgmt/DeviceCredentialsWireTest.java index c2e0481ca..2bfe290f1 100644 --- a/src/test/java/com/auth0/client/mgmt/DeviceCredentialsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/DeviceCredentialsWireTest.java @@ -176,7 +176,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/EmailTemplatesWireTest.java b/src/test/java/com/auth0/client/mgmt/EmailTemplatesWireTest.java index 591d3e903..fc3220cb1 100644 --- a/src/test/java/com/auth0/client/mgmt/EmailTemplatesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EmailTemplatesWireTest.java @@ -385,7 +385,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/EmailsProviderWireTest.java b/src/test/java/com/auth0/client/mgmt/EmailsProviderWireTest.java index 15d002af2..197c90262 100644 --- a/src/test/java/com/auth0/client/mgmt/EmailsProviderWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EmailsProviderWireTest.java @@ -330,7 +330,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java b/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java index f7859be51..6584e049c 100644 --- a/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java @@ -201,7 +201,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java b/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java index 5f4e16ba3..143fee3a0 100644 --- a/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java @@ -148,7 +148,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java b/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java index 9ab910df6..cef67a0d7 100644 --- a/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java @@ -490,7 +490,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/EventsWireTest.java b/src/test/java/com/auth0/client/mgmt/EventsWireTest.java new file mode 100644 index 000000000..d9cd523e3 --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/EventsWireTest.java @@ -0,0 +1,92 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.auth0.client.mgmt.types.EventStreamSubscribeEventsEventTypeEnum; +import com.auth0.client.mgmt.types.EventStreamSubscribeEventsEventTypeParam; +import com.auth0.client.mgmt.types.EventStreamSubscribeEventsResponseContent; +import com.auth0.client.mgmt.types.SubscribeEventsRequestParameters; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import okhttp3.mockwebserver.MockResponse; +import okhttp3.mockwebserver.MockWebServer; +import okhttp3.mockwebserver.RecordedRequest; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class EventsWireTest { + private MockWebServer server; + private ManagementApi client; + private ObjectMapper objectMapper = ObjectMappers.JSON_MAPPER; + + @BeforeEach + public void setup() throws Exception { + server = new MockWebServer(); + server.start(); + client = ManagementApi.builder() + .url(server.url("/").toString()) + .token("test-token") + .build(); + } + + @AfterEach + public void teardown() throws Exception { + server.shutdown(); + } + + @Test + public void testSubscribe() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + Iterable response = client.events() + .subscribe(SubscribeEventsRequestParameters.builder() + .from(OptionalNullable.of("from")) + .fromTimestamp(OptionalNullable.of("from_timestamp")) + .eventType(OptionalNullable.of(EventStreamSubscribeEventsEventTypeParam.of( + EventStreamSubscribeEventsEventTypeEnum.GROUP_CREATED))) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response deserialization + Assertions.assertNotNull(response, "Response should not be null"); + // Verify the response can be serialized back to JSON + String responseJson = objectMapper.writeValueAsString(response); + Assertions.assertNotNull(responseJson); + Assertions.assertFalse(responseJson.isEmpty()); + } + + /** + * Compares two JsonNodes with numeric equivalence and null safety. + * For objects, checks that all fields in 'expected' exist in 'actual' with matching values. + * Allows 'actual' to have extra fields (e.g., default values added during serialization). + */ + private boolean jsonEquals(JsonNode expected, JsonNode actual) { + if (expected == null && actual == null) return true; + if (expected == null || actual == null) return false; + if (expected.equals(actual)) return true; + if (expected.isNumber() && actual.isNumber()) + return Math.abs(expected.doubleValue() - actual.doubleValue()) < 1e-10; + if (expected.isObject() && actual.isObject()) { + java.util.Iterator> iter = expected.fields(); + while (iter.hasNext()) { + java.util.Map.Entry entry = iter.next(); + JsonNode actualValue = actual.get(entry.getKey()); + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; + } + return true; + } + if (expected.isArray() && actual.isArray()) { + if (expected.size() != actual.size()) return false; + for (int i = 0; i < expected.size(); i++) { + if (!jsonEquals(expected.get(i), actual.get(i))) return false; + } + return true; + } + return false; + } +} diff --git a/src/test/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java b/src/test/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java index e1379c3e0..624ea3292 100644 --- a/src/test/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java @@ -6,9 +6,12 @@ import com.auth0.client.mgmt.flows.types.GetFlowExecutionRequestParameters; import com.auth0.client.mgmt.flows.types.ListFlowExecutionsRequestParameters; import com.auth0.client.mgmt.types.FlowExecutionSummary; +import com.auth0.client.mgmt.types.GetFlowExecutionRequestParametersHydrateEnum; import com.auth0.client.mgmt.types.GetFlowExecutionResponseContent; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Arrays; +import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -74,7 +77,9 @@ public void testGet() throws Exception { .get( "flow_id", "execution_id", - GetFlowExecutionRequestParameters.builder().build()); + GetFlowExecutionRequestParameters.builder() + .hydrate(Arrays.asList(Optional.of(GetFlowExecutionRequestParametersHydrateEnum.DEBUG))) + .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("GET", request.getMethod()); @@ -152,7 +157,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/FlowsVaultConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/FlowsVaultConnectionsWireTest.java index 8a19b8d9a..f35431d60 100644 --- a/src/test/java/com/auth0/client/mgmt/FlowsVaultConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/FlowsVaultConnectionsWireTest.java @@ -355,7 +355,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java b/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java index d5a2fa35e..c00fcad41 100644 --- a/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java @@ -7,12 +7,16 @@ import com.auth0.client.mgmt.types.CreateFlowResponseContent; import com.auth0.client.mgmt.types.FlowSummary; import com.auth0.client.mgmt.types.GetFlowRequestParameters; +import com.auth0.client.mgmt.types.GetFlowRequestParametersHydrateEnum; import com.auth0.client.mgmt.types.GetFlowResponseContent; import com.auth0.client.mgmt.types.ListFlowsRequestParameters; +import com.auth0.client.mgmt.types.ListFlowsRequestParametersHydrateEnum; import com.auth0.client.mgmt.types.UpdateFlowRequestContent; import com.auth0.client.mgmt.types.UpdateFlowResponseContent; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Arrays; +import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -54,6 +58,7 @@ public void testList() throws Exception { .perPage(OptionalNullable.of(1)) .includeTotals(OptionalNullable.of(true)) .synchronous(OptionalNullable.of(true)) + .hydrate(Arrays.asList(Optional.of(ListFlowsRequestParametersHydrateEnum.FORM_COUNT))) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -170,8 +175,12 @@ public void testGet() throws Exception { .setResponseCode(200) .setBody( "{\"id\":\"id\",\"name\":\"name\",\"actions\":[{\"id\":\"id\",\"alias\":\"alias\",\"type\":\"ACTIVECAMPAIGN\",\"action\":\"LIST_CONTACTS\",\"allow_failure\":true,\"mask_output\":true,\"params\":{\"connection_id\":\"connection_id\",\"email\":\"email\"}}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"executed_at\":\"executed_at\"}")); - GetFlowResponseContent response = - client.flows().get("id", GetFlowRequestParameters.builder().build()); + GetFlowResponseContent response = client.flows() + .get( + "id", + GetFlowRequestParameters.builder() + .hydrate(Arrays.asList(Optional.of(GetFlowRequestParametersHydrateEnum.FORM_COUNT))) + .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("GET", request.getMethod()); @@ -355,7 +364,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/FormsWireTest.java b/src/test/java/com/auth0/client/mgmt/FormsWireTest.java index e838c2236..9703882b0 100644 --- a/src/test/java/com/auth0/client/mgmt/FormsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/FormsWireTest.java @@ -6,6 +6,7 @@ import com.auth0.client.mgmt.types.CreateFormRequestContent; import com.auth0.client.mgmt.types.CreateFormResponseContent; import com.auth0.client.mgmt.types.FormSummary; +import com.auth0.client.mgmt.types.FormsRequestParametersHydrateEnum; import com.auth0.client.mgmt.types.GetFormRequestParameters; import com.auth0.client.mgmt.types.GetFormResponseContent; import com.auth0.client.mgmt.types.ListFormsRequestParameters; @@ -13,6 +14,8 @@ import com.auth0.client.mgmt.types.UpdateFormResponseContent; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Arrays; +import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -53,6 +56,7 @@ public void testList() throws Exception { .page(OptionalNullable.of(1)) .perPage(OptionalNullable.of(1)) .includeTotals(OptionalNullable.of(true)) + .hydrate(Arrays.asList(Optional.of(FormsRequestParametersHydrateEnum.FLOW_COUNT))) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -144,8 +148,12 @@ public void testGet() throws Exception { server.enqueue(new MockResponse() .setResponseCode(200) .setBody(TestResources.loadResource("/wire-tests/FormsWireTest_testGet_response.json"))); - GetFormResponseContent response = - client.forms().get("id", GetFormRequestParameters.builder().build()); + GetFormResponseContent response = client.forms() + .get( + "id", + GetFormRequestParameters.builder() + .hydrate(Arrays.asList(Optional.of(FormsRequestParametersHydrateEnum.FLOW_COUNT))) + .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("GET", request.getMethod()); @@ -285,7 +293,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/GroupsMembersWireTest.java b/src/test/java/com/auth0/client/mgmt/GroupsMembersWireTest.java index 42817904b..ba2fdfeb2 100644 --- a/src/test/java/com/auth0/client/mgmt/GroupsMembersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GroupsMembersWireTest.java @@ -78,7 +78,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java b/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java index 7c044a96c..b45bcac33 100644 --- a/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java @@ -48,6 +48,7 @@ public void testList() throws Exception { .connectionId(OptionalNullable.of("connection_id")) .name(OptionalNullable.of("name")) .externalId(OptionalNullable.of("external_id")) + .search(OptionalNullable.of("search")) .fields(OptionalNullable.of("fields")) .includeFields(OptionalNullable.of(true)) .from(OptionalNullable.of("from")) @@ -144,7 +145,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/GuardianEnrollmentsWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianEnrollmentsWireTest.java index 7eafe0eba..a05b715c4 100644 --- a/src/test/java/com/auth0/client/mgmt/GuardianEnrollmentsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GuardianEnrollmentsWireTest.java @@ -195,7 +195,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/GuardianFactorsDuoSettingsWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsDuoSettingsWireTest.java index ab0252d20..fafa724a1 100644 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsDuoSettingsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GuardianFactorsDuoSettingsWireTest.java @@ -257,7 +257,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/GuardianFactorsPhoneWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsPhoneWireTest.java index 277b15a37..84b437165 100644 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsPhoneWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GuardianFactorsPhoneWireTest.java @@ -586,7 +586,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/GuardianFactorsPushNotificationWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsPushNotificationWireTest.java index ae863823d..80658c6f5 100644 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsPushNotificationWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GuardianFactorsPushNotificationWireTest.java @@ -925,7 +925,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/GuardianFactorsSmsWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsSmsWireTest.java index 1ccecc2bd..6a11a7e91 100644 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsSmsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GuardianFactorsSmsWireTest.java @@ -460,7 +460,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/GuardianFactorsWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsWireTest.java index f4a996267..54bb94f06 100644 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GuardianFactorsWireTest.java @@ -180,7 +180,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/GuardianPoliciesWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianPoliciesWireTest.java index 3f248b3b2..8ab223332 100644 --- a/src/test/java/com/auth0/client/mgmt/GuardianPoliciesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GuardianPoliciesWireTest.java @@ -165,7 +165,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/HooksSecretsWireTest.java b/src/test/java/com/auth0/client/mgmt/HooksSecretsWireTest.java index e20e59e05..577b176a4 100644 --- a/src/test/java/com/auth0/client/mgmt/HooksSecretsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/HooksSecretsWireTest.java @@ -215,7 +215,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/HooksWireTest.java b/src/test/java/com/auth0/client/mgmt/HooksWireTest.java index a8edd3984..2fe6f78aa 100644 --- a/src/test/java/com/auth0/client/mgmt/HooksWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/HooksWireTest.java @@ -338,7 +338,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/JobsErrorsWireTest.java b/src/test/java/com/auth0/client/mgmt/JobsErrorsWireTest.java index 8686117d2..e3602abf5 100644 --- a/src/test/java/com/auth0/client/mgmt/JobsErrorsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/JobsErrorsWireTest.java @@ -102,7 +102,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/JobsUsersExportsWireTest.java b/src/test/java/com/auth0/client/mgmt/JobsUsersExportsWireTest.java index 63528b822..38e1274fd 100644 --- a/src/test/java/com/auth0/client/mgmt/JobsUsersExportsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/JobsUsersExportsWireTest.java @@ -142,7 +142,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/JobsVerificationEmailWireTest.java b/src/test/java/com/auth0/client/mgmt/JobsVerificationEmailWireTest.java index 7d106a661..f7fcb045e 100644 --- a/src/test/java/com/auth0/client/mgmt/JobsVerificationEmailWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/JobsVerificationEmailWireTest.java @@ -133,7 +133,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/JobsWireTest.java b/src/test/java/com/auth0/client/mgmt/JobsWireTest.java index da6f92c3f..96a66030a 100644 --- a/src/test/java/com/auth0/client/mgmt/JobsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/JobsWireTest.java @@ -113,7 +113,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/KeysCustomSigningWireTest.java b/src/test/java/com/auth0/client/mgmt/KeysCustomSigningWireTest.java index 5708bc252..d804eef97 100644 --- a/src/test/java/com/auth0/client/mgmt/KeysCustomSigningWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/KeysCustomSigningWireTest.java @@ -241,7 +241,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/KeysEncryptionWireTest.java b/src/test/java/com/auth0/client/mgmt/KeysEncryptionWireTest.java index f3c8c7715..527fbe67e 100644 --- a/src/test/java/com/auth0/client/mgmt/KeysEncryptionWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/KeysEncryptionWireTest.java @@ -386,7 +386,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/KeysSigningWireTest.java b/src/test/java/com/auth0/client/mgmt/KeysSigningWireTest.java index 0e9ae009f..d94770b1b 100644 --- a/src/test/java/com/auth0/client/mgmt/KeysSigningWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/KeysSigningWireTest.java @@ -262,7 +262,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/LogStreamsWireTest.java b/src/test/java/com/auth0/client/mgmt/LogStreamsWireTest.java index 2d8f22ef7..0f3bf5ca4 100644 --- a/src/test/java/com/auth0/client/mgmt/LogStreamsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/LogStreamsWireTest.java @@ -440,7 +440,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/LogsWireTest.java b/src/test/java/com/auth0/client/mgmt/LogsWireTest.java index d5bfe8f73..56248e036 100644 --- a/src/test/java/com/auth0/client/mgmt/LogsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/LogsWireTest.java @@ -163,7 +163,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/NetworkAclsWireTest.java b/src/test/java/com/auth0/client/mgmt/NetworkAclsWireTest.java index 59aa2657b..1018aebe7 100644 --- a/src/test/java/com/auth0/client/mgmt/NetworkAclsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/NetworkAclsWireTest.java @@ -361,7 +361,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java index 19a052b17..b49d47cbb 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java @@ -9,6 +9,8 @@ import com.auth0.client.mgmt.types.OrganizationClientGrant; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Arrays; +import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -54,6 +56,7 @@ public void testList() throws Exception { .page(OptionalNullable.of(1)) .perPage(OptionalNullable.of(1)) .includeTotals(OptionalNullable.of(true)) + .grantIds(Arrays.asList(Optional.of("grant_ids"))) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -182,7 +185,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsConnectionsWireTest.java index d66a2e69b..084ae1625 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsConnectionsWireTest.java @@ -342,7 +342,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsDiscoveryDomainsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsDiscoveryDomainsWireTest.java index 895582f10..e3e17eed4 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsDiscoveryDomainsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsDiscoveryDomainsWireTest.java @@ -383,7 +383,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsEnabledConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsEnabledConnectionsWireTest.java index a3315a84a..00eb0d9b2 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsEnabledConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsEnabledConnectionsWireTest.java @@ -332,7 +332,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsInvitationsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsInvitationsWireTest.java index 6facd9615..93c81cd36 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsInvitationsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsInvitationsWireTest.java @@ -297,7 +297,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersRolesWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersRolesWireTest.java index 2088c6c43..f91123464 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersRolesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersRolesWireTest.java @@ -174,7 +174,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersWireTest.java index 6c7f099eb..395b97a50 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersWireTest.java @@ -169,7 +169,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsWireTest.java index dee87ef24..42cba106d 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsWireTest.java @@ -433,7 +433,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/PromptsCustomTextWireTest.java b/src/test/java/com/auth0/client/mgmt/PromptsCustomTextWireTest.java index fe2c30fef..28a6615c5 100644 --- a/src/test/java/com/auth0/client/mgmt/PromptsCustomTextWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/PromptsCustomTextWireTest.java @@ -139,7 +139,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/PromptsPartialsWireTest.java b/src/test/java/com/auth0/client/mgmt/PromptsPartialsWireTest.java index ebf84dab8..ab8f6a693 100644 --- a/src/test/java/com/auth0/client/mgmt/PromptsPartialsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/PromptsPartialsWireTest.java @@ -135,7 +135,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/PromptsRenderingWireTest.java b/src/test/java/com/auth0/client/mgmt/PromptsRenderingWireTest.java index 0491b52ac..4dad4ed1b 100644 --- a/src/test/java/com/auth0/client/mgmt/PromptsRenderingWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/PromptsRenderingWireTest.java @@ -400,7 +400,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/PromptsWireTest.java b/src/test/java/com/auth0/client/mgmt/PromptsWireTest.java index ba93e3529..7e5ac1db3 100644 --- a/src/test/java/com/auth0/client/mgmt/PromptsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/PromptsWireTest.java @@ -184,7 +184,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/RefreshTokensWireTest.java b/src/test/java/com/auth0/client/mgmt/RefreshTokensWireTest.java index 6b0e52848..743ec853f 100644 --- a/src/test/java/com/auth0/client/mgmt/RefreshTokensWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RefreshTokensWireTest.java @@ -6,6 +6,7 @@ import com.auth0.client.mgmt.types.GetRefreshTokenResponseContent; import com.auth0.client.mgmt.types.GetRefreshTokensRequestParameters; import com.auth0.client.mgmt.types.RefreshTokenResponseContent; +import com.auth0.client.mgmt.types.RevokeRefreshTokensRequestContent; import com.auth0.client.mgmt.types.UpdateRefreshTokenRequestContent; import com.auth0.client.mgmt.types.UpdateRefreshTokenResponseContent; import com.fasterxml.jackson.databind.JsonNode; @@ -64,6 +65,45 @@ public void testList() throws Exception { // The SDK correctly parses the response into a SyncPagingIterable } + @Test + public void testRevoke() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.refreshTokens() + .revoke(RevokeRefreshTokensRequestContent.builder().build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("POST", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{}"; + JsonNode actualJson = objectMapper.readTree(actualRequestBody); + JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); + Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); + if (actualJson.has("type") || actualJson.has("_type") || actualJson.has("kind")) { + String discriminator = null; + if (actualJson.has("type")) discriminator = actualJson.get("type").asText(); + else if (actualJson.has("_type")) + discriminator = actualJson.get("_type").asText(); + else if (actualJson.has("kind")) + discriminator = actualJson.get("kind").asText(); + Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); + Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); + } + + if (!actualJson.isNull()) { + Assertions.assertTrue( + actualJson.isObject() || actualJson.isArray() || actualJson.isValueNode(), + "request should be a valid JSON value"); + } + + if (actualJson.isArray()) { + Assertions.assertTrue(actualJson.size() >= 0, "Array should have valid size"); + } + if (actualJson.isObject()) { + Assertions.assertTrue(actualJson.size() >= 0, "Object should have valid field count"); + } + } + @Test public void testGet() throws Exception { server.enqueue( @@ -269,7 +309,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java b/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java index 0f06a87c4..45b4b859b 100644 --- a/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java @@ -13,6 +13,8 @@ import com.auth0.client.mgmt.types.UpdateResourceServerResponseContent; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Arrays; +import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -47,13 +49,14 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"resource_servers\":[{\"id\":\"id\",\"name\":\"name\",\"is_system\":true,\"identifier\":\"identifier\",\"scopes\":[{\"value\":\"value\"}],\"signing_alg\":\"HS256\",\"signing_secret\":\"signing_secret\",\"allow_offline_access\":true,\"allow_online_access\":true,\"skip_consent_for_verifiable_first_party_clients\":true,\"token_lifetime\":1,\"token_lifetime_for_web\":1,\"enforce_policies\":true,\"token_dialect\":\"access_token\",\"token_encryption\":{\"format\":\"compact-nested-jwe\",\"encryption_key\":{\"alg\":\"RSA-OAEP-256\",\"pem\":\"pem\"}},\"consent_policy\":\"transactional-authorization-with-mfa\",\"proof_of_possession\":{\"mechanism\":\"mtls\",\"required\":true},\"client_id\":\"client_id\"}]}")); + "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"resource_servers\":[{\"id\":\"id\",\"name\":\"name\",\"is_system\":true,\"identifier\":\"identifier\",\"scopes\":[{\"value\":\"value\"}],\"signing_alg\":\"HS256\",\"signing_secret\":\"signing_secret\",\"allow_offline_access\":true,\"allow_online_access\":true,\"skip_consent_for_verifiable_first_party_clients\":true,\"token_lifetime\":1,\"token_lifetime_for_web\":1,\"enforce_policies\":true,\"token_dialect\":\"access_token\",\"token_encryption\":{\"format\":\"compact-nested-jwe\",\"encryption_key\":{\"alg\":\"RSA-OAEP-256\",\"pem\":\"pem\"}},\"consent_policy\":\"transactional-authorization-with-mfa\",\"proof_of_possession\":{\"mechanism\":\"mtls\",\"required\":true},\"authorization_policy\":{\"policy_id\":\"policy_id\"},\"client_id\":\"client_id\"}]}")); SyncPagingIterable response = client.resourceServers() .list(ListResourceServerRequestParameters.builder() .page(OptionalNullable.of(1)) .perPage(OptionalNullable.of(1)) .includeTotals(OptionalNullable.of(true)) .includeFields(OptionalNullable.of(true)) + .identifiers(Arrays.asList(Optional.of("identifiers"))) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -67,11 +70,9 @@ public void testList() throws Exception { @Test public void testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"is_system\":true,\"identifier\":\"identifier\",\"scopes\":[{\"value\":\"value\",\"description\":\"description\"}],\"signing_alg\":\"HS256\",\"signing_secret\":\"signing_secret\",\"allow_offline_access\":true,\"allow_online_access\":true,\"skip_consent_for_verifiable_first_party_clients\":true,\"token_lifetime\":1,\"token_lifetime_for_web\":1,\"enforce_policies\":true,\"token_dialect\":\"access_token\",\"token_encryption\":{\"format\":\"compact-nested-jwe\",\"encryption_key\":{\"name\":\"name\",\"alg\":\"RSA-OAEP-256\",\"kid\":\"kid\",\"pem\":\"pem\"}},\"consent_policy\":\"transactional-authorization-with-mfa\",\"authorization_details\":[{\"key\":\"value\"}],\"proof_of_possession\":{\"mechanism\":\"mtls\",\"required\":true,\"required_for\":\"public_clients\"},\"subject_type_authorization\":{\"user\":{\"policy\":\"allow_all\"},\"client\":{\"policy\":\"deny_all\"}},\"client_id\":\"client_id\"}")); + server.enqueue(new MockResponse() + .setResponseCode(200) + .setBody(TestResources.loadResource("/wire-tests/ResourceServersWireTest_testCreate_response.json"))); CreateResourceServerResponseContent response = client.resourceServers() .create(CreateResourceServerRequestContent.builder() .identifier("identifier") @@ -112,57 +113,8 @@ else if (actualJson.has("kind")) // Validate response body Assertions.assertNotNull(response, "Response should not be null"); String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"is_system\": true,\n" - + " \"identifier\": \"identifier\",\n" - + " \"scopes\": [\n" - + " {\n" - + " \"value\": \"value\",\n" - + " \"description\": \"description\"\n" - + " }\n" - + " ],\n" - + " \"signing_alg\": \"HS256\",\n" - + " \"signing_secret\": \"signing_secret\",\n" - + " \"allow_offline_access\": true,\n" - + " \"allow_online_access\": true,\n" - + " \"skip_consent_for_verifiable_first_party_clients\": true,\n" - + " \"token_lifetime\": 1,\n" - + " \"token_lifetime_for_web\": 1,\n" - + " \"enforce_policies\": true,\n" - + " \"token_dialect\": \"access_token\",\n" - + " \"token_encryption\": {\n" - + " \"format\": \"compact-nested-jwe\",\n" - + " \"encryption_key\": {\n" - + " \"name\": \"name\",\n" - + " \"alg\": \"RSA-OAEP-256\",\n" - + " \"kid\": \"kid\",\n" - + " \"pem\": \"pem\"\n" - + " }\n" - + " },\n" - + " \"consent_policy\": \"transactional-authorization-with-mfa\",\n" - + " \"authorization_details\": [\n" - + " {\n" - + " \"key\": \"value\"\n" - + " }\n" - + " ],\n" - + " \"proof_of_possession\": {\n" - + " \"mechanism\": \"mtls\",\n" - + " \"required\": true,\n" - + " \"required_for\": \"public_clients\"\n" - + " },\n" - + " \"subject_type_authorization\": {\n" - + " \"user\": {\n" - + " \"policy\": \"allow_all\"\n" - + " },\n" - + " \"client\": {\n" - + " \"policy\": \"deny_all\"\n" - + " }\n" - + " },\n" - + " \"client_id\": \"client_id\"\n" - + "}"; + String expectedResponseBody = + TestResources.loadResource("/wire-tests/ResourceServersWireTest_testCreate_response.json"); JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); Assertions.assertTrue( @@ -196,11 +148,9 @@ else if (actualResponseNode.has("kind")) @Test public void testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"is_system\":true,\"identifier\":\"identifier\",\"scopes\":[{\"value\":\"value\",\"description\":\"description\"}],\"signing_alg\":\"HS256\",\"signing_secret\":\"signing_secret\",\"allow_offline_access\":true,\"allow_online_access\":true,\"skip_consent_for_verifiable_first_party_clients\":true,\"token_lifetime\":1,\"token_lifetime_for_web\":1,\"enforce_policies\":true,\"token_dialect\":\"access_token\",\"token_encryption\":{\"format\":\"compact-nested-jwe\",\"encryption_key\":{\"name\":\"name\",\"alg\":\"RSA-OAEP-256\",\"kid\":\"kid\",\"pem\":\"pem\"}},\"consent_policy\":\"transactional-authorization-with-mfa\",\"authorization_details\":[{\"key\":\"value\"}],\"proof_of_possession\":{\"mechanism\":\"mtls\",\"required\":true,\"required_for\":\"public_clients\"},\"subject_type_authorization\":{\"user\":{\"policy\":\"allow_all\"},\"client\":{\"policy\":\"deny_all\"}},\"client_id\":\"client_id\"}")); + server.enqueue(new MockResponse() + .setResponseCode(200) + .setBody(TestResources.loadResource("/wire-tests/ResourceServersWireTest_testGet_response.json"))); GetResourceServerResponseContent response = client.resourceServers() .get( "id", @@ -214,57 +164,8 @@ public void testGet() throws Exception { // Validate response body Assertions.assertNotNull(response, "Response should not be null"); String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"is_system\": true,\n" - + " \"identifier\": \"identifier\",\n" - + " \"scopes\": [\n" - + " {\n" - + " \"value\": \"value\",\n" - + " \"description\": \"description\"\n" - + " }\n" - + " ],\n" - + " \"signing_alg\": \"HS256\",\n" - + " \"signing_secret\": \"signing_secret\",\n" - + " \"allow_offline_access\": true,\n" - + " \"allow_online_access\": true,\n" - + " \"skip_consent_for_verifiable_first_party_clients\": true,\n" - + " \"token_lifetime\": 1,\n" - + " \"token_lifetime_for_web\": 1,\n" - + " \"enforce_policies\": true,\n" - + " \"token_dialect\": \"access_token\",\n" - + " \"token_encryption\": {\n" - + " \"format\": \"compact-nested-jwe\",\n" - + " \"encryption_key\": {\n" - + " \"name\": \"name\",\n" - + " \"alg\": \"RSA-OAEP-256\",\n" - + " \"kid\": \"kid\",\n" - + " \"pem\": \"pem\"\n" - + " }\n" - + " },\n" - + " \"consent_policy\": \"transactional-authorization-with-mfa\",\n" - + " \"authorization_details\": [\n" - + " {\n" - + " \"key\": \"value\"\n" - + " }\n" - + " ],\n" - + " \"proof_of_possession\": {\n" - + " \"mechanism\": \"mtls\",\n" - + " \"required\": true,\n" - + " \"required_for\": \"public_clients\"\n" - + " },\n" - + " \"subject_type_authorization\": {\n" - + " \"user\": {\n" - + " \"policy\": \"allow_all\"\n" - + " },\n" - + " \"client\": {\n" - + " \"policy\": \"deny_all\"\n" - + " }\n" - + " },\n" - + " \"client_id\": \"client_id\"\n" - + "}"; + String expectedResponseBody = + TestResources.loadResource("/wire-tests/ResourceServersWireTest_testGet_response.json"); JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); Assertions.assertTrue( @@ -307,11 +208,9 @@ public void testDelete() throws Exception { @Test public void testUpdate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"is_system\":true,\"identifier\":\"identifier\",\"scopes\":[{\"value\":\"value\",\"description\":\"description\"}],\"signing_alg\":\"HS256\",\"signing_secret\":\"signing_secret\",\"allow_offline_access\":true,\"allow_online_access\":true,\"skip_consent_for_verifiable_first_party_clients\":true,\"token_lifetime\":1,\"token_lifetime_for_web\":1,\"enforce_policies\":true,\"token_dialect\":\"access_token\",\"token_encryption\":{\"format\":\"compact-nested-jwe\",\"encryption_key\":{\"name\":\"name\",\"alg\":\"RSA-OAEP-256\",\"kid\":\"kid\",\"pem\":\"pem\"}},\"consent_policy\":\"transactional-authorization-with-mfa\",\"authorization_details\":[{\"key\":\"value\"}],\"proof_of_possession\":{\"mechanism\":\"mtls\",\"required\":true,\"required_for\":\"public_clients\"},\"subject_type_authorization\":{\"user\":{\"policy\":\"allow_all\"},\"client\":{\"policy\":\"deny_all\"}},\"client_id\":\"client_id\"}")); + server.enqueue(new MockResponse() + .setResponseCode(200) + .setBody(TestResources.loadResource("/wire-tests/ResourceServersWireTest_testUpdate_response.json"))); UpdateResourceServerResponseContent response = client.resourceServers() .update("id", UpdateResourceServerRequestContent.builder().build()); RecordedRequest request = server.takeRequest(); @@ -350,57 +249,8 @@ else if (actualJson.has("kind")) // Validate response body Assertions.assertNotNull(response, "Response should not be null"); String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"is_system\": true,\n" - + " \"identifier\": \"identifier\",\n" - + " \"scopes\": [\n" - + " {\n" - + " \"value\": \"value\",\n" - + " \"description\": \"description\"\n" - + " }\n" - + " ],\n" - + " \"signing_alg\": \"HS256\",\n" - + " \"signing_secret\": \"signing_secret\",\n" - + " \"allow_offline_access\": true,\n" - + " \"allow_online_access\": true,\n" - + " \"skip_consent_for_verifiable_first_party_clients\": true,\n" - + " \"token_lifetime\": 1,\n" - + " \"token_lifetime_for_web\": 1,\n" - + " \"enforce_policies\": true,\n" - + " \"token_dialect\": \"access_token\",\n" - + " \"token_encryption\": {\n" - + " \"format\": \"compact-nested-jwe\",\n" - + " \"encryption_key\": {\n" - + " \"name\": \"name\",\n" - + " \"alg\": \"RSA-OAEP-256\",\n" - + " \"kid\": \"kid\",\n" - + " \"pem\": \"pem\"\n" - + " }\n" - + " },\n" - + " \"consent_policy\": \"transactional-authorization-with-mfa\",\n" - + " \"authorization_details\": [\n" - + " {\n" - + " \"key\": \"value\"\n" - + " }\n" - + " ],\n" - + " \"proof_of_possession\": {\n" - + " \"mechanism\": \"mtls\",\n" - + " \"required\": true,\n" - + " \"required_for\": \"public_clients\"\n" - + " },\n" - + " \"subject_type_authorization\": {\n" - + " \"user\": {\n" - + " \"policy\": \"allow_all\"\n" - + " },\n" - + " \"client\": {\n" - + " \"policy\": \"deny_all\"\n" - + " }\n" - + " },\n" - + " \"client_id\": \"client_id\"\n" - + "}"; + String expectedResponseBody = + TestResources.loadResource("/wire-tests/ResourceServersWireTest_testUpdate_response.json"); JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); Assertions.assertTrue( @@ -448,7 +298,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/RiskAssessmentsSettingsNewDeviceWireTest.java b/src/test/java/com/auth0/client/mgmt/RiskAssessmentsSettingsNewDeviceWireTest.java index d83a6a6ce..40effa2cd 100644 --- a/src/test/java/com/auth0/client/mgmt/RiskAssessmentsSettingsNewDeviceWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RiskAssessmentsSettingsNewDeviceWireTest.java @@ -171,7 +171,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/RiskAssessmentsSettingsWireTest.java b/src/test/java/com/auth0/client/mgmt/RiskAssessmentsSettingsWireTest.java index 6893a370f..03433b59a 100644 --- a/src/test/java/com/auth0/client/mgmt/RiskAssessmentsSettingsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RiskAssessmentsSettingsWireTest.java @@ -170,7 +170,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/RolesPermissionsWireTest.java b/src/test/java/com/auth0/client/mgmt/RolesPermissionsWireTest.java index 8071522ee..af57125ac 100644 --- a/src/test/java/com/auth0/client/mgmt/RolesPermissionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RolesPermissionsWireTest.java @@ -191,7 +191,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/RolesUsersWireTest.java b/src/test/java/com/auth0/client/mgmt/RolesUsersWireTest.java index e1a5c8d3f..710571a69 100644 --- a/src/test/java/com/auth0/client/mgmt/RolesUsersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RolesUsersWireTest.java @@ -122,7 +122,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/RolesWireTest.java b/src/test/java/com/auth0/client/mgmt/RolesWireTest.java index 1d2f1cf62..461ba3890 100644 --- a/src/test/java/com/auth0/client/mgmt/RolesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RolesWireTest.java @@ -299,7 +299,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/RulesConfigsWireTest.java b/src/test/java/com/auth0/client/mgmt/RulesConfigsWireTest.java index 8145ca8aa..cf1f52b2f 100644 --- a/src/test/java/com/auth0/client/mgmt/RulesConfigsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RulesConfigsWireTest.java @@ -178,7 +178,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/RulesWireTest.java b/src/test/java/com/auth0/client/mgmt/RulesWireTest.java index e0f043078..f8b04fc5c 100644 --- a/src/test/java/com/auth0/client/mgmt/RulesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RulesWireTest.java @@ -326,7 +326,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesCustomTextWireTest.java b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesCustomTextWireTest.java index 5a24993f5..af84cadac 100644 --- a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesCustomTextWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesCustomTextWireTest.java @@ -181,7 +181,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesSsoTicketWireTest.java b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesSsoTicketWireTest.java index 8f4363c3f..b6ca85541 100644 --- a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesSsoTicketWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesSsoTicketWireTest.java @@ -135,7 +135,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesWireTest.java index dd6bc4bc1..2d195406b 100644 --- a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesWireTest.java @@ -364,7 +364,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/SessionsWireTest.java b/src/test/java/com/auth0/client/mgmt/SessionsWireTest.java index 4649e2c22..d44419d22 100644 --- a/src/test/java/com/auth0/client/mgmt/SessionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/SessionsWireTest.java @@ -260,7 +260,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/StatsWireTest.java b/src/test/java/com/auth0/client/mgmt/StatsWireTest.java index 369a31683..0b912d2ea 100644 --- a/src/test/java/com/auth0/client/mgmt/StatsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/StatsWireTest.java @@ -155,7 +155,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/SupplementalSignalsWireTest.java b/src/test/java/com/auth0/client/mgmt/SupplementalSignalsWireTest.java index 925393f5f..019cbe89f 100644 --- a/src/test/java/com/auth0/client/mgmt/SupplementalSignalsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/SupplementalSignalsWireTest.java @@ -169,7 +169,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/TenantsSettingsWireTest.java b/src/test/java/com/auth0/client/mgmt/TenantsSettingsWireTest.java index 0fb371ffd..390f6ea52 100644 --- a/src/test/java/com/auth0/client/mgmt/TenantsSettingsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/TenantsSettingsWireTest.java @@ -180,7 +180,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/TicketsWireTest.java b/src/test/java/com/auth0/client/mgmt/TicketsWireTest.java index 1d0b1e8e6..f573ea4d9 100644 --- a/src/test/java/com/auth0/client/mgmt/TicketsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/TicketsWireTest.java @@ -199,7 +199,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/TokenExchangeProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/TokenExchangeProfilesWireTest.java index 23739b5f7..ab630d029 100644 --- a/src/test/java/com/auth0/client/mgmt/TokenExchangeProfilesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/TokenExchangeProfilesWireTest.java @@ -280,7 +280,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UndiscriminatedUnionTest.java b/src/test/java/com/auth0/client/mgmt/UndiscriminatedUnionTest.java new file mode 100644 index 000000000..bb20b6bee --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/UndiscriminatedUnionTest.java @@ -0,0 +1,154 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import static org.junit.jupiter.api.Assertions.*; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.AculClientFilter; +import com.auth0.client.mgmt.types.AculClientFilterById; +import com.auth0.client.mgmt.types.AculClientFilterByMetadata; +import com.auth0.client.mgmt.types.AculDomainFilter; +import com.auth0.client.mgmt.types.AculDomainFilterById; +import com.auth0.client.mgmt.types.AculDomainFilterByMetadata; +import com.auth0.client.mgmt.types.AculOrganizationFilter; +import com.auth0.client.mgmt.types.AculOrganizationFilterById; +import com.auth0.client.mgmt.types.AculOrganizationFilterByMetadata; +import com.auth0.client.mgmt.types.CreateEventStreamWebHookRequestContent; +import com.auth0.client.mgmt.types.CustomProviderConfiguration; +import com.auth0.client.mgmt.types.EventStreamsCreateRequest; +import com.auth0.client.mgmt.types.FlowActionMailjetSendEmailParams; +import com.auth0.client.mgmt.types.FlowActionMailjetSendEmailParamsContent; +import com.auth0.client.mgmt.types.FlowActionMailjetSendEmailParamsTemplateId; +import com.auth0.client.mgmt.types.LogStreamHttpSink; +import com.auth0.client.mgmt.types.LogStreamSinkPatch; +import com.auth0.client.mgmt.types.LogStreamSplunkSink; +import com.auth0.client.mgmt.types.LogStreamSumoSink; +import com.auth0.client.mgmt.types.PhoneProviderConfiguration; +import com.auth0.client.mgmt.types.TwilioProviderConfiguration; +import org.junit.jupiter.api.Test; + +public final class UndiscriminatedUnionTest { + @Test + public void testEventStreamsCreateRequest_CreateEventStreamWebHookRequestContent() throws Exception { + String json = "{\"destination\":{}}"; + EventStreamsCreateRequest union = ObjectMappers.JSON_MAPPER.readValue(json, EventStreamsCreateRequest.class); + assertTrue( + union.get() instanceof CreateEventStreamWebHookRequestContent, + "Expected CreateEventStreamWebHookRequestContent but got different variant"); + } + + @Test + public void testAculClientFilter_AculClientFilterById() throws Exception { + String json = "{\"id\":\"test\"}"; + AculClientFilter union = ObjectMappers.JSON_MAPPER.readValue(json, AculClientFilter.class); + assertTrue( + union.get() instanceof AculClientFilterById, "Expected AculClientFilterById but got different variant"); + } + + @Test + public void testAculClientFilter_AculClientFilterByMetadata() throws Exception { + String json = "{\"metadata\":{}}"; + AculClientFilter union = ObjectMappers.JSON_MAPPER.readValue(json, AculClientFilter.class); + assertTrue( + union.get() instanceof AculClientFilterByMetadata, + "Expected AculClientFilterByMetadata but got different variant"); + } + + @Test + public void testAculDomainFilter_AculDomainFilterById() throws Exception { + String json = "{\"id\":\"test\"}"; + AculDomainFilter union = ObjectMappers.JSON_MAPPER.readValue(json, AculDomainFilter.class); + assertTrue( + union.get() instanceof AculDomainFilterById, "Expected AculDomainFilterById but got different variant"); + } + + @Test + public void testAculDomainFilter_AculDomainFilterByMetadata() throws Exception { + String json = "{\"metadata\":{}}"; + AculDomainFilter union = ObjectMappers.JSON_MAPPER.readValue(json, AculDomainFilter.class); + assertTrue( + union.get() instanceof AculDomainFilterByMetadata, + "Expected AculDomainFilterByMetadata but got different variant"); + } + + @Test + public void testAculOrganizationFilter_AculOrganizationFilterById() throws Exception { + String json = "{\"id\":\"test\"}"; + AculOrganizationFilter union = ObjectMappers.JSON_MAPPER.readValue(json, AculOrganizationFilter.class); + assertTrue( + union.get() instanceof AculOrganizationFilterById, + "Expected AculOrganizationFilterById but got different variant"); + } + + @Test + public void testAculOrganizationFilter_AculOrganizationFilterByMetadata() throws Exception { + String json = "{\"metadata\":{}}"; + AculOrganizationFilter union = ObjectMappers.JSON_MAPPER.readValue(json, AculOrganizationFilter.class); + assertTrue( + union.get() instanceof AculOrganizationFilterByMetadata, + "Expected AculOrganizationFilterByMetadata but got different variant"); + } + + @Test + public void testFlowActionMailjetSendEmailParams_FlowActionMailjetSendEmailParamsContent() throws Exception { + String json = "{\"content\":\"test\"}"; + FlowActionMailjetSendEmailParams union = + ObjectMappers.JSON_MAPPER.readValue(json, FlowActionMailjetSendEmailParams.class); + assertTrue( + union.get() instanceof FlowActionMailjetSendEmailParamsContent, + "Expected FlowActionMailjetSendEmailParamsContent but got different variant"); + } + + @Test + public void testFlowActionMailjetSendEmailParams_FlowActionMailjetSendEmailParamsTemplateId() throws Exception { + String json = "{\"template_id\":1}"; + FlowActionMailjetSendEmailParams union = + ObjectMappers.JSON_MAPPER.readValue(json, FlowActionMailjetSendEmailParams.class); + assertTrue( + union.get() instanceof FlowActionMailjetSendEmailParamsTemplateId, + "Expected FlowActionMailjetSendEmailParamsTemplateId but got different variant"); + } + + @Test + public void testLogStreamSinkPatch_LogStreamHttpSink() throws Exception { + String json = "{\"httpEndpoint\":\"test\"}"; + LogStreamSinkPatch union = ObjectMappers.JSON_MAPPER.readValue(json, LogStreamSinkPatch.class); + assertTrue(union.get() instanceof LogStreamHttpSink, "Expected LogStreamHttpSink but got different variant"); + } + + @Test + public void testLogStreamSinkPatch_LogStreamSplunkSink() throws Exception { + String json = + "{\"splunkDomain\":\"test\",\"splunkPort\":\"test\",\"splunkToken\":\"test\",\"splunkSecure\":true}"; + LogStreamSinkPatch union = ObjectMappers.JSON_MAPPER.readValue(json, LogStreamSinkPatch.class); + assertTrue( + union.get() instanceof LogStreamSplunkSink, "Expected LogStreamSplunkSink but got different variant"); + } + + @Test + public void testLogStreamSinkPatch_LogStreamSumoSink() throws Exception { + String json = "{\"sumoSourceAddress\":\"test\"}"; + LogStreamSinkPatch union = ObjectMappers.JSON_MAPPER.readValue(json, LogStreamSinkPatch.class); + assertTrue(union.get() instanceof LogStreamSumoSink, "Expected LogStreamSumoSink but got different variant"); + } + + @Test + public void testPhoneProviderConfiguration_TwilioProviderConfiguration() throws Exception { + String json = "{\"sid\":\"test\",\"delivery_methods\":[]}"; + PhoneProviderConfiguration union = ObjectMappers.JSON_MAPPER.readValue(json, PhoneProviderConfiguration.class); + assertTrue( + union.get() instanceof TwilioProviderConfiguration, + "Expected TwilioProviderConfiguration but got different variant"); + } + + @Test + public void testPhoneProviderConfiguration_CustomProviderConfiguration() throws Exception { + String json = "{\"delivery_methods\":[]}"; + PhoneProviderConfiguration union = ObjectMappers.JSON_MAPPER.readValue(json, PhoneProviderConfiguration.class); + assertTrue( + union.get() instanceof CustomProviderConfiguration, + "Expected CustomProviderConfiguration but got different variant"); + } +} diff --git a/src/test/java/com/auth0/client/mgmt/UserAttributeProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/UserAttributeProfilesWireTest.java index 8e8cac459..6f98db41c 100644 --- a/src/test/java/com/auth0/client/mgmt/UserAttributeProfilesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UserAttributeProfilesWireTest.java @@ -520,7 +520,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UserBlocksWireTest.java b/src/test/java/com/auth0/client/mgmt/UserBlocksWireTest.java index a3092c1df..0fad1f5e7 100644 --- a/src/test/java/com/auth0/client/mgmt/UserBlocksWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UserBlocksWireTest.java @@ -195,7 +195,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UserGrantsWireTest.java b/src/test/java/com/auth0/client/mgmt/UserGrantsWireTest.java index e6c9fd695..672f5c683 100644 --- a/src/test/java/com/auth0/client/mgmt/UserGrantsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UserGrantsWireTest.java @@ -99,7 +99,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersAuthenticationMethodsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersAuthenticationMethodsWireTest.java index beebfa05c..522064d92 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersAuthenticationMethodsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersAuthenticationMethodsWireTest.java @@ -374,7 +374,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"type\":\"phone\",\"name\":\"name\",\"totp_secret\":\"totp_secret\",\"phone_number\":\"phone_number\",\"email\":\"email\",\"authentication_methods\":[{\"type\":\"totp\",\"id\":\"id\"}],\"preferred_authentication_method\":\"voice\",\"key_id\":\"key_id\",\"public_key\":\"public_key\",\"aaguid\":\"aaguid\",\"relying_party_identifier\":\"relying_party_identifier\",\"created_at\":\"2024-01-15T09:30:00Z\"}")); + "{\"id\":\"id\",\"type\":\"phone\",\"name\":\"name\",\"totp_secret\":\"totp_secret\",\"phone_number\":\"phone_number\",\"email\":\"email\",\"authentication_methods\":[{\"type\":\"totp\",\"id\":\"id\"}],\"preferred_authentication_method\":\"voice\",\"key_id\":\"key_id\",\"public_key\":\"public_key\",\"aaguid\":\"aaguid\",\"relying_party_identifier\":\"relying_party_identifier\",\"confirmed\":true,\"created_at\":\"2024-01-15T09:30:00Z\"}")); UpdateUserAuthenticationMethodResponseContent response = client.users() .authenticationMethods() .update( @@ -436,6 +436,7 @@ else if (actualJson.has("kind")) + " \"public_key\": \"public_key\",\n" + " \"aaguid\": \"aaguid\",\n" + " \"relying_party_identifier\": \"relying_party_identifier\",\n" + + " \"confirmed\": true,\n" + " \"created_at\": \"2024-01-15T09:30:00Z\"\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); @@ -485,7 +486,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersAuthenticatorsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersAuthenticatorsWireTest.java index 21aca011f..6deb3efdc 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersAuthenticatorsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersAuthenticatorsWireTest.java @@ -56,7 +56,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java index 55e071acb..3dc8b55fd 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java @@ -76,7 +76,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersEnrollmentsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersEnrollmentsWireTest.java index 638ae54ce..696e5b491 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersEnrollmentsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersEnrollmentsWireTest.java @@ -109,7 +109,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersFederatedConnectionsTokensetsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersFederatedConnectionsTokensetsWireTest.java index 26be964bb..fcf094466 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersFederatedConnectionsTokensetsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersFederatedConnectionsTokensetsWireTest.java @@ -116,7 +116,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersGroupsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersGroupsWireTest.java index 00a0e231f..ad51418f2 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersGroupsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersGroupsWireTest.java @@ -78,7 +78,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersIdentitiesWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersIdentitiesWireTest.java index 91b03f63b..b3197cc89 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersIdentitiesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersIdentitiesWireTest.java @@ -220,7 +220,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersLogsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersLogsWireTest.java index 313971d36..3316ff72f 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersLogsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersLogsWireTest.java @@ -78,7 +78,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersMultifactorWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersMultifactorWireTest.java index 4abfafddb..f483ff08c 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersMultifactorWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersMultifactorWireTest.java @@ -66,7 +66,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersOrganizationsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersOrganizationsWireTest.java index 825b41ce5..95b65b683 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersOrganizationsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersOrganizationsWireTest.java @@ -77,7 +77,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersPermissionsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersPermissionsWireTest.java index 9e0d464e7..24ba7238e 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersPermissionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersPermissionsWireTest.java @@ -191,7 +191,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersRefreshTokenWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersRefreshTokenWireTest.java index 8c32af79f..13f3008b9 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersRefreshTokenWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersRefreshTokenWireTest.java @@ -85,7 +85,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersRiskAssessmentsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersRiskAssessmentsWireTest.java index cf0daca1b..341ccb1e2 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersRiskAssessmentsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersRiskAssessmentsWireTest.java @@ -101,7 +101,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersRolesWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersRolesWireTest.java index 2e34e4cd3..7c9f540e9 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersRolesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersRolesWireTest.java @@ -168,7 +168,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersSessionsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersSessionsWireTest.java index 9f8ca2a66..213c34bae 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersSessionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersSessionsWireTest.java @@ -85,7 +85,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/UsersWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersWireTest.java index 7a51dccfe..bfcac9433 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersWireTest.java @@ -594,7 +594,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/java/com/auth0/client/mgmt/VerifiableCredentialsVerificationTemplatesWireTest.java b/src/test/java/com/auth0/client/mgmt/VerifiableCredentialsVerificationTemplatesWireTest.java index a12778ae8..ff1f81abd 100644 --- a/src/test/java/com/auth0/client/mgmt/VerifiableCredentialsVerificationTemplatesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/VerifiableCredentialsVerificationTemplatesWireTest.java @@ -368,7 +368,9 @@ private boolean jsonEquals(JsonNode expected, JsonNode actual) { while (iter.hasNext()) { java.util.Map.Entry entry = iter.next(); JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !jsonEquals(entry.getValue(), actualValue)) return false; + if (actualValue == null) { + if (!entry.getValue().isNull()) return false; + } else if (!jsonEquals(entry.getValue(), actualValue)) return false; } return true; } diff --git a/src/test/resources/wire-tests/ResourceServersWireTest_testCreate_response.json b/src/test/resources/wire-tests/ResourceServersWireTest_testCreate_response.json new file mode 100644 index 000000000..e1368d3cb --- /dev/null +++ b/src/test/resources/wire-tests/ResourceServersWireTest_testCreate_response.json @@ -0,0 +1,53 @@ +{ + "id": "id", + "name": "name", + "is_system": true, + "identifier": "identifier", + "scopes": [ + { + "value": "value", + "description": "description" + } + ], + "signing_alg": "HS256", + "signing_secret": "signing_secret", + "allow_offline_access": true, + "allow_online_access": true, + "skip_consent_for_verifiable_first_party_clients": true, + "token_lifetime": 1, + "token_lifetime_for_web": 1, + "enforce_policies": true, + "token_dialect": "access_token", + "token_encryption": { + "format": "compact-nested-jwe", + "encryption_key": { + "name": "name", + "alg": "RSA-OAEP-256", + "kid": "kid", + "pem": "pem" + } + }, + "consent_policy": "transactional-authorization-with-mfa", + "authorization_details": [ + { + "key": "value" + } + ], + "proof_of_possession": { + "mechanism": "mtls", + "required": true, + "required_for": "public_clients" + }, + "subject_type_authorization": { + "user": { + "policy": "allow_all" + }, + "client": { + "policy": "deny_all" + } + }, + "authorization_policy": { + "policy_id": "policy_id" + }, + "client_id": "client_id" +} \ No newline at end of file diff --git a/src/test/resources/wire-tests/ResourceServersWireTest_testGet_response.json b/src/test/resources/wire-tests/ResourceServersWireTest_testGet_response.json new file mode 100644 index 000000000..e1368d3cb --- /dev/null +++ b/src/test/resources/wire-tests/ResourceServersWireTest_testGet_response.json @@ -0,0 +1,53 @@ +{ + "id": "id", + "name": "name", + "is_system": true, + "identifier": "identifier", + "scopes": [ + { + "value": "value", + "description": "description" + } + ], + "signing_alg": "HS256", + "signing_secret": "signing_secret", + "allow_offline_access": true, + "allow_online_access": true, + "skip_consent_for_verifiable_first_party_clients": true, + "token_lifetime": 1, + "token_lifetime_for_web": 1, + "enforce_policies": true, + "token_dialect": "access_token", + "token_encryption": { + "format": "compact-nested-jwe", + "encryption_key": { + "name": "name", + "alg": "RSA-OAEP-256", + "kid": "kid", + "pem": "pem" + } + }, + "consent_policy": "transactional-authorization-with-mfa", + "authorization_details": [ + { + "key": "value" + } + ], + "proof_of_possession": { + "mechanism": "mtls", + "required": true, + "required_for": "public_clients" + }, + "subject_type_authorization": { + "user": { + "policy": "allow_all" + }, + "client": { + "policy": "deny_all" + } + }, + "authorization_policy": { + "policy_id": "policy_id" + }, + "client_id": "client_id" +} \ No newline at end of file diff --git a/src/test/resources/wire-tests/ResourceServersWireTest_testUpdate_response.json b/src/test/resources/wire-tests/ResourceServersWireTest_testUpdate_response.json new file mode 100644 index 000000000..e1368d3cb --- /dev/null +++ b/src/test/resources/wire-tests/ResourceServersWireTest_testUpdate_response.json @@ -0,0 +1,53 @@ +{ + "id": "id", + "name": "name", + "is_system": true, + "identifier": "identifier", + "scopes": [ + { + "value": "value", + "description": "description" + } + ], + "signing_alg": "HS256", + "signing_secret": "signing_secret", + "allow_offline_access": true, + "allow_online_access": true, + "skip_consent_for_verifiable_first_party_clients": true, + "token_lifetime": 1, + "token_lifetime_for_web": 1, + "enforce_policies": true, + "token_dialect": "access_token", + "token_encryption": { + "format": "compact-nested-jwe", + "encryption_key": { + "name": "name", + "alg": "RSA-OAEP-256", + "kid": "kid", + "pem": "pem" + } + }, + "consent_policy": "transactional-authorization-with-mfa", + "authorization_details": [ + { + "key": "value" + } + ], + "proof_of_possession": { + "mechanism": "mtls", + "required": true, + "required_for": "public_clients" + }, + "subject_type_authorization": { + "user": { + "policy": "allow_all" + }, + "client": { + "policy": "deny_all" + } + }, + "authorization_policy": { + "policy_id": "policy_id" + }, + "client_id": "client_id" +} \ No newline at end of file From 1ffe79dc9316354de6d9556a20407f80290f912a Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 23:44:20 +0530 Subject: [PATCH 2/2] SDK regeneration (#861) Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> --- reference.md | 24 ++- .../client/mgmt/AsyncRawEventsClient.java | 4 +- .../auth0/client/mgmt/RawEventsClient.java | 4 +- ...sertionDecryptionAlgorithmProfileEnum.java | 75 ++++++++ ...ConnectionAssertionDecryptionSettings.java | 168 ++++++++++++++++++ .../types/ConnectionOptionsCommonSaml.java | 30 +++- .../types/ConnectionOptionsPingFederate.java | 38 +++- .../mgmt/types/ConnectionOptionsSaml.java | 30 +++- .../types/ConnectionPropertiesOptions.java | 27 +++ ...ntStreamSubscribeEventsEventTypeParam.java | 100 ----------- .../types/IConnectionOptionsCommonSaml.java | 2 + .../SubscribeEventsRequestParameters.java | 114 ++++++------ .../mgmt/types/UpdateConnectionOptions.java | 27 +++ .../mgmt/ClientsConnectionsWireTest.java | 3 +- .../client/mgmt/ConnectionsWireTest.java | 3 +- .../com/auth0/client/mgmt/EventsWireTest.java | 5 +- .../client/mgmt/FlowsExecutionsWireTest.java | 3 +- .../com/auth0/client/mgmt/FlowsWireTest.java | 5 +- .../com/auth0/client/mgmt/FormsWireTest.java | 5 +- .../OrganizationsClientGrantsWireTest.java | 3 +- .../client/mgmt/ResourceServersWireTest.java | 3 +- 21 files changed, 476 insertions(+), 197 deletions(-) create mode 100644 src/main/java/com/auth0/client/mgmt/types/ConnectionAssertionDecryptionAlgorithmProfileEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ConnectionAssertionDecryptionSettings.java delete mode 100644 src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeParam.java diff --git a/reference.md b/reference.md index eaa0149e1..ee55df7f7 100644 --- a/reference.md +++ b/reference.md @@ -3266,7 +3266,7 @@ client.connections().list( OptionalNullable.of(true) ) .strategy( - Arrays.asList(Optional.of(ConnectionStrategyEnum.AD)) + Arrays.asList(ConnectionStrategyEnum.AD) ) .build() ); @@ -5566,9 +5566,7 @@ client.events().subscribe( OptionalNullable.of("from_timestamp") ) .eventType( - OptionalNullable.of( - EventStreamSubscribeEventsEventTypeParam.of(EventStreamSubscribeEventsEventTypeEnum.GROUP_CREATED) - ) + Arrays.asList(EventStreamSubscribeEventsEventTypeEnum.GROUP_CREATED) ) .build() ); @@ -5602,7 +5600,7 @@ client.events().subscribe(
-**eventType:** `Optional` — Event type(s) to listen for. Specify multiple times for multiple types (e.g., ?event_type=user.created&event_type=user.updated). If not provided, all event types will be streamed. +**eventType:** `Optional` — Event type(s) to listen for. Specify multiple times for multiple types (e.g., ?event_type=user.created&event_type=user.updated). If not provided, all event types will be streamed.
@@ -5644,7 +5642,7 @@ client.flows().list( OptionalNullable.of(true) ) .hydrate( - Arrays.asList(Optional.of(ListFlowsRequestParametersHydrateEnum.FORM_COUNT)) + Arrays.asList(ListFlowsRequestParametersHydrateEnum.FORM_COUNT) ) .build() ); @@ -5777,7 +5775,7 @@ client.flows().get( GetFlowRequestParameters .builder() .hydrate( - Arrays.asList(Optional.of(GetFlowRequestParametersHydrateEnum.FORM_COUNT)) + Arrays.asList(GetFlowRequestParametersHydrateEnum.FORM_COUNT) ) .build() ); @@ -5943,7 +5941,7 @@ client.forms().list( OptionalNullable.of(true) ) .hydrate( - Arrays.asList(Optional.of(FormsRequestParametersHydrateEnum.FLOW_COUNT)) + Arrays.asList(FormsRequestParametersHydrateEnum.FLOW_COUNT) ) .build() ); @@ -6116,7 +6114,7 @@ client.forms().get( GetFormRequestParameters .builder() .hydrate( - Arrays.asList(Optional.of(FormsRequestParametersHydrateEnum.FLOW_COUNT)) + Arrays.asList(FormsRequestParametersHydrateEnum.FLOW_COUNT) ) .build() ); @@ -9754,7 +9752,7 @@ client.resourceServers().list( OptionalNullable.of(true) ) .identifiers( - Arrays.asList(Optional.of("identifiers")) + Arrays.asList("identifiers") ) .build() ); @@ -18365,7 +18363,7 @@ client.clients().connections().get( OptionalNullable.of(true) ) .strategy( - Arrays.asList(Optional.of(ConnectionStrategyEnum.AD)) + Arrays.asList(ConnectionStrategyEnum.AD) ) .build() ); @@ -20735,7 +20733,7 @@ client.flows().executions().get( GetFlowExecutionRequestParameters .builder() .hydrate( - Arrays.asList(Optional.of(GetFlowExecutionRequestParametersHydrateEnum.DEBUG)) + Arrays.asList(GetFlowExecutionRequestParametersHydrateEnum.DEBUG) ) .build() ); @@ -24597,7 +24595,7 @@ client.organizations().clientGrants().list( OptionalNullable.of(true) ) .grantIds( - Arrays.asList(Optional.of("grant_ids")) + Arrays.asList("grant_ids") ) .build() ); diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawEventsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawEventsClient.java index 72355b02d..261c6a665 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawEventsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawEventsClient.java @@ -81,9 +81,9 @@ public CompletableFuture { diff --git a/src/main/java/com/auth0/client/mgmt/RawEventsClient.java b/src/main/java/com/auth0/client/mgmt/RawEventsClient.java index ddfee8cfe..63ec6d1d5 100644 --- a/src/main/java/com/auth0/client/mgmt/RawEventsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawEventsClient.java @@ -76,9 +76,9 @@ public ManagementApiHttpResponse { diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionAssertionDecryptionAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionAssertionDecryptionAlgorithmProfileEnum.java new file mode 100644 index 000000000..ae1a1ff08 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionAssertionDecryptionAlgorithmProfileEnum.java @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class ConnectionAssertionDecryptionAlgorithmProfileEnum { + public static final ConnectionAssertionDecryptionAlgorithmProfileEnum V20261 = + new ConnectionAssertionDecryptionAlgorithmProfileEnum(Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + ConnectionAssertionDecryptionAlgorithmProfileEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof ConnectionAssertionDecryptionAlgorithmProfileEnum + && this.string.equals(((ConnectionAssertionDecryptionAlgorithmProfileEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ConnectionAssertionDecryptionAlgorithmProfileEnum valueOf(String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new ConnectionAssertionDecryptionAlgorithmProfileEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionAssertionDecryptionSettings.java new file mode 100644 index 000000000..fae616e9f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionAssertionDecryptionSettings.java @@ -0,0 +1,168 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConnectionAssertionDecryptionSettings.Builder.class) +public final class ConnectionAssertionDecryptionSettings { + private final ConnectionAssertionDecryptionAlgorithmProfileEnum algorithmProfile; + + private final Optional> algorithmExceptions; + + private final Map additionalProperties; + + private ConnectionAssertionDecryptionSettings( + ConnectionAssertionDecryptionAlgorithmProfileEnum algorithmProfile, + Optional> algorithmExceptions, + Map additionalProperties) { + this.algorithmProfile = algorithmProfile; + this.algorithmExceptions = algorithmExceptions; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("algorithm_profile") + public ConnectionAssertionDecryptionAlgorithmProfileEnum getAlgorithmProfile() { + return algorithmProfile; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionAssertionDecryptionSettings + && equalTo((ConnectionAssertionDecryptionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConnectionAssertionDecryptionSettings other) { + return algorithmProfile.equals(other.algorithmProfile) && algorithmExceptions.equals(other.algorithmExceptions); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmProfile, this.algorithmExceptions); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile(@NotNull ConnectionAssertionDecryptionAlgorithmProfileEnum algorithmProfile); + + Builder from(ConnectionAssertionDecryptionSettings other); + } + + public interface _FinalStage { + ConnectionAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

A list of insecure algorithms to allow for SAML assertion decryption.

+ */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private ConnectionAssertionDecryptionAlgorithmProfileEnum algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConnectionAssertionDecryptionSettings other) { + algorithmProfile(other.getAlgorithmProfile()); + algorithmExceptions(other.getAlgorithmExceptions()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull ConnectionAssertionDecryptionAlgorithmProfileEnum algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

A list of insecure algorithms to allow for SAML assertion decryption.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage algorithmExceptions(List algorithmExceptions) { + this.algorithmExceptions = Optional.ofNullable(algorithmExceptions); + return this; + } + + /** + *

A list of insecure algorithms to allow for SAML assertion decryption.

+ */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public ConnectionAssertionDecryptionSettings build() { + return new ConnectionAssertionDecryptionSettings( + algorithmProfile, algorithmExceptions, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonSaml.java index 850b831ee..1efb4b8c9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonSaml.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonSaml.java @@ -24,6 +24,8 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionOptionsCommonSaml.Builder.class) public final class ConnectionOptionsCommonSaml implements IConnectionOptionsCommonSaml { + private final Optional assertionDecryptionSettings; + private final Optional cert; private final Optional decryptionKey; @@ -58,6 +60,7 @@ public final class ConnectionOptionsCommonSaml implements IConnectionOptionsComm private final Map additionalProperties; private ConnectionOptionsCommonSaml( + Optional assertionDecryptionSettings, Optional cert, Optional decryptionKey, Optional digestAlgorithm, @@ -74,6 +77,7 @@ private ConnectionOptionsCommonSaml( Optional> thumbprints, OptionalNullable>> upstreamParams, Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; this.cert = cert; this.decryptionKey = decryptionKey; this.digestAlgorithm = digestAlgorithm; @@ -92,6 +96,12 @@ private ConnectionOptionsCommonSaml( this.additionalProperties = additionalProperties; } + @JsonProperty("assertion_decryption_settings") + @java.lang.Override + public Optional getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + @JsonProperty("cert") @java.lang.Override public Optional getCert() { @@ -205,7 +215,8 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConnectionOptionsCommonSaml other) { - return cert.equals(other.cert) + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) && decryptionKey.equals(other.decryptionKey) && digestAlgorithm.equals(other.digestAlgorithm) && domainAliases.equals(other.domainAliases) @@ -225,6 +236,7 @@ private boolean equalTo(ConnectionOptionsCommonSaml other) { @java.lang.Override public int hashCode() { return Objects.hash( + this.assertionDecryptionSettings, this.cert, this.decryptionKey, this.digestAlgorithm, @@ -253,6 +265,8 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private Optional assertionDecryptionSettings = Optional.empty(); + private Optional cert = Optional.empty(); private Optional decryptionKey = Optional.empty(); @@ -290,6 +304,7 @@ public static final class Builder { private Builder() {} public Builder from(ConnectionOptionsCommonSaml other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); cert(other.getCert()); decryptionKey(other.getDecryptionKey()); digestAlgorithm(other.getDigestAlgorithm()); @@ -308,6 +323,18 @@ public Builder from(ConnectionOptionsCommonSaml other) { return this; } + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public Builder assertionDecryptionSettings( + Optional assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + public Builder assertionDecryptionSettings(ConnectionAssertionDecryptionSettings assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + @JsonSetter(value = "cert", nulls = Nulls.SKIP) public Builder cert(Optional cert) { this.cert = cert; @@ -503,6 +530,7 @@ public Builder upstreamParams( public ConnectionOptionsCommonSaml build() { return new ConnectionOptionsCommonSaml( + assertionDecryptionSettings, cert, decryptionKey, digestAlgorithm, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPingFederate.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPingFederate.java index d23ca3876..8f9d002d7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPingFederate.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPingFederate.java @@ -25,6 +25,8 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionOptionsPingFederate.Builder.class) public final class ConnectionOptionsPingFederate implements IConnectionOptionsCommonSaml, IConnectionOptionsCommon { + private final Optional assertionDecryptionSettings; + private final Optional cert; private final Optional decryptionKey; @@ -65,6 +67,7 @@ public final class ConnectionOptionsPingFederate implements IConnectionOptionsCo private final Map additionalProperties; private ConnectionOptionsPingFederate( + Optional assertionDecryptionSettings, Optional cert, Optional decryptionKey, Optional digestAlgorithm, @@ -84,6 +87,7 @@ private ConnectionOptionsPingFederate( String pingFederateBaseUrl, Optional signingCert, Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; this.cert = cert; this.decryptionKey = decryptionKey; this.digestAlgorithm = digestAlgorithm; @@ -105,6 +109,12 @@ private ConnectionOptionsPingFederate( this.additionalProperties = additionalProperties; } + @JsonProperty("assertion_decryption_settings") + @java.lang.Override + public Optional getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + @JsonProperty("cert") @java.lang.Override public Optional getCert() { @@ -234,7 +244,8 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConnectionOptionsPingFederate other) { - return cert.equals(other.cert) + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) && decryptionKey.equals(other.decryptionKey) && digestAlgorithm.equals(other.digestAlgorithm) && domainAliases.equals(other.domainAliases) @@ -257,6 +268,7 @@ private boolean equalTo(ConnectionOptionsPingFederate other) { @java.lang.Override public int hashCode() { return Objects.hash( + this.assertionDecryptionSettings, this.cert, this.decryptionKey, this.digestAlgorithm, @@ -299,6 +311,11 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage assertionDecryptionSettings( + Optional assertionDecryptionSettings); + + _FinalStage assertionDecryptionSettings(ConnectionAssertionDecryptionSettings assertionDecryptionSettings); + _FinalStage cert(Optional cert); _FinalStage cert(String cert); @@ -419,6 +436,8 @@ public static final class Builder implements PingFederateBaseUrlStage, _FinalSta private Optional cert = Optional.empty(); + private Optional assertionDecryptionSettings = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -426,6 +445,7 @@ private Builder() {} @java.lang.Override public Builder from(ConnectionOptionsPingFederate other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); cert(other.getCert()); decryptionKey(other.getDecryptionKey()); digestAlgorithm(other.getDigestAlgorithm()); @@ -706,9 +726,25 @@ public _FinalStage cert(Optional cert) { return this; } + @java.lang.Override + public _FinalStage assertionDecryptionSettings( + ConnectionAssertionDecryptionSettings assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public _FinalStage assertionDecryptionSettings( + Optional assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + @java.lang.Override public ConnectionOptionsPingFederate build() { return new ConnectionOptionsPingFederate( + assertionDecryptionSettings, cert, decryptionKey, digestAlgorithm, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSaml.java index 25de71989..3f01f6d61 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSaml.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSaml.java @@ -24,6 +24,8 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionOptionsSaml.Builder.class) public final class ConnectionOptionsSaml implements IConnectionOptionsCommonSaml, IConnectionOptionsCommon { + private final Optional assertionDecryptionSettings; + private final Optional cert; private final Optional decryptionKey; @@ -90,6 +92,7 @@ public final class ConnectionOptionsSaml implements IConnectionOptionsCommonSaml private final Map additionalProperties; private ConnectionOptionsSaml( + Optional assertionDecryptionSettings, Optional cert, Optional decryptionKey, Optional digestAlgorithm, @@ -122,6 +125,7 @@ private ConnectionOptionsSaml( Optional signOutEndpoint, Optional userIdAttribute, Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; this.cert = cert; this.decryptionKey = decryptionKey; this.digestAlgorithm = digestAlgorithm; @@ -156,6 +160,12 @@ private ConnectionOptionsSaml( this.additionalProperties = additionalProperties; } + @JsonProperty("assertion_decryption_settings") + @java.lang.Override + public Optional getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + @JsonProperty("cert") @java.lang.Override public Optional getCert() { @@ -353,7 +363,8 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConnectionOptionsSaml other) { - return cert.equals(other.cert) + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) && decryptionKey.equals(other.decryptionKey) && digestAlgorithm.equals(other.digestAlgorithm) && domainAliases.equals(other.domainAliases) @@ -389,6 +400,7 @@ private boolean equalTo(ConnectionOptionsSaml other) { @java.lang.Override public int hashCode() { return Objects.hash( + this.assertionDecryptionSettings, this.cert, this.decryptionKey, this.digestAlgorithm, @@ -433,6 +445,8 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private Optional assertionDecryptionSettings = Optional.empty(); + private Optional cert = Optional.empty(); private Optional decryptionKey = Optional.empty(); @@ -502,6 +516,7 @@ public static final class Builder { private Builder() {} public Builder from(ConnectionOptionsSaml other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); cert(other.getCert()); decryptionKey(other.getDecryptionKey()); digestAlgorithm(other.getDigestAlgorithm()); @@ -536,6 +551,18 @@ public Builder from(ConnectionOptionsSaml other) { return this; } + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public Builder assertionDecryptionSettings( + Optional assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + public Builder assertionDecryptionSettings(ConnectionAssertionDecryptionSettings assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + @JsonSetter(value = "cert", nulls = Nulls.SKIP) public Builder cert(Optional cert) { this.cert = cert; @@ -910,6 +937,7 @@ public Builder userIdAttribute(String userIdAttribute) { public ConnectionOptionsSaml build() { return new ConnectionOptionsSaml( + assertionDecryptionSettings, cert, decryptionKey, digestAlgorithm, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java index cd07c3e5c..53f76bf18 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java @@ -87,6 +87,8 @@ public final class ConnectionPropertiesOptions { private final Optional passwordOptions; + private final Optional assertionDecryptionSettings; + private final OptionalNullable> idTokenSignedResponseAlgs; private final OptionalNullable tokenEndpointAuthMethod; @@ -129,6 +131,7 @@ private ConnectionPropertiesOptions( OptionalNullable gatewayAuthentication, OptionalNullable federatedConnectionsAccessTokens, Optional passwordOptions, + Optional assertionDecryptionSettings, OptionalNullable> idTokenSignedResponseAlgs, OptionalNullable tokenEndpointAuthMethod, OptionalNullable tokenEndpointAuthSigningAlg, @@ -165,6 +168,7 @@ private ConnectionPropertiesOptions( this.gatewayAuthentication = gatewayAuthentication; this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.passwordOptions = passwordOptions; + this.assertionDecryptionSettings = assertionDecryptionSettings; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; @@ -397,6 +401,11 @@ public Optional getPasswordOptions() { return passwordOptions; } + @JsonProperty("assertion_decryption_settings") + public Optional getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("id_token_signed_response_algs") public OptionalNullable> getIdTokenSignedResponseAlgs() { @@ -569,6 +578,7 @@ private boolean equalTo(ConnectionPropertiesOptions other) { && gatewayAuthentication.equals(other.gatewayAuthentication) && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) && passwordOptions.equals(other.passwordOptions) + && assertionDecryptionSettings.equals(other.assertionDecryptionSettings) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) @@ -609,6 +619,7 @@ public int hashCode() { this.gatewayAuthentication, this.federatedConnectionsAccessTokens, this.passwordOptions, + this.assertionDecryptionSettings, this.idTokenSignedResponseAlgs, this.tokenEndpointAuthMethod, this.tokenEndpointAuthSigningAlg, @@ -692,6 +703,8 @@ public static final class Builder { private Optional passwordOptions = Optional.empty(); + private Optional assertionDecryptionSettings = Optional.empty(); + private OptionalNullable> idTokenSignedResponseAlgs = OptionalNullable.absent(); @@ -740,6 +753,7 @@ public Builder from(ConnectionPropertiesOptions other) { gatewayAuthentication(other.getGatewayAuthentication()); federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); passwordOptions(other.getPasswordOptions()); + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); @@ -1395,6 +1409,18 @@ public Builder passwordOptions(ConnectionPasswordOptions passwordOptions) { return this; } + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public Builder assertionDecryptionSettings( + Optional assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + public Builder assertionDecryptionSettings(ConnectionAssertionDecryptionSettings assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) public Builder idTokenSignedResponseAlgs( @Nullable OptionalNullable> idTokenSignedResponseAlgs) { @@ -1547,6 +1573,7 @@ public ConnectionPropertiesOptions build() { gatewayAuthentication, federatedConnectionsAccessTokens, passwordOptions, + assertionDecryptionSettings, idTokenSignedResponseAlgs, tokenEndpointAuthMethod, tokenEndpointAuthSigningAlg, diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeParam.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeParam.java deleted file mode 100644 index d9f6b71aa..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeParam.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import java.io.IOException; -import java.util.List; -import java.util.Objects; - -@JsonDeserialize(using = EventStreamSubscribeEventsEventTypeParam.Deserializer.class) -public final class EventStreamSubscribeEventsEventTypeParam { - private final Object value; - - private final int type; - - private EventStreamSubscribeEventsEventTypeParam(Object value, int type) { - this.value = value; - this.type = type; - } - - @JsonValue - public Object get() { - return this.value; - } - - @SuppressWarnings("unchecked") - public T visit(Visitor visitor) { - if (this.type == 0) { - return visitor.visit((EventStreamSubscribeEventsEventTypeEnum) this.value); - } else if (this.type == 1) { - return visitor.visit((List) this.value); - } - throw new IllegalStateException("Failed to visit value. This should never happen."); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamSubscribeEventsEventTypeParam - && equalTo((EventStreamSubscribeEventsEventTypeParam) other); - } - - private boolean equalTo(EventStreamSubscribeEventsEventTypeParam other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return this.value.toString(); - } - - public static EventStreamSubscribeEventsEventTypeParam of(EventStreamSubscribeEventsEventTypeEnum value) { - return new EventStreamSubscribeEventsEventTypeParam(value, 0); - } - - public static EventStreamSubscribeEventsEventTypeParam of(List value) { - return new EventStreamSubscribeEventsEventTypeParam(value, 1); - } - - public interface Visitor { - T visit(EventStreamSubscribeEventsEventTypeEnum value); - - T visit(List value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(EventStreamSubscribeEventsEventTypeParam.class); - } - - @java.lang.Override - public EventStreamSubscribeEventsEventTypeParam deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamSubscribeEventsEventTypeEnum.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, new TypeReference>() {})); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonSaml.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonSaml.java index 7283adea7..6550f1e03 100644 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonSaml.java +++ b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonSaml.java @@ -9,6 +9,8 @@ import java.util.Optional; public interface IConnectionOptionsCommonSaml { + Optional getAssertionDecryptionSettings(); + Optional getCert(); Optional getDecryptionKey(); diff --git a/src/main/java/com/auth0/client/mgmt/types/SubscribeEventsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/SubscribeEventsRequestParameters.java index 0b83c82fd..b4c4a38d7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SubscribeEventsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/SubscribeEventsRequestParameters.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; @@ -22,25 +24,36 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SubscribeEventsRequestParameters.Builder.class) public final class SubscribeEventsRequestParameters { + private final Optional> eventType; + private final OptionalNullable from; private final OptionalNullable fromTimestamp; - private final OptionalNullable eventType; - private final Map additionalProperties; private SubscribeEventsRequestParameters( + Optional> eventType, OptionalNullable from, OptionalNullable fromTimestamp, - OptionalNullable eventType, Map additionalProperties) { + this.eventType = eventType; this.from = from; this.fromTimestamp = fromTimestamp; - this.eventType = eventType; this.additionalProperties = additionalProperties; } + /** + * @return Event type(s) to listen for. Specify multiple times for multiple types (e.g., ?event_type=user.created&event_type=user.updated). If not provided, all event types will be streamed. + */ + @JsonIgnore + public Optional> getEventType() { + if (eventType == null) { + return Optional.empty(); + } + return eventType; + } + /** * @return Opaque token representing position in the stream. If not provided, stream will start from the latest events. */ @@ -63,17 +76,6 @@ public OptionalNullable getFromTimestamp() { return fromTimestamp; } - /** - * @return Event type(s) to listen for. Specify multiple times for multiple types (e.g., ?event_type=user.created&event_type=user.updated). If not provided, all event types will be streamed. - */ - @JsonIgnore - public OptionalNullable getEventType() { - if (eventType == null) { - return OptionalNullable.absent(); - } - return eventType; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -86,14 +88,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(SubscribeEventsRequestParameters other) { - return from.equals(other.from) - && fromTimestamp.equals(other.fromTimestamp) - && eventType.equals(other.eventType); + return eventType.equals(other.eventType) + && from.equals(other.from) + && fromTimestamp.equals(other.fromTimestamp); } @java.lang.Override public int hashCode() { - return Objects.hash(this.from, this.fromTimestamp, this.eventType); + return Objects.hash(this.eventType, this.from, this.fromTimestamp); } @java.lang.Override @@ -107,21 +109,52 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private Optional> eventType = Optional.empty(); + private OptionalNullable from = OptionalNullable.absent(); private OptionalNullable fromTimestamp = OptionalNullable.absent(); - private OptionalNullable eventType = OptionalNullable.absent(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} public Builder from(SubscribeEventsRequestParameters other) { + eventType(other.getEventType()); from(other.getFrom()); fromTimestamp(other.getFromTimestamp()); - eventType(other.getEventType()); + return this; + } + + /** + *

Event type(s) to listen for. Specify multiple times for multiple types (e.g., ?event_type=user.created&event_type=user.updated). If not provided, all event types will be streamed.

+ */ + @JsonSetter(value = "event_type", nulls = Nulls.SKIP) + public Builder eventType(@Nullable Optional> eventType) { + this.eventType = eventType; + return this; + } + + public Builder eventType(List eventType) { + this.eventType = Optional.ofNullable(eventType); + return this; + } + + public Builder eventType( + com.auth0.client.mgmt.core.Nullable> eventType) { + if (eventType.isNull()) { + this.eventType = null; + } else if (eventType.isEmpty()) { + this.eventType = Optional.empty(); + } else { + this.eventType = Optional.of(eventType.get()); + } + return this; + } + + public Builder eventType(EventStreamSubscribeEventsEventTypeEnum eventType) { + this.eventType = Optional.of(Collections.singletonList(eventType)); return this; } @@ -193,43 +226,8 @@ public Builder fromTimestamp(com.auth0.client.mgmt.core.Nullable fromTim return this; } - /** - *

Event type(s) to listen for. Specify multiple times for multiple types (e.g., ?event_type=user.created&event_type=user.updated). If not provided, all event types will be streamed.

- */ - @JsonSetter(value = "event_type", nulls = Nulls.SKIP) - public Builder eventType(@Nullable OptionalNullable eventType) { - this.eventType = eventType; - return this; - } - - public Builder eventType(EventStreamSubscribeEventsEventTypeParam eventType) { - this.eventType = OptionalNullable.of(eventType); - return this; - } - - public Builder eventType(Optional eventType) { - if (eventType.isPresent()) { - this.eventType = OptionalNullable.of(eventType.get()); - } else { - this.eventType = OptionalNullable.absent(); - } - return this; - } - - public Builder eventType( - com.auth0.client.mgmt.core.Nullable eventType) { - if (eventType.isNull()) { - this.eventType = OptionalNullable.ofNull(); - } else if (eventType.isEmpty()) { - this.eventType = OptionalNullable.absent(); - } else { - this.eventType = OptionalNullable.of(eventType.get()); - } - return this; - } - public SubscribeEventsRequestParameters build() { - return new SubscribeEventsRequestParameters(from, fromTimestamp, eventType, additionalProperties); + return new SubscribeEventsRequestParameters(eventType, from, fromTimestamp, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java index 016ba440b..e7599dfc7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java @@ -87,6 +87,8 @@ public final class UpdateConnectionOptions { private final Optional passwordOptions; + private final Optional assertionDecryptionSettings; + private final OptionalNullable> idTokenSignedResponseAlgs; private final OptionalNullable tokenEndpointAuthMethod; @@ -129,6 +131,7 @@ private UpdateConnectionOptions( OptionalNullable gatewayAuthentication, OptionalNullable federatedConnectionsAccessTokens, Optional passwordOptions, + Optional assertionDecryptionSettings, OptionalNullable> idTokenSignedResponseAlgs, OptionalNullable tokenEndpointAuthMethod, OptionalNullable tokenEndpointAuthSigningAlg, @@ -165,6 +168,7 @@ private UpdateConnectionOptions( this.gatewayAuthentication = gatewayAuthentication; this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.passwordOptions = passwordOptions; + this.assertionDecryptionSettings = assertionDecryptionSettings; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; @@ -397,6 +401,11 @@ public Optional getPasswordOptions() { return passwordOptions; } + @JsonProperty("assertion_decryption_settings") + public Optional getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("id_token_signed_response_algs") public OptionalNullable> getIdTokenSignedResponseAlgs() { @@ -569,6 +578,7 @@ private boolean equalTo(UpdateConnectionOptions other) { && gatewayAuthentication.equals(other.gatewayAuthentication) && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) && passwordOptions.equals(other.passwordOptions) + && assertionDecryptionSettings.equals(other.assertionDecryptionSettings) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) @@ -609,6 +619,7 @@ public int hashCode() { this.gatewayAuthentication, this.federatedConnectionsAccessTokens, this.passwordOptions, + this.assertionDecryptionSettings, this.idTokenSignedResponseAlgs, this.tokenEndpointAuthMethod, this.tokenEndpointAuthSigningAlg, @@ -692,6 +703,8 @@ public static final class Builder { private Optional passwordOptions = Optional.empty(); + private Optional assertionDecryptionSettings = Optional.empty(); + private OptionalNullable> idTokenSignedResponseAlgs = OptionalNullable.absent(); @@ -740,6 +753,7 @@ public Builder from(UpdateConnectionOptions other) { gatewayAuthentication(other.getGatewayAuthentication()); federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); passwordOptions(other.getPasswordOptions()); + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); @@ -1395,6 +1409,18 @@ public Builder passwordOptions(ConnectionPasswordOptions passwordOptions) { return this; } + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public Builder assertionDecryptionSettings( + Optional assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + public Builder assertionDecryptionSettings(ConnectionAssertionDecryptionSettings assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) public Builder idTokenSignedResponseAlgs( @Nullable OptionalNullable> idTokenSignedResponseAlgs) { @@ -1547,6 +1573,7 @@ public UpdateConnectionOptions build() { gatewayAuthentication, federatedConnectionsAccessTokens, passwordOptions, + assertionDecryptionSettings, idTokenSignedResponseAlgs, tokenEndpointAuthMethod, tokenEndpointAuthSigningAlg, diff --git a/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java index 9e4fa7552..3dcee8001 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java @@ -9,7 +9,6 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Arrays; -import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -54,7 +53,7 @@ public void testGet() throws Exception { .take(OptionalNullable.of(1)) .fields(OptionalNullable.of("fields")) .includeFields(OptionalNullable.of(true)) - .strategy(Arrays.asList(Optional.of(ConnectionStrategyEnum.AD))) + .strategy(Arrays.asList(ConnectionStrategyEnum.AD)) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java index d94c4962d..dbeecfa03 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java @@ -16,7 +16,6 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Arrays; -import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -59,7 +58,7 @@ public void testList() throws Exception { .name(OptionalNullable.of("name")) .fields(OptionalNullable.of("fields")) .includeFields(OptionalNullable.of(true)) - .strategy(Arrays.asList(Optional.of(ConnectionStrategyEnum.AD))) + .strategy(Arrays.asList(ConnectionStrategyEnum.AD)) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/EventsWireTest.java b/src/test/java/com/auth0/client/mgmt/EventsWireTest.java index d9cd523e3..67b9037a9 100644 --- a/src/test/java/com/auth0/client/mgmt/EventsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EventsWireTest.java @@ -3,11 +3,11 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.types.EventStreamSubscribeEventsEventTypeEnum; -import com.auth0.client.mgmt.types.EventStreamSubscribeEventsEventTypeParam; import com.auth0.client.mgmt.types.EventStreamSubscribeEventsResponseContent; import com.auth0.client.mgmt.types.SubscribeEventsRequestParameters; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Arrays; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -43,8 +43,7 @@ public void testSubscribe() throws Exception { .subscribe(SubscribeEventsRequestParameters.builder() .from(OptionalNullable.of("from")) .fromTimestamp(OptionalNullable.of("from_timestamp")) - .eventType(OptionalNullable.of(EventStreamSubscribeEventsEventTypeParam.of( - EventStreamSubscribeEventsEventTypeEnum.GROUP_CREATED))) + .eventType(Arrays.asList(EventStreamSubscribeEventsEventTypeEnum.GROUP_CREATED)) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java b/src/test/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java index 624ea3292..d61853f15 100644 --- a/src/test/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java @@ -11,7 +11,6 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Arrays; -import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -78,7 +77,7 @@ public void testGet() throws Exception { "flow_id", "execution_id", GetFlowExecutionRequestParameters.builder() - .hydrate(Arrays.asList(Optional.of(GetFlowExecutionRequestParametersHydrateEnum.DEBUG))) + .hydrate(Arrays.asList(GetFlowExecutionRequestParametersHydrateEnum.DEBUG)) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java b/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java index c00fcad41..7eb3fc2a0 100644 --- a/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java @@ -16,7 +16,6 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Arrays; -import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -58,7 +57,7 @@ public void testList() throws Exception { .perPage(OptionalNullable.of(1)) .includeTotals(OptionalNullable.of(true)) .synchronous(OptionalNullable.of(true)) - .hydrate(Arrays.asList(Optional.of(ListFlowsRequestParametersHydrateEnum.FORM_COUNT))) + .hydrate(Arrays.asList(ListFlowsRequestParametersHydrateEnum.FORM_COUNT)) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -179,7 +178,7 @@ public void testGet() throws Exception { .get( "id", GetFlowRequestParameters.builder() - .hydrate(Arrays.asList(Optional.of(GetFlowRequestParametersHydrateEnum.FORM_COUNT))) + .hydrate(Arrays.asList(GetFlowRequestParametersHydrateEnum.FORM_COUNT)) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/FormsWireTest.java b/src/test/java/com/auth0/client/mgmt/FormsWireTest.java index 9703882b0..afbbcc10a 100644 --- a/src/test/java/com/auth0/client/mgmt/FormsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/FormsWireTest.java @@ -15,7 +15,6 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Arrays; -import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -56,7 +55,7 @@ public void testList() throws Exception { .page(OptionalNullable.of(1)) .perPage(OptionalNullable.of(1)) .includeTotals(OptionalNullable.of(true)) - .hydrate(Arrays.asList(Optional.of(FormsRequestParametersHydrateEnum.FLOW_COUNT))) + .hydrate(Arrays.asList(FormsRequestParametersHydrateEnum.FLOW_COUNT)) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -152,7 +151,7 @@ public void testGet() throws Exception { .get( "id", GetFormRequestParameters.builder() - .hydrate(Arrays.asList(Optional.of(FormsRequestParametersHydrateEnum.FLOW_COUNT))) + .hydrate(Arrays.asList(FormsRequestParametersHydrateEnum.FLOW_COUNT)) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java index b49d47cbb..cc1eddc75 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java @@ -10,7 +10,6 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Arrays; -import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -56,7 +55,7 @@ public void testList() throws Exception { .page(OptionalNullable.of(1)) .perPage(OptionalNullable.of(1)) .includeTotals(OptionalNullable.of(true)) - .grantIds(Arrays.asList(Optional.of("grant_ids"))) + .grantIds(Arrays.asList("grant_ids")) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java b/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java index 45b4b859b..c95223bc4 100644 --- a/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java @@ -14,7 +14,6 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Arrays; -import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -56,7 +55,7 @@ public void testList() throws Exception { .perPage(OptionalNullable.of(1)) .includeTotals(OptionalNullable.of(true)) .includeFields(OptionalNullable.of(true)) - .identifiers(Arrays.asList(Optional.of("identifiers"))) + .identifiers(Arrays.asList("identifiers")) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request);