From ff58cdd9e18d9cbf6e6779cd9040fb794b876edd Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 09:34:10 +0000 Subject: [PATCH] SDK regeneration --- reference.md | 1700 ++++++++++++----- .../client/mgmt/AsyncLogStreamsClient.java | 1394 ++++++++------ .../client/mgmt/AsyncOrganizationsClient.java | 8 + .../mgmt/AsyncRawClientGrantsClient.java | 4 + .../client/mgmt/AsyncRawLogStreamsClient.java | 1394 ++++++++------ .../auth0/client/mgmt/LogStreamsClient.java | 1394 ++++++++------ .../client/mgmt/OrganizationsClient.java | 8 + .../client/mgmt/RawClientGrantsClient.java | 4 + .../client/mgmt/RawLogStreamsClient.java | 1394 ++++++++------ .../AsyncDirectoryProvisioningClient.java | 51 + .../AsyncRawDirectoryProvisioningClient.java | 246 +++ .../DirectoryProvisioningClient.java | 50 + .../RawDirectoryProvisioningClient.java | 187 ++ ...stSynchronizedGroupsRequestParameters.java | 195 ++ ...placeSynchronizedGroupsRequestContent.java | 125 ++ .../organizations/AsyncConnectionsClient.java | 102 + .../AsyncRawConnectionsClient.java | 549 ++++++ .../mgmt/organizations/ConnectionsClient.java | 100 + .../organizations/RawConnectionsClient.java | 423 ++++ ...izationAllConnectionRequestParameters.java | 395 ++++ ...zationAllConnectionsRequestParameters.java | 301 +++ ...ganizationConnectionRequestParameters.java | 369 ++++ ...ServiceProfileSsoTicketRequestContent.java | 31 +- .../UpdateTenantSettingsRequestContent.java | 66 +- .../com/auth0/client/mgmt/types/Client.java | 80 + ...gy.java => ClientGrantDefaultForEnum.java} | 28 +- .../types/ClientGrantResponseContent.java | 26 + ...ionConfigurationAllowedStrategiesEnum.java | 141 ++ ...entMyOrganizationDeletionBehaviorEnum.java | 86 + ...lientMyOrganizationPatchConfiguration.java | 287 +++ ...ClientMyOrganizationPostConfiguration.java | 287 +++ ...ntMyOrganizationResponseConfiguration.java | 287 +++ .../types/ClientRedirectionPolicyEnum.java | 86 + .../ClientSessionTransferConfiguration.java | 61 +- ...essionTransferDelegationConfiguration.java | 140 ++ ...onTransferDelegationDeviceBindingEnum.java | 86 + .../ClientThirdPartySecurityModeEnum.java | 86 + .../client/mgmt/types/ConnectedAccount.java | 49 +- ...java => ConnectionDpopSigningAlgEnum.java} | 38 +- .../types/ConnectionIdentityProviderEnum.java | 11 - .../types/ConnectionOptionsCommonOidc.java | 33 + .../mgmt/types/ConnectionOptionsFlickr.java | 276 --- .../mgmt/types/ConnectionOptionsOidc.java | 33 + .../mgmt/types/ConnectionOptionsOkta.java | 33 + .../types/ConnectionPropertiesOptions.java | 26 + .../ConnectionResponseContentFlickr.java | 458 ----- .../mgmt/types/ConnectionStrategyEnum.java | 10 - .../CreateClientGrantRequestContent.java | 32 + .../CreateClientGrantResponseContent.java | 26 + .../types/CreateClientRequestContent.java | 99 + .../types/CreateClientResponseContent.java | 80 + .../CreateConnectionRequestContentFlickr.java | 332 ---- ...teDirectoryProvisioningRequestContent.java | 12 +- ...eDirectoryProvisioningResponseContent.java | 16 +- ...anizationAllConnectionResponseContent.java | 426 +++++ .../mgmt/types/DirectoryProvisioning.java | 16 +- .../EventStreamDeliveryEventTypeEnum.java | 124 +- .../mgmt/types/EventStreamEventTypeEnum.java | 122 +- .../types/EventStreamTestEventTypeEnum.java | 123 +- .../types/GetClientGrantResponseContent.java | 26 + .../mgmt/types/GetClientResponseContent.java | 80 + ...tDirectoryProvisioningResponseContent.java | 16 +- ...anizationAllConnectionResponseContent.java | 426 +++++ .../GetTenantSettingsResponseContent.java | 65 +- .../types/IConnectionOptionsCommonOidc.java | 2 + .../mgmt/types/IdentityProviderEnum.java | 10 - .../ListClientGrantsRequestParameters.java | 79 +- ...ectionsOffsetPaginatedResponseContent.java | 182 ++ ...ListSynchronizedGroupsResponseContent.java | 153 ++ .../client/mgmt/types/NetworkAclMatch.java | 26 - .../types/OrganizationAccessLevelEnum.java | 105 + .../OrganizationAccessLevelEnumWithNull.java | 108 ++ .../types/OrganizationAllConnectionPost.java | 425 +++++ .../RotateClientSecretResponseContent.java | 80 + ...ceProfileSsoTicketDomainAliasesConfig.java | 52 +- ...erviceProfileSsoTicketEnabledFeatures.java | 175 ++ ...EaEnum.java => SynchronizeGroupsEnum.java} | 26 +- .../mgmt/types/SynchronizedGroupPayload.java | 129 ++ ...DynamicClientRegistrationSecurityMode.java | 86 + .../UpdateClientGrantResponseContent.java | 26 + .../types/UpdateClientRequestContent.java | 117 +- .../types/UpdateClientResponseContent.java | 80 + .../mgmt/types/UpdateConnectionOptions.java | 26 + .../UpdateConnectionRequestContentFlickr.java | 212 -- ...teDirectoryProvisioningRequestContent.java | 12 +- ...eDirectoryProvisioningResponseContent.java | 16 +- ...anizationAllConnectionResponseContent.java | 426 +++++ .../UpdateTenantSettingsResponseContent.java | 65 +- .../mgmt/types/UserIdentityProviderEnum.java | 10 - .../client/mgmt/ClientGrantsWireTest.java | 13 +- ...nectionsDirectoryProvisioningWireTest.java | 87 +- .../mgmt/EventStreamsDeliveriesWireTest.java | 8 +- .../EventStreamsRedeliveriesWireTest.java | 4 +- .../client/mgmt/EventStreamsWireTest.java | 8 +- .../OrganizationsConnectionsWireTest.java | 358 ++++ .../mgmt/UsersConnectedAccountsWireTest.java | 2 +- .../ClientsWireTest_testCreate_response.json | 16 +- .../ClientsWireTest_testGet_response.json | 16 +- .../ClientsWireTest_testList_response.json | 8 + ...ntsWireTest_testRotateSecret_response.json | 16 +- .../ClientsWireTest_testUpdate_response.json | 16 +- .../NetworkAclsWireTest_testGet_response.json | 6 - .../NetworkAclsWireTest_testSet_response.json | 6 - ...tworkAclsWireTest_testUpdate_response.json | 6 - ...antsSettingsWireTest_testGet_response.json | 4 +- ...sSettingsWireTest_testUpdate_response.json | 4 +- 106 files changed, 13892 insertions(+), 4473 deletions(-) create mode 100644 src/main/java/com/auth0/client/mgmt/connections/types/ListSynchronizedGroupsRequestParameters.java create mode 100644 src/main/java/com/auth0/client/mgmt/connections/types/ReplaceSynchronizedGroupsRequestContent.java create mode 100644 src/main/java/com/auth0/client/mgmt/organizations/AsyncConnectionsClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/organizations/AsyncRawConnectionsClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/organizations/ConnectionsClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/organizations/RawConnectionsClient.java create mode 100644 src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationAllConnectionRequestParameters.java create mode 100644 src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationAllConnectionsRequestParameters.java create mode 100644 src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationConnectionRequestParameters.java rename src/main/java/com/auth0/client/mgmt/types/{ConnectionResponseContentFlickrStrategy.java => ClientGrantDefaultForEnum.java} (58%) create mode 100644 src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationAllowedStrategiesEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationDeletionBehaviorEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPatchConfiguration.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPostConfiguration.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationResponseConfiguration.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ClientRedirectionPolicyEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDelegationConfiguration.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDelegationDeviceBindingEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ClientThirdPartySecurityModeEnum.java rename src/main/java/com/auth0/client/mgmt/types/{CreateConnectionRequestContentFlickrStrategy.java => ConnectionDpopSigningAlgEnum.java} (53%) delete mode 100644 src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFlickr.java delete mode 100644 src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickr.java delete mode 100644 src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickr.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/CreateOrganizationAllConnectionResponseContent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/GetOrganizationAllConnectionResponseContent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ListOrganizationAllConnectionsOffsetPaginatedResponseContent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/ListSynchronizedGroupsResponseContent.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/OrganizationAccessLevelEnum.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/OrganizationAccessLevelEnumWithNull.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/OrganizationAllConnectionPost.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketEnabledFeatures.java rename src/main/java/com/auth0/client/mgmt/types/{SynchronizeGroupsEaEnum.java => SynchronizeGroupsEnum.java} (65%) create mode 100644 src/main/java/com/auth0/client/mgmt/types/SynchronizedGroupPayload.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/TenantSettingsDynamicClientRegistrationSecurityMode.java delete mode 100644 src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFlickr.java create mode 100644 src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationAllConnectionResponseContent.java create mode 100644 src/test/java/com/auth0/client/mgmt/OrganizationsConnectionsWireTest.java diff --git a/reference.md b/reference.md index d37e177d6..5cdaa50ca 100644 --- a/reference.md +++ b/reference.md @@ -775,6 +775,9 @@ client.clientGrants().list( .subjectType( OptionalNullable.of(ClientGrantSubjectTypeEnum.CLIENT) ) + .defaultFor( + OptionalNullable.of(ClientGrantDefaultForEnum.THIRD_PARTY_CLIENTS) + ) .build() ); ``` @@ -833,6 +836,14 @@ client.clientGrants().list( **subjectType:** `Optional` β€” The type of application access the client grant allows. + + + +
+
+ +**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`. +
@@ -906,6 +917,14 @@ client.clientGrants().create(
+**defaultFor:** `Optional` + +
+
+ +
+
+ **organizationUsage:** `Optional`
@@ -1807,6 +1826,22 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso
+**thirdPartySecurityMode:** `Optional` + +
+
+ +
+
+ +**redirectionPolicy:** `Optional` + +
+
+ +
+
+ **expressConfiguration:** `Optional`
@@ -1815,6 +1850,14 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso
+**myOrganizationConfiguration:** `Optional` + +
+
+ +
+
+ **asyncApprovalNotificationChannels:** `Optional>`
@@ -2576,8 +2619,32 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso
+**myOrganizationConfiguration:** `Optional` + +
+
+ +
+
+ **asyncApprovalNotificationChannels:** `Optional>` +
+
+ +
+
+ +**thirdPartySecurityMode:** `Optional` + +
+
+ +
+
+ +**redirectionPolicy:** `Optional` +
@@ -5405,7 +5472,7 @@ client.eventStreams().test( "id", CreateEventStreamTestEventRequestContent .builder() - .eventType(EventStreamTestEventTypeEnum.USER_CREATED) + .eventType(EventStreamTestEventTypeEnum.GROUP_CREATED) .build() ); ``` @@ -7086,72 +7153,77 @@ client.jobs().get("id");
-Retrieve details on log streams. -
Sample Response
[{
-	"id": "string",
-	"name": "string",
-	"type": "eventbridge",
-	"status": "active|paused|suspended",
-	"sink": {
-		"awsAccountId": "string",
-		"awsRegion": "string",
-		"awsPartnerEventSource": "string"
-	}
+Retrieve details on [log streams](https://auth0.com/docs/logs/streams).
+
+**Sample Response**
+
+```json
+[{
+  "id": "string",
+  "name": "string",
+  "type": "eventbridge",
+  "status": "active|paused|suspended",
+  "sink": {
+    "awsAccountId": "string",
+    "awsRegion": "string",
+    "awsPartnerEventSource": "string"
+  }
 }, {
-	"id": "string",
-	"name": "string",
-	"type": "http",
-	"status": "active|paused|suspended",
-	"sink": {
-		"httpContentFormat": "JSONLINES|JSONARRAY",
-		"httpContentType": "string",
-		"httpEndpoint": "string",
-		"httpAuthorization": "string"
-	}
+  "id": "string",
+  "name": "string",
+  "type": "http",
+  "status": "active|paused|suspended",
+  "sink": {
+    "httpContentFormat": "JSONLINES|JSONARRAY",
+    "httpContentType": "string",
+    "httpEndpoint": "string",
+    "httpAuthorization": "string"
+  }
 },
 {
-	"id": "string",
-	"name": "string",
-	"type": "eventgrid",
-	"status": "active|paused|suspended",
-	"sink": {
-		"azureSubscriptionId": "string",
-		"azureResourceGroup": "string",
-		"azureRegion": "string",
-		"azurePartnerTopic": "string"
-	}
+  "id": "string",
+  "name": "string",
+  "type": "eventgrid",
+  "status": "active|paused|suspended",
+  "sink": {
+    "azureSubscriptionId": "string",
+    "azureResourceGroup": "string",
+    "azureRegion": "string",
+    "azurePartnerTopic": "string"
+  }
 },
 {
-	"id": "string",
-	"name": "string",
-	"type": "splunk",
-	"status": "active|paused|suspended",
-	"sink": {
-		"splunkDomain": "string",
-		"splunkToken": "string",
-		"splunkPort": "string",
-		"splunkSecure": "boolean"
-	}
+  "id": "string",
+  "name": "string",
+  "type": "splunk",
+  "status": "active|paused|suspended",
+  "sink": {
+    "splunkDomain": "string",
+    "splunkToken": "string",
+    "splunkPort": "string",
+    "splunkSecure": "boolean"
+  }
 },
 {
-	"id": "string",
-	"name": "string",
-	"type": "sumo",
-	"status": "active|paused|suspended",
-	"sink": {
-		"sumoSourceAddress": "string",
-	}
+  "id": "string",
+  "name": "string",
+  "type": "sumo",
+  "status": "active|paused|suspended",
+  "sink": {
+    "sumoSourceAddress": "string"
+  }
 },
 {
-	"id": "string",
-	"name": "string",
-	"type": "datadog",
-	"status": "active|paused|suspended",
-	"sink": {
-		"datadogRegion": "string",
-		"datadogApiKey": "string"
-	}
-}]
+ "id": "string", + "name": "string", + "type": "datadog", + "status": "active|paused|suspended", + "sink": { + "datadogRegion": "string", + "datadogApiKey": "string" + } +}] +```
@@ -7191,131 +7263,202 @@ client.logStreams().list();
Create a log stream. -
Log Stream Types
The type of log stream being created determines the properties required in the sink payload. -
HTTP Stream
For an http Stream, the sink properties are listed in the payload below -Request:
{
-	"name": "string",
-	"type": "http",
-	"sink": {
-		"httpEndpoint": "string",
-		"httpContentType": "string",
-		"httpContentFormat": "JSONLINES|JSONARRAY",
-		"httpAuthorization": "string"
-	}
-}
-Response:
{
-	"id": "string",
-	"name": "string",
-	"type": "http",
-	"status": "active",
-	"sink": {
-		"httpEndpoint": "string",
-		"httpContentType": "string",
-		"httpContentFormat": "JSONLINES|JSONARRAY",
-		"httpAuthorization": "string"
-	}
-}
-
Amazon EventBridge Stream
For an eventbridge Stream, the sink properties are listed in the payload below -Request:
{
-	"name": "string",
-	"type": "eventbridge",
-	"sink": {
-		"awsRegion": "string",
-		"awsAccountId": "string"
-	}
-}
-The response will include an additional field awsPartnerEventSource in the sink:
{
-	"id": "string",
-	"name": "string",
-	"type": "eventbridge",
-	"status": "active",
-	"sink": {
-		"awsAccountId": "string",
-		"awsRegion": "string",
-		"awsPartnerEventSource": "string"
-	}
-}
-
Azure Event Grid Stream
For an Azure Event Grid Stream, the sink properties are listed in the payload below -Request:
{
-	"name": "string",
-	"type": "eventgrid",
-	"sink": {
-		"azureSubscriptionId": "string",
-		"azureResourceGroup": "string",
-		"azureRegion": "string"
-	}
-}
-Response:
{
-	"id": "string",
-	"name": "string",
-	"type": "http",
-	"status": "active",
-	"sink": {
-		"azureSubscriptionId": "string",
-		"azureResourceGroup": "string",
-		"azureRegion": "string",
-		"azurePartnerTopic": "string"
-	}
-}
-
Datadog Stream
For a Datadog Stream, the sink properties are listed in the payload below -Request:
{
-	"name": "string",
-	"type": "datadog",
-	"sink": {
-		"datadogRegion": "string",
-		"datadogApiKey": "string"
-	}
-}
-Response:
{
-	"id": "string",
-	"name": "string",
-	"type": "datadog",
-	"status": "active",
-	"sink": {
-		"datadogRegion": "string",
-		"datadogApiKey": "string"
-	}
-}
-
Splunk Stream
For a Splunk Stream, the sink properties are listed in the payload below -Request:
{
-	"name": "string",
-	"type": "splunk",
-	"sink": {
-		"splunkDomain": "string",
-		"splunkToken": "string",
-		"splunkPort": "string",
-		"splunkSecure": "boolean"
-	}
-}
-Response:
{
-	"id": "string",
-	"name": "string",
-	"type": "splunk",
-	"status": "active",
-	"sink": {
-		"splunkDomain": "string",
-		"splunkToken": "string",
-		"splunkPort": "string",
-		"splunkSecure": "boolean"
-	}
-}
-
Sumo Logic Stream
For a Sumo Logic Stream, the sink properties are listed in the payload below -Request:
{
-	"name": "string",
-	"type": "sumo",
-	"sink": {
-		"sumoSourceAddress": "string",
-	}
-}
-Response:
{
-	"id": "string",
-	"name": "string",
-	"type": "sumo",
-	"status": "active",
-	"sink": {
-		"sumoSourceAddress": "string",
-	}
-}
+ +**Log Stream Types** + +The `type` of log stream being created determines the properties required in the `sink` payload. + +**HTTP Stream** + +For an `http` Stream, the `sink` properties are listed in the payload below. + +**Request:** +```json +{ + "name": "string", + "type": "http", + "sink": { + "httpEndpoint": "string", + "httpContentType": "string", + "httpContentFormat": "JSONLINES|JSONARRAY", + "httpAuthorization": "string" + } +} +``` + +**Response:** +```json +{ + "id": "string", + "name": "string", + "type": "http", + "status": "active", + "sink": { + "httpEndpoint": "string", + "httpContentType": "string", + "httpContentFormat": "JSONLINES|JSONARRAY", + "httpAuthorization": "string" + } +} +``` + +**Amazon EventBridge Stream** + +For an `eventbridge` Stream, the `sink` properties are listed in the payload below. + +**Request:** +```json +{ + "name": "string", + "type": "eventbridge", + "sink": { + "awsRegion": "string", + "awsAccountId": "string" + } +} +``` + +The response will include an additional field `awsPartnerEventSource` in the `sink`: + +**Response:** +```json +{ + "id": "string", + "name": "string", + "type": "eventbridge", + "status": "active", + "sink": { + "awsAccountId": "string", + "awsRegion": "string", + "awsPartnerEventSource": "string" + } +} +``` + +**Azure Event Grid Stream** + +For an `Azure Event Grid` Stream, the `sink` properties are listed in the payload below. + +**Request:** +```json +{ + "name": "string", + "type": "eventgrid", + "sink": { + "azureSubscriptionId": "string", + "azureResourceGroup": "string", + "azureRegion": "string" + } +} +``` + +**Response:** +```json +{ + "id": "string", + "name": "string", + "type": "http", + "status": "active", + "sink": { + "azureSubscriptionId": "string", + "azureResourceGroup": "string", + "azureRegion": "string", + "azurePartnerTopic": "string" + } +} +``` + +**Datadog Stream** + +For a `Datadog` Stream, the `sink` properties are listed in the payload below. + +**Request:** +```json +{ + "name": "string", + "type": "datadog", + "sink": { + "datadogRegion": "string", + "datadogApiKey": "string" + } +} +``` + +**Response:** +```json +{ + "id": "string", + "name": "string", + "type": "datadog", + "status": "active", + "sink": { + "datadogRegion": "string", + "datadogApiKey": "string" + } +} +``` + +**Splunk Stream** + +For a `Splunk` Stream, the `sink` properties are listed in the payload below. + +**Request:** +```json +{ + "name": "string", + "type": "splunk", + "sink": { + "splunkDomain": "string", + "splunkToken": "string", + "splunkPort": "string", + "splunkSecure": "boolean" + } +} +``` + +**Response:** +```json +{ + "id": "string", + "name": "string", + "type": "splunk", + "status": "active", + "sink": { + "splunkDomain": "string", + "splunkToken": "string", + "splunkPort": "string", + "splunkSecure": "boolean" + } +} +``` + +**Sumo Logic Stream** + +For a `Sumo Logic` Stream, the `sink` properties are listed in the payload below. + +**Request:** +```json +{ + "name": "string", + "type": "sumo", + "sink": { + "sumoSourceAddress": "string" + } +} +``` + +**Response:** +```json +{ + "id": "string", + "name": "string", + "type": "sumo", + "status": "active", + "sink": { + "sumoSourceAddress": "string" + } +} +```
@@ -7383,138 +7526,188 @@ client.logStreams().create(
Retrieve a log stream configuration and status. -
Sample responses
Amazon EventBridge Log Stream
{
-	"id": "string",
-	"name": "string",
-	"type": "eventbridge",
-	"status": "active|paused|suspended",
-	"sink": {
-		"awsAccountId": "string",
-		"awsRegion": "string",
-		"awsPartnerEventSource": "string"
-	}
-}
HTTP Log Stream
{
-	"id": "string",
-	"name": "string",
-	"type": "http",
-	"status": "active|paused|suspended",
-	"sink": {
-		"httpContentFormat": "JSONLINES|JSONARRAY",
-		"httpContentType": "string",
-		"httpEndpoint": "string",
-		"httpAuthorization": "string"
-	}
-}
Datadog Log Stream
{
-	"id": "string",
-	"name": "string",
-	"type": "datadog",
-	"status": "active|paused|suspended",
-	"sink": {
-		"datadogRegion": "string",
-		"datadogApiKey": "string"
-	}
-
-}
Mixpanel
- - Request:
{
-	  "name": "string",
-	  "type": "mixpanel",
-	  "sink": {
-		"mixpanelRegion": "string", // "us" | "eu",
-		"mixpanelProjectId": "string",
-		"mixpanelServiceAccountUsername": "string",
-		"mixpanelServiceAccountPassword": "string"
-	  }
-	} 
- - - Response:
{
-		"id": "string",
-		"name": "string",
-		"type": "mixpanel",
-		"status": "active",
-		"sink": {
-		  "mixpanelRegion": "string", // "us" | "eu",
-		  "mixpanelProjectId": "string",
-		  "mixpanelServiceAccountUsername": "string",
-		  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-		}
-	  } 
- -
Segment
- - Request:
 {
-	  "name": "string",
-	  "type": "segment",
-	  "sink": {
-		"segmentWriteKey": "string"
-	  }
-	}
- - Response:
{
-	  "id": "string",
-	  "name": "string",
-	  "type": "segment",
-	  "status": "active",
-	  "sink": {
-		"segmentWriteKey": "string"
-	  }
-	} 
- -
Splunk Log Stream
{
-	"id": "string",
-	"name": "string",
-	"type": "splunk",
-	"status": "active|paused|suspended",
-	"sink": {
-		"splunkDomain": "string",
-		"splunkToken": "string",
-		"splunkPort": "string",
-		"splunkSecure": "boolean"
-	}
-}
Sumo Logic Log Stream
{
-	"id": "string",
-	"name": "string",
-	"type": "sumo",
-	"status": "active|paused|suspended",
-	"sink": {
-		"sumoSourceAddress": "string",
-	}
-}
Status
The status of a log stream maybe any of the following: -1. active - Stream is currently enabled. -2. paused - Stream is currently user disabled and will not attempt log delivery. -3. suspended - Stream is currently disabled because of errors and will not attempt log delivery. -
-
- -
-#### πŸ”Œ Usage +**Sample responses** -
-
+**Amazon EventBridge Log Stream** -
-
+```json +{ + "id": "string", + "name": "string", + "type": "eventbridge", + "status": "active|paused|suspended", + "sink": { + "awsAccountId": "string", + "awsRegion": "string", + "awsPartnerEventSource": "string" + } +} +``` -```java -client.logStreams().get("id"); +**HTTP Log Stream** + +```json +{ + "id": "string", + "name": "string", + "type": "http", + "status": "active|paused|suspended", + "sink": { + "httpContentFormat": "JSONLINES|JSONARRAY", + "httpContentType": "string", + "httpEndpoint": "string", + "httpAuthorization": "string" + } +} ``` -
-
-
-
-#### βš™οΈ Parameters +**Datadog Log Stream** -
-
+```json +{ + "id": "string", + "name": "string", + "type": "datadog", + "status": "active|paused|suspended", + "sink": { + "datadogRegion": "string", + "datadogApiKey": "string" + } +} +``` -
-
+**Mixpanel** -**id:** `String` β€” The id of the log stream to get - +**Request:** + +```json +{ + "name": "string", + "type": "mixpanel", + "sink": { + "mixpanelRegion": "string", + "mixpanelProjectId": "string", + "mixpanelServiceAccountUsername": "string", + "mixpanelServiceAccountPassword": "string" + } +} +``` + +**Response:** + +```json +{ + "id": "string", + "name": "string", + "type": "mixpanel", + "status": "active", + "sink": { + "mixpanelRegion": "string", + "mixpanelProjectId": "string", + "mixpanelServiceAccountUsername": "string", + "mixpanelServiceAccountPassword": "string" + } +} +``` + +**Segment** + +**Request:** + +```json +{ + "name": "string", + "type": "segment", + "sink": { + "segmentWriteKey": "string" + } +} +``` + +**Response:** + +```json +{ + "id": "string", + "name": "string", + "type": "segment", + "status": "active", + "sink": { + "segmentWriteKey": "string" + } +} +``` + +**Splunk Log Stream** + +```json +{ + "id": "string", + "name": "string", + "type": "splunk", + "status": "active|paused|suspended", + "sink": { + "splunkDomain": "string", + "splunkToken": "string", + "splunkPort": "string", + "splunkSecure": "boolean" + } +} +``` + +**Sumo Logic Log Stream** + +```json +{ + "id": "string", + "name": "string", + "type": "sumo", + "status": "active|paused|suspended", + "sink": { + "sumoSourceAddress": "string" + } +} +``` + +**Status** + +The `status` of a log stream maybe any of the following: + +1. `active` - Stream is currently enabled. +2. `paused` - Stream is currently user disabled and will not attempt log delivery. +3. `suspended` - Stream is currently disabled because of errors and will not attempt log delivery. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```java +client.logStreams().get("id"); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**id:** `String` β€” The id of the log stream to get +
@@ -7592,40 +7785,79 @@ client.logStreams().delete("id");
Update a log stream. -

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. -
Update the status of a log stream
{
-	"status": "active|paused"
-}
-
Update the name of a log stream
{
-	"name": "string"
-}
-
Update the sink properties of a stream of type http
{
+
+**Examples of how to use the PATCH endpoint.**
+
+The following fields may be updated in a PATCH operation:
+
+- name
+- status
+- sink
+
+Note: For log streams of type `eventbridge` and `eventgrid`, updating the `sink` is not permitted.
+
+**Update the status of a log stream**
+
+```json
+{
+  "status": "active|paused"
+}
+```
+
+**Update the name of a log stream**
+
+```json
+{
+  "name": "string"
+}
+```
+
+**Update the sink properties of a stream of type `http`**
+
+```json
+{
   "sink": {
     "httpEndpoint": "string",
     "httpContentType": "string",
     "httpContentFormat": "JSONARRAY|JSONLINES",
     "httpAuthorization": "string"
   }
-}
-
Update the sink properties of a stream of type datadog
{
+}
+```
+
+**Update the sink properties of a stream of type `datadog`**
+
+```json
+{
   "sink": {
-		"datadogRegion": "string",
-		"datadogApiKey": "string"
+    "datadogRegion": "string",
+    "datadogApiKey": "string"
   }
-}
-
Update the sink properties of a stream of type splunk
{
+}
+```
+
+**Update the sink properties of a stream of type `splunk`**
+
+```json
+{
   "sink": {
     "splunkDomain": "string",
     "splunkToken": "string",
     "splunkPort": "string",
     "splunkSecure": "boolean"
   }
-}
-
Update the sink properties of a stream of type sumo
{
+}
+```
+
+**Update the sink properties of a stream of type `sumo`**
+
+```json
+{
   "sink": {
     "sumoSourceAddress": "string"
   }
-}
+} +```
@@ -18349,8 +18581,7 @@ client.connections().directoryProvisioning().getDefaultMapping("id"); -## Connections ScimConfiguration -
client.connections.scimConfiguration.list() -> SyncPagingIterable&lt;ScimConfiguration&gt; +
client.connections.directoryProvisioning.listSynchronizedGroups(id) -> SyncPagingIterable&lt;SynchronizedGroupPayload&gt;
@@ -18362,7 +18593,7 @@ client.connections().directoryProvisioning().getDefaultMapping("id");
-Retrieve a list of SCIM configurations of a tenant. +Retrieve the configured synchronized groups for a connection directory provisioning configuration.
@@ -18377,8 +18608,9 @@ Retrieve a list of SCIM configurations of a tenant.
```java -client.connections().scimConfiguration().list( - ListScimConfigurationsRequestParameters +client.connections().directoryProvisioning().listSynchronizedGroups( + "id", + ListSynchronizedGroupsRequestParameters .builder() .from( OptionalNullable.of("from") @@ -18402,6 +18634,14 @@ client.connections().scimConfiguration().list(
+**id:** `String` β€” The id of the connection to list synchronized groups for. + +
+
+ +
+
+ **from:** `Optional` β€” Optional Id from which to start selection.
@@ -18422,7 +18662,7 @@ client.connections().scimConfiguration().list(
-
client.connections.scimConfiguration.get(id) -> GetScimConfigurationResponseContent +
client.connections.directoryProvisioning.set(id, request)
@@ -18434,7 +18674,7 @@ client.connections().scimConfiguration().list(
-Retrieves a scim configuration by its connectionId. +Create or replace the selected groups for a connection directory provisioning configuration.
@@ -18449,7 +18689,20 @@ Retrieves a scim configuration by its connectionId.
```java -client.connections().scimConfiguration().get("id"); +client.connections().directoryProvisioning().set( + "id", + ReplaceSynchronizedGroupsRequestContent + .builder() + .groups( + Arrays.asList( + SynchronizedGroupPayload + .builder() + .id("id") + .build() + ) + ) + .build() +); ```
@@ -18464,7 +18717,15 @@ client.connections().scimConfiguration().get("id");
-**id:** `String` β€” The id of the connection to retrieve its SCIM configuration +**id:** `String` β€” The id of the connection to create or replace synchronized groups for + +
+
+ +
+
+ +**groups:** `List` β€” Array of Google Workspace Directory group objects to synchronize.
@@ -18476,7 +18737,8 @@ client.connections().scimConfiguration().get("id");
-
client.connections.scimConfiguration.create(id, request) -> CreateScimConfigurationResponseContent +## Connections ScimConfiguration +
client.connections.scimConfiguration.list() -> SyncPagingIterable&lt;ScimConfiguration&gt;
@@ -18488,7 +18750,7 @@ client.connections().scimConfiguration().get("id");
-Create a scim configuration for a connection. +Retrieve a list of SCIM configurations of a tenant.
@@ -18503,9 +18765,16 @@ Create a scim configuration for a connection.
```java -client.connections().scimConfiguration().create( - "id", - OptionalNullable.absent() +client.connections().scimConfiguration().list( + ListScimConfigurationsRequestParameters + .builder() + .from( + OptionalNullable.of("from") + ) + .take( + OptionalNullable.of(1) + ) + .build() ); ```
@@ -18521,7 +18790,7 @@ client.connections().scimConfiguration().create(
-**id:** `String` β€” The id of the connection to create its SCIM configuration +**from:** `Optional` β€” Optional Id from which to start selection.
@@ -18529,7 +18798,7 @@ client.connections().scimConfiguration().create(
-**request:** `Optional` +**take:** `Optional` β€” Number of results per page. Defaults to 50.
@@ -18541,7 +18810,7 @@ client.connections().scimConfiguration().create(
-
client.connections.scimConfiguration.delete(id) +
client.connections.scimConfiguration.get(id) -> GetScimConfigurationResponseContent
@@ -18553,7 +18822,7 @@ client.connections().scimConfiguration().create(
-Deletes a scim configuration by its connectionId. +Retrieves a scim configuration by its connectionId.
@@ -18568,7 +18837,7 @@ Deletes a scim configuration by its connectionId.
```java -client.connections().scimConfiguration().delete("id"); +client.connections().scimConfiguration().get("id"); ```
@@ -18583,7 +18852,7 @@ client.connections().scimConfiguration().delete("id");
-**id:** `String` β€” The id of the connection to delete its SCIM configuration +**id:** `String` β€” The id of the connection to retrieve its SCIM configuration
@@ -18595,7 +18864,7 @@ client.connections().scimConfiguration().delete("id");
-
client.connections.scimConfiguration.update(id, request) -> UpdateScimConfigurationResponseContent +
client.connections.scimConfiguration.create(id, request) -> CreateScimConfigurationResponseContent
@@ -18607,7 +18876,7 @@ client.connections().scimConfiguration().delete("id");
-Update a scim configuration by its connectionId. +Create a scim configuration for a connection.
@@ -18622,19 +18891,9 @@ Update a scim configuration by its connectionId.
```java -client.connections().scimConfiguration().update( +client.connections().scimConfiguration().create( "id", - UpdateScimConfigurationRequestContent - .builder() - .userIdAttribute("user_id_attribute") - .mapping( - Arrays.asList( - ScimMappingItem - .builder() - .build() - ) - ) - .build() + OptionalNullable.absent() ); ```
@@ -18650,15 +18909,7 @@ client.connections().scimConfiguration().update(
-**id:** `String` β€” The id of the connection to update its SCIM configuration - -
-
- -
-
- -**userIdAttribute:** `String` β€” User ID attribute for generating unique user ids +**id:** `String` β€” The id of the connection to create its SCIM configuration
@@ -18666,7 +18917,7 @@ client.connections().scimConfiguration().update(
-**mapping:** `List` β€” The mapping between auth0 and SCIM +**request:** `Optional`
@@ -18678,7 +18929,7 @@ client.connections().scimConfiguration().update(
-
client.connections.scimConfiguration.getDefaultMapping(id) -> GetScimConfigurationDefaultMappingResponseContent +
client.connections.scimConfiguration.delete(id)
@@ -18690,7 +18941,7 @@ client.connections().scimConfiguration().update(
-Retrieves a scim configuration's default mapping by its connectionId. +Deletes a scim configuration by its connectionId.
@@ -18705,7 +18956,7 @@ Retrieves a scim configuration's default mapping by its connectionId ```java -client.connections().scimConfiguration().getDefaultMapping("id"); +client.connections().scimConfiguration().delete("id"); ```
@@ -18720,7 +18971,7 @@ client.connections().scimConfiguration().getDefaultMapping("id");
-**id:** `String` β€” The id of the connection to retrieve its default SCIM mapping +**id:** `String` β€” The id of the connection to delete its SCIM configuration
@@ -18732,8 +18983,7 @@ client.connections().scimConfiguration().getDefaultMapping("id");
-## Connections Clients -
client.connections.clients.get(id) -> SyncPagingIterable&lt;ConnectionEnabledClient&gt; +
client.connections.scimConfiguration.update(id, request) -> UpdateScimConfigurationResponseContent
@@ -18745,9 +18995,7 @@ client.connections().scimConfiguration().getDefaultMapping("id");
-Retrieve all clients that have the specified connection enabled. - -Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. +Update a scim configuration by its connectionId.
@@ -18762,15 +19010,17 @@ Retrieve all clients that have the specified
-**id:** `String` β€” The id of the connection for which enabled clients are to be retrieved +**id:** `String` β€” The id of the connection to update its SCIM configuration
@@ -18796,7 +19046,7 @@ client.connections().clients().get(
-**take:** `Optional` β€” Number of results per page. Defaults to 50. +**userIdAttribute:** `String` β€” User ID attribute for generating unique user ids
@@ -18804,7 +19054,145 @@ client.connections().clients().get(
-**from:** `Optional` β€” Optional Id from which to start selection. +**mapping:** `List` β€” The mapping between auth0 and SCIM + +
+
+ + + + + + +
+ +
client.connections.scimConfiguration.getDefaultMapping(id) -> GetScimConfigurationDefaultMappingResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a scim configuration's default mapping by its connectionId. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```java +client.connections().scimConfiguration().getDefaultMapping("id"); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**id:** `String` β€” The id of the connection to retrieve its default SCIM mapping + +
+
+
+
+ + +
+
+
+ +## Connections Clients +
client.connections.clients.get(id) -> SyncPagingIterable&lt;ConnectionEnabledClient&gt; +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieve all clients that have the specified connection enabled. + +Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```java +client.connections().clients().get( + "id", + GetConnectionEnabledClientsRequestParameters + .builder() + .take( + OptionalNullable.of(1) + ) + .from( + OptionalNullable.of("from") + ) + .build() +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**id:** `String` β€” The id of the connection for which enabled clients are to be retrieved + +
+
+ +
+
+ +**take:** `Optional` β€” Number of results per page. Defaults to 50. + +
+
+ +
+
+ +**from:** `Optional` β€” Optional Id from which to start selection.
@@ -24164,26 +24552,11 @@ client.organizations().clientGrants().delete("id", "grant_id");
-## Organizations DiscoveryDomains -
client.organizations.discoveryDomains.list(id) -> SyncPagingIterable&lt;OrganizationDiscoveryDomain&gt; -
-
- -#### πŸ“ Description - -
-
- +## Organizations Connections +
client.organizations.connections.list(id) -> SyncPagingIterable&lt;OrganizationAllConnectionPost&gt;
-Retrieve list of all organization discovery domains associated with the specified organization. -This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. -
-
-
-
- #### πŸ”Œ Usage
@@ -24193,16 +24566,22 @@ This endpoint is subject to eventual consistency; newly created, updated, or del
```java -client.organizations().discoveryDomains().list( +client.organizations().connections().list( "id", - ListOrganizationDiscoveryDomainsRequestParameters + ListOrganizationAllConnectionsRequestParameters .builder() - .from( - OptionalNullable.of("from") + .page( + OptionalNullable.of(1) ) - .take( + .perPage( OptionalNullable.of(1) ) + .includeTotals( + OptionalNullable.of(true) + ) + .isEnabled( + OptionalNullable.of(true) + ) .build() ); ``` @@ -24219,7 +24598,7 @@ client.organizations().discoveryDomains().list(
-**id:** `String` β€” ID of the organization. +**id:** `String` β€” Organization identifier.
@@ -24227,7 +24606,7 @@ client.organizations().discoveryDomains().list(
-**from:** `Optional` β€” Optional Id from which to start selection. +**page:** `Optional` β€” Page index of the results to return. First page is 0.
@@ -24235,36 +24614,38 @@ client.organizations().discoveryDomains().list(
-**take:** `Optional` β€” Number of results per page. Defaults to 50. +**perPage:** `Optional` β€” Number of results per page. Defaults to 50.
-
-
- -
-
-
- -
client.organizations.discoveryDomains.create(id, request) -> CreateOrganizationDiscoveryDomainResponseContent
-#### πŸ“ Description - -
-
+**includeTotals:** `Optional` β€” Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + +
+
-Create a new discovery domain for an organization. +**isEnabled:** `Optional` β€” Filter connections by enabled status. +
+ + + +
+ +
client.organizations.connections.create(id, request) -> CreateOrganizationAllConnectionResponseContent +
+
+ #### πŸ”Œ Usage
@@ -24274,11 +24655,11 @@ Create a new discovery domain for an organization.
```java -client.organizations().discoveryDomains().create( +client.organizations().connections().create( "id", - CreateOrganizationDiscoveryDomainRequestContent + CreateOrganizationAllConnectionRequestParameters .builder() - .domain("domain") + .connectionId("connection_id") .build() ); ``` @@ -24295,7 +24676,7 @@ client.organizations().discoveryDomains().create(
-**id:** `String` β€” ID of the organization. +**id:** `String` β€” Organization identifier.
@@ -24303,7 +24684,7 @@ client.organizations().discoveryDomains().create(
-**domain:** `String` β€” The domain name to associate with the organization e.g. acme.com. +**organizationConnectionName:** `Optional` β€” Name of the connection in the scope of this organization.
@@ -24311,7 +24692,7 @@ client.organizations().discoveryDomains().create(
-**status:** `Optional` +**assignMembershipOnLogin:** `Optional` β€” 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.
@@ -24319,36 +24700,53 @@ client.organizations().discoveryDomains().create(
-**useForOrganizationDiscovery:** `Optional` β€” Indicates whether this domain should be used for organization discovery. +**showAsButton:** `Optional` β€” Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.
-
-
+
+
+**isSignupEnabled:** `Optional` β€” Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false. +
-
-
client.organizations.discoveryDomains.getByName(id, discoveryDomain) -> GetOrganizationDiscoveryDomainByNameResponseContent
-#### πŸ“ Description +**organizationAccessLevel:** `Optional` + +
+
+**isEnabled:** `Optional` β€” Whether the connection is enabled for the organization. + +
+
+
-Retrieve details about a single organization discovery domain specified by domain name. -This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. +**connectionId:** `String` β€” Connection identifier. + +
+
+ + +
+ +
client.organizations.connections.get(id, connectionId) -> GetOrganizationAllConnectionResponseContent +
+
#### πŸ”Œ Usage @@ -24359,7 +24757,7 @@ This endpoint is subject to eventual consistency; newly created, updated, or del
```java -client.organizations().discoveryDomains().getByName("id", "discovery_domain"); +client.organizations().connections().get("id", "connection_id"); ```
@@ -24374,7 +24772,7 @@ client.organizations().discoveryDomains().getByName("id", "discovery_domain");
-**id:** `String` β€” ID of the organization. +**id:** `String` β€” Organization identifier.
@@ -24382,7 +24780,7 @@ client.organizations().discoveryDomains().getByName("id", "discovery_domain");
-**discoveryDomain:** `String` β€” Domain name of the discovery domain. +**connectionId:** `String` β€” Connection identifier.
@@ -24394,11 +24792,11 @@ client.organizations().discoveryDomains().getByName("id", "discovery_domain");
-
client.organizations.discoveryDomains.get(id, discoveryDomainId) -> GetOrganizationDiscoveryDomainResponseContent +
client.organizations.connections.delete(id, connectionId)
-#### πŸ“ Description +#### πŸ”Œ Usage
@@ -24406,14 +24804,15 @@ client.organizations().discoveryDomains().getByName("id", "discovery_domain");
-Retrieve details about a single organization discovery domain specified by ID. -This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. +```java +client.organizations().connections().delete("id", "connection_id"); +```
-#### πŸ”Œ Usage +#### βš™οΈ Parameters
@@ -24421,9 +24820,388 @@ This endpoint is subject to eventual consistency; newly created, updated, or del
-```java -client.organizations().discoveryDomains().get("id", "discovery_domain_id"); -``` +**id:** `String` β€” Organization identifier. + +
+
+ +
+
+ +**connectionId:** `String` β€” Connection identifier. + +
+
+
+
+ + +
+
+
+ +
client.organizations.connections.update(id, connectionId, request) -> UpdateOrganizationAllConnectionResponseContent +
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```java +client.organizations().connections().update( + "id", + "connection_id", + UpdateOrganizationConnectionRequestParameters + .builder() + .build() +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**id:** `String` β€” Organization identifier. + +
+
+ +
+
+ +**connectionId:** `String` β€” Connection identifier. + +
+
+ +
+
+ +**organizationConnectionName:** `Optional` β€” Name of the connection in the scope of this organization. + +
+
+ +
+
+ +**assignMembershipOnLogin:** `Optional` β€” 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. + +
+
+ +
+
+ +**showAsButton:** `Optional` β€” Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true. + +
+
+ +
+
+ +**isSignupEnabled:** `Optional` β€” Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false. + +
+
+ +
+
+ +**organizationAccessLevel:** `Optional` + +
+
+ +
+
+ +**isEnabled:** `Optional` β€” Whether the connection is enabled for the organization. + +
+
+
+
+ + +
+
+
+ +## Organizations DiscoveryDomains +
client.organizations.discoveryDomains.list(id) -> SyncPagingIterable&lt;OrganizationDiscoveryDomain&gt; +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieve list of all organization discovery domains associated with the specified organization. +This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```java +client.organizations().discoveryDomains().list( + "id", + ListOrganizationDiscoveryDomainsRequestParameters + .builder() + .from( + OptionalNullable.of("from") + ) + .take( + OptionalNullable.of(1) + ) + .build() +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**id:** `String` β€” ID of the organization. + +
+
+ +
+
+ +**from:** `Optional` β€” Optional Id from which to start selection. + +
+
+ +
+
+ +**take:** `Optional` β€” Number of results per page. Defaults to 50. + +
+
+
+
+ + +
+
+
+ +
client.organizations.discoveryDomains.create(id, request) -> CreateOrganizationDiscoveryDomainResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Create a new discovery domain for an organization. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```java +client.organizations().discoveryDomains().create( + "id", + CreateOrganizationDiscoveryDomainRequestContent + .builder() + .domain("domain") + .build() +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**id:** `String` β€” ID of the organization. + +
+
+ +
+
+ +**domain:** `String` β€” The domain name to associate with the organization e.g. acme.com. + +
+
+ +
+
+ +**status:** `Optional` + +
+
+ +
+
+ +**useForOrganizationDiscovery:** `Optional` β€” Indicates whether this domain should be used for organization discovery. + +
+
+
+
+ + +
+
+
+ +
client.organizations.discoveryDomains.getByName(id, discoveryDomain) -> GetOrganizationDiscoveryDomainByNameResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieve details about a single organization discovery domain specified by domain name. +This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```java +client.organizations().discoveryDomains().getByName("id", "discovery_domain"); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**id:** `String` β€” ID of the organization. + +
+
+ +
+
+ +**discoveryDomain:** `String` β€” Domain name of the discovery domain. + +
+
+
+
+ + +
+
+
+ +
client.organizations.discoveryDomains.get(id, discoveryDomainId) -> GetOrganizationDiscoveryDomainResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieve details about a single organization discovery domain specified by ID. +This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```java +client.organizations().discoveryDomains().get("id", "discovery_domain_id"); +```
@@ -27451,6 +28229,14 @@ client.selfServiceProfiles().ssoTicket().create( **useForOrganizationDiscovery:** `Optional` β€” Indicates whether a verified domain should be used for organization discovery during authentication. +
+
+ +
+
+ +**enabledFeatures:** `Optional` +
@@ -27903,6 +28689,14 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso
+**clientIdMetadataDocumentSupported:** `Optional` β€” Whether the authorization server supports retrieving client metadata from a client_id URL. + +
+
+ +
+
+ **enableAiGuide:** `Optional` β€” Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant.
@@ -27913,6 +28707,14 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso **phoneConsolidatedExperience:** `Optional` β€” Whether Phone Consolidated Experience is enabled for this tenant. + +
+ +
+
+ +**dynamicClientRegistrationSecurityMode:** `Optional` +
diff --git a/src/main/java/com/auth0/client/mgmt/AsyncLogStreamsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncLogStreamsClient.java index d7e08394c..e9efbade2 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncLogStreamsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncLogStreamsClient.java @@ -33,71 +33,73 @@ public AsyncRawLogStreamsClient withRawResponse() { /** * Retrieve details on log streams. - *

Sample Response
[{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
+     * 

Sample Response

+ *
[{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
      * }, {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }]

+ * "id": "string", + * "name": "string", + * "type": "datadog", + * "status": "active|paused|suspended", + * "sink": { + * "datadogRegion": "string", + * "datadogApiKey": "string" + * } + * }] + *
*/ public CompletableFuture> list() { return this.rawClient.list().thenApply(response -> response.body()); @@ -105,71 +107,73 @@ public CompletableFuture> list() { /** * Retrieve details on log streams. - *

Sample Response
[{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
+     * 

Sample Response

+ *
[{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
      * }, {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }]

+ * "id": "string", + * "name": "string", + * "type": "datadog", + * "status": "active|paused|suspended", + * "sink": { + * "datadogRegion": "string", + * "datadogApiKey": "string" + * } + * }] + *
*/ public CompletableFuture> list(RequestOptions requestOptions) { return this.rawClient.list(requestOptions).thenApply(response -> response.body()); @@ -177,131 +181,163 @@ public CompletableFuture> list(RequestOptions requ /** * Create a log stream. - *

Log Stream Types
The type of log stream being created determines the properties required in the sink payload. - *
HTTP Stream
For an http Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- *
Amazon EventBridge Stream
For an eventbridge Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"sink": {
-     * 		"awsRegion": "string",
-     * 		"awsAccountId": "string"
-     * 	}
-     * }
- * The response will include an additional field awsPartnerEventSource in the sink:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
- *
Azure Event Grid Stream
For an Azure Event Grid Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
-     * }
- *
Datadog Stream
For a Datadog Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- *
Splunk Stream
For a Splunk Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- *
Sumo Logic Stream
For a Sumo Logic Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }

+ *

Log Stream Types

+ *

The type of log stream being created determines the properties required in the sink payload.

+ *

HTTP Stream

+ *

For an http Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "http",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Amazon EventBridge Stream

+ *

For an eventbridge Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "sink": {
+     *     "awsRegion": "string",
+     *     "awsAccountId": "string"
+     *   }
+     * }
+     * 
+ *

The response will include an additional field awsPartnerEventSource in the sink:

+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

Azure Event Grid Stream

+ *

For an Azure Event Grid Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Stream

+ *

For a Datadog Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Splunk Stream

+ *

For a Splunk Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Stream

+ *

For a Sumo Logic Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
*/ public CompletableFuture create(CreateLogStreamRequestContent request) { return this.rawClient.create(request).thenApply(response -> response.body()); @@ -309,131 +345,163 @@ public CompletableFuture create(CreateLogStreamR /** * Create a log stream. - *

Log Stream Types
The type of log stream being created determines the properties required in the sink payload. - *
HTTP Stream
For an http Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- *
Amazon EventBridge Stream
For an eventbridge Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"sink": {
-     * 		"awsRegion": "string",
-     * 		"awsAccountId": "string"
-     * 	}
-     * }
- * The response will include an additional field awsPartnerEventSource in the sink:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
- *
Azure Event Grid Stream
For an Azure Event Grid Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
-     * }
- *
Datadog Stream
For a Datadog Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- *
Splunk Stream
For a Splunk Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- *
Sumo Logic Stream
For a Sumo Logic Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }

+ *

Log Stream Types

+ *

The type of log stream being created determines the properties required in the sink payload.

+ *

HTTP Stream

+ *

For an http Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "http",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Amazon EventBridge Stream

+ *

For an eventbridge Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "sink": {
+     *     "awsRegion": "string",
+     *     "awsAccountId": "string"
+     *   }
+     * }
+     * 
+ *

The response will include an additional field awsPartnerEventSource in the sink:

+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

Azure Event Grid Stream

+ *

For an Azure Event Grid Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Stream

+ *

For a Datadog Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Splunk Stream

+ *

For a Splunk Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Stream

+ *

For a Sumo Logic Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
*/ public CompletableFuture create( CreateLogStreamRequestContent request, RequestOptions requestOptions) { @@ -442,105 +510,126 @@ public CompletableFuture create( /** * Retrieve a log stream configuration and status. - *

Sample responses
Amazon EventBridge Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
HTTP Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
Datadog Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}

- *

}

Mixpanel

- *
Request: 
{
+     * 

Sample responses

+ *

Amazon EventBridge Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

HTTP Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Mixpanel

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "mixpanel",
+     *   "sink": {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
      *   "name": "string",
      *   "type": "mixpanel",
+     *   "status": "active",
      *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } 
- * - * - * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } 
- * - *
Segment
- * - * Request:
 {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Segment

+ *

Request:

+ *
{
      *   "name": "string",
      *   "type": "segment",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
+     *     "segmentWriteKey": "string"
      *   }
-     * }
- * - * Response:
{
+     * }
+     * 
+ *

Response:

+ *
{
      *   "id": "string",
      *   "name": "string",
      *   "type": "segment",
      *   "status": "active",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } 
- *
- *

Splunk Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
Sumo Logic Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
Status
The status of a log stream maybe any of the following: - * 1. active - Stream is currently enabled. - * 2. paused - Stream is currently user disabled and will not attempt log delivery. - * 3. suspended - Stream is currently disabled because of errors and will not attempt log delivery.

+ * "segmentWriteKey": "string" + * } + * } + *
+ *

Splunk Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Status

+ *

The status of a log stream maybe any of the following:

+ *
    + *
  1. active - Stream is currently enabled.
  2. + *
  3. paused - Stream is currently user disabled and will not attempt log delivery.
  4. + *
  5. suspended - Stream is currently disabled because of errors and will not attempt log delivery.
  6. + *
*/ public CompletableFuture get(String id) { return this.rawClient.get(id).thenApply(response -> response.body()); @@ -548,105 +637,126 @@ public CompletableFuture get(String id) { /** * Retrieve a log stream configuration and status. - *

Sample responses
Amazon EventBridge Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
HTTP Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
Datadog Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}

- *

}

Mixpanel

- *
Request: 
{
+     * 

Sample responses

+ *

Amazon EventBridge Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

HTTP Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Mixpanel

+ *

Request:

+ *
{
      *   "name": "string",
      *   "type": "mixpanel",
      *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } 
- * - * - * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } 
- * - *
Segment
- * - * Request:
 {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "mixpanel",
+     *   "status": "active",
+     *   "sink": {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Segment

+ *

Request:

+ *
{
      *   "name": "string",
      *   "type": "segment",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
+     *     "segmentWriteKey": "string"
      *   }
-     * }
- * - * Response:
{
+     * }
+     * 
+ *

Response:

+ *
{
      *   "id": "string",
      *   "name": "string",
      *   "type": "segment",
      *   "status": "active",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } 
- *
- *

Splunk Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
Sumo Logic Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
Status
The status of a log stream maybe any of the following: - * 1. active - Stream is currently enabled. - * 2. paused - Stream is currently user disabled and will not attempt log delivery. - * 3. suspended - Stream is currently disabled because of errors and will not attempt log delivery.

+ * "segmentWriteKey": "string" + * } + * } + *
+ *

Splunk Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Status

+ *

The status of a log stream maybe any of the following:

+ *
    + *
  1. active - Stream is currently enabled.
  2. + *
  3. paused - Stream is currently user disabled and will not attempt log delivery.
  4. + *
  5. suspended - Stream is currently disabled because of errors and will not attempt log delivery.
  6. + *
*/ public CompletableFuture get(String id, RequestOptions requestOptions) { return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); @@ -668,40 +778,59 @@ public CompletableFuture delete(String id, RequestOptions requestOptions) /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public CompletableFuture update(String id) { return this.rawClient.update(id).thenApply(response -> response.body()); @@ -709,40 +838,59 @@ public CompletableFuture update(String id) { /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public CompletableFuture update(String id, RequestOptions requestOptions) { return this.rawClient.update(id, requestOptions).thenApply(response -> response.body()); @@ -750,40 +898,59 @@ public CompletableFuture update(String id, Reque /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public CompletableFuture update(String id, UpdateLogStreamRequestContent request) { return this.rawClient.update(id, request).thenApply(response -> response.body()); @@ -791,40 +958,59 @@ public CompletableFuture update(String id, Updat /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public CompletableFuture update( String id, UpdateLogStreamRequestContent request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java index 5489a3809..471b87167 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java @@ -8,6 +8,7 @@ import com.auth0.client.mgmt.core.Suppliers; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.AsyncClientGrantsClient; +import com.auth0.client.mgmt.organizations.AsyncConnectionsClient; import com.auth0.client.mgmt.organizations.AsyncDiscoveryDomainsClient; import com.auth0.client.mgmt.organizations.AsyncEnabledConnectionsClient; import com.auth0.client.mgmt.organizations.AsyncInvitationsClient; @@ -30,6 +31,8 @@ public class AsyncOrganizationsClient { protected final Supplier clientGrantsClient; + protected final Supplier connectionsClient; + protected final Supplier discoveryDomainsClient; protected final Supplier enabledConnectionsClient; @@ -42,6 +45,7 @@ public AsyncOrganizationsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.rawClient = new AsyncRawOrganizationsClient(clientOptions); this.clientGrantsClient = Suppliers.memoize(() -> new AsyncClientGrantsClient(clientOptions)); + this.connectionsClient = Suppliers.memoize(() -> new AsyncConnectionsClient(clientOptions)); this.discoveryDomainsClient = Suppliers.memoize(() -> new AsyncDiscoveryDomainsClient(clientOptions)); this.enabledConnectionsClient = Suppliers.memoize(() -> new AsyncEnabledConnectionsClient(clientOptions)); this.invitationsClient = Suppliers.memoize(() -> new AsyncInvitationsClient(clientOptions)); @@ -230,6 +234,10 @@ public AsyncClientGrantsClient clientGrants() { return this.clientGrantsClient.get(); } + public AsyncConnectionsClient connections() { + return this.connectionsClient.get(); + } + public AsyncDiscoveryDomainsClient discoveryDomains() { return this.discoveryDomainsClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawClientGrantsClient.java index 9bb1794f2..048e3712e 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawClientGrantsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawClientGrantsClient.java @@ -106,6 +106,10 @@ public CompletableFuture { httpUrl.addQueryParameter(_key, _value); diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawLogStreamsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawLogStreamsClient.java index 70770a881..b619ac29b 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawLogStreamsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawLogStreamsClient.java @@ -47,71 +47,73 @@ public AsyncRawLogStreamsClient(ClientOptions clientOptions) { /** * Retrieve details on log streams. - *

Sample Response
[{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
+     * 

Sample Response

+ *
[{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
      * }, {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }]

+ * "id": "string", + * "name": "string", + * "type": "datadog", + * "status": "active|paused|suspended", + * "sink": { + * "datadogRegion": "string", + * "datadogApiKey": "string" + * } + * }] + *
*/ public CompletableFuture>> list() { return list(null); @@ -119,71 +121,73 @@ public CompletableFuture /** * Retrieve details on log streams. - *

Sample Response
[{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
+     * 

Sample Response

+ *
[{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
      * }, {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }]

+ * "id": "string", + * "name": "string", + * "type": "datadog", + * "status": "active|paused|suspended", + * "sink": { + * "datadogRegion": "string", + * "datadogApiKey": "string" + * } + * }] + *
*/ public CompletableFuture>> list( RequestOptions requestOptions) { @@ -263,131 +267,163 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { /** * Create a log stream. - *

Log Stream Types
The type of log stream being created determines the properties required in the sink payload. - *
HTTP Stream
For an http Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- *
Amazon EventBridge Stream
For an eventbridge Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"sink": {
-     * 		"awsRegion": "string",
-     * 		"awsAccountId": "string"
-     * 	}
-     * }
- * The response will include an additional field awsPartnerEventSource in the sink:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
- *
Azure Event Grid Stream
For an Azure Event Grid Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
-     * }
- *
Datadog Stream
For a Datadog Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- *
Splunk Stream
For a Splunk Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- *
Sumo Logic Stream
For a Sumo Logic Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }

+ *

Log Stream Types

+ *

The type of log stream being created determines the properties required in the sink payload.

+ *

HTTP Stream

+ *

For an http Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "http",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Amazon EventBridge Stream

+ *

For an eventbridge Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "sink": {
+     *     "awsRegion": "string",
+     *     "awsAccountId": "string"
+     *   }
+     * }
+     * 
+ *

The response will include an additional field awsPartnerEventSource in the sink:

+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

Azure Event Grid Stream

+ *

For an Azure Event Grid Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Stream

+ *

For a Datadog Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Splunk Stream

+ *

For a Splunk Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Stream

+ *

For a Sumo Logic Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
*/ public CompletableFuture> create( CreateLogStreamRequestContent request) { @@ -396,131 +432,163 @@ public CompletableFuture
Log Stream Types
The type of log stream being created determines the properties required in the sink payload. - *
HTTP Stream
For an http Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- *
Amazon EventBridge Stream
For an eventbridge Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"sink": {
-     * 		"awsRegion": "string",
-     * 		"awsAccountId": "string"
-     * 	}
-     * }
- * The response will include an additional field awsPartnerEventSource in the sink:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
- *
Azure Event Grid Stream
For an Azure Event Grid Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
-     * }
- *
Datadog Stream
For a Datadog Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- *
Splunk Stream
For a Splunk Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- *
Sumo Logic Stream
For a Sumo Logic Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }

+ *

Log Stream Types

+ *

The type of log stream being created determines the properties required in the sink payload.

+ *

HTTP Stream

+ *

For an http Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "http",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Amazon EventBridge Stream

+ *

For an eventbridge Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "sink": {
+     *     "awsRegion": "string",
+     *     "awsAccountId": "string"
+     *   }
+     * }
+     * 
+ *

The response will include an additional field awsPartnerEventSource in the sink:

+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

Azure Event Grid Stream

+ *

For an Azure Event Grid Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Stream

+ *

For a Datadog Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Splunk Stream

+ *

For a Splunk Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Stream

+ *

For a Sumo Logic Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
*/ public CompletableFuture> create( CreateLogStreamRequestContent request, RequestOptions requestOptions) { @@ -613,105 +681,126 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { /** * Retrieve a log stream configuration and status. - *

Sample responses
Amazon EventBridge Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
HTTP Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
Datadog Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}

- *

}

Mixpanel

- *
Request: 
{
+     * 

Sample responses

+ *

Amazon EventBridge Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

HTTP Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Mixpanel

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "mixpanel",
+     *   "sink": {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
      *   "name": "string",
      *   "type": "mixpanel",
+     *   "status": "active",
      *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } 
- * - * - * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } 
- * - *
Segment
- * - * Request:
 {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Segment

+ *

Request:

+ *
{
      *   "name": "string",
      *   "type": "segment",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
+     *     "segmentWriteKey": "string"
      *   }
-     * }
- * - * Response:
{
+     * }
+     * 
+ *

Response:

+ *
{
      *   "id": "string",
      *   "name": "string",
      *   "type": "segment",
      *   "status": "active",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } 
- *
- *

Splunk Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
Sumo Logic Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
Status
The status of a log stream maybe any of the following: - * 1. active - Stream is currently enabled. - * 2. paused - Stream is currently user disabled and will not attempt log delivery. - * 3. suspended - Stream is currently disabled because of errors and will not attempt log delivery.

+ * "segmentWriteKey": "string" + * } + * } + *
+ *

Splunk Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Status

+ *

The status of a log stream maybe any of the following:

+ *
    + *
  1. active - Stream is currently enabled.
  2. + *
  3. paused - Stream is currently user disabled and will not attempt log delivery.
  4. + *
  5. suspended - Stream is currently disabled because of errors and will not attempt log delivery.
  6. + *
*/ public CompletableFuture> get(String id) { return get(id, null); @@ -719,105 +808,126 @@ public CompletableFuture> /** * Retrieve a log stream configuration and status. - *

Sample responses
Amazon EventBridge Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
HTTP Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
Datadog Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}

- *

}

Mixpanel

- *
Request: 
{
+     * 

Sample responses

+ *

Amazon EventBridge Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

HTTP Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Mixpanel

+ *

Request:

+ *
{
      *   "name": "string",
      *   "type": "mixpanel",
      *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } 
- * - * - * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } 
- * - *
Segment
- * - * Request:
 {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "mixpanel",
+     *   "status": "active",
+     *   "sink": {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Segment

+ *

Request:

+ *
{
      *   "name": "string",
      *   "type": "segment",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
+     *     "segmentWriteKey": "string"
      *   }
-     * }
- * - * Response:
{
+     * }
+     * 
+ *

Response:

+ *
{
      *   "id": "string",
      *   "name": "string",
      *   "type": "segment",
      *   "status": "active",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } 
- *
- *

Splunk Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
Sumo Logic Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
Status
The status of a log stream maybe any of the following: - * 1. active - Stream is currently enabled. - * 2. paused - Stream is currently user disabled and will not attempt log delivery. - * 3. suspended - Stream is currently disabled because of errors and will not attempt log delivery.

+ * "segmentWriteKey": "string" + * } + * } + *
+ *

Splunk Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Status

+ *

The status of a log stream maybe any of the following:

+ *
    + *
  1. active - Stream is currently enabled.
  2. + *
  3. paused - Stream is currently user disabled and will not attempt log delivery.
  4. + *
  5. suspended - Stream is currently disabled because of errors and will not attempt log delivery.
  6. + *
*/ public CompletableFuture> get( String id, RequestOptions requestOptions) { @@ -986,40 +1096,59 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public CompletableFuture> update(String id) { return update(id, UpdateLogStreamRequestContent.builder().build()); @@ -1027,40 +1156,59 @@ public CompletableFuture

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public CompletableFuture> update( String id, RequestOptions requestOptions) { @@ -1069,40 +1217,59 @@ public CompletableFuture

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public CompletableFuture> update( String id, UpdateLogStreamRequestContent request) { @@ -1111,40 +1278,59 @@ public CompletableFuture

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public CompletableFuture> update( String id, UpdateLogStreamRequestContent request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/LogStreamsClient.java b/src/main/java/com/auth0/client/mgmt/LogStreamsClient.java index bd64d8e6b..99ee5a4d9 100644 --- a/src/main/java/com/auth0/client/mgmt/LogStreamsClient.java +++ b/src/main/java/com/auth0/client/mgmt/LogStreamsClient.java @@ -32,71 +32,73 @@ public RawLogStreamsClient withRawResponse() { /** * Retrieve details on log streams. - *

Sample Response
[{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
+     * 

Sample Response

+ *
[{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
      * }, {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }]

+ * "id": "string", + * "name": "string", + * "type": "datadog", + * "status": "active|paused|suspended", + * "sink": { + * "datadogRegion": "string", + * "datadogApiKey": "string" + * } + * }] + *
*/ public List list() { return this.rawClient.list().body(); @@ -104,71 +106,73 @@ public List list() { /** * Retrieve details on log streams. - *

Sample Response
[{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
+     * 

Sample Response

+ *
[{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
      * }, {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }]

+ * "id": "string", + * "name": "string", + * "type": "datadog", + * "status": "active|paused|suspended", + * "sink": { + * "datadogRegion": "string", + * "datadogApiKey": "string" + * } + * }] + *
*/ public List list(RequestOptions requestOptions) { return this.rawClient.list(requestOptions).body(); @@ -176,131 +180,163 @@ public List list(RequestOptions requestOptions) { /** * Create a log stream. - *

Log Stream Types
The type of log stream being created determines the properties required in the sink payload. - *
HTTP Stream
For an http Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- *
Amazon EventBridge Stream
For an eventbridge Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"sink": {
-     * 		"awsRegion": "string",
-     * 		"awsAccountId": "string"
-     * 	}
-     * }
- * The response will include an additional field awsPartnerEventSource in the sink:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
- *
Azure Event Grid Stream
For an Azure Event Grid Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
-     * }
- *
Datadog Stream
For a Datadog Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- *
Splunk Stream
For a Splunk Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- *
Sumo Logic Stream
For a Sumo Logic Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }

+ *

Log Stream Types

+ *

The type of log stream being created determines the properties required in the sink payload.

+ *

HTTP Stream

+ *

For an http Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "http",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Amazon EventBridge Stream

+ *

For an eventbridge Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "sink": {
+     *     "awsRegion": "string",
+     *     "awsAccountId": "string"
+     *   }
+     * }
+     * 
+ *

The response will include an additional field awsPartnerEventSource in the sink:

+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

Azure Event Grid Stream

+ *

For an Azure Event Grid Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Stream

+ *

For a Datadog Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Splunk Stream

+ *

For a Splunk Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Stream

+ *

For a Sumo Logic Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
*/ public CreateLogStreamResponseContent create(CreateLogStreamRequestContent request) { return this.rawClient.create(request).body(); @@ -308,131 +344,163 @@ public CreateLogStreamResponseContent create(CreateLogStreamRequestContent reque /** * Create a log stream. - *

Log Stream Types
The type of log stream being created determines the properties required in the sink payload. - *
HTTP Stream
For an http Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- *
Amazon EventBridge Stream
For an eventbridge Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"sink": {
-     * 		"awsRegion": "string",
-     * 		"awsAccountId": "string"
-     * 	}
-     * }
- * The response will include an additional field awsPartnerEventSource in the sink:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
- *
Azure Event Grid Stream
For an Azure Event Grid Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
-     * }
- *
Datadog Stream
For a Datadog Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- *
Splunk Stream
For a Splunk Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- *
Sumo Logic Stream
For a Sumo Logic Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }

+ *

Log Stream Types

+ *

The type of log stream being created determines the properties required in the sink payload.

+ *

HTTP Stream

+ *

For an http Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "http",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Amazon EventBridge Stream

+ *

For an eventbridge Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "sink": {
+     *     "awsRegion": "string",
+     *     "awsAccountId": "string"
+     *   }
+     * }
+     * 
+ *

The response will include an additional field awsPartnerEventSource in the sink:

+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

Azure Event Grid Stream

+ *

For an Azure Event Grid Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Stream

+ *

For a Datadog Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Splunk Stream

+ *

For a Splunk Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Stream

+ *

For a Sumo Logic Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
*/ public CreateLogStreamResponseContent create(CreateLogStreamRequestContent request, RequestOptions requestOptions) { return this.rawClient.create(request, requestOptions).body(); @@ -440,105 +508,126 @@ public CreateLogStreamResponseContent create(CreateLogStreamRequestContent reque /** * Retrieve a log stream configuration and status. - *

Sample responses
Amazon EventBridge Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
HTTP Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
Datadog Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}

- *

}

Mixpanel

- *
Request: 
{
+     * 

Sample responses

+ *

Amazon EventBridge Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

HTTP Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Mixpanel

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "mixpanel",
+     *   "sink": {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
      *   "name": "string",
      *   "type": "mixpanel",
+     *   "status": "active",
      *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } 
- * - * - * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } 
- * - *
Segment
- * - * Request:
 {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Segment

+ *

Request:

+ *
{
      *   "name": "string",
      *   "type": "segment",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
+     *     "segmentWriteKey": "string"
      *   }
-     * }
- * - * Response:
{
+     * }
+     * 
+ *

Response:

+ *
{
      *   "id": "string",
      *   "name": "string",
      *   "type": "segment",
      *   "status": "active",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } 
- *
- *

Splunk Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
Sumo Logic Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
Status
The status of a log stream maybe any of the following: - * 1. active - Stream is currently enabled. - * 2. paused - Stream is currently user disabled and will not attempt log delivery. - * 3. suspended - Stream is currently disabled because of errors and will not attempt log delivery.

+ * "segmentWriteKey": "string" + * } + * } + *
+ *

Splunk Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Status

+ *

The status of a log stream maybe any of the following:

+ *
    + *
  1. active - Stream is currently enabled.
  2. + *
  3. paused - Stream is currently user disabled and will not attempt log delivery.
  4. + *
  5. suspended - Stream is currently disabled because of errors and will not attempt log delivery.
  6. + *
*/ public GetLogStreamResponseContent get(String id) { return this.rawClient.get(id).body(); @@ -546,105 +635,126 @@ public GetLogStreamResponseContent get(String id) { /** * Retrieve a log stream configuration and status. - *

Sample responses
Amazon EventBridge Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
HTTP Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
Datadog Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}

- *

}

Mixpanel

- *
Request: 
{
+     * 

Sample responses

+ *

Amazon EventBridge Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

HTTP Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Mixpanel

+ *

Request:

+ *
{
      *   "name": "string",
      *   "type": "mixpanel",
      *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } 
- * - * - * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } 
- * - *
Segment
- * - * Request:
 {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "mixpanel",
+     *   "status": "active",
+     *   "sink": {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Segment

+ *

Request:

+ *
{
      *   "name": "string",
      *   "type": "segment",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
+     *     "segmentWriteKey": "string"
      *   }
-     * }
- * - * Response:
{
+     * }
+     * 
+ *

Response:

+ *
{
      *   "id": "string",
      *   "name": "string",
      *   "type": "segment",
      *   "status": "active",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } 
- *
- *

Splunk Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
Sumo Logic Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
Status
The status of a log stream maybe any of the following: - * 1. active - Stream is currently enabled. - * 2. paused - Stream is currently user disabled and will not attempt log delivery. - * 3. suspended - Stream is currently disabled because of errors and will not attempt log delivery.

+ * "segmentWriteKey": "string" + * } + * } + *
+ *

Splunk Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Status

+ *

The status of a log stream maybe any of the following:

+ *
    + *
  1. active - Stream is currently enabled.
  2. + *
  3. paused - Stream is currently user disabled and will not attempt log delivery.
  4. + *
  5. suspended - Stream is currently disabled because of errors and will not attempt log delivery.
  6. + *
*/ public GetLogStreamResponseContent get(String id, RequestOptions requestOptions) { return this.rawClient.get(id, requestOptions).body(); @@ -666,40 +776,59 @@ public void delete(String id, RequestOptions requestOptions) { /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public UpdateLogStreamResponseContent update(String id) { return this.rawClient.update(id).body(); @@ -707,40 +836,59 @@ public UpdateLogStreamResponseContent update(String id) { /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public UpdateLogStreamResponseContent update(String id, RequestOptions requestOptions) { return this.rawClient.update(id, requestOptions).body(); @@ -748,40 +896,59 @@ public UpdateLogStreamResponseContent update(String id, RequestOptions requestOp /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public UpdateLogStreamResponseContent update(String id, UpdateLogStreamRequestContent request) { return this.rawClient.update(id, request).body(); @@ -789,40 +956,59 @@ public UpdateLogStreamResponseContent update(String id, UpdateLogStreamRequestCo /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public UpdateLogStreamResponseContent update( String id, UpdateLogStreamRequestContent request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java index 5a1782ab5..e81225f71 100644 --- a/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java @@ -8,6 +8,7 @@ import com.auth0.client.mgmt.core.Suppliers; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.ClientGrantsClient; +import com.auth0.client.mgmt.organizations.ConnectionsClient; import com.auth0.client.mgmt.organizations.DiscoveryDomainsClient; import com.auth0.client.mgmt.organizations.EnabledConnectionsClient; import com.auth0.client.mgmt.organizations.InvitationsClient; @@ -29,6 +30,8 @@ public class OrganizationsClient { protected final Supplier clientGrantsClient; + protected final Supplier connectionsClient; + protected final Supplier discoveryDomainsClient; protected final Supplier enabledConnectionsClient; @@ -41,6 +44,7 @@ public OrganizationsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.rawClient = new RawOrganizationsClient(clientOptions); this.clientGrantsClient = Suppliers.memoize(() -> new ClientGrantsClient(clientOptions)); + this.connectionsClient = Suppliers.memoize(() -> new ConnectionsClient(clientOptions)); this.discoveryDomainsClient = Suppliers.memoize(() -> new DiscoveryDomainsClient(clientOptions)); this.enabledConnectionsClient = Suppliers.memoize(() -> new EnabledConnectionsClient(clientOptions)); this.invitationsClient = Suppliers.memoize(() -> new InvitationsClient(clientOptions)); @@ -227,6 +231,10 @@ public ClientGrantsClient clientGrants() { return this.clientGrantsClient.get(); } + public ConnectionsClient connections() { + return this.connectionsClient.get(); + } + public DiscoveryDomainsClient discoveryDomains() { return this.discoveryDomainsClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/RawClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/RawClientGrantsClient.java index 18702fe9f..f49048a00 100644 --- a/src/main/java/com/auth0/client/mgmt/RawClientGrantsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawClientGrantsClient.java @@ -101,6 +101,10 @@ public ManagementApiHttpResponse> QueryStringMapper.addQueryParameter( httpUrl, "subject_type", request.getSubjectType().orElse(null), false); } + if (!request.getDefaultFor().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "default_for", request.getDefaultFor().orElse(null), false); + } if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); diff --git a/src/main/java/com/auth0/client/mgmt/RawLogStreamsClient.java b/src/main/java/com/auth0/client/mgmt/RawLogStreamsClient.java index 663794793..3f4e1e458 100644 --- a/src/main/java/com/auth0/client/mgmt/RawLogStreamsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawLogStreamsClient.java @@ -43,71 +43,73 @@ public RawLogStreamsClient(ClientOptions clientOptions) { /** * Retrieve details on log streams. - *

Sample Response
[{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
+     * 

Sample Response

+ *
[{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
      * }, {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }]

+ * "id": "string", + * "name": "string", + * "type": "datadog", + * "status": "active|paused|suspended", + * "sink": { + * "datadogRegion": "string", + * "datadogApiKey": "string" + * } + * }] + *
*/ public ManagementApiHttpResponse> list() { return list(null); @@ -115,71 +117,73 @@ public ManagementApiHttpResponse> list() { /** * Retrieve details on log streams. - *

Sample Response
[{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
+     * 

Sample Response

+ *
[{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
      * }, {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
      * },
      * {
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }]

+ * "id": "string", + * "name": "string", + * "type": "datadog", + * "status": "active|paused|suspended", + * "sink": { + * "datadogRegion": "string", + * "datadogApiKey": "string" + * } + * }] + *
*/ public ManagementApiHttpResponse> list(RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) @@ -237,131 +241,163 @@ public ManagementApiHttpResponse> list(RequestOpti /** * Create a log stream. - *

Log Stream Types
The type of log stream being created determines the properties required in the sink payload. - *
HTTP Stream
For an http Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- *
Amazon EventBridge Stream
For an eventbridge Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"sink": {
-     * 		"awsRegion": "string",
-     * 		"awsAccountId": "string"
-     * 	}
-     * }
- * The response will include an additional field awsPartnerEventSource in the sink:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
- *
Azure Event Grid Stream
For an Azure Event Grid Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
-     * }
- *
Datadog Stream
For a Datadog Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- *
Splunk Stream
For a Splunk Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- *
Sumo Logic Stream
For a Sumo Logic Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }

+ *

Log Stream Types

+ *

The type of log stream being created determines the properties required in the sink payload.

+ *

HTTP Stream

+ *

For an http Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "http",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Amazon EventBridge Stream

+ *

For an eventbridge Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "sink": {
+     *     "awsRegion": "string",
+     *     "awsAccountId": "string"
+     *   }
+     * }
+     * 
+ *

The response will include an additional field awsPartnerEventSource in the sink:

+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

Azure Event Grid Stream

+ *

For an Azure Event Grid Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Stream

+ *

For a Datadog Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Splunk Stream

+ *

For a Splunk Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Stream

+ *

For a Sumo Logic Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
*/ public ManagementApiHttpResponse create(CreateLogStreamRequestContent request) { return create(request, null); @@ -369,131 +405,163 @@ public ManagementApiHttpResponse create(CreateLo /** * Create a log stream. - *

Log Stream Types
The type of log stream being created determines the properties required in the sink payload. - *
HTTP Stream
For an http Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"httpEndpoint": "string",
-     * 		"httpContentType": "string",
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
- *
Amazon EventBridge Stream
For an eventbridge Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"sink": {
-     * 		"awsRegion": "string",
-     * 		"awsAccountId": "string"
-     * 	}
-     * }
- * The response will include an additional field awsPartnerEventSource in the sink:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
- *
Azure Event Grid Stream
For an Azure Event Grid Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "eventgrid",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"azureSubscriptionId": "string",
-     * 		"azureResourceGroup": "string",
-     * 		"azureRegion": "string",
-     * 		"azurePartnerTopic": "string"
-     * 	}
-     * }
- *
Datadog Stream
For a Datadog Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}
-     * }
- *
Splunk Stream
For a Splunk Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
- *
Sumo Logic Stream
For a Sumo Logic Stream, the sink properties are listed in the payload below - * Request:
{
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
- * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }

+ *

Log Stream Types

+ *

The type of log stream being created determines the properties required in the sink payload.

+ *

HTTP Stream

+ *

For an http Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "http",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "httpEndpoint": "string",
+     *     "httpContentType": "string",
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Amazon EventBridge Stream

+ *

For an eventbridge Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "sink": {
+     *     "awsRegion": "string",
+     *     "awsAccountId": "string"
+     *   }
+     * }
+     * 
+ *

The response will include an additional field awsPartnerEventSource in the sink:

+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

Azure Event Grid Stream

+ *

For an Azure Event Grid Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "eventgrid",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active",
+     *   "sink": {
+     *     "azureSubscriptionId": "string",
+     *     "azureResourceGroup": "string",
+     *     "azureRegion": "string",
+     *     "azurePartnerTopic": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Stream

+ *

For a Datadog Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Splunk Stream

+ *

For a Splunk Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Stream

+ *

For a Sumo Logic Stream, the sink properties are listed in the payload below.

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
*/ public ManagementApiHttpResponse create( CreateLogStreamRequestContent request, RequestOptions requestOptions) { @@ -562,105 +630,126 @@ public ManagementApiHttpResponse create( /** * Retrieve a log stream configuration and status. - *

Sample responses
Amazon EventBridge Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
HTTP Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
Datadog Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}

- *

}

Mixpanel

- *
Request: 
{
+     * 

Sample responses

+ *

Amazon EventBridge Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

HTTP Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Mixpanel

+ *

Request:

+ *
{
+     *   "name": "string",
+     *   "type": "mixpanel",
+     *   "sink": {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
      *   "name": "string",
      *   "type": "mixpanel",
+     *   "status": "active",
      *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } 
- * - * - * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } 
- * - *
Segment
- * - * Request:
 {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Segment

+ *

Request:

+ *
{
      *   "name": "string",
      *   "type": "segment",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
+     *     "segmentWriteKey": "string"
      *   }
-     * }
- * - * Response:
{
+     * }
+     * 
+ *

Response:

+ *
{
      *   "id": "string",
      *   "name": "string",
      *   "type": "segment",
      *   "status": "active",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } 
- *
- *

Splunk Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
Sumo Logic Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
Status
The status of a log stream maybe any of the following: - * 1. active - Stream is currently enabled. - * 2. paused - Stream is currently user disabled and will not attempt log delivery. - * 3. suspended - Stream is currently disabled because of errors and will not attempt log delivery.

+ * "segmentWriteKey": "string" + * } + * } + *
+ *

Splunk Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Status

+ *

The status of a log stream maybe any of the following:

+ *
    + *
  1. active - Stream is currently enabled.
  2. + *
  3. paused - Stream is currently user disabled and will not attempt log delivery.
  4. + *
  5. suspended - Stream is currently disabled because of errors and will not attempt log delivery.
  6. + *
*/ public ManagementApiHttpResponse get(String id) { return get(id, null); @@ -668,105 +757,126 @@ public ManagementApiHttpResponse get(String id) { /** * Retrieve a log stream configuration and status. - *

Sample responses
Amazon EventBridge Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "eventbridge",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"awsAccountId": "string",
-     * 		"awsRegion": "string",
-     * 		"awsPartnerEventSource": "string"
-     * 	}
-     * }
HTTP Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "http",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"httpContentFormat": "JSONLINES|JSONARRAY",
-     * 		"httpContentType": "string",
-     * 		"httpEndpoint": "string",
-     * 		"httpAuthorization": "string"
-     * 	}
-     * }
Datadog Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "datadog",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
-     * 	}

- *

}

Mixpanel

- *
Request: 
{
+     * 

Sample responses

+ *

Amazon EventBridge Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "eventbridge",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "awsAccountId": "string",
+     *     "awsRegion": "string",
+     *     "awsPartnerEventSource": "string"
+     *   }
+     * }
+     * 
+ *

HTTP Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "http",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "httpContentFormat": "JSONLINES|JSONARRAY",
+     *     "httpContentType": "string",
+     *     "httpEndpoint": "string",
+     *     "httpAuthorization": "string"
+     *   }
+     * }
+     * 
+ *

Datadog Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "datadog",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
+     *   }
+     * }
+     * 
+ *

Mixpanel

+ *

Request:

+ *
{
      *   "name": "string",
      *   "type": "mixpanel",
      *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } 
- * - * - * Response:
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } 
- * - *
Segment
- * - * Request:
 {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Response:

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "mixpanel",
+     *   "status": "active",
+     *   "sink": {
+     *     "mixpanelRegion": "string",
+     *     "mixpanelProjectId": "string",
+     *     "mixpanelServiceAccountUsername": "string",
+     *     "mixpanelServiceAccountPassword": "string"
+     *   }
+     * }
+     * 
+ *

Segment

+ *

Request:

+ *
{
      *   "name": "string",
      *   "type": "segment",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
+     *     "segmentWriteKey": "string"
      *   }
-     * }
- * - * Response:
{
+     * }
+     * 
+ *

Response:

+ *
{
      *   "id": "string",
      *   "name": "string",
      *   "type": "segment",
      *   "status": "active",
      *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } 
- *
- *

Splunk Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "splunk",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"splunkDomain": "string",
-     * 		"splunkToken": "string",
-     * 		"splunkPort": "string",
-     * 		"splunkSecure": "boolean"
-     * 	}
-     * }
Sumo Logic Log Stream
{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "sumo",
-     * 	"status": "active|paused|suspended",
-     * 	"sink": {
-     * 		"sumoSourceAddress": "string",
-     * 	}
-     * }
Status
The status of a log stream maybe any of the following: - * 1. active - Stream is currently enabled. - * 2. paused - Stream is currently user disabled and will not attempt log delivery. - * 3. suspended - Stream is currently disabled because of errors and will not attempt log delivery.

+ * "segmentWriteKey": "string" + * } + * } + *
+ *

Splunk Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "splunk",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "splunkDomain": "string",
+     *     "splunkToken": "string",
+     *     "splunkPort": "string",
+     *     "splunkSecure": "boolean"
+     *   }
+     * }
+     * 
+ *

Sumo Logic Log Stream

+ *
{
+     *   "id": "string",
+     *   "name": "string",
+     *   "type": "sumo",
+     *   "status": "active|paused|suspended",
+     *   "sink": {
+     *     "sumoSourceAddress": "string"
+     *   }
+     * }
+     * 
+ *

Status

+ *

The status of a log stream maybe any of the following:

+ *
    + *
  1. active - Stream is currently enabled.
  2. + *
  3. paused - Stream is currently user disabled and will not attempt log delivery.
  4. + *
  5. suspended - Stream is currently disabled because of errors and will not attempt log delivery.
  6. + *
*/ public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) @@ -889,40 +999,59 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public ManagementApiHttpResponse update(String id) { return update(id, UpdateLogStreamRequestContent.builder().build()); @@ -930,40 +1059,59 @@ public ManagementApiHttpResponse update(String i /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public ManagementApiHttpResponse update(String id, RequestOptions requestOptions) { return update(id, UpdateLogStreamRequestContent.builder().build(), requestOptions); @@ -971,40 +1119,59 @@ public ManagementApiHttpResponse update(String i /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public ManagementApiHttpResponse update( String id, UpdateLogStreamRequestContent request) { @@ -1013,40 +1180,59 @@ public ManagementApiHttpResponse update( /** * Update a log stream. - *

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. - *
Update the status of a log stream
{
-     * 	"status": "active|paused"
-     * }
- *
Update the name of a log stream
{
-     * 	"name": "string"
-     * }
- *
Update the sink properties of a stream of type http
{
+     * 

Examples of how to use the PATCH endpoint.

+ *

The following fields may be updated in a PATCH operation:

+ *
    + *
  • name
  • + *
  • status
  • + *
  • sink
  • + *
+ *

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

+ *

Update the status of a log stream

+ *
{
+     *   "status": "active|paused"
+     * }
+     * 
+ *

Update the name of a log stream

+ *
{
+     *   "name": "string"
+     * }
+     * 
+ *

Update the sink properties of a stream of type http

+ *
{
      *   "sink": {
      *     "httpEndpoint": "string",
      *     "httpContentType": "string",
      *     "httpContentFormat": "JSONARRAY|JSONLINES",
      *     "httpAuthorization": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type datadog
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type datadog

+ *
{
      *   "sink": {
-     * 		"datadogRegion": "string",
-     * 		"datadogApiKey": "string"
+     *     "datadogRegion": "string",
+     *     "datadogApiKey": "string"
      *   }
-     * }
- *
Update the sink properties of a stream of type splunk
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type splunk

+ *
{
      *   "sink": {
      *     "splunkDomain": "string",
      *     "splunkToken": "string",
      *     "splunkPort": "string",
      *     "splunkSecure": "boolean"
      *   }
-     * }
- *
Update the sink properties of a stream of type sumo
{
+     * }
+     * 
+ *

Update the sink properties of a stream of type sumo

+ *
{
      *   "sink": {
      *     "sumoSourceAddress": "string"
      *   }
-     * }

+ * } + *
*/ public ManagementApiHttpResponse update( String id, UpdateLogStreamRequestContent request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncDirectoryProvisioningClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncDirectoryProvisioningClient.java index 0b6d8631a..94cf32566 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncDirectoryProvisioningClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/AsyncDirectoryProvisioningClient.java @@ -5,6 +5,8 @@ import com.auth0.client.mgmt.connections.directoryprovisioning.AsyncSynchronizationsClient; import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; +import com.auth0.client.mgmt.connections.types.ListSynchronizedGroupsRequestParameters; +import com.auth0.client.mgmt.connections.types.ReplaceSynchronizedGroupsRequestContent; import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.RequestOptions; @@ -15,6 +17,7 @@ import com.auth0.client.mgmt.types.DirectoryProvisioning; import com.auth0.client.mgmt.types.GetDirectoryProvisioningDefaultMappingResponseContent; import com.auth0.client.mgmt.types.GetDirectoryProvisioningResponseContent; +import com.auth0.client.mgmt.types.SynchronizedGroupPayload; import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningRequestContent; import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningResponseContent; import java.util.concurrent.CompletableFuture; @@ -179,6 +182,54 @@ public CompletableFuture return this.rawClient.getDefaultMapping(id, requestOptions).thenApply(response -> response.body()); } + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public CompletableFuture> listSynchronizedGroups(String id) { + return this.rawClient.listSynchronizedGroups(id).thenApply(response -> response.body()); + } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public CompletableFuture> listSynchronizedGroups( + String id, RequestOptions requestOptions) { + return this.rawClient.listSynchronizedGroups(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public CompletableFuture> listSynchronizedGroups( + String id, ListSynchronizedGroupsRequestParameters request) { + return this.rawClient.listSynchronizedGroups(id, request).thenApply(response -> response.body()); + } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public CompletableFuture> listSynchronizedGroups( + String id, ListSynchronizedGroupsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient + .listSynchronizedGroups(id, request, requestOptions) + .thenApply(response -> response.body()); + } + + /** + * Create or replace the selected groups for a connection directory provisioning configuration. + */ + public CompletableFuture set(String id, ReplaceSynchronizedGroupsRequestContent request) { + return this.rawClient.set(id, request).thenApply(response -> response.body()); + } + + /** + * Create or replace the selected groups for a connection directory provisioning configuration. + */ + public CompletableFuture set( + String id, ReplaceSynchronizedGroupsRequestContent request, RequestOptions requestOptions) { + return this.rawClient.set(id, request, requestOptions).thenApply(response -> response.body()); + } + public AsyncSynchronizationsClient synchronizations() { return this.synchronizationsClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawDirectoryProvisioningClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawDirectoryProvisioningClient.java index 1ecb13356..5cc77c53a 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawDirectoryProvisioningClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawDirectoryProvisioningClient.java @@ -4,6 +4,8 @@ package com.auth0.client.mgmt.connections; import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; +import com.auth0.client.mgmt.connections.types.ListSynchronizedGroupsRequestParameters; +import com.auth0.client.mgmt.connections.types.ReplaceSynchronizedGroupsRequestContent; import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.ManagementApiException; import com.auth0.client.mgmt.core.ManagementApiHttpResponse; @@ -26,6 +28,8 @@ import com.auth0.client.mgmt.types.GetDirectoryProvisioningDefaultMappingResponseContent; import com.auth0.client.mgmt.types.GetDirectoryProvisioningResponseContent; import com.auth0.client.mgmt.types.ListDirectoryProvisioningsResponseContent; +import com.auth0.client.mgmt.types.ListSynchronizedGroupsResponseContent; +import com.auth0.client.mgmt.types.SynchronizedGroupPayload; import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningRequestContent; import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; @@ -707,4 +711,246 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { }); return future; } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public CompletableFuture>> + listSynchronizedGroups(String id) { + return listSynchronizedGroups( + id, ListSynchronizedGroupsRequestParameters.builder().build()); + } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public CompletableFuture>> + listSynchronizedGroups(String id, RequestOptions requestOptions) { + return listSynchronizedGroups( + id, ListSynchronizedGroupsRequestParameters.builder().build(), requestOptions); + } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public CompletableFuture>> + listSynchronizedGroups(String id, ListSynchronizedGroupsRequestParameters request) { + return listSynchronizedGroups(id, request, null); + } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public CompletableFuture>> + listSynchronizedGroups( + String id, ListSynchronizedGroupsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("connections") + .addPathSegment(id) + .addPathSegments("directory-provisioning") + .addPathSegments("synchronized-groups"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), 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))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.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()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListSynchronizedGroupsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListSynchronizedGroupsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListSynchronizedGroupsRequestParameters nextRequest = + ListSynchronizedGroupsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getGroups(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return listSynchronizedGroups(id, nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + 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 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; + } + + /** + * Create or replace the selected groups for a connection directory provisioning configuration. + */ + public CompletableFuture> set( + String id, ReplaceSynchronizedGroupsRequestContent request) { + return set(id, request, null); + } + + /** + * Create or replace the selected groups for a connection directory provisioning configuration. + */ + public CompletableFuture> set( + String id, ReplaceSynchronizedGroupsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("connections") + .addPathSegment(id) + .addPathSegments("directory-provisioning") + .addPathSegments("synchronized-groups"); + 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("PUT", 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 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 409: + future.completeExceptionally(new ConflictError( + 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/connections/DirectoryProvisioningClient.java b/src/main/java/com/auth0/client/mgmt/connections/DirectoryProvisioningClient.java index cbfb76728..53333a622 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/DirectoryProvisioningClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/DirectoryProvisioningClient.java @@ -5,6 +5,8 @@ import com.auth0.client.mgmt.connections.directoryprovisioning.SynchronizationsClient; import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; +import com.auth0.client.mgmt.connections.types.ListSynchronizedGroupsRequestParameters; +import com.auth0.client.mgmt.connections.types.ReplaceSynchronizedGroupsRequestContent; import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.RequestOptions; @@ -15,6 +17,7 @@ import com.auth0.client.mgmt.types.DirectoryProvisioning; import com.auth0.client.mgmt.types.GetDirectoryProvisioningDefaultMappingResponseContent; import com.auth0.client.mgmt.types.GetDirectoryProvisioningResponseContent; +import com.auth0.client.mgmt.types.SynchronizedGroupPayload; import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningRequestContent; import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningResponseContent; import java.util.function.Supplier; @@ -175,6 +178,53 @@ public GetDirectoryProvisioningDefaultMappingResponseContent getDefaultMapping( return this.rawClient.getDefaultMapping(id, requestOptions).body(); } + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public SyncPagingIterable listSynchronizedGroups(String id) { + return this.rawClient.listSynchronizedGroups(id).body(); + } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public SyncPagingIterable listSynchronizedGroups( + String id, RequestOptions requestOptions) { + return this.rawClient.listSynchronizedGroups(id, requestOptions).body(); + } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public SyncPagingIterable listSynchronizedGroups( + String id, ListSynchronizedGroupsRequestParameters request) { + return this.rawClient.listSynchronizedGroups(id, request).body(); + } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public SyncPagingIterable listSynchronizedGroups( + String id, ListSynchronizedGroupsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient + .listSynchronizedGroups(id, request, requestOptions) + .body(); + } + + /** + * Create or replace the selected groups for a connection directory provisioning configuration. + */ + public void set(String id, ReplaceSynchronizedGroupsRequestContent request) { + this.rawClient.set(id, request).body(); + } + + /** + * Create or replace the selected groups for a connection directory provisioning configuration. + */ + public void set(String id, ReplaceSynchronizedGroupsRequestContent request, RequestOptions requestOptions) { + this.rawClient.set(id, request, requestOptions).body(); + } + public SynchronizationsClient synchronizations() { return this.synchronizationsClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/RawDirectoryProvisioningClient.java b/src/main/java/com/auth0/client/mgmt/connections/RawDirectoryProvisioningClient.java index a3a29663b..f91bcb49f 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/RawDirectoryProvisioningClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/RawDirectoryProvisioningClient.java @@ -4,6 +4,8 @@ package com.auth0.client.mgmt.connections; import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; +import com.auth0.client.mgmt.connections.types.ListSynchronizedGroupsRequestParameters; +import com.auth0.client.mgmt.connections.types.ReplaceSynchronizedGroupsRequestContent; import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.ManagementApiException; import com.auth0.client.mgmt.core.ManagementApiHttpResponse; @@ -26,6 +28,8 @@ import com.auth0.client.mgmt.types.GetDirectoryProvisioningDefaultMappingResponseContent; import com.auth0.client.mgmt.types.GetDirectoryProvisioningResponseContent; import com.auth0.client.mgmt.types.ListDirectoryProvisioningsResponseContent; +import com.auth0.client.mgmt.types.ListSynchronizedGroupsResponseContent; +import com.auth0.client.mgmt.types.SynchronizedGroupPayload; import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningRequestContent; import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; @@ -551,4 +555,187 @@ public ManagementApiHttpResponse> listSynchronizedGroups(String id) { + return listSynchronizedGroups( + id, ListSynchronizedGroupsRequestParameters.builder().build()); + } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public ManagementApiHttpResponse> listSynchronizedGroups( + String id, RequestOptions requestOptions) { + return listSynchronizedGroups( + id, ListSynchronizedGroupsRequestParameters.builder().build(), requestOptions); + } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public ManagementApiHttpResponse> listSynchronizedGroups( + String id, ListSynchronizedGroupsRequestParameters request) { + return listSynchronizedGroups(id, request, null); + } + + /** + * Retrieve the configured synchronized groups for a connection directory provisioning configuration. + */ + public ManagementApiHttpResponse> listSynchronizedGroups( + String id, ListSynchronizedGroupsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("connections") + .addPathSegment(id) + .addPathSegments("directory-provisioning") + .addPathSegments("synchronized-groups"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), 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))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.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(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListSynchronizedGroupsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListSynchronizedGroupsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListSynchronizedGroupsRequestParameters nextRequest = ListSynchronizedGroupsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getGroups(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> listSynchronizedGroups( + id, nextRequest, requestOptions) + .body()), + response); + } + 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 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); + } + } + + /** + * Create or replace the selected groups for a connection directory provisioning configuration. + */ + public ManagementApiHttpResponse set(String id, ReplaceSynchronizedGroupsRequestContent request) { + return set(id, request, null); + } + + /** + * Create or replace the selected groups for a connection directory provisioning configuration. + */ + public ManagementApiHttpResponse set( + String id, ReplaceSynchronizedGroupsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("connections") + .addPathSegment(id) + .addPathSegments("directory-provisioning") + .addPathSegments("synchronized-groups"); + 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("PUT", 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 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 409: + throw new ConflictError( + 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/connections/types/ListSynchronizedGroupsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/connections/types/ListSynchronizedGroupsRequestParameters.java new file mode 100644 index 000000000..87f800823 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/connections/types/ListSynchronizedGroupsRequestParameters.java @@ -0,0 +1,195 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.connections.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 = ListSynchronizedGroupsRequestParameters.Builder.class) +public final class ListSynchronizedGroupsRequestParameters { + private final OptionalNullable from; + + private final OptionalNullable take; + + private final Map additionalProperties; + + private ListSynchronizedGroupsRequestParameters( + OptionalNullable from, OptionalNullable take, Map additionalProperties) { + this.from = from; + this.take = take; + this.additionalProperties = additionalProperties; + } + + /** + * @return Optional Id from which to start selection. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Number of results per page. Defaults to 50. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListSynchronizedGroupsRequestParameters + && equalTo((ListSynchronizedGroupsRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListSynchronizedGroupsRequestParameters other) { + return from.equals(other.from) && take.equals(other.take); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.from, this.take); + } + + @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 take = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListSynchronizedGroupsRequestParameters other) { + from(other.getFrom()); + take(other.getTake()); + return this; + } + + /** + *

Optional Id from which to start selection.

+ */ + @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; + } + + /** + *

Number of results per page. Defaults to 50.

+ */ + @JsonSetter(value = "take", nulls = Nulls.SKIP) + public Builder take(OptionalNullable take) { + this.take = take; + return this; + } + + public Builder take(Integer take) { + this.take = OptionalNullable.of(take); + return this; + } + + public Builder take(Optional take) { + if (take.isPresent()) { + this.take = OptionalNullable.of(take.get()); + } else { + this.take = OptionalNullable.absent(); + } + return this; + } + + public Builder take(com.auth0.client.mgmt.core.Nullable take) { + if (take.isNull()) { + this.take = OptionalNullable.ofNull(); + } else if (take.isEmpty()) { + this.take = OptionalNullable.absent(); + } else { + this.take = OptionalNullable.of(take.get()); + } + return this; + } + + public ListSynchronizedGroupsRequestParameters build() { + return new ListSynchronizedGroupsRequestParameters(from, take, 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/connections/types/ReplaceSynchronizedGroupsRequestContent.java b/src/main/java/com/auth0/client/mgmt/connections/types/ReplaceSynchronizedGroupsRequestContent.java new file mode 100644 index 000000000..ba6d204ec --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/connections/types/ReplaceSynchronizedGroupsRequestContent.java @@ -0,0 +1,125 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.connections.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.SynchronizedGroupPayload; +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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ReplaceSynchronizedGroupsRequestContent.Builder.class) +public final class ReplaceSynchronizedGroupsRequestContent { + private final List groups; + + private final Map additionalProperties; + + private ReplaceSynchronizedGroupsRequestContent( + List groups, Map additionalProperties) { + this.groups = groups; + this.additionalProperties = additionalProperties; + } + + /** + * @return Array of Google Workspace Directory group objects to synchronize. + */ + @JsonProperty("groups") + public List getGroups() { + return groups; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ReplaceSynchronizedGroupsRequestContent + && equalTo((ReplaceSynchronizedGroupsRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ReplaceSynchronizedGroupsRequestContent other) { + return groups.equals(other.groups); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.groups); + } + + @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 List groups = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ReplaceSynchronizedGroupsRequestContent other) { + groups(other.getGroups()); + return this; + } + + /** + *

Array of Google Workspace Directory group objects to synchronize.

+ */ + @JsonSetter(value = "groups", nulls = Nulls.SKIP) + public Builder groups(List groups) { + this.groups.clear(); + if (groups != null) { + this.groups.addAll(groups); + } + return this; + } + + public Builder addGroups(SynchronizedGroupPayload groups) { + this.groups.add(groups); + return this; + } + + public Builder addAllGroups(List groups) { + if (groups != null) { + this.groups.addAll(groups); + } + return this; + } + + public ReplaceSynchronizedGroupsRequestContent build() { + return new ReplaceSynchronizedGroupsRequestContent(groups, 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/organizations/AsyncConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncConnectionsClient.java new file mode 100644 index 000000000..984333c28 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncConnectionsClient.java @@ -0,0 +1,102 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.organizations.types.CreateOrganizationAllConnectionRequestParameters; +import com.auth0.client.mgmt.organizations.types.ListOrganizationAllConnectionsRequestParameters; +import com.auth0.client.mgmt.organizations.types.UpdateOrganizationConnectionRequestParameters; +import com.auth0.client.mgmt.types.CreateOrganizationAllConnectionResponseContent; +import com.auth0.client.mgmt.types.GetOrganizationAllConnectionResponseContent; +import com.auth0.client.mgmt.types.OrganizationAllConnectionPost; +import com.auth0.client.mgmt.types.UpdateOrganizationAllConnectionResponseContent; +import java.util.concurrent.CompletableFuture; + +public class AsyncConnectionsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawConnectionsClient rawClient; + + public AsyncConnectionsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawConnectionsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawConnectionsClient withRawResponse() { + return this.rawClient; + } + + public CompletableFuture> list(String id) { + return this.rawClient.list(id).thenApply(response -> response.body()); + } + + public CompletableFuture> list( + String id, RequestOptions requestOptions) { + return this.rawClient.list(id, requestOptions).thenApply(response -> response.body()); + } + + public CompletableFuture> list( + String id, ListOrganizationAllConnectionsRequestParameters request) { + return this.rawClient.list(id, request).thenApply(response -> response.body()); + } + + public CompletableFuture> list( + String id, ListOrganizationAllConnectionsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); + } + + public CompletableFuture create( + String id, CreateOrganizationAllConnectionRequestParameters request) { + return this.rawClient.create(id, request).thenApply(response -> response.body()); + } + + public CompletableFuture create( + String id, CreateOrganizationAllConnectionRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); + } + + public CompletableFuture get(String id, String connectionId) { + return this.rawClient.get(id, connectionId).thenApply(response -> response.body()); + } + + public CompletableFuture get( + String id, String connectionId, RequestOptions requestOptions) { + return this.rawClient.get(id, connectionId, requestOptions).thenApply(response -> response.body()); + } + + public CompletableFuture delete(String id, String connectionId) { + return this.rawClient.delete(id, connectionId).thenApply(response -> response.body()); + } + + public CompletableFuture delete(String id, String connectionId, RequestOptions requestOptions) { + return this.rawClient.delete(id, connectionId, requestOptions).thenApply(response -> response.body()); + } + + public CompletableFuture update(String id, String connectionId) { + return this.rawClient.update(id, connectionId).thenApply(response -> response.body()); + } + + public CompletableFuture update( + String id, String connectionId, RequestOptions requestOptions) { + return this.rawClient.update(id, connectionId, requestOptions).thenApply(response -> response.body()); + } + + public CompletableFuture update( + String id, String connectionId, UpdateOrganizationConnectionRequestParameters request) { + return this.rawClient.update(id, connectionId, request).thenApply(response -> response.body()); + } + + public CompletableFuture update( + String id, + String connectionId, + UpdateOrganizationConnectionRequestParameters request, + RequestOptions requestOptions) { + return this.rawClient.update(id, connectionId, request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawConnectionsClient.java new file mode 100644 index 000000000..c34866c57 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawConnectionsClient.java @@ -0,0 +1,549 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations; + +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.MediaTypes; +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.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +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.organizations.types.CreateOrganizationAllConnectionRequestParameters; +import com.auth0.client.mgmt.organizations.types.ListOrganizationAllConnectionsRequestParameters; +import com.auth0.client.mgmt.organizations.types.UpdateOrganizationConnectionRequestParameters; +import com.auth0.client.mgmt.types.CreateOrganizationAllConnectionResponseContent; +import com.auth0.client.mgmt.types.GetOrganizationAllConnectionResponseContent; +import com.auth0.client.mgmt.types.ListOrganizationAllConnectionsOffsetPaginatedResponseContent; +import com.auth0.client.mgmt.types.OrganizationAllConnectionPost; +import com.auth0.client.mgmt.types.UpdateOrganizationAllConnectionResponseContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawConnectionsClient { + protected final ClientOptions clientOptions; + + public AsyncRawConnectionsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + public CompletableFuture>> list( + String id) { + return list( + id, ListOrganizationAllConnectionsRequestParameters.builder().build()); + } + + public CompletableFuture>> list( + String id, RequestOptions requestOptions) { + return list( + id, ListOrganizationAllConnectionsRequestParameters.builder().build(), requestOptions); + } + + public CompletableFuture>> list( + String id, ListOrganizationAllConnectionsRequestParameters request) { + return list(id, request, null); + } + + public CompletableFuture>> list( + String id, ListOrganizationAllConnectionsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("connections"); + QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); + QueryStringMapper.addQueryParameter( + httpUrl, "per_page", request.getPerPage().orElse(50), false); + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); + if (!request.getIsEnabled().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_enabled", request.getIsEnabled().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))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.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()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListOrganizationAllConnectionsOffsetPaginatedResponseContent parsedResponse = + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, + ListOrganizationAllConnectionsOffsetPaginatedResponseContent.class); + int newPageNumber = request.getPage() + .map((Integer page) -> page + 1) + .orElse(1); + ListOrganizationAllConnectionsRequestParameters nextRequest = + ListOrganizationAllConnectionsRequestParameters.builder() + .from(request) + .page(newPageNumber) + .build(); + List result = + parsedResponse.getConnections().orElse(Collections.emptyList()); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + true, result, parsedResponse, () -> { + try { + return list(id, nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + 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; + } + + public CompletableFuture> create( + String id, CreateOrganizationAllConnectionRequestParameters request) { + return create(id, request, null); + } + + public CompletableFuture> create( + String id, CreateOrganizationAllConnectionRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("connections"); + 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()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, CreateOrganizationAllConnectionResponseContent.class), + response)); + return; + } + 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 409: + future.completeExceptionally(new ConflictError( + 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; + } + + public CompletableFuture> get( + String id, String connectionId) { + return get(id, connectionId, null); + } + + public CompletableFuture> get( + String id, String connectionId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("connections") + .addPathSegment(connectionId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .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()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, GetOrganizationAllConnectionResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + 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 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; + } + + public CompletableFuture> delete(String id, String connectionId) { + return delete(id, connectionId, null); + } + + public CompletableFuture> delete( + String id, String connectionId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("connections") + .addPathSegment(connectionId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .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 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; + } + + public CompletableFuture> update( + String id, String connectionId) { + return update( + id, + connectionId, + UpdateOrganizationConnectionRequestParameters.builder().build()); + } + + public CompletableFuture> update( + String id, String connectionId, RequestOptions requestOptions) { + return update( + id, + connectionId, + UpdateOrganizationConnectionRequestParameters.builder().build(), + requestOptions); + } + + public CompletableFuture> update( + String id, String connectionId, UpdateOrganizationConnectionRequestParameters request) { + return update(id, connectionId, request, null); + } + + public CompletableFuture> update( + String id, + String connectionId, + UpdateOrganizationConnectionRequestParameters request, + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("connections") + .addPathSegment(connectionId); + 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("PATCH", 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()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, UpdateOrganizationAllConnectionResponseContent.class), + response)); + return; + } + 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; + } +} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/ConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/ConnectionsClient.java new file mode 100644 index 000000000..8fde0b24d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/ConnectionsClient.java @@ -0,0 +1,100 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.organizations.types.CreateOrganizationAllConnectionRequestParameters; +import com.auth0.client.mgmt.organizations.types.ListOrganizationAllConnectionsRequestParameters; +import com.auth0.client.mgmt.organizations.types.UpdateOrganizationConnectionRequestParameters; +import com.auth0.client.mgmt.types.CreateOrganizationAllConnectionResponseContent; +import com.auth0.client.mgmt.types.GetOrganizationAllConnectionResponseContent; +import com.auth0.client.mgmt.types.OrganizationAllConnectionPost; +import com.auth0.client.mgmt.types.UpdateOrganizationAllConnectionResponseContent; + +public class ConnectionsClient { + protected final ClientOptions clientOptions; + + private final RawConnectionsClient rawClient; + + public ConnectionsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawConnectionsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawConnectionsClient withRawResponse() { + return this.rawClient; + } + + public SyncPagingIterable list(String id) { + return this.rawClient.list(id).body(); + } + + public SyncPagingIterable list(String id, RequestOptions requestOptions) { + return this.rawClient.list(id, requestOptions).body(); + } + + public SyncPagingIterable list( + String id, ListOrganizationAllConnectionsRequestParameters request) { + return this.rawClient.list(id, request).body(); + } + + public SyncPagingIterable list( + String id, ListOrganizationAllConnectionsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(id, request, requestOptions).body(); + } + + public CreateOrganizationAllConnectionResponseContent create( + String id, CreateOrganizationAllConnectionRequestParameters request) { + return this.rawClient.create(id, request).body(); + } + + public CreateOrganizationAllConnectionResponseContent create( + String id, CreateOrganizationAllConnectionRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.create(id, request, requestOptions).body(); + } + + public GetOrganizationAllConnectionResponseContent get(String id, String connectionId) { + return this.rawClient.get(id, connectionId).body(); + } + + public GetOrganizationAllConnectionResponseContent get( + String id, String connectionId, RequestOptions requestOptions) { + return this.rawClient.get(id, connectionId, requestOptions).body(); + } + + public void delete(String id, String connectionId) { + this.rawClient.delete(id, connectionId).body(); + } + + public void delete(String id, String connectionId, RequestOptions requestOptions) { + this.rawClient.delete(id, connectionId, requestOptions).body(); + } + + public UpdateOrganizationAllConnectionResponseContent update(String id, String connectionId) { + return this.rawClient.update(id, connectionId).body(); + } + + public UpdateOrganizationAllConnectionResponseContent update( + String id, String connectionId, RequestOptions requestOptions) { + return this.rawClient.update(id, connectionId, requestOptions).body(); + } + + public UpdateOrganizationAllConnectionResponseContent update( + String id, String connectionId, UpdateOrganizationConnectionRequestParameters request) { + return this.rawClient.update(id, connectionId, request).body(); + } + + public UpdateOrganizationAllConnectionResponseContent update( + String id, + String connectionId, + UpdateOrganizationConnectionRequestParameters request, + RequestOptions requestOptions) { + return this.rawClient.update(id, connectionId, request, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawConnectionsClient.java new file mode 100644 index 000000000..c1225cafa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/RawConnectionsClient.java @@ -0,0 +1,423 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations; + +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.MediaTypes; +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.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +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.organizations.types.CreateOrganizationAllConnectionRequestParameters; +import com.auth0.client.mgmt.organizations.types.ListOrganizationAllConnectionsRequestParameters; +import com.auth0.client.mgmt.organizations.types.UpdateOrganizationConnectionRequestParameters; +import com.auth0.client.mgmt.types.CreateOrganizationAllConnectionResponseContent; +import com.auth0.client.mgmt.types.GetOrganizationAllConnectionResponseContent; +import com.auth0.client.mgmt.types.ListOrganizationAllConnectionsOffsetPaginatedResponseContent; +import com.auth0.client.mgmt.types.OrganizationAllConnectionPost; +import com.auth0.client.mgmt.types.UpdateOrganizationAllConnectionResponseContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawConnectionsClient { + protected final ClientOptions clientOptions; + + public RawConnectionsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + public ManagementApiHttpResponse> list(String id) { + return list( + id, ListOrganizationAllConnectionsRequestParameters.builder().build()); + } + + public ManagementApiHttpResponse> list( + String id, RequestOptions requestOptions) { + return list( + id, ListOrganizationAllConnectionsRequestParameters.builder().build(), requestOptions); + } + + public ManagementApiHttpResponse> list( + String id, ListOrganizationAllConnectionsRequestParameters request) { + return list(id, request, null); + } + + public ManagementApiHttpResponse> list( + String id, ListOrganizationAllConnectionsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("connections"); + QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); + QueryStringMapper.addQueryParameter( + httpUrl, "per_page", request.getPerPage().orElse(50), false); + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); + if (!request.getIsEnabled().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_enabled", request.getIsEnabled().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))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.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(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListOrganizationAllConnectionsOffsetPaginatedResponseContent parsedResponse = + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListOrganizationAllConnectionsOffsetPaginatedResponseContent.class); + int newPageNumber = + request.getPage().map((Integer page) -> page + 1).orElse(1); + ListOrganizationAllConnectionsRequestParameters nextRequest = + ListOrganizationAllConnectionsRequestParameters.builder() + .from(request) + .page(newPageNumber) + .build(); + List result = + parsedResponse.getConnections().orElse(Collections.emptyList()); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable( + true, result, parsedResponse, () -> list(id, nextRequest, requestOptions) + .body()), + response); + } + 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); + } + } + + public ManagementApiHttpResponse create( + String id, CreateOrganizationAllConnectionRequestParameters request) { + return create(id, request, null); + } + + public ManagementApiHttpResponse create( + String id, CreateOrganizationAllConnectionRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("connections"); + 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(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, CreateOrganizationAllConnectionResponseContent.class), + response); + } + 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 409: + throw new ConflictError( + 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); + } + } + + public ManagementApiHttpResponse get(String id, String connectionId) { + return get(id, connectionId, null); + } + + public ManagementApiHttpResponse get( + String id, String connectionId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("connections") + .addPathSegment(connectionId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .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(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, GetOrganizationAllConnectionResponseContent.class), + response); + } + try { + switch (response.code()) { + 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 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); + } + } + + public ManagementApiHttpResponse delete(String id, String connectionId) { + return delete(id, connectionId, null); + } + + public ManagementApiHttpResponse delete(String id, String connectionId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("connections") + .addPathSegment(connectionId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .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 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); + } + } + + public ManagementApiHttpResponse update( + String id, String connectionId) { + return update( + id, + connectionId, + UpdateOrganizationConnectionRequestParameters.builder().build()); + } + + public ManagementApiHttpResponse update( + String id, String connectionId, RequestOptions requestOptions) { + return update( + id, + connectionId, + UpdateOrganizationConnectionRequestParameters.builder().build(), + requestOptions); + } + + public ManagementApiHttpResponse update( + String id, String connectionId, UpdateOrganizationConnectionRequestParameters request) { + return update(id, connectionId, request, null); + } + + public ManagementApiHttpResponse update( + String id, + String connectionId, + UpdateOrganizationConnectionRequestParameters request, + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("connections") + .addPathSegment(connectionId); + 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("PATCH", 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(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, UpdateOrganizationAllConnectionResponseContent.class), + response); + } + 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); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationAllConnectionRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationAllConnectionRequestParameters.java new file mode 100644 index 000000000..facd18fd8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationAllConnectionRequestParameters.java @@ -0,0 +1,395 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.OrganizationAccessLevelEnum; +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 = CreateOrganizationAllConnectionRequestParameters.Builder.class) +public final class CreateOrganizationAllConnectionRequestParameters { + private final Optional organizationConnectionName; + + private final Optional assignMembershipOnLogin; + + private final Optional showAsButton; + + private final Optional isSignupEnabled; + + private final Optional organizationAccessLevel; + + private final Optional isEnabled; + + private final String connectionId; + + private final Map additionalProperties; + + private CreateOrganizationAllConnectionRequestParameters( + Optional organizationConnectionName, + Optional assignMembershipOnLogin, + Optional showAsButton, + Optional isSignupEnabled, + Optional organizationAccessLevel, + Optional isEnabled, + String connectionId, + Map additionalProperties) { + this.organizationConnectionName = organizationConnectionName; + this.assignMembershipOnLogin = assignMembershipOnLogin; + this.showAsButton = showAsButton; + this.isSignupEnabled = isSignupEnabled; + this.organizationAccessLevel = organizationAccessLevel; + this.isEnabled = isEnabled; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection in the scope of this organization. + */ + @JsonProperty("organization_connection_name") + public Optional getOrganizationConnectionName() { + return organizationConnectionName; + } + + /** + * @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. Default: true. + */ + @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. Default: false. + */ + @JsonProperty("is_signup_enabled") + public Optional getIsSignupEnabled() { + return isSignupEnabled; + } + + @JsonProperty("organization_access_level") + public Optional getOrganizationAccessLevel() { + return organizationAccessLevel; + } + + /** + * @return Whether the connection is enabled for the organization. + */ + @JsonProperty("is_enabled") + public Optional getIsEnabled() { + return isEnabled; + } + + /** + * @return Connection identifier. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateOrganizationAllConnectionRequestParameters + && equalTo((CreateOrganizationAllConnectionRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateOrganizationAllConnectionRequestParameters other) { + return organizationConnectionName.equals(other.organizationConnectionName) + && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) + && showAsButton.equals(other.showAsButton) + && isSignupEnabled.equals(other.isSignupEnabled) + && organizationAccessLevel.equals(other.organizationAccessLevel) + && isEnabled.equals(other.isEnabled) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.organizationConnectionName, + this.assignMembershipOnLogin, + this.showAsButton, + this.isSignupEnabled, + this.organizationAccessLevel, + this.isEnabled, + this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionIdStage builder() { + return new Builder(); + } + + public interface ConnectionIdStage { + /** + *

Connection identifier.

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

Name of the connection in the scope of this organization.

+ */ + _FinalStage organizationConnectionName(Optional organizationConnectionName); + + _FinalStage organizationConnectionName(String organizationConnectionName); + + /** + *

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. Default: true.

+ */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + + /** + *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

+ */ + _FinalStage isSignupEnabled(Optional isSignupEnabled); + + _FinalStage isSignupEnabled(Boolean isSignupEnabled); + + _FinalStage organizationAccessLevel(Optional organizationAccessLevel); + + _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel); + + /** + *

Whether the connection is enabled for the organization.

+ */ + _FinalStage isEnabled(Optional isEnabled); + + _FinalStage isEnabled(Boolean isEnabled); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConnectionIdStage, _FinalStage { + private String connectionId; + + private Optional isEnabled = Optional.empty(); + + private Optional organizationAccessLevel = Optional.empty(); + + private Optional isSignupEnabled = Optional.empty(); + + private Optional showAsButton = Optional.empty(); + + private Optional assignMembershipOnLogin = Optional.empty(); + + private Optional organizationConnectionName = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateOrganizationAllConnectionRequestParameters other) { + organizationConnectionName(other.getOrganizationConnectionName()); + assignMembershipOnLogin(other.getAssignMembershipOnLogin()); + showAsButton(other.getShowAsButton()); + isSignupEnabled(other.getIsSignupEnabled()); + organizationAccessLevel(other.getOrganizationAccessLevel()); + isEnabled(other.getIsEnabled()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

Connection identifier.

+ *

Connection identifier.

+ * @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; + } + + /** + *

Whether the connection is enabled for the organization.

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

Whether the connection is enabled for the organization.

+ */ + @java.lang.Override + @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) + public _FinalStage isEnabled(Optional isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + @java.lang.Override + public _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel) { + this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationAccessLevel(Optional organizationAccessLevel) { + this.organizationAccessLevel = organizationAccessLevel; + return this; + } + + /** + *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

+ * @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. Default: false.

+ */ + @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. Default: true.

+ * @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. Default: true.

+ */ + @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; + } + + /** + *

Name of the connection in the scope of this organization.

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

Name of the connection in the scope of this organization.

+ */ + @java.lang.Override + @JsonSetter(value = "organization_connection_name", nulls = Nulls.SKIP) + public _FinalStage organizationConnectionName(Optional organizationConnectionName) { + this.organizationConnectionName = organizationConnectionName; + return this; + } + + @java.lang.Override + public CreateOrganizationAllConnectionRequestParameters build() { + return new CreateOrganizationAllConnectionRequestParameters( + organizationConnectionName, + assignMembershipOnLogin, + showAsButton, + isSignupEnabled, + organizationAccessLevel, + isEnabled, + 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/organizations/types/ListOrganizationAllConnectionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationAllConnectionsRequestParameters.java new file mode 100644 index 000000000..1932f7051 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationAllConnectionsRequestParameters.java @@ -0,0 +1,301 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.types; + +import com.auth0.client.mgmt.core.Nullable; +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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListOrganizationAllConnectionsRequestParameters.Builder.class) +public final class ListOrganizationAllConnectionsRequestParameters { + private final OptionalNullable page; + + private final OptionalNullable perPage; + + private final OptionalNullable includeTotals; + + private final OptionalNullable isEnabled; + + private final Map additionalProperties; + + private ListOrganizationAllConnectionsRequestParameters( + OptionalNullable page, + OptionalNullable perPage, + OptionalNullable includeTotals, + OptionalNullable isEnabled, + Map additionalProperties) { + this.page = page; + this.perPage = perPage; + this.includeTotals = includeTotals; + this.isEnabled = isEnabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return Page index of the results to return. First page is 0. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + public OptionalNullable getPage() { + return page; + } + + /** + * @return Number of results per page. Defaults to 50. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + public OptionalNullable getPerPage() { + return perPage; + } + + /** + * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + public OptionalNullable getIncludeTotals() { + return includeTotals; + } + + /** + * @return Filter connections by enabled status. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("is_enabled") + public OptionalNullable getIsEnabled() { + if (isEnabled == null) { + return OptionalNullable.absent(); + } + return isEnabled; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("is_enabled") + private OptionalNullable _getIsEnabled() { + return isEnabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListOrganizationAllConnectionsRequestParameters + && equalTo((ListOrganizationAllConnectionsRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListOrganizationAllConnectionsRequestParameters other) { + return page.equals(other.page) + && perPage.equals(other.perPage) + && includeTotals.equals(other.includeTotals) + && isEnabled.equals(other.isEnabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.page, this.perPage, this.includeTotals, this.isEnabled); + } + + @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 page = OptionalNullable.absent(); + + private OptionalNullable perPage = OptionalNullable.absent(); + + private OptionalNullable includeTotals = OptionalNullable.absent(); + + private OptionalNullable isEnabled = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListOrganizationAllConnectionsRequestParameters other) { + page(other.getPage()); + perPage(other.getPerPage()); + includeTotals(other.getIncludeTotals()); + isEnabled(other.getIsEnabled()); + return this; + } + + /** + *

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

+ */ + @JsonSetter(value = "page", nulls = Nulls.SKIP) + public Builder page(OptionalNullable page) { + this.page = page; + return this; + } + + public Builder page(Integer page) { + this.page = OptionalNullable.of(page); + return this; + } + + public Builder page(Optional page) { + if (page.isPresent()) { + this.page = OptionalNullable.of(page.get()); + } else { + this.page = OptionalNullable.absent(); + } + return this; + } + + public Builder page(Nullable page) { + if (page.isNull()) { + this.page = OptionalNullable.ofNull(); + } else if (page.isEmpty()) { + this.page = OptionalNullable.absent(); + } else { + this.page = OptionalNullable.of(page.get()); + } + return this; + } + + /** + *

Number of results per page. Defaults to 50.

+ */ + @JsonSetter(value = "per_page", nulls = Nulls.SKIP) + public Builder perPage(OptionalNullable perPage) { + this.perPage = perPage; + return this; + } + + public Builder perPage(Integer perPage) { + this.perPage = OptionalNullable.of(perPage); + return this; + } + + public Builder perPage(Optional perPage) { + if (perPage.isPresent()) { + this.perPage = OptionalNullable.of(perPage.get()); + } else { + this.perPage = OptionalNullable.absent(); + } + return this; + } + + public Builder perPage(Nullable perPage) { + if (perPage.isNull()) { + this.perPage = OptionalNullable.ofNull(); + } else if (perPage.isEmpty()) { + this.perPage = OptionalNullable.absent(); + } else { + this.perPage = OptionalNullable.of(perPage.get()); + } + return this; + } + + /** + *

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) { + this.includeTotals = includeTotals; + return this; + } + + public Builder includeTotals(Boolean includeTotals) { + this.includeTotals = OptionalNullable.of(includeTotals); + return this; + } + + public Builder includeTotals(Optional includeTotals) { + if (includeTotals.isPresent()) { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } else { + this.includeTotals = OptionalNullable.absent(); + } + return this; + } + + public Builder includeTotals(Nullable includeTotals) { + if (includeTotals.isNull()) { + this.includeTotals = OptionalNullable.ofNull(); + } else if (includeTotals.isEmpty()) { + this.includeTotals = OptionalNullable.absent(); + } else { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } + return this; + } + + /** + *

Filter connections by enabled status.

+ */ + @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) + public Builder isEnabled(@org.jetbrains.annotations.Nullable OptionalNullable isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = OptionalNullable.of(isEnabled); + return this; + } + + public Builder isEnabled(Optional isEnabled) { + if (isEnabled.isPresent()) { + this.isEnabled = OptionalNullable.of(isEnabled.get()); + } else { + this.isEnabled = OptionalNullable.absent(); + } + return this; + } + + public Builder isEnabled(Nullable isEnabled) { + if (isEnabled.isNull()) { + this.isEnabled = OptionalNullable.ofNull(); + } else if (isEnabled.isEmpty()) { + this.isEnabled = OptionalNullable.absent(); + } else { + this.isEnabled = OptionalNullable.of(isEnabled.get()); + } + return this; + } + + public ListOrganizationAllConnectionsRequestParameters build() { + return new ListOrganizationAllConnectionsRequestParameters( + page, perPage, includeTotals, isEnabled, 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/organizations/types/UpdateOrganizationConnectionRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationConnectionRequestParameters.java new file mode 100644 index 000000000..b5ef77532 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationConnectionRequestParameters.java @@ -0,0 +1,369 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.auth0.client.mgmt.types.OrganizationAccessLevelEnumWithNull; +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 = UpdateOrganizationConnectionRequestParameters.Builder.class) +public final class UpdateOrganizationConnectionRequestParameters { + private final OptionalNullable organizationConnectionName; + + private final Optional assignMembershipOnLogin; + + private final Optional showAsButton; + + private final Optional isSignupEnabled; + + private final OptionalNullable organizationAccessLevel; + + private final OptionalNullable isEnabled; + + private final Map additionalProperties; + + private UpdateOrganizationConnectionRequestParameters( + OptionalNullable organizationConnectionName, + Optional assignMembershipOnLogin, + Optional showAsButton, + Optional isSignupEnabled, + OptionalNullable organizationAccessLevel, + OptionalNullable isEnabled, + Map additionalProperties) { + this.organizationConnectionName = organizationConnectionName; + this.assignMembershipOnLogin = assignMembershipOnLogin; + this.showAsButton = showAsButton; + this.isSignupEnabled = isSignupEnabled; + this.organizationAccessLevel = organizationAccessLevel; + this.isEnabled = isEnabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection in the scope of this organization. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("organization_connection_name") + public OptionalNullable getOrganizationConnectionName() { + if (organizationConnectionName == null) { + return OptionalNullable.absent(); + } + return organizationConnectionName; + } + + /** + * @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. Default: true. + */ + @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. Default: false. + */ + @JsonProperty("is_signup_enabled") + public Optional getIsSignupEnabled() { + return isSignupEnabled; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("organization_access_level") + public OptionalNullable getOrganizationAccessLevel() { + if (organizationAccessLevel == null) { + return OptionalNullable.absent(); + } + return organizationAccessLevel; + } + + /** + * @return Whether the connection is enabled for the organization. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("is_enabled") + public OptionalNullable getIsEnabled() { + if (isEnabled == null) { + return OptionalNullable.absent(); + } + return isEnabled; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("organization_connection_name") + private OptionalNullable _getOrganizationConnectionName() { + return organizationConnectionName; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("organization_access_level") + private OptionalNullable _getOrganizationAccessLevel() { + return organizationAccessLevel; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("is_enabled") + private OptionalNullable _getIsEnabled() { + return isEnabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateOrganizationConnectionRequestParameters + && equalTo((UpdateOrganizationConnectionRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateOrganizationConnectionRequestParameters other) { + return organizationConnectionName.equals(other.organizationConnectionName) + && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) + && showAsButton.equals(other.showAsButton) + && isSignupEnabled.equals(other.isSignupEnabled) + && organizationAccessLevel.equals(other.organizationAccessLevel) + && isEnabled.equals(other.isEnabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.organizationConnectionName, + this.assignMembershipOnLogin, + this.showAsButton, + this.isSignupEnabled, + this.organizationAccessLevel, + this.isEnabled); + } + + @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 organizationConnectionName = OptionalNullable.absent(); + + private Optional assignMembershipOnLogin = Optional.empty(); + + private Optional showAsButton = Optional.empty(); + + private Optional isSignupEnabled = Optional.empty(); + + private OptionalNullable organizationAccessLevel = + OptionalNullable.absent(); + + private OptionalNullable isEnabled = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(UpdateOrganizationConnectionRequestParameters other) { + organizationConnectionName(other.getOrganizationConnectionName()); + assignMembershipOnLogin(other.getAssignMembershipOnLogin()); + showAsButton(other.getShowAsButton()); + isSignupEnabled(other.getIsSignupEnabled()); + organizationAccessLevel(other.getOrganizationAccessLevel()); + isEnabled(other.getIsEnabled()); + return this; + } + + /** + *

Name of the connection in the scope of this organization.

+ */ + @JsonSetter(value = "organization_connection_name", nulls = Nulls.SKIP) + public Builder organizationConnectionName(@Nullable OptionalNullable organizationConnectionName) { + this.organizationConnectionName = organizationConnectionName; + return this; + } + + public Builder organizationConnectionName(String organizationConnectionName) { + this.organizationConnectionName = OptionalNullable.of(organizationConnectionName); + return this; + } + + public Builder organizationConnectionName(Optional organizationConnectionName) { + if (organizationConnectionName.isPresent()) { + this.organizationConnectionName = OptionalNullable.of(organizationConnectionName.get()); + } else { + this.organizationConnectionName = OptionalNullable.absent(); + } + return this; + } + + public Builder organizationConnectionName( + com.auth0.client.mgmt.core.Nullable organizationConnectionName) { + if (organizationConnectionName.isNull()) { + this.organizationConnectionName = OptionalNullable.ofNull(); + } else if (organizationConnectionName.isEmpty()) { + this.organizationConnectionName = OptionalNullable.absent(); + } else { + this.organizationConnectionName = OptionalNullable.of(organizationConnectionName.get()); + } + 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.

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

Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.

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

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

+ */ + @JsonSetter(value = "is_signup_enabled", nulls = Nulls.SKIP) + public Builder isSignupEnabled(Optional isSignupEnabled) { + this.isSignupEnabled = isSignupEnabled; + return this; + } + + public Builder isSignupEnabled(Boolean isSignupEnabled) { + this.isSignupEnabled = Optional.ofNullable(isSignupEnabled); + return this; + } + + @JsonSetter(value = "organization_access_level", nulls = Nulls.SKIP) + public Builder organizationAccessLevel( + @Nullable OptionalNullable organizationAccessLevel) { + this.organizationAccessLevel = organizationAccessLevel; + return this; + } + + public Builder organizationAccessLevel(OrganizationAccessLevelEnumWithNull organizationAccessLevel) { + this.organizationAccessLevel = OptionalNullable.of(organizationAccessLevel); + return this; + } + + public Builder organizationAccessLevel(Optional organizationAccessLevel) { + if (organizationAccessLevel.isPresent()) { + this.organizationAccessLevel = OptionalNullable.of(organizationAccessLevel.get()); + } else { + this.organizationAccessLevel = OptionalNullable.absent(); + } + return this; + } + + public Builder organizationAccessLevel( + com.auth0.client.mgmt.core.Nullable organizationAccessLevel) { + if (organizationAccessLevel.isNull()) { + this.organizationAccessLevel = OptionalNullable.ofNull(); + } else if (organizationAccessLevel.isEmpty()) { + this.organizationAccessLevel = OptionalNullable.absent(); + } else { + this.organizationAccessLevel = OptionalNullable.of(organizationAccessLevel.get()); + } + return this; + } + + /** + *

Whether the connection is enabled for the organization.

+ */ + @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) + public Builder isEnabled(@Nullable OptionalNullable isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = OptionalNullable.of(isEnabled); + return this; + } + + public Builder isEnabled(Optional isEnabled) { + if (isEnabled.isPresent()) { + this.isEnabled = OptionalNullable.of(isEnabled.get()); + } else { + this.isEnabled = OptionalNullable.absent(); + } + return this; + } + + public Builder isEnabled(com.auth0.client.mgmt.core.Nullable isEnabled) { + if (isEnabled.isNull()) { + this.isEnabled = OptionalNullable.ofNull(); + } else if (isEnabled.isEmpty()) { + this.isEnabled = OptionalNullable.absent(); + } else { + this.isEnabled = OptionalNullable.of(isEnabled.get()); + } + return this; + } + + public UpdateOrganizationConnectionRequestParameters build() { + return new UpdateOrganizationConnectionRequestParameters( + organizationConnectionName, + assignMembershipOnLogin, + showAsButton, + isSignupEnabled, + organizationAccessLevel, + isEnabled, + 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/selfserviceprofiles/types/CreateSelfServiceProfileSsoTicketRequestContent.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/types/CreateSelfServiceProfileSsoTicketRequestContent.java index ce5799956..0465001ca 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 @@ -6,6 +6,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketConnectionConfig; import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketDomainAliasesConfig; +import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketEnabledFeatures; import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketEnabledOrganization; import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketProvisioningConfig; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -41,6 +42,8 @@ public final class CreateSelfServiceProfileSsoTicketRequestContent { private final Optional useForOrganizationDiscovery; + private final Optional enabledFeatures; + private final Map additionalProperties; private CreateSelfServiceProfileSsoTicketRequestContent( @@ -52,6 +55,7 @@ private CreateSelfServiceProfileSsoTicketRequestContent( Optional domainAliasesConfig, Optional provisioningConfig, Optional useForOrganizationDiscovery, + Optional enabledFeatures, Map additionalProperties) { this.connectionId = connectionId; this.connectionConfig = connectionConfig; @@ -61,6 +65,7 @@ private CreateSelfServiceProfileSsoTicketRequestContent( this.domainAliasesConfig = domainAliasesConfig; this.provisioningConfig = provisioningConfig; this.useForOrganizationDiscovery = useForOrganizationDiscovery; + this.enabledFeatures = enabledFeatures; this.additionalProperties = additionalProperties; } @@ -119,6 +124,11 @@ public Optional getUseForOrganizationDiscovery() { return useForOrganizationDiscovery; } + @JsonProperty("enabled_features") + public Optional getEnabledFeatures() { + return enabledFeatures; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -139,7 +149,8 @@ private boolean equalTo(CreateSelfServiceProfileSsoTicketRequestContent other) { && ttlSec.equals(other.ttlSec) && domainAliasesConfig.equals(other.domainAliasesConfig) && provisioningConfig.equals(other.provisioningConfig) - && useForOrganizationDiscovery.equals(other.useForOrganizationDiscovery); + && useForOrganizationDiscovery.equals(other.useForOrganizationDiscovery) + && enabledFeatures.equals(other.enabledFeatures); } @java.lang.Override @@ -152,7 +163,8 @@ public int hashCode() { this.ttlSec, this.domainAliasesConfig, this.provisioningConfig, - this.useForOrganizationDiscovery); + this.useForOrganizationDiscovery, + this.enabledFeatures); } @java.lang.Override @@ -182,6 +194,8 @@ public static final class Builder { private Optional useForOrganizationDiscovery = Optional.empty(); + private Optional enabledFeatures = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -196,6 +210,7 @@ public Builder from(CreateSelfServiceProfileSsoTicketRequestContent other) { domainAliasesConfig(other.getDomainAliasesConfig()); provisioningConfig(other.getProvisioningConfig()); useForOrganizationDiscovery(other.getUseForOrganizationDiscovery()); + enabledFeatures(other.getEnabledFeatures()); return this; } @@ -304,6 +319,17 @@ public Builder useForOrganizationDiscovery(Boolean useForOrganizationDiscovery) return this; } + @JsonSetter(value = "enabled_features", nulls = Nulls.SKIP) + public Builder enabledFeatures(Optional enabledFeatures) { + this.enabledFeatures = enabledFeatures; + return this; + } + + public Builder enabledFeatures(SelfServiceProfileSsoTicketEnabledFeatures enabledFeatures) { + this.enabledFeatures = Optional.ofNullable(enabledFeatures); + return this; + } + public CreateSelfServiceProfileSsoTicketRequestContent build() { return new CreateSelfServiceProfileSsoTicketRequestContent( connectionId, @@ -314,6 +340,7 @@ public CreateSelfServiceProfileSsoTicketRequestContent build() { domainAliasesConfig, provisioningConfig, useForOrganizationDiscovery, + enabledFeatures, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java index 31f5e1369..a8a8fef3f 100644 --- a/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.types.SessionCookieSchema; import com.auth0.client.mgmt.types.TenantOidcLogoutSettings; import com.auth0.client.mgmt.types.TenantSettingsDeviceFlow; +import com.auth0.client.mgmt.types.TenantSettingsDynamicClientRegistrationSecurityMode; import com.auth0.client.mgmt.types.TenantSettingsErrorPage; import com.auth0.client.mgmt.types.TenantSettingsFlags; import com.auth0.client.mgmt.types.TenantSettingsGuardianPage; @@ -100,10 +101,14 @@ public final class UpdateTenantSettingsRequestContent { private final Optional resourceParameterProfile; + private final Optional clientIdMetadataDocumentSupported; + private final Optional enableAiGuide; private final Optional phoneConsolidatedExperience; + private final Optional dynamicClientRegistrationSecurityMode; + private final Map additionalProperties; private UpdateTenantSettingsRequestContent( @@ -139,8 +144,10 @@ private UpdateTenantSettingsRequestContent( OptionalNullable authorizationResponseIssParameterSupported, OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt, Optional resourceParameterProfile, + Optional clientIdMetadataDocumentSupported, Optional enableAiGuide, Optional phoneConsolidatedExperience, + Optional dynamicClientRegistrationSecurityMode, Map additionalProperties) { this.changePassword = changePassword; this.deviceFlow = deviceFlow; @@ -174,8 +181,10 @@ private UpdateTenantSettingsRequestContent( this.authorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.resourceParameterProfile = resourceParameterProfile; + this.clientIdMetadataDocumentSupported = clientIdMetadataDocumentSupported; this.enableAiGuide = enableAiGuide; this.phoneConsolidatedExperience = phoneConsolidatedExperience; + this.dynamicClientRegistrationSecurityMode = dynamicClientRegistrationSecurityMode; this.additionalProperties = additionalProperties; } @@ -463,6 +472,14 @@ public Optional getResourceParameterProf return resourceParameterProfile; } + /** + * @return Whether the authorization server supports retrieving client metadata from a client_id URL. + */ + @JsonProperty("client_id_metadata_document_supported") + public Optional getClientIdMetadataDocumentSupported() { + return clientIdMetadataDocumentSupported; + } + /** * @return Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant. */ @@ -479,6 +496,11 @@ public Optional getPhoneConsolidatedExperience() { return phoneConsolidatedExperience; } + @JsonProperty("dynamic_client_registration_security_mode") + public Optional getDynamicClientRegistrationSecurityMode() { + return dynamicClientRegistrationSecurityMode; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("change_password") private OptionalNullable _getChangePassword() { @@ -609,8 +631,10 @@ private boolean equalTo(UpdateTenantSettingsRequestContent other) { && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) && resourceParameterProfile.equals(other.resourceParameterProfile) + && clientIdMetadataDocumentSupported.equals(other.clientIdMetadataDocumentSupported) && enableAiGuide.equals(other.enableAiGuide) - && phoneConsolidatedExperience.equals(other.phoneConsolidatedExperience); + && phoneConsolidatedExperience.equals(other.phoneConsolidatedExperience) + && dynamicClientRegistrationSecurityMode.equals(other.dynamicClientRegistrationSecurityMode); } @java.lang.Override @@ -648,8 +672,10 @@ public int hashCode() { this.authorizationResponseIssParameterSupported, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.resourceParameterProfile, + this.clientIdMetadataDocumentSupported, this.enableAiGuide, - this.phoneConsolidatedExperience); + this.phoneConsolidatedExperience, + this.dynamicClientRegistrationSecurityMode); } @java.lang.Override @@ -727,10 +753,15 @@ public static final class Builder { private Optional resourceParameterProfile = Optional.empty(); + private Optional clientIdMetadataDocumentSupported = Optional.empty(); + private Optional enableAiGuide = Optional.empty(); private Optional phoneConsolidatedExperience = Optional.empty(); + private Optional dynamicClientRegistrationSecurityMode = + Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -769,8 +800,10 @@ public Builder from(UpdateTenantSettingsRequestContent other) { authorizationResponseIssParameterSupported(other.getAuthorizationResponseIssParameterSupported()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); resourceParameterProfile(other.getResourceParameterProfile()); + clientIdMetadataDocumentSupported(other.getClientIdMetadataDocumentSupported()); enableAiGuide(other.getEnableAiGuide()); phoneConsolidatedExperience(other.getPhoneConsolidatedExperience()); + dynamicClientRegistrationSecurityMode(other.getDynamicClientRegistrationSecurityMode()); return this; } @@ -1501,6 +1534,20 @@ public Builder resourceParameterProfile(TenantSettingsResourceParameterProfile r return this; } + /** + *

Whether the authorization server supports retrieving client metadata from a client_id URL.

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

Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant.

*/ @@ -1529,6 +1576,19 @@ public Builder phoneConsolidatedExperience(Boolean phoneConsolidatedExperience) return this; } + @JsonSetter(value = "dynamic_client_registration_security_mode", nulls = Nulls.SKIP) + public Builder dynamicClientRegistrationSecurityMode( + Optional dynamicClientRegistrationSecurityMode) { + this.dynamicClientRegistrationSecurityMode = dynamicClientRegistrationSecurityMode; + return this; + } + + public Builder dynamicClientRegistrationSecurityMode( + TenantSettingsDynamicClientRegistrationSecurityMode dynamicClientRegistrationSecurityMode) { + this.dynamicClientRegistrationSecurityMode = Optional.ofNullable(dynamicClientRegistrationSecurityMode); + return this; + } + public UpdateTenantSettingsRequestContent build() { return new UpdateTenantSettingsRequestContent( changePassword, @@ -1563,8 +1623,10 @@ public UpdateTenantSettingsRequestContent build() { authorizationResponseIssParameterSupported, skipNonVerifiableCallbackUriConfirmationPrompt, resourceParameterProfile, + clientIdMetadataDocumentSupported, enableAiGuide, phoneConsolidatedExperience, + dynamicClientRegistrationSecurityMode, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/Client.java b/src/main/java/com/auth0/client/mgmt/types/Client.java index 4fc0d1218..4f20faabb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/Client.java +++ b/src/main/java/com/auth0/client/mgmt/types/Client.java @@ -126,6 +126,12 @@ public final class Client { private final Optional expressConfiguration; + private final Optional myOrganizationConfiguration; + + private final Optional thirdPartySecurityMode; + + private final Optional redirectionPolicy; + private final Optional resourceServerIdentifier; private final Optional> asyncApprovalNotificationChannels; @@ -192,6 +198,9 @@ private Client( OptionalNullable parRequestExpiry, Optional tokenQuota, Optional expressConfiguration, + Optional myOrganizationConfiguration, + Optional thirdPartySecurityMode, + Optional redirectionPolicy, Optional resourceServerIdentifier, Optional> asyncApprovalNotificationChannels, Optional externalMetadataType, @@ -250,6 +259,9 @@ private Client( this.parRequestExpiry = parRequestExpiry; this.tokenQuota = tokenQuota; this.expressConfiguration = expressConfiguration; + this.myOrganizationConfiguration = myOrganizationConfiguration; + this.thirdPartySecurityMode = thirdPartySecurityMode; + this.redirectionPolicy = redirectionPolicy; this.resourceServerIdentifier = resourceServerIdentifier; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; this.externalMetadataType = externalMetadataType; @@ -641,6 +653,21 @@ public Optional getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("my_organization_configuration") + public Optional getMyOrganizationConfiguration() { + return myOrganizationConfiguration; + } + + @JsonProperty("third_party_security_mode") + public Optional getThirdPartySecurityMode() { + return thirdPartySecurityMode; + } + + @JsonProperty("redirection_policy") + public Optional getRedirectionPolicy() { + return redirectionPolicy; + } + /** * @return The identifier of the resource server that this client is linked to. */ @@ -792,6 +819,9 @@ private boolean equalTo(Client other) { && parRequestExpiry.equals(other.parRequestExpiry) && tokenQuota.equals(other.tokenQuota) && expressConfiguration.equals(other.expressConfiguration) + && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && redirectionPolicy.equals(other.redirectionPolicy) && resourceServerIdentifier.equals(other.resourceServerIdentifier) && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) && externalMetadataType.equals(other.externalMetadataType) @@ -854,6 +884,9 @@ public int hashCode() { this.parRequestExpiry, this.tokenQuota, this.expressConfiguration, + this.myOrganizationConfiguration, + this.thirdPartySecurityMode, + this.redirectionPolicy, this.resourceServerIdentifier, this.asyncApprovalNotificationChannels, this.externalMetadataType, @@ -975,6 +1008,12 @@ public static final class Builder { private Optional expressConfiguration = Optional.empty(); + private Optional myOrganizationConfiguration = Optional.empty(); + + private Optional thirdPartySecurityMode = Optional.empty(); + + private Optional redirectionPolicy = Optional.empty(); + private Optional resourceServerIdentifier = Optional.empty(); private Optional> asyncApprovalNotificationChannels = @@ -1045,6 +1084,9 @@ public Builder from(Client other) { parRequestExpiry(other.getParRequestExpiry()); tokenQuota(other.getTokenQuota()); expressConfiguration(other.getExpressConfiguration()); + myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + thirdPartySecurityMode(other.getThirdPartySecurityMode()); + redirectionPolicy(other.getRedirectionPolicy()); resourceServerIdentifier(other.getResourceServerIdentifier()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); externalMetadataType(other.getExternalMetadataType()); @@ -1880,6 +1922,41 @@ public Builder expressConfiguration(ExpressConfiguration expressConfiguration) { return this; } + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) + public Builder myOrganizationConfiguration( + Optional myOrganizationConfiguration) { + this.myOrganizationConfiguration = myOrganizationConfiguration; + return this; + } + + public Builder myOrganizationConfiguration( + ClientMyOrganizationResponseConfiguration myOrganizationConfiguration) { + this.myOrganizationConfiguration = Optional.ofNullable(myOrganizationConfiguration); + return this; + } + + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) + public Builder thirdPartySecurityMode(Optional thirdPartySecurityMode) { + this.thirdPartySecurityMode = thirdPartySecurityMode; + return this; + } + + public Builder thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPartySecurityMode) { + this.thirdPartySecurityMode = Optional.ofNullable(thirdPartySecurityMode); + return this; + } + + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) + public Builder redirectionPolicy(Optional redirectionPolicy) { + this.redirectionPolicy = redirectionPolicy; + return this; + } + + public Builder redirectionPolicy(ClientRedirectionPolicyEnum redirectionPolicy) { + this.redirectionPolicy = Optional.ofNullable(redirectionPolicy); + return this; + } + /** *

The identifier of the resource server that this client is linked to.

*/ @@ -2011,6 +2088,9 @@ public Client build() { parRequestExpiry, tokenQuota, expressConfiguration, + myOrganizationConfiguration, + thirdPartySecurityMode, + redirectionPolicy, resourceServerIdentifier, asyncApprovalNotificationChannels, externalMetadataType, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickrStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ClientGrantDefaultForEnum.java similarity index 58% rename from src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickrStrategy.java rename to src/main/java/com/auth0/client/mgmt/types/ClientGrantDefaultForEnum.java index 56fa474f7..6c2da7615 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickrStrategy.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientGrantDefaultForEnum.java @@ -6,15 +6,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class ConnectionResponseContentFlickrStrategy { - public static final ConnectionResponseContentFlickrStrategy FLICKR = - new ConnectionResponseContentFlickrStrategy(Value.FLICKR, "flickr"); +public final class ClientGrantDefaultForEnum { + public static final ClientGrantDefaultForEnum THIRD_PARTY_CLIENTS = + new ClientGrantDefaultForEnum(Value.THIRD_PARTY_CLIENTS, "third_party_clients"); private final Value value; private final String string; - ConnectionResponseContentFlickrStrategy(Value value, String string) { + ClientGrantDefaultForEnum(Value value, String string) { this.value = value; this.string = string; } @@ -32,8 +32,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof ConnectionResponseContentFlickrStrategy - && this.string.equals(((ConnectionResponseContentFlickrStrategy) other).string)); + || (other instanceof ClientGrantDefaultForEnum + && this.string.equals(((ClientGrantDefaultForEnum) other).string)); } @java.lang.Override @@ -43,8 +43,8 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case FLICKR: - return visitor.visitFlickr(); + case THIRD_PARTY_CLIENTS: + return visitor.visitThirdPartyClients(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -52,23 +52,23 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentFlickrStrategy valueOf(String value) { + public static ClientGrantDefaultForEnum valueOf(String value) { switch (value) { - case "flickr": - return FLICKR; + case "third_party_clients": + return THIRD_PARTY_CLIENTS; default: - return new ConnectionResponseContentFlickrStrategy(Value.UNKNOWN, value); + return new ClientGrantDefaultForEnum(Value.UNKNOWN, value); } } public enum Value { - FLICKR, + THIRD_PARTY_CLIENTS, UNKNOWN } public interface Visitor { - T visitFlickr(); + T visitThirdPartyClients(); T visitUnknown(String unknownType); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientGrantResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ClientGrantResponseContent.java index c0ae611b1..f84416e1d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientGrantResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientGrantResponseContent.java @@ -33,6 +33,8 @@ public final class ClientGrantResponseContent { private final Optional allowAnyOrganization; + private final Optional defaultFor; + private final Optional isSystem; private final Optional subjectType; @@ -50,6 +52,7 @@ private ClientGrantResponseContent( Optional> scope, Optional organizationUsage, Optional allowAnyOrganization, + Optional defaultFor, Optional isSystem, Optional subjectType, Optional> authorizationDetailsTypes, @@ -61,6 +64,7 @@ private ClientGrantResponseContent( this.scope = scope; this.organizationUsage = organizationUsage; this.allowAnyOrganization = allowAnyOrganization; + this.defaultFor = defaultFor; this.isSystem = isSystem; this.subjectType = subjectType; this.authorizationDetailsTypes = authorizationDetailsTypes; @@ -113,6 +117,11 @@ public Optional getAllowAnyOrganization() { return allowAnyOrganization; } + @JsonProperty("default_for") + public Optional getDefaultFor() { + return defaultFor; + } + /** * @return If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly. */ @@ -160,6 +169,7 @@ private boolean equalTo(ClientGrantResponseContent other) { && scope.equals(other.scope) && organizationUsage.equals(other.organizationUsage) && allowAnyOrganization.equals(other.allowAnyOrganization) + && defaultFor.equals(other.defaultFor) && isSystem.equals(other.isSystem) && subjectType.equals(other.subjectType) && authorizationDetailsTypes.equals(other.authorizationDetailsTypes) @@ -175,6 +185,7 @@ public int hashCode() { this.scope, this.organizationUsage, this.allowAnyOrganization, + this.defaultFor, this.isSystem, this.subjectType, this.authorizationDetailsTypes, @@ -204,6 +215,8 @@ public static final class Builder { private Optional allowAnyOrganization = Optional.empty(); + private Optional defaultFor = Optional.empty(); + private Optional isSystem = Optional.empty(); private Optional subjectType = Optional.empty(); @@ -224,6 +237,7 @@ public Builder from(ClientGrantResponseContent other) { scope(other.getScope()); organizationUsage(other.getOrganizationUsage()); allowAnyOrganization(other.getAllowAnyOrganization()); + defaultFor(other.getDefaultFor()); isSystem(other.getIsSystem()); subjectType(other.getSubjectType()); authorizationDetailsTypes(other.getAuthorizationDetailsTypes()); @@ -312,6 +326,17 @@ public Builder allowAnyOrganization(Boolean allowAnyOrganization) { return this; } + @JsonSetter(value = "default_for", nulls = Nulls.SKIP) + public Builder defaultFor(Optional defaultFor) { + this.defaultFor = defaultFor; + return this; + } + + public Builder defaultFor(ClientGrantDefaultForEnum defaultFor) { + this.defaultFor = Optional.ofNullable(defaultFor); + return this; + } + /** *

If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.

*/ @@ -373,6 +398,7 @@ public ClientGrantResponseContent build() { scope, organizationUsage, allowAnyOrganization, + defaultFor, isSystem, subjectType, authorizationDetailsTypes, diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationAllowedStrategiesEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationAllowedStrategiesEnum.java new file mode 100644 index 000000000..38bf2b5e6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationConfigurationAllowedStrategiesEnum.java @@ -0,0 +1,141 @@ +/** + * 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 ClientMyOrganizationConfigurationAllowedStrategiesEnum { + public static final ClientMyOrganizationConfigurationAllowedStrategiesEnum PINGFEDERATE = + new ClientMyOrganizationConfigurationAllowedStrategiesEnum(Value.PINGFEDERATE, "pingfederate"); + + public static final ClientMyOrganizationConfigurationAllowedStrategiesEnum OKTA = + new ClientMyOrganizationConfigurationAllowedStrategiesEnum(Value.OKTA, "okta"); + + 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"); + + public static final ClientMyOrganizationConfigurationAllowedStrategiesEnum ADFS = + new ClientMyOrganizationConfigurationAllowedStrategiesEnum(Value.ADFS, "adfs"); + + public static final ClientMyOrganizationConfigurationAllowedStrategiesEnum OIDC = + new ClientMyOrganizationConfigurationAllowedStrategiesEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + ClientMyOrganizationConfigurationAllowedStrategiesEnum(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 ClientMyOrganizationConfigurationAllowedStrategiesEnum + && this.string.equals(((ClientMyOrganizationConfigurationAllowedStrategiesEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PINGFEDERATE: + return visitor.visitPingfederate(); + case OKTA: + 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 UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientMyOrganizationConfigurationAllowedStrategiesEnum valueOf(String value) { + switch (value) { + case "pingfederate": + return PINGFEDERATE; + case "okta": + return OKTA; + case "samlp": + return SAMLP; + case "google-apps": + return GOOGLE_APPS; + case "waad": + return WAAD; + case "adfs": + return ADFS; + case "oidc": + return OIDC; + default: + return new ClientMyOrganizationConfigurationAllowedStrategiesEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + PINGFEDERATE, + + ADFS, + + WAAD, + + GOOGLE_APPS, + + OKTA, + + OIDC, + + SAMLP, + + UNKNOWN + } + + public interface Visitor { + T visitPingfederate(); + + T visitAdfs(); + + T visitWaad(); + + T visitGoogleApps(); + + T visitOkta(); + + T visitOidc(); + + T visitSamlp(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationDeletionBehaviorEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationDeletionBehaviorEnum.java new file mode 100644 index 000000000..b22fa8360 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationDeletionBehaviorEnum.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 ClientMyOrganizationDeletionBehaviorEnum { + public static final ClientMyOrganizationDeletionBehaviorEnum ALLOW = + new ClientMyOrganizationDeletionBehaviorEnum(Value.ALLOW, "allow"); + + public static final ClientMyOrganizationDeletionBehaviorEnum ALLOW_IF_EMPTY = + new ClientMyOrganizationDeletionBehaviorEnum(Value.ALLOW_IF_EMPTY, "allow_if_empty"); + + private final Value value; + + private final String string; + + ClientMyOrganizationDeletionBehaviorEnum(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 ClientMyOrganizationDeletionBehaviorEnum + && this.string.equals(((ClientMyOrganizationDeletionBehaviorEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ALLOW: + return visitor.visitAllow(); + case ALLOW_IF_EMPTY: + return visitor.visitAllowIfEmpty(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientMyOrganizationDeletionBehaviorEnum valueOf(String value) { + switch (value) { + case "allow": + return ALLOW; + case "allow_if_empty": + return ALLOW_IF_EMPTY; + default: + return new ClientMyOrganizationDeletionBehaviorEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ALLOW, + + ALLOW_IF_EMPTY, + + UNKNOWN + } + + public interface Visitor { + T visitAllow(); + + T visitAllowIfEmpty(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPatchConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPatchConfiguration.java new file mode 100644 index 000000000..56a5beff8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPatchConfiguration.java @@ -0,0 +1,287 @@ +/** + * 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.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 = ClientMyOrganizationPatchConfiguration.Builder.class) +public final class ClientMyOrganizationPatchConfiguration { + private final Optional connectionProfileId; + + private final Optional userAttributeProfileId; + + private final List allowedStrategies; + + private final ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; + + private final Map additionalProperties; + + private ClientMyOrganizationPatchConfiguration( + Optional connectionProfileId, + Optional userAttributeProfileId, + List allowedStrategies, + ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior, + Map additionalProperties) { + this.connectionProfileId = connectionProfileId; + this.userAttributeProfileId = userAttributeProfileId; + this.allowedStrategies = allowedStrategies; + this.connectionDeletionBehavior = connectionDeletionBehavior; + this.additionalProperties = additionalProperties; + } + + /** + * @return The connection profile ID that this client should validate against. + */ + @JsonProperty("connection_profile_id") + public Optional getConnectionProfileId() { + return connectionProfileId; + } + + /** + * @return The user attribute profile ID that this client should validate against. + */ + @JsonProperty("user_attribute_profile_id") + public Optional getUserAttributeProfileId() { + return userAttributeProfileId; + } + + /** + * @return The allowed connection strategies for the My Organization Configuration. + */ + @JsonProperty("allowed_strategies") + public List getAllowedStrategies() { + return allowedStrategies; + } + + @JsonProperty("connection_deletion_behavior") + public ClientMyOrganizationDeletionBehaviorEnum getConnectionDeletionBehavior() { + return connectionDeletionBehavior; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientMyOrganizationPatchConfiguration + && equalTo((ClientMyOrganizationPatchConfiguration) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientMyOrganizationPatchConfiguration other) { + return connectionProfileId.equals(other.connectionProfileId) + && userAttributeProfileId.equals(other.userAttributeProfileId) + && allowedStrategies.equals(other.allowedStrategies) + && connectionDeletionBehavior.equals(other.connectionDeletionBehavior); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.connectionProfileId, + this.userAttributeProfileId, + this.allowedStrategies, + this.connectionDeletionBehavior); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionDeletionBehaviorStage builder() { + return new Builder(); + } + + public interface ConnectionDeletionBehaviorStage { + _FinalStage connectionDeletionBehavior( + @NotNull ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior); + + Builder from(ClientMyOrganizationPatchConfiguration other); + } + + public interface _FinalStage { + ClientMyOrganizationPatchConfiguration build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The connection profile ID that this client should validate against.

+ */ + _FinalStage connectionProfileId(Optional connectionProfileId); + + _FinalStage connectionProfileId(String connectionProfileId); + + /** + *

The user attribute profile ID that this client should validate against.

+ */ + _FinalStage userAttributeProfileId(Optional userAttributeProfileId); + + _FinalStage userAttributeProfileId(String userAttributeProfileId); + + /** + *

The allowed connection strategies for the My Organization Configuration.

+ */ + _FinalStage allowedStrategies(List allowedStrategies); + + _FinalStage addAllowedStrategies(ClientMyOrganizationConfigurationAllowedStrategiesEnum allowedStrategies); + + _FinalStage addAllAllowedStrategies( + List allowedStrategies); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConnectionDeletionBehaviorStage, _FinalStage { + private ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; + + private List allowedStrategies = new ArrayList<>(); + + private Optional userAttributeProfileId = Optional.empty(); + + private Optional connectionProfileId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ClientMyOrganizationPatchConfiguration other) { + connectionProfileId(other.getConnectionProfileId()); + userAttributeProfileId(other.getUserAttributeProfileId()); + allowedStrategies(other.getAllowedStrategies()); + connectionDeletionBehavior(other.getConnectionDeletionBehavior()); + return this; + } + + @java.lang.Override + @JsonSetter("connection_deletion_behavior") + public _FinalStage connectionDeletionBehavior( + @NotNull ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior) { + this.connectionDeletionBehavior = + Objects.requireNonNull(connectionDeletionBehavior, "connectionDeletionBehavior must not be null"); + return this; + } + + /** + *

The allowed connection strategies for the My Organization Configuration.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllAllowedStrategies( + List allowedStrategies) { + if (allowedStrategies != null) { + this.allowedStrategies.addAll(allowedStrategies); + } + return this; + } + + /** + *

The allowed connection strategies for the My Organization Configuration.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllowedStrategies( + ClientMyOrganizationConfigurationAllowedStrategiesEnum allowedStrategies) { + this.allowedStrategies.add(allowedStrategies); + return this; + } + + /** + *

The allowed connection strategies for the My Organization Configuration.

+ */ + @java.lang.Override + @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) + public _FinalStage allowedStrategies( + List allowedStrategies) { + this.allowedStrategies.clear(); + if (allowedStrategies != null) { + this.allowedStrategies.addAll(allowedStrategies); + } + return this; + } + + /** + *

The user attribute profile ID that this client should validate against.

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

The user attribute profile ID that this client should validate against.

+ */ + @java.lang.Override + @JsonSetter(value = "user_attribute_profile_id", nulls = Nulls.SKIP) + public _FinalStage userAttributeProfileId(Optional userAttributeProfileId) { + this.userAttributeProfileId = userAttributeProfileId; + return this; + } + + /** + *

The connection profile ID that this client should validate against.

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

The connection profile ID that this client should validate against.

+ */ + @java.lang.Override + @JsonSetter(value = "connection_profile_id", nulls = Nulls.SKIP) + public _FinalStage connectionProfileId(Optional connectionProfileId) { + this.connectionProfileId = connectionProfileId; + return this; + } + + @java.lang.Override + public ClientMyOrganizationPatchConfiguration build() { + return new ClientMyOrganizationPatchConfiguration( + connectionProfileId, + userAttributeProfileId, + allowedStrategies, + connectionDeletionBehavior, + 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/ClientMyOrganizationPostConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPostConfiguration.java new file mode 100644 index 000000000..a4080a360 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPostConfiguration.java @@ -0,0 +1,287 @@ +/** + * 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.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 = ClientMyOrganizationPostConfiguration.Builder.class) +public final class ClientMyOrganizationPostConfiguration { + private final Optional connectionProfileId; + + private final Optional userAttributeProfileId; + + private final List allowedStrategies; + + private final ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; + + private final Map additionalProperties; + + private ClientMyOrganizationPostConfiguration( + Optional connectionProfileId, + Optional userAttributeProfileId, + List allowedStrategies, + ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior, + Map additionalProperties) { + this.connectionProfileId = connectionProfileId; + this.userAttributeProfileId = userAttributeProfileId; + this.allowedStrategies = allowedStrategies; + this.connectionDeletionBehavior = connectionDeletionBehavior; + this.additionalProperties = additionalProperties; + } + + /** + * @return The connection profile ID that this client should validate against. + */ + @JsonProperty("connection_profile_id") + public Optional getConnectionProfileId() { + return connectionProfileId; + } + + /** + * @return The user attribute profile ID that this client should validate against. + */ + @JsonProperty("user_attribute_profile_id") + public Optional getUserAttributeProfileId() { + return userAttributeProfileId; + } + + /** + * @return The allowed connection strategies for the My Organization Configuration. + */ + @JsonProperty("allowed_strategies") + public List getAllowedStrategies() { + return allowedStrategies; + } + + @JsonProperty("connection_deletion_behavior") + public ClientMyOrganizationDeletionBehaviorEnum getConnectionDeletionBehavior() { + return connectionDeletionBehavior; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientMyOrganizationPostConfiguration + && equalTo((ClientMyOrganizationPostConfiguration) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientMyOrganizationPostConfiguration other) { + return connectionProfileId.equals(other.connectionProfileId) + && userAttributeProfileId.equals(other.userAttributeProfileId) + && allowedStrategies.equals(other.allowedStrategies) + && connectionDeletionBehavior.equals(other.connectionDeletionBehavior); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.connectionProfileId, + this.userAttributeProfileId, + this.allowedStrategies, + this.connectionDeletionBehavior); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionDeletionBehaviorStage builder() { + return new Builder(); + } + + public interface ConnectionDeletionBehaviorStage { + _FinalStage connectionDeletionBehavior( + @NotNull ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior); + + Builder from(ClientMyOrganizationPostConfiguration other); + } + + public interface _FinalStage { + ClientMyOrganizationPostConfiguration build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The connection profile ID that this client should validate against.

+ */ + _FinalStage connectionProfileId(Optional connectionProfileId); + + _FinalStage connectionProfileId(String connectionProfileId); + + /** + *

The user attribute profile ID that this client should validate against.

+ */ + _FinalStage userAttributeProfileId(Optional userAttributeProfileId); + + _FinalStage userAttributeProfileId(String userAttributeProfileId); + + /** + *

The allowed connection strategies for the My Organization Configuration.

+ */ + _FinalStage allowedStrategies(List allowedStrategies); + + _FinalStage addAllowedStrategies(ClientMyOrganizationConfigurationAllowedStrategiesEnum allowedStrategies); + + _FinalStage addAllAllowedStrategies( + List allowedStrategies); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConnectionDeletionBehaviorStage, _FinalStage { + private ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; + + private List allowedStrategies = new ArrayList<>(); + + private Optional userAttributeProfileId = Optional.empty(); + + private Optional connectionProfileId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ClientMyOrganizationPostConfiguration other) { + connectionProfileId(other.getConnectionProfileId()); + userAttributeProfileId(other.getUserAttributeProfileId()); + allowedStrategies(other.getAllowedStrategies()); + connectionDeletionBehavior(other.getConnectionDeletionBehavior()); + return this; + } + + @java.lang.Override + @JsonSetter("connection_deletion_behavior") + public _FinalStage connectionDeletionBehavior( + @NotNull ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior) { + this.connectionDeletionBehavior = + Objects.requireNonNull(connectionDeletionBehavior, "connectionDeletionBehavior must not be null"); + return this; + } + + /** + *

The allowed connection strategies for the My Organization Configuration.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllAllowedStrategies( + List allowedStrategies) { + if (allowedStrategies != null) { + this.allowedStrategies.addAll(allowedStrategies); + } + return this; + } + + /** + *

The allowed connection strategies for the My Organization Configuration.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllowedStrategies( + ClientMyOrganizationConfigurationAllowedStrategiesEnum allowedStrategies) { + this.allowedStrategies.add(allowedStrategies); + return this; + } + + /** + *

The allowed connection strategies for the My Organization Configuration.

+ */ + @java.lang.Override + @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) + public _FinalStage allowedStrategies( + List allowedStrategies) { + this.allowedStrategies.clear(); + if (allowedStrategies != null) { + this.allowedStrategies.addAll(allowedStrategies); + } + return this; + } + + /** + *

The user attribute profile ID that this client should validate against.

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

The user attribute profile ID that this client should validate against.

+ */ + @java.lang.Override + @JsonSetter(value = "user_attribute_profile_id", nulls = Nulls.SKIP) + public _FinalStage userAttributeProfileId(Optional userAttributeProfileId) { + this.userAttributeProfileId = userAttributeProfileId; + return this; + } + + /** + *

The connection profile ID that this client should validate against.

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

The connection profile ID that this client should validate against.

+ */ + @java.lang.Override + @JsonSetter(value = "connection_profile_id", nulls = Nulls.SKIP) + public _FinalStage connectionProfileId(Optional connectionProfileId) { + this.connectionProfileId = connectionProfileId; + return this; + } + + @java.lang.Override + public ClientMyOrganizationPostConfiguration build() { + return new ClientMyOrganizationPostConfiguration( + connectionProfileId, + userAttributeProfileId, + allowedStrategies, + connectionDeletionBehavior, + 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/ClientMyOrganizationResponseConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationResponseConfiguration.java new file mode 100644 index 000000000..5897b8583 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationResponseConfiguration.java @@ -0,0 +1,287 @@ +/** + * 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.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 = ClientMyOrganizationResponseConfiguration.Builder.class) +public final class ClientMyOrganizationResponseConfiguration { + private final Optional connectionProfileId; + + private final Optional userAttributeProfileId; + + private final List allowedStrategies; + + private final ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; + + private final Map additionalProperties; + + private ClientMyOrganizationResponseConfiguration( + Optional connectionProfileId, + Optional userAttributeProfileId, + List allowedStrategies, + ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior, + Map additionalProperties) { + this.connectionProfileId = connectionProfileId; + this.userAttributeProfileId = userAttributeProfileId; + this.allowedStrategies = allowedStrategies; + this.connectionDeletionBehavior = connectionDeletionBehavior; + this.additionalProperties = additionalProperties; + } + + /** + * @return The connection profile ID that this client should validate against. + */ + @JsonProperty("connection_profile_id") + public Optional getConnectionProfileId() { + return connectionProfileId; + } + + /** + * @return The user attribute profile ID that this client should validate against. + */ + @JsonProperty("user_attribute_profile_id") + public Optional getUserAttributeProfileId() { + return userAttributeProfileId; + } + + /** + * @return The allowed connection strategies for the My Organization Configuration. + */ + @JsonProperty("allowed_strategies") + public List getAllowedStrategies() { + return allowedStrategies; + } + + @JsonProperty("connection_deletion_behavior") + public ClientMyOrganizationDeletionBehaviorEnum getConnectionDeletionBehavior() { + return connectionDeletionBehavior; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientMyOrganizationResponseConfiguration + && equalTo((ClientMyOrganizationResponseConfiguration) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientMyOrganizationResponseConfiguration other) { + return connectionProfileId.equals(other.connectionProfileId) + && userAttributeProfileId.equals(other.userAttributeProfileId) + && allowedStrategies.equals(other.allowedStrategies) + && connectionDeletionBehavior.equals(other.connectionDeletionBehavior); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.connectionProfileId, + this.userAttributeProfileId, + this.allowedStrategies, + this.connectionDeletionBehavior); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionDeletionBehaviorStage builder() { + return new Builder(); + } + + public interface ConnectionDeletionBehaviorStage { + _FinalStage connectionDeletionBehavior( + @NotNull ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior); + + Builder from(ClientMyOrganizationResponseConfiguration other); + } + + public interface _FinalStage { + ClientMyOrganizationResponseConfiguration build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The connection profile ID that this client should validate against.

+ */ + _FinalStage connectionProfileId(Optional connectionProfileId); + + _FinalStage connectionProfileId(String connectionProfileId); + + /** + *

The user attribute profile ID that this client should validate against.

+ */ + _FinalStage userAttributeProfileId(Optional userAttributeProfileId); + + _FinalStage userAttributeProfileId(String userAttributeProfileId); + + /** + *

The allowed connection strategies for the My Organization Configuration.

+ */ + _FinalStage allowedStrategies(List allowedStrategies); + + _FinalStage addAllowedStrategies(ClientMyOrganizationConfigurationAllowedStrategiesEnum allowedStrategies); + + _FinalStage addAllAllowedStrategies( + List allowedStrategies); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConnectionDeletionBehaviorStage, _FinalStage { + private ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; + + private List allowedStrategies = new ArrayList<>(); + + private Optional userAttributeProfileId = Optional.empty(); + + private Optional connectionProfileId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ClientMyOrganizationResponseConfiguration other) { + connectionProfileId(other.getConnectionProfileId()); + userAttributeProfileId(other.getUserAttributeProfileId()); + allowedStrategies(other.getAllowedStrategies()); + connectionDeletionBehavior(other.getConnectionDeletionBehavior()); + return this; + } + + @java.lang.Override + @JsonSetter("connection_deletion_behavior") + public _FinalStage connectionDeletionBehavior( + @NotNull ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior) { + this.connectionDeletionBehavior = + Objects.requireNonNull(connectionDeletionBehavior, "connectionDeletionBehavior must not be null"); + return this; + } + + /** + *

The allowed connection strategies for the My Organization Configuration.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllAllowedStrategies( + List allowedStrategies) { + if (allowedStrategies != null) { + this.allowedStrategies.addAll(allowedStrategies); + } + return this; + } + + /** + *

The allowed connection strategies for the My Organization Configuration.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllowedStrategies( + ClientMyOrganizationConfigurationAllowedStrategiesEnum allowedStrategies) { + this.allowedStrategies.add(allowedStrategies); + return this; + } + + /** + *

The allowed connection strategies for the My Organization Configuration.

+ */ + @java.lang.Override + @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) + public _FinalStage allowedStrategies( + List allowedStrategies) { + this.allowedStrategies.clear(); + if (allowedStrategies != null) { + this.allowedStrategies.addAll(allowedStrategies); + } + return this; + } + + /** + *

The user attribute profile ID that this client should validate against.

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

The user attribute profile ID that this client should validate against.

+ */ + @java.lang.Override + @JsonSetter(value = "user_attribute_profile_id", nulls = Nulls.SKIP) + public _FinalStage userAttributeProfileId(Optional userAttributeProfileId) { + this.userAttributeProfileId = userAttributeProfileId; + return this; + } + + /** + *

The connection profile ID that this client should validate against.

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

The connection profile ID that this client should validate against.

+ */ + @java.lang.Override + @JsonSetter(value = "connection_profile_id", nulls = Nulls.SKIP) + public _FinalStage connectionProfileId(Optional connectionProfileId) { + this.connectionProfileId = connectionProfileId; + return this; + } + + @java.lang.Override + public ClientMyOrganizationResponseConfiguration build() { + return new ClientMyOrganizationResponseConfiguration( + connectionProfileId, + userAttributeProfileId, + allowedStrategies, + connectionDeletionBehavior, + 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/ClientRedirectionPolicyEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientRedirectionPolicyEnum.java new file mode 100644 index 000000000..b96141d31 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientRedirectionPolicyEnum.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 ClientRedirectionPolicyEnum { + public static final ClientRedirectionPolicyEnum ALLOW_ALWAYS = + new ClientRedirectionPolicyEnum(Value.ALLOW_ALWAYS, "allow_always"); + + public static final ClientRedirectionPolicyEnum OPEN_REDIRECT_PROTECTION = + new ClientRedirectionPolicyEnum(Value.OPEN_REDIRECT_PROTECTION, "open_redirect_protection"); + + private final Value value; + + private final String string; + + ClientRedirectionPolicyEnum(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 ClientRedirectionPolicyEnum + && this.string.equals(((ClientRedirectionPolicyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ALLOW_ALWAYS: + return visitor.visitAllowAlways(); + case OPEN_REDIRECT_PROTECTION: + return visitor.visitOpenRedirectProtection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientRedirectionPolicyEnum valueOf(String value) { + switch (value) { + case "allow_always": + return ALLOW_ALWAYS; + case "open_redirect_protection": + return OPEN_REDIRECT_PROTECTION; + default: + return new ClientRedirectionPolicyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ALLOW_ALWAYS, + + OPEN_REDIRECT_PROTECTION, + + UNKNOWN + } + + public interface Visitor { + T visitAllowAlways(); + + T visitOpenRedirectProtection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferConfiguration.java index 9132aa608..00cea20d5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferConfiguration.java @@ -37,6 +37,8 @@ public final class ClientSessionTransferConfiguration { private final Optional enforceOnlineRefreshTokens; + private final OptionalNullable delegation; + private final Map additionalProperties; private ClientSessionTransferConfiguration( @@ -46,6 +48,7 @@ private ClientSessionTransferConfiguration( Optional enforceDeviceBinding, Optional allowRefreshToken, Optional enforceOnlineRefreshTokens, + OptionalNullable delegation, Map additionalProperties) { this.canCreateSessionTransferToken = canCreateSessionTransferToken; this.enforceCascadeRevocation = enforceCascadeRevocation; @@ -53,6 +56,7 @@ private ClientSessionTransferConfiguration( this.enforceDeviceBinding = enforceDeviceBinding; this.allowRefreshToken = allowRefreshToken; this.enforceOnlineRefreshTokens = enforceOnlineRefreshTokens; + this.delegation = delegation; this.additionalProperties = additionalProperties; } @@ -106,6 +110,15 @@ public Optional getEnforceOnlineRefreshTokens() { return enforceOnlineRefreshTokens; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("delegation") + public OptionalNullable getDelegation() { + if (delegation == null) { + return OptionalNullable.absent(); + } + return delegation; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("allowed_authentication_methods") private OptionalNullable> @@ -113,6 +126,12 @@ public Optional getEnforceOnlineRefreshTokens() { return allowedAuthenticationMethods; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("delegation") + private OptionalNullable _getDelegation() { + return delegation; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -131,7 +150,8 @@ private boolean equalTo(ClientSessionTransferConfiguration other) { && allowedAuthenticationMethods.equals(other.allowedAuthenticationMethods) && enforceDeviceBinding.equals(other.enforceDeviceBinding) && allowRefreshToken.equals(other.allowRefreshToken) - && enforceOnlineRefreshTokens.equals(other.enforceOnlineRefreshTokens); + && enforceOnlineRefreshTokens.equals(other.enforceOnlineRefreshTokens) + && delegation.equals(other.delegation); } @java.lang.Override @@ -142,7 +162,8 @@ public int hashCode() { this.allowedAuthenticationMethods, this.enforceDeviceBinding, this.allowRefreshToken, - this.enforceOnlineRefreshTokens); + this.enforceOnlineRefreshTokens, + this.delegation); } @java.lang.Override @@ -169,6 +190,8 @@ public static final class Builder { private Optional enforceOnlineRefreshTokens = Optional.empty(); + private OptionalNullable delegation = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -181,6 +204,7 @@ public Builder from(ClientSessionTransferConfiguration other) { enforceDeviceBinding(other.getEnforceDeviceBinding()); allowRefreshToken(other.getAllowRefreshToken()); enforceOnlineRefreshTokens(other.getEnforceOnlineRefreshTokens()); + delegation(other.getDelegation()); return this; } @@ -292,6 +316,38 @@ public Builder enforceOnlineRefreshTokens(Boolean enforceOnlineRefreshTokens) { return this; } + @JsonSetter(value = "delegation", nulls = Nulls.SKIP) + public Builder delegation(@Nullable OptionalNullable delegation) { + this.delegation = delegation; + return this; + } + + public Builder delegation(ClientSessionTransferDelegationConfiguration delegation) { + this.delegation = OptionalNullable.of(delegation); + return this; + } + + public Builder delegation(Optional delegation) { + if (delegation.isPresent()) { + this.delegation = OptionalNullable.of(delegation.get()); + } else { + this.delegation = OptionalNullable.absent(); + } + return this; + } + + public Builder delegation( + com.auth0.client.mgmt.core.Nullable delegation) { + if (delegation.isNull()) { + this.delegation = OptionalNullable.ofNull(); + } else if (delegation.isEmpty()) { + this.delegation = OptionalNullable.absent(); + } else { + this.delegation = OptionalNullable.of(delegation.get()); + } + return this; + } + public ClientSessionTransferConfiguration build() { return new ClientSessionTransferConfiguration( canCreateSessionTransferToken, @@ -300,6 +356,7 @@ public ClientSessionTransferConfiguration build() { enforceDeviceBinding, allowRefreshToken, enforceOnlineRefreshTokens, + delegation, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDelegationConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDelegationConfiguration.java new file mode 100644 index 000000000..7c8e459b7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDelegationConfiguration.java @@ -0,0 +1,140 @@ +/** + * 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 = ClientSessionTransferDelegationConfiguration.Builder.class) +public final class ClientSessionTransferDelegationConfiguration { + private final Optional allowDelegatedAccess; + + private final Optional enforceDeviceBinding; + + private final Map additionalProperties; + + private ClientSessionTransferDelegationConfiguration( + Optional allowDelegatedAccess, + Optional enforceDeviceBinding, + Map additionalProperties) { + this.allowDelegatedAccess = allowDelegatedAccess; + this.enforceDeviceBinding = enforceDeviceBinding; + this.additionalProperties = additionalProperties; + } + + /** + * @return Indicates whether delegation (impersonation) access is allowed using Session Transfer Tokens. Default value is false. + */ + @JsonProperty("allow_delegated_access") + public Optional getAllowDelegatedAccess() { + return allowDelegatedAccess; + } + + @JsonProperty("enforce_device_binding") + public Optional getEnforceDeviceBinding() { + return enforceDeviceBinding; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientSessionTransferDelegationConfiguration + && equalTo((ClientSessionTransferDelegationConfiguration) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientSessionTransferDelegationConfiguration other) { + return allowDelegatedAccess.equals(other.allowDelegatedAccess) + && enforceDeviceBinding.equals(other.enforceDeviceBinding); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.allowDelegatedAccess, this.enforceDeviceBinding); + } + + @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 allowDelegatedAccess = Optional.empty(); + + private Optional enforceDeviceBinding = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientSessionTransferDelegationConfiguration other) { + allowDelegatedAccess(other.getAllowDelegatedAccess()); + enforceDeviceBinding(other.getEnforceDeviceBinding()); + return this; + } + + /** + *

Indicates whether delegation (impersonation) access is allowed using Session Transfer Tokens. Default value is false.

+ */ + @JsonSetter(value = "allow_delegated_access", nulls = Nulls.SKIP) + public Builder allowDelegatedAccess(Optional allowDelegatedAccess) { + this.allowDelegatedAccess = allowDelegatedAccess; + return this; + } + + public Builder allowDelegatedAccess(Boolean allowDelegatedAccess) { + this.allowDelegatedAccess = Optional.ofNullable(allowDelegatedAccess); + return this; + } + + @JsonSetter(value = "enforce_device_binding", nulls = Nulls.SKIP) + public Builder enforceDeviceBinding( + Optional enforceDeviceBinding) { + this.enforceDeviceBinding = enforceDeviceBinding; + return this; + } + + public Builder enforceDeviceBinding(ClientSessionTransferDelegationDeviceBindingEnum enforceDeviceBinding) { + this.enforceDeviceBinding = Optional.ofNullable(enforceDeviceBinding); + return this; + } + + public ClientSessionTransferDelegationConfiguration build() { + return new ClientSessionTransferDelegationConfiguration( + allowDelegatedAccess, enforceDeviceBinding, 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/ClientSessionTransferDelegationDeviceBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDelegationDeviceBindingEnum.java new file mode 100644 index 000000000..cd0c1ed04 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDelegationDeviceBindingEnum.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 ClientSessionTransferDelegationDeviceBindingEnum { + public static final ClientSessionTransferDelegationDeviceBindingEnum ASN = + new ClientSessionTransferDelegationDeviceBindingEnum(Value.ASN, "asn"); + + public static final ClientSessionTransferDelegationDeviceBindingEnum IP = + new ClientSessionTransferDelegationDeviceBindingEnum(Value.IP, "ip"); + + private final Value value; + + private final String string; + + ClientSessionTransferDelegationDeviceBindingEnum(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 ClientSessionTransferDelegationDeviceBindingEnum + && this.string.equals(((ClientSessionTransferDelegationDeviceBindingEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ASN: + return visitor.visitAsn(); + case IP: + return visitor.visitIp(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientSessionTransferDelegationDeviceBindingEnum valueOf(String value) { + switch (value) { + case "asn": + return ASN; + case "ip": + return IP; + default: + return new ClientSessionTransferDelegationDeviceBindingEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + IP, + + ASN, + + UNKNOWN + } + + public interface Visitor { + T visitIp(); + + T visitAsn(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientThirdPartySecurityModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientThirdPartySecurityModeEnum.java new file mode 100644 index 000000000..27e1f4e4e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientThirdPartySecurityModeEnum.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 ClientThirdPartySecurityModeEnum { + public static final ClientThirdPartySecurityModeEnum STRICT = + new ClientThirdPartySecurityModeEnum(Value.STRICT, "strict"); + + public static final ClientThirdPartySecurityModeEnum PERMISSIVE = + new ClientThirdPartySecurityModeEnum(Value.PERMISSIVE, "permissive"); + + private final Value value; + + private final String string; + + ClientThirdPartySecurityModeEnum(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 ClientThirdPartySecurityModeEnum + && this.string.equals(((ClientThirdPartySecurityModeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case STRICT: + return visitor.visitStrict(); + case PERMISSIVE: + return visitor.visitPermissive(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientThirdPartySecurityModeEnum valueOf(String value) { + switch (value) { + case "strict": + return STRICT; + case "permissive": + return PERMISSIVE; + default: + return new ClientThirdPartySecurityModeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + STRICT, + + PERMISSIVE, + + UNKNOWN + } + + public interface Visitor { + T visitStrict(); + + T visitPermissive(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectedAccount.java b/src/main/java/com/auth0/client/mgmt/types/ConnectedAccount.java index 3a22c8b08..dc0dbf84e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectedAccount.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectedAccount.java @@ -39,6 +39,8 @@ public final class ConnectedAccount { private final Optional expiresAt; + private final Optional organizationId; + private final Map additionalProperties; private ConnectedAccount( @@ -50,6 +52,7 @@ private ConnectedAccount( Optional> scopes, OffsetDateTime createdAt, Optional expiresAt, + Optional organizationId, Map additionalProperties) { this.id = id; this.connection = connection; @@ -59,6 +62,7 @@ private ConnectedAccount( this.scopes = scopes; this.createdAt = createdAt; this.expiresAt = expiresAt; + this.organizationId = organizationId; this.additionalProperties = additionalProperties; } @@ -123,6 +127,14 @@ public Optional getExpiresAt() { return expiresAt; } + /** + * @return The identifier of the organization associated with the connected account. + */ + @JsonProperty("organization_id") + public Optional getOrganizationId() { + return organizationId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -142,7 +154,8 @@ private boolean equalTo(ConnectedAccount other) { && accessType.equals(other.accessType) && scopes.equals(other.scopes) && createdAt.equals(other.createdAt) - && expiresAt.equals(other.expiresAt); + && expiresAt.equals(other.expiresAt) + && organizationId.equals(other.organizationId); } @java.lang.Override @@ -155,7 +168,8 @@ public int hashCode() { this.accessType, this.scopes, this.createdAt, - this.expiresAt); + this.expiresAt, + this.organizationId); } @java.lang.Override @@ -228,6 +242,13 @@ public interface _FinalStage { _FinalStage expiresAt(Optional expiresAt); _FinalStage expiresAt(OffsetDateTime expiresAt); + + /** + *

The identifier of the organization associated with the connected account.

+ */ + _FinalStage organizationId(Optional organizationId); + + _FinalStage organizationId(String organizationId); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -251,6 +272,8 @@ public static final class Builder private OffsetDateTime createdAt; + private Optional organizationId = Optional.empty(); + private Optional expiresAt = Optional.empty(); private Optional> scopes = Optional.empty(); @@ -270,6 +293,7 @@ public Builder from(ConnectedAccount other) { scopes(other.getScopes()); createdAt(other.getCreatedAt()); expiresAt(other.getExpiresAt()); + organizationId(other.getOrganizationId()); return this; } @@ -340,6 +364,26 @@ public _FinalStage createdAt(@NotNull OffsetDateTime createdAt) { return this; } + /** + *

The identifier of the organization associated with the connected account.

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

The identifier of the organization associated with the connected account.

+ */ + @java.lang.Override + @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) + public _FinalStage organizationId(Optional organizationId) { + this.organizationId = organizationId; + return this; + } + /** *

ISO 8601 timestamp when the connected account expires.

* @return Reference to {@code this} so that method calls can be chained together. @@ -391,6 +435,7 @@ public ConnectedAccount build() { scopes, createdAt, expiresAt, + organizationId, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickrStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionDpopSigningAlgEnum.java similarity index 53% rename from src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickrStrategy.java rename to src/main/java/com/auth0/client/mgmt/types/ConnectionDpopSigningAlgEnum.java index 28c502003..cb4e688af 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickrStrategy.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionDpopSigningAlgEnum.java @@ -6,15 +6,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class CreateConnectionRequestContentFlickrStrategy { - public static final CreateConnectionRequestContentFlickrStrategy FLICKR = - new CreateConnectionRequestContentFlickrStrategy(Value.FLICKR, "flickr"); +public final class ConnectionDpopSigningAlgEnum { + public static final ConnectionDpopSigningAlgEnum ES256 = new ConnectionDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final ConnectionDpopSigningAlgEnum ED25519 = + new ConnectionDpopSigningAlgEnum(Value.ED25519, "Ed25519"); private final Value value; private final String string; - CreateConnectionRequestContentFlickrStrategy(Value value, String string) { + ConnectionDpopSigningAlgEnum(Value value, String string) { this.value = value; this.string = string; } @@ -32,8 +34,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof CreateConnectionRequestContentFlickrStrategy - && this.string.equals(((CreateConnectionRequestContentFlickrStrategy) other).string)); + || (other instanceof ConnectionDpopSigningAlgEnum + && this.string.equals(((ConnectionDpopSigningAlgEnum) other).string)); } @java.lang.Override @@ -43,8 +45,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case FLICKR: - return visitor.visitFlickr(); + case ES256: + return visitor.visitEs256(); + case ED25519: + return visitor.visitEd25519(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -52,23 +56,29 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentFlickrStrategy valueOf(String value) { + public static ConnectionDpopSigningAlgEnum valueOf(String value) { switch (value) { - case "flickr": - return FLICKR; + case "ES256": + return ES256; + case "Ed25519": + return ED25519; default: - return new CreateConnectionRequestContentFlickrStrategy(Value.UNKNOWN, value); + return new ConnectionDpopSigningAlgEnum(Value.UNKNOWN, value); } } public enum Value { - FLICKR, + ES256, + + ED25519, UNKNOWN } public interface Visitor { - T visitFlickr(); + T visitEs256(); + + T visitEd25519(); T visitUnknown(String unknownType); } 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 27f6e9b25..0fe7ab6db 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java @@ -15,9 +15,6 @@ public final class ConnectionIdentityProviderEnum { public static final ConnectionIdentityProviderEnum DWOLLA = new ConnectionIdentityProviderEnum(Value.DWOLLA, "dwolla"); - public static final ConnectionIdentityProviderEnum FLICKR = - new ConnectionIdentityProviderEnum(Value.FLICKR, "flickr"); - public static final ConnectionIdentityProviderEnum OKTA = new ConnectionIdentityProviderEnum(Value.OKTA, "okta"); public static final ConnectionIdentityProviderEnum PLANNINGCENTER = @@ -195,8 +192,6 @@ public T visit(Visitor visitor) { return visitor.visitAuth0Oidc(); case DWOLLA: return visitor.visitDwolla(); - case FLICKR: - return visitor.visitFlickr(); case OKTA: return visitor.visitOkta(); case PLANNINGCENTER: @@ -316,8 +311,6 @@ public static ConnectionIdentityProviderEnum valueOf(String value) { return AUTH0OIDC; case "dwolla": return DWOLLA; - case "flickr": - return FLICKR; case "okta": return OKTA; case "planningcenter": @@ -468,8 +461,6 @@ public enum Value { FITBIT, - FLICKR, - GITHUB, GOOGLE_APPS, @@ -584,8 +575,6 @@ public interface Visitor { T visitFitbit(); - T visitFlickr(); - T visitGithub(); T visitGoogleApps(); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java index 0c5874440..46a055635 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java @@ -35,6 +35,8 @@ public final class ConnectionOptionsCommonOidc implements IConnectionOptionsComm private final Optional> domainAliases; + private final Optional dpopSigningAlg; + private final OptionalNullable federatedConnectionsAccessTokens; private final Optional iconUrl; @@ -74,6 +76,7 @@ private ConnectionOptionsCommonOidc( Optional clientSecret, Optional connectionSettings, Optional> domainAliases, + Optional dpopSigningAlg, OptionalNullable federatedConnectionsAccessTokens, Optional iconUrl, OptionalNullable> idTokenSignedResponseAlgs, @@ -95,6 +98,7 @@ private ConnectionOptionsCommonOidc( this.clientSecret = clientSecret; this.connectionSettings = connectionSettings; this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.iconUrl = iconUrl; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; @@ -143,6 +147,12 @@ public Optional> getDomainAliases() { return domainAliases; } + @JsonProperty("dpop_signing_alg") + @java.lang.Override + public Optional getDpopSigningAlg() { + return dpopSigningAlg; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("federated_connections_access_tokens") @java.lang.Override @@ -301,6 +311,7 @@ private boolean equalTo(ConnectionOptionsCommonOidc other) { && clientSecret.equals(other.clientSecret) && connectionSettings.equals(other.connectionSettings) && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) && iconUrl.equals(other.iconUrl) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) @@ -326,6 +337,7 @@ public int hashCode() { this.clientSecret, this.connectionSettings, this.domainAliases, + this.dpopSigningAlg, this.federatedConnectionsAccessTokens, this.iconUrl, this.idTokenSignedResponseAlgs, @@ -381,6 +393,10 @@ public interface _FinalStage { _FinalStage domainAliases(List domainAliases); + _FinalStage dpopSigningAlg(Optional dpopSigningAlg); + + _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg); + _FinalStage federatedConnectionsAccessTokens( @Nullable OptionalNullable federatedConnectionsAccessTokens); @@ -525,6 +541,8 @@ public static final class Builder implements ClientIdStage, _FinalStage { private OptionalNullable federatedConnectionsAccessTokens = OptionalNullable.absent(); + private Optional dpopSigningAlg = Optional.empty(); + private Optional> domainAliases = Optional.empty(); private Optional connectionSettings = Optional.empty(); @@ -545,6 +563,7 @@ public Builder from(ConnectionOptionsCommonOidc other) { clientSecret(other.getClientSecret()); connectionSettings(other.getConnectionSettings()); domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); iconUrl(other.getIconUrl()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); @@ -902,6 +921,19 @@ public _FinalStage federatedConnectionsAccessTokens( return this; } + @java.lang.Override + public _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg(Optional dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + @java.lang.Override public _FinalStage domainAliases(List domainAliases) { this.domainAliases = Optional.ofNullable(domainAliases); @@ -962,6 +994,7 @@ public ConnectionOptionsCommonOidc build() { clientSecret, connectionSettings, domainAliases, + dpopSigningAlg, federatedConnectionsAccessTokens, iconUrl, idTokenSignedResponseAlgs, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFlickr.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFlickr.java deleted file mode 100644 index 3e35fdfda..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFlickr.java +++ /dev/null @@ -1,276 +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.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.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsFlickr.Builder.class) -public final class ConnectionOptionsFlickr implements IConnectionOptionsOAuth1Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsFlickr( - Optional clientId, - Optional clientSecret, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - /** - * @return OAuth 1.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. - */ - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - /** - * @return OAuth 1.0 client secret issued by the identity provider during application registration. Used to authenticate your Auth0 connection when signing requests and exchanging request tokens and verifiers for access tokens. May be null for public clients. - */ - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsFlickr && equalTo((ConnectionOptionsFlickr) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsFlickr other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @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 clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsFlickr other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - /** - *

OAuth 1.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

- */ - @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; - } - - /** - *

OAuth 1.0 client secret issued by the identity provider during application registration. Used to authenticate your Auth0 connection when signing requests and exchanging request tokens and verifiers for access tokens. May be null for public clients.

- */ - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsFlickr build() { - return new ConnectionOptionsFlickr( - clientId, - clientSecret, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - 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/ConnectionOptionsOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java index 35f3c9d76..457cc8d09 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java @@ -35,6 +35,8 @@ public final class ConnectionOptionsOidc implements IConnectionOptionsCommonOidc private final Optional> domainAliases; + private final Optional dpopSigningAlg; + private final OptionalNullable federatedConnectionsAccessTokens; private final Optional iconUrl; @@ -82,6 +84,7 @@ private ConnectionOptionsOidc( Optional clientSecret, Optional connectionSettings, Optional> domainAliases, + Optional dpopSigningAlg, OptionalNullable federatedConnectionsAccessTokens, Optional iconUrl, OptionalNullable> idTokenSignedResponseAlgs, @@ -107,6 +110,7 @@ private ConnectionOptionsOidc( this.clientSecret = clientSecret; this.connectionSettings = connectionSettings; this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.iconUrl = iconUrl; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; @@ -159,6 +163,12 @@ public Optional> getDomainAliases() { return domainAliases; } + @JsonProperty("dpop_signing_alg") + @java.lang.Override + public Optional getDpopSigningAlg() { + return dpopSigningAlg; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("federated_connections_access_tokens") @java.lang.Override @@ -338,6 +348,7 @@ private boolean equalTo(ConnectionOptionsOidc other) { && clientSecret.equals(other.clientSecret) && connectionSettings.equals(other.connectionSettings) && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) && iconUrl.equals(other.iconUrl) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) @@ -367,6 +378,7 @@ public int hashCode() { this.clientSecret, this.connectionSettings, this.domainAliases, + this.dpopSigningAlg, this.federatedConnectionsAccessTokens, this.iconUrl, this.idTokenSignedResponseAlgs, @@ -426,6 +438,10 @@ public interface _FinalStage { _FinalStage domainAliases(List domainAliases); + _FinalStage dpopSigningAlg(Optional dpopSigningAlg); + + _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg); + _FinalStage federatedConnectionsAccessTokens( @Nullable OptionalNullable federatedConnectionsAccessTokens); @@ -594,6 +610,8 @@ public static final class Builder implements ClientIdStage, _FinalStage { private OptionalNullable federatedConnectionsAccessTokens = OptionalNullable.absent(); + private Optional dpopSigningAlg = Optional.empty(); + private Optional> domainAliases = Optional.empty(); private Optional connectionSettings = Optional.empty(); @@ -614,6 +632,7 @@ public Builder from(ConnectionOptionsOidc other) { clientSecret(other.getClientSecret()); connectionSettings(other.getConnectionSettings()); domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); iconUrl(other.getIconUrl()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); @@ -1027,6 +1046,19 @@ public _FinalStage federatedConnectionsAccessTokens( return this; } + @java.lang.Override + public _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg(Optional dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + @java.lang.Override public _FinalStage domainAliases(List domainAliases) { this.domainAliases = Optional.ofNullable(domainAliases); @@ -1087,6 +1119,7 @@ public ConnectionOptionsOidc build() { clientSecret, connectionSettings, domainAliases, + dpopSigningAlg, federatedConnectionsAccessTokens, iconUrl, idTokenSignedResponseAlgs, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java index b25024bec..376926cac 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java @@ -37,6 +37,8 @@ public final class ConnectionOptionsOkta implements IConnectionOptionsCommon, IC private final Optional> domainAliases; + private final Optional dpopSigningAlg; + private final OptionalNullable federatedConnectionsAccessTokens; private final Optional iconUrl; @@ -83,6 +85,7 @@ private ConnectionOptionsOkta( Optional clientSecret, Optional connectionSettings, Optional> domainAliases, + Optional dpopSigningAlg, OptionalNullable federatedConnectionsAccessTokens, Optional iconUrl, OptionalNullable> idTokenSignedResponseAlgs, @@ -108,6 +111,7 @@ private ConnectionOptionsOkta( this.clientSecret = clientSecret; this.connectionSettings = connectionSettings; this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.iconUrl = iconUrl; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; @@ -165,6 +169,12 @@ public Optional> getDomainAliases() { return domainAliases; } + @JsonProperty("dpop_signing_alg") + @java.lang.Override + public Optional getDpopSigningAlg() { + return dpopSigningAlg; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("federated_connections_access_tokens") @java.lang.Override @@ -339,6 +349,7 @@ private boolean equalTo(ConnectionOptionsOkta other) { && clientSecret.equals(other.clientSecret) && connectionSettings.equals(other.connectionSettings) && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) && iconUrl.equals(other.iconUrl) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) @@ -368,6 +379,7 @@ public int hashCode() { this.clientSecret, this.connectionSettings, this.domainAliases, + this.dpopSigningAlg, this.federatedConnectionsAccessTokens, this.iconUrl, this.idTokenSignedResponseAlgs, @@ -430,6 +442,10 @@ public interface _FinalStage { _FinalStage domainAliases(List domainAliases); + _FinalStage dpopSigningAlg(Optional dpopSigningAlg); + + _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg); + _FinalStage federatedConnectionsAccessTokens( @Nullable OptionalNullable federatedConnectionsAccessTokens); @@ -592,6 +608,8 @@ public static final class Builder implements ClientIdStage, _FinalStage { private OptionalNullable federatedConnectionsAccessTokens = OptionalNullable.absent(); + private Optional dpopSigningAlg = Optional.empty(); + private Optional> domainAliases = Optional.empty(); private Optional connectionSettings = Optional.empty(); @@ -615,6 +633,7 @@ public Builder from(ConnectionOptionsOkta other) { clientSecret(other.getClientSecret()); connectionSettings(other.getConnectionSettings()); domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); iconUrl(other.getIconUrl()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); @@ -1014,6 +1033,19 @@ public _FinalStage federatedConnectionsAccessTokens( return this; } + @java.lang.Override + public _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg(Optional dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + @java.lang.Override public _FinalStage domainAliases(List domainAliases) { this.domainAliases = Optional.ofNullable(domainAliases); @@ -1088,6 +1120,7 @@ public ConnectionOptionsOkta build() { clientSecret, connectionSettings, domainAliases, + dpopSigningAlg, federatedConnectionsAccessTokens, iconUrl, idTokenSignedResponseAlgs, 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 50c1edeb0..8abf89dff 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java @@ -58,6 +58,8 @@ public final class ConnectionPropertiesOptions { private final Optional apiEnableUsers; + private final Optional apiEnableGroups; + private final Optional basicProfile; private final Optional extAdmin; @@ -105,6 +107,7 @@ private ConnectionPropertiesOptions( OptionalNullable passwordNoPersonalInfo, OptionalNullable passwordDictionary, Optional apiEnableUsers, + Optional apiEnableGroups, Optional basicProfile, Optional extAdmin, Optional extIsSuspended, @@ -136,6 +139,7 @@ private ConnectionPropertiesOptions( this.passwordNoPersonalInfo = passwordNoPersonalInfo; this.passwordDictionary = passwordDictionary; this.apiEnableUsers = apiEnableUsers; + this.apiEnableGroups = apiEnableGroups; this.basicProfile = basicProfile; this.extAdmin = extAdmin; this.extIsSuspended = extIsSuspended; @@ -295,6 +299,11 @@ public Optional getApiEnableUsers() { return apiEnableUsers; } + @JsonProperty("api_enable_groups") + public Optional getApiEnableGroups() { + return apiEnableGroups; + } + @JsonProperty("basic_profile") public Optional getBasicProfile() { return basicProfile; @@ -480,6 +489,7 @@ private boolean equalTo(ConnectionPropertiesOptions other) { && passwordNoPersonalInfo.equals(other.passwordNoPersonalInfo) && passwordDictionary.equals(other.passwordDictionary) && apiEnableUsers.equals(other.apiEnableUsers) + && apiEnableGroups.equals(other.apiEnableGroups) && basicProfile.equals(other.basicProfile) && extAdmin.equals(other.extAdmin) && extIsSuspended.equals(other.extIsSuspended) @@ -515,6 +525,7 @@ public int hashCode() { this.passwordNoPersonalInfo, this.passwordDictionary, this.apiEnableUsers, + this.apiEnableGroups, this.basicProfile, this.extAdmin, this.extIsSuspended, @@ -577,6 +588,8 @@ public static final class Builder { private Optional apiEnableUsers = Optional.empty(); + private Optional apiEnableGroups = Optional.empty(); + private Optional basicProfile = Optional.empty(); private Optional extAdmin = Optional.empty(); @@ -628,6 +641,7 @@ public Builder from(ConnectionPropertiesOptions other) { passwordNoPersonalInfo(other.getPasswordNoPersonalInfo()); passwordDictionary(other.getPasswordDictionary()); apiEnableUsers(other.getApiEnableUsers()); + apiEnableGroups(other.getApiEnableGroups()); basicProfile(other.getBasicProfile()); extAdmin(other.getExtAdmin()); extIsSuspended(other.getExtIsSuspended()); @@ -1062,6 +1076,17 @@ public Builder apiEnableUsers(Boolean apiEnableUsers) { return this; } + @JsonSetter(value = "api_enable_groups", nulls = Nulls.SKIP) + public Builder apiEnableGroups(Optional apiEnableGroups) { + this.apiEnableGroups = apiEnableGroups; + return this; + } + + public Builder apiEnableGroups(Boolean apiEnableGroups) { + this.apiEnableGroups = Optional.ofNullable(apiEnableGroups); + return this; + } + @JsonSetter(value = "basic_profile", nulls = Nulls.SKIP) public Builder basicProfile(Optional basicProfile) { this.basicProfile = basicProfile; @@ -1300,6 +1325,7 @@ public ConnectionPropertiesOptions build() { passwordNoPersonalInfo, passwordDictionary, apiEnableUsers, + apiEnableGroups, basicProfile, extAdmin, extIsSuspended, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickr.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickr.java deleted file mode 100644 index fe5e76a3c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickr.java +++ /dev/null @@ -1,458 +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.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.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 = ConnectionResponseContentFlickr.Builder.class) -public final class ConnectionResponseContentFlickr - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final String id; - - private final Optional> realms; - - private final String name; - - private final Optional> enabledClients; - - private final Optional displayName; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentFlickrStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentFlickr( - Optional authentication, - Optional connectedAccounts, - String id, - Optional> realms, - String name, - Optional> enabledClients, - Optional displayName, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentFlickrStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.enabledClients = enabledClients; - this.displayName = displayName; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public String getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public String getName() { - return name; - } - - /** - * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. - */ - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentFlickrStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentFlickr && equalTo((ConnectionResponseContentFlickr) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentFlickr other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.enabledClients, - this.displayName, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - NameStage id(@NotNull String id); - - Builder from(ConnectionResponseContentFlickr other); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentFlickrStrategy strategy); - } - - public interface _FinalStage { - ConnectionResponseContentFlickr build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _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); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsFlickr options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { - private String id; - - private String name; - - private ConnectionResponseContentFlickrStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentFlickr other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - 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 ConnectionResponseContentFlickrStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsFlickr options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - 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; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage 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; - 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); - 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; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentFlickr build() { - return new ConnectionResponseContentFlickr( - authentication, - connectedAccounts, - id, - realms, - name, - enabledClients, - displayName, - isDomainConnection, - metadata, - strategy, - options, - 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/ConnectionStrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java index 9a57042b7..7b196125b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java @@ -13,8 +13,6 @@ public final class ConnectionStrategyEnum { public static final ConnectionStrategyEnum DWOLLA = new ConnectionStrategyEnum(Value.DWOLLA, "dwolla"); - public static final ConnectionStrategyEnum FLICKR = new ConnectionStrategyEnum(Value.FLICKR, "flickr"); - public static final ConnectionStrategyEnum OKTA = new ConnectionStrategyEnum(Value.OKTA, "okta"); public static final ConnectionStrategyEnum PLANNINGCENTER = @@ -171,8 +169,6 @@ public T visit(Visitor visitor) { return visitor.visitAuth0Oidc(); case DWOLLA: return visitor.visitDwolla(); - case FLICKR: - return visitor.visitFlickr(); case OKTA: return visitor.visitOkta(); case PLANNINGCENTER: @@ -294,8 +290,6 @@ public static ConnectionStrategyEnum valueOf(String value) { return AUTH0OIDC; case "dwolla": return DWOLLA; - case "flickr": - return FLICKR; case "okta": return OKTA; case "planningcenter": @@ -448,8 +442,6 @@ public enum Value { FITBIT, - FLICKR, - GITHUB, GOOGLE_APPS, @@ -566,8 +558,6 @@ public interface Visitor { T visitFitbit(); - T visitFlickr(); - T visitGithub(); T visitGoogleApps(); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java index e6e2dccd3..103d74606 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java @@ -26,6 +26,8 @@ public final class CreateClientGrantRequestContent { private final String audience; + private final Optional defaultFor; + private final Optional organizationUsage; private final Optional allowAnyOrganization; @@ -43,6 +45,7 @@ public final class CreateClientGrantRequestContent { private CreateClientGrantRequestContent( Optional clientId, String audience, + Optional defaultFor, Optional organizationUsage, Optional allowAnyOrganization, Optional> scope, @@ -52,6 +55,7 @@ private CreateClientGrantRequestContent( Map additionalProperties) { this.clientId = clientId; this.audience = audience; + this.defaultFor = defaultFor; this.organizationUsage = organizationUsage; this.allowAnyOrganization = allowAnyOrganization; this.scope = scope; @@ -77,6 +81,11 @@ public String getAudience() { return audience; } + @JsonProperty("default_for") + public Optional getDefaultFor() { + return defaultFor; + } + @JsonProperty("organization_usage") public Optional getOrganizationUsage() { return organizationUsage; @@ -133,6 +142,7 @@ public Map getAdditionalProperties() { private boolean equalTo(CreateClientGrantRequestContent other) { return clientId.equals(other.clientId) && audience.equals(other.audience) + && defaultFor.equals(other.defaultFor) && organizationUsage.equals(other.organizationUsage) && allowAnyOrganization.equals(other.allowAnyOrganization) && scope.equals(other.scope) @@ -146,6 +156,7 @@ public int hashCode() { return Objects.hash( this.clientId, this.audience, + this.defaultFor, this.organizationUsage, this.allowAnyOrganization, this.scope, @@ -186,6 +197,10 @@ public interface _FinalStage { _FinalStage clientId(String clientId); + _FinalStage defaultFor(Optional defaultFor); + + _FinalStage defaultFor(ClientGrantDefaultForEnum defaultFor); + _FinalStage organizationUsage(Optional organizationUsage); _FinalStage organizationUsage(ClientGrantOrganizationUsageEnum organizationUsage); @@ -239,6 +254,8 @@ public static final class Builder implements AudienceStage, _FinalStage { private Optional organizationUsage = Optional.empty(); + private Optional defaultFor = Optional.empty(); + private Optional clientId = Optional.empty(); @JsonAnySetter @@ -250,6 +267,7 @@ private Builder() {} public Builder from(CreateClientGrantRequestContent other) { clientId(other.getClientId()); audience(other.getAudience()); + defaultFor(other.getDefaultFor()); organizationUsage(other.getOrganizationUsage()); allowAnyOrganization(other.getAllowAnyOrganization()); scope(other.getScope()); @@ -377,6 +395,19 @@ public _FinalStage organizationUsage(Optional return this; } + @java.lang.Override + public _FinalStage defaultFor(ClientGrantDefaultForEnum defaultFor) { + this.defaultFor = Optional.ofNullable(defaultFor); + return this; + } + + @java.lang.Override + @JsonSetter(value = "default_for", nulls = Nulls.SKIP) + public _FinalStage defaultFor(Optional defaultFor) { + this.defaultFor = defaultFor; + return this; + } + /** *

ID of the client.

* @return Reference to {@code this} so that method calls can be chained together. @@ -402,6 +433,7 @@ public CreateClientGrantRequestContent build() { return new CreateClientGrantRequestContent( clientId, audience, + defaultFor, organizationUsage, allowAnyOrganization, scope, diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantResponseContent.java index a507b69cf..45574bbf0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantResponseContent.java @@ -33,6 +33,8 @@ public final class CreateClientGrantResponseContent { private final Optional allowAnyOrganization; + private final Optional defaultFor; + private final Optional isSystem; private final Optional subjectType; @@ -50,6 +52,7 @@ private CreateClientGrantResponseContent( Optional> scope, Optional organizationUsage, Optional allowAnyOrganization, + Optional defaultFor, Optional isSystem, Optional subjectType, Optional> authorizationDetailsTypes, @@ -61,6 +64,7 @@ private CreateClientGrantResponseContent( this.scope = scope; this.organizationUsage = organizationUsage; this.allowAnyOrganization = allowAnyOrganization; + this.defaultFor = defaultFor; this.isSystem = isSystem; this.subjectType = subjectType; this.authorizationDetailsTypes = authorizationDetailsTypes; @@ -113,6 +117,11 @@ public Optional getAllowAnyOrganization() { return allowAnyOrganization; } + @JsonProperty("default_for") + public Optional getDefaultFor() { + return defaultFor; + } + /** * @return If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly. */ @@ -160,6 +169,7 @@ private boolean equalTo(CreateClientGrantResponseContent other) { && scope.equals(other.scope) && organizationUsage.equals(other.organizationUsage) && allowAnyOrganization.equals(other.allowAnyOrganization) + && defaultFor.equals(other.defaultFor) && isSystem.equals(other.isSystem) && subjectType.equals(other.subjectType) && authorizationDetailsTypes.equals(other.authorizationDetailsTypes) @@ -175,6 +185,7 @@ public int hashCode() { this.scope, this.organizationUsage, this.allowAnyOrganization, + this.defaultFor, this.isSystem, this.subjectType, this.authorizationDetailsTypes, @@ -204,6 +215,8 @@ public static final class Builder { private Optional allowAnyOrganization = Optional.empty(); + private Optional defaultFor = Optional.empty(); + private Optional isSystem = Optional.empty(); private Optional subjectType = Optional.empty(); @@ -224,6 +237,7 @@ public Builder from(CreateClientGrantResponseContent other) { scope(other.getScope()); organizationUsage(other.getOrganizationUsage()); allowAnyOrganization(other.getAllowAnyOrganization()); + defaultFor(other.getDefaultFor()); isSystem(other.getIsSystem()); subjectType(other.getSubjectType()); authorizationDetailsTypes(other.getAuthorizationDetailsTypes()); @@ -312,6 +326,17 @@ public Builder allowAnyOrganization(Boolean allowAnyOrganization) { return this; } + @JsonSetter(value = "default_for", nulls = Nulls.SKIP) + public Builder defaultFor(Optional defaultFor) { + this.defaultFor = defaultFor; + return this; + } + + public Builder defaultFor(ClientGrantDefaultForEnum defaultFor) { + this.defaultFor = Optional.ofNullable(defaultFor); + return this; + } + /** *

If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.

*/ @@ -373,6 +398,7 @@ public CreateClientGrantResponseContent build() { scope, organizationUsage, allowAnyOrganization, + defaultFor, isSystem, subjectType, authorizationDetailsTypes, diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java index 505a2cf76..23d5a79de 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java @@ -121,8 +121,14 @@ public final class CreateClientRequestContent { private final Optional resourceServerIdentifier; + private final Optional thirdPartySecurityMode; + + private final Optional redirectionPolicy; + private final Optional expressConfiguration; + private final Optional myOrganizationConfiguration; + private final Optional> asyncApprovalNotificationChannels; private final Map additionalProperties; @@ -176,7 +182,10 @@ private CreateClientRequestContent( OptionalNullable parRequestExpiry, Optional tokenQuota, Optional resourceServerIdentifier, + Optional thirdPartySecurityMode, + Optional redirectionPolicy, Optional expressConfiguration, + Optional myOrganizationConfiguration, Optional> asyncApprovalNotificationChannels, Map additionalProperties) { this.name = name; @@ -227,7 +236,10 @@ private CreateClientRequestContent( this.parRequestExpiry = parRequestExpiry; this.tokenQuota = tokenQuota; this.resourceServerIdentifier = resourceServerIdentifier; + this.thirdPartySecurityMode = thirdPartySecurityMode; + this.redirectionPolicy = redirectionPolicy; this.expressConfiguration = expressConfiguration; + this.myOrganizationConfiguration = myOrganizationConfiguration; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; this.additionalProperties = additionalProperties; } @@ -585,11 +597,26 @@ public Optional getResourceServerIdentifier() { return resourceServerIdentifier; } + @JsonProperty("third_party_security_mode") + public Optional getThirdPartySecurityMode() { + return thirdPartySecurityMode; + } + + @JsonProperty("redirection_policy") + public Optional getRedirectionPolicy() { + return redirectionPolicy; + } + @JsonProperty("express_configuration") public Optional getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("my_organization_configuration") + public Optional getMyOrganizationConfiguration() { + return myOrganizationConfiguration; + } + @JsonProperty("async_approval_notification_channels") public Optional> getAsyncApprovalNotificationChannels() { return asyncApprovalNotificationChannels; @@ -692,7 +719,10 @@ private boolean equalTo(CreateClientRequestContent other) { && parRequestExpiry.equals(other.parRequestExpiry) && tokenQuota.equals(other.tokenQuota) && resourceServerIdentifier.equals(other.resourceServerIdentifier) + && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && redirectionPolicy.equals(other.redirectionPolicy) && expressConfiguration.equals(other.expressConfiguration) + && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels); } @@ -747,7 +777,10 @@ public int hashCode() { this.parRequestExpiry, this.tokenQuota, this.resourceServerIdentifier, + this.thirdPartySecurityMode, + this.redirectionPolicy, this.expressConfiguration, + this.myOrganizationConfiguration, this.asyncApprovalNotificationChannels); } @@ -1080,10 +1113,23 @@ _FinalStage skipNonVerifiableCallbackUriConfirmationPrompt( _FinalStage resourceServerIdentifier(String resourceServerIdentifier); + _FinalStage thirdPartySecurityMode(Optional thirdPartySecurityMode); + + _FinalStage thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPartySecurityMode); + + _FinalStage redirectionPolicy(Optional redirectionPolicy); + + _FinalStage redirectionPolicy(ClientRedirectionPolicyEnum redirectionPolicy); + _FinalStage expressConfiguration(Optional expressConfiguration); _FinalStage expressConfiguration(ExpressConfiguration expressConfiguration); + _FinalStage myOrganizationConfiguration( + Optional myOrganizationConfiguration); + + _FinalStage myOrganizationConfiguration(ClientMyOrganizationPostConfiguration myOrganizationConfiguration); + _FinalStage asyncApprovalNotificationChannels( Optional> asyncApprovalNotificationChannels); @@ -1098,8 +1144,14 @@ public static final class Builder implements NameStage, _FinalStage { private Optional> asyncApprovalNotificationChannels = Optional.empty(); + private Optional myOrganizationConfiguration = Optional.empty(); + private Optional expressConfiguration = Optional.empty(); + private Optional redirectionPolicy = Optional.empty(); + + private Optional thirdPartySecurityMode = Optional.empty(); + private Optional resourceServerIdentifier = Optional.empty(); private Optional tokenQuota = Optional.empty(); @@ -1249,7 +1301,10 @@ public Builder from(CreateClientRequestContent other) { parRequestExpiry(other.getParRequestExpiry()); tokenQuota(other.getTokenQuota()); resourceServerIdentifier(other.getResourceServerIdentifier()); + thirdPartySecurityMode(other.getThirdPartySecurityMode()); + redirectionPolicy(other.getRedirectionPolicy()); expressConfiguration(other.getExpressConfiguration()); + myOrganizationConfiguration(other.getMyOrganizationConfiguration()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); return this; } @@ -1281,6 +1336,21 @@ public _FinalStage asyncApprovalNotificationChannels( return this; } + @java.lang.Override + public _FinalStage myOrganizationConfiguration( + ClientMyOrganizationPostConfiguration myOrganizationConfiguration) { + this.myOrganizationConfiguration = Optional.ofNullable(myOrganizationConfiguration); + return this; + } + + @java.lang.Override + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) + public _FinalStage myOrganizationConfiguration( + Optional myOrganizationConfiguration) { + this.myOrganizationConfiguration = myOrganizationConfiguration; + return this; + } + @java.lang.Override public _FinalStage expressConfiguration(ExpressConfiguration expressConfiguration) { this.expressConfiguration = Optional.ofNullable(expressConfiguration); @@ -1294,6 +1364,32 @@ public _FinalStage expressConfiguration(Optional expressCo return this; } + @java.lang.Override + public _FinalStage redirectionPolicy(ClientRedirectionPolicyEnum redirectionPolicy) { + this.redirectionPolicy = Optional.ofNullable(redirectionPolicy); + return this; + } + + @java.lang.Override + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) + public _FinalStage redirectionPolicy(Optional redirectionPolicy) { + this.redirectionPolicy = redirectionPolicy; + return this; + } + + @java.lang.Override + public _FinalStage thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPartySecurityMode) { + this.thirdPartySecurityMode = Optional.ofNullable(thirdPartySecurityMode); + return this; + } + + @java.lang.Override + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) + public _FinalStage thirdPartySecurityMode(Optional thirdPartySecurityMode) { + this.thirdPartySecurityMode = thirdPartySecurityMode; + return this; + } + /** *

The identifier of the resource server that this client is linked to.

* @return Reference to {@code this} so that method calls can be chained together. @@ -2311,7 +2407,10 @@ public CreateClientRequestContent build() { parRequestExpiry, tokenQuota, resourceServerIdentifier, + thirdPartySecurityMode, + redirectionPolicy, expressConfiguration, + myOrganizationConfiguration, asyncApprovalNotificationChannels, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java index 51c78d797..f2795eb4c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java @@ -126,6 +126,12 @@ public final class CreateClientResponseContent { private final Optional expressConfiguration; + private final Optional myOrganizationConfiguration; + + private final Optional thirdPartySecurityMode; + + private final Optional redirectionPolicy; + private final Optional resourceServerIdentifier; private final Optional> asyncApprovalNotificationChannels; @@ -192,6 +198,9 @@ private CreateClientResponseContent( OptionalNullable parRequestExpiry, Optional tokenQuota, Optional expressConfiguration, + Optional myOrganizationConfiguration, + Optional thirdPartySecurityMode, + Optional redirectionPolicy, Optional resourceServerIdentifier, Optional> asyncApprovalNotificationChannels, Optional externalMetadataType, @@ -250,6 +259,9 @@ private CreateClientResponseContent( this.parRequestExpiry = parRequestExpiry; this.tokenQuota = tokenQuota; this.expressConfiguration = expressConfiguration; + this.myOrganizationConfiguration = myOrganizationConfiguration; + this.thirdPartySecurityMode = thirdPartySecurityMode; + this.redirectionPolicy = redirectionPolicy; this.resourceServerIdentifier = resourceServerIdentifier; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; this.externalMetadataType = externalMetadataType; @@ -641,6 +653,21 @@ public Optional getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("my_organization_configuration") + public Optional getMyOrganizationConfiguration() { + return myOrganizationConfiguration; + } + + @JsonProperty("third_party_security_mode") + public Optional getThirdPartySecurityMode() { + return thirdPartySecurityMode; + } + + @JsonProperty("redirection_policy") + public Optional getRedirectionPolicy() { + return redirectionPolicy; + } + /** * @return The identifier of the resource server that this client is linked to. */ @@ -792,6 +819,9 @@ private boolean equalTo(CreateClientResponseContent other) { && parRequestExpiry.equals(other.parRequestExpiry) && tokenQuota.equals(other.tokenQuota) && expressConfiguration.equals(other.expressConfiguration) + && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && redirectionPolicy.equals(other.redirectionPolicy) && resourceServerIdentifier.equals(other.resourceServerIdentifier) && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) && externalMetadataType.equals(other.externalMetadataType) @@ -854,6 +884,9 @@ public int hashCode() { this.parRequestExpiry, this.tokenQuota, this.expressConfiguration, + this.myOrganizationConfiguration, + this.thirdPartySecurityMode, + this.redirectionPolicy, this.resourceServerIdentifier, this.asyncApprovalNotificationChannels, this.externalMetadataType, @@ -975,6 +1008,12 @@ public static final class Builder { private Optional expressConfiguration = Optional.empty(); + private Optional myOrganizationConfiguration = Optional.empty(); + + private Optional thirdPartySecurityMode = Optional.empty(); + + private Optional redirectionPolicy = Optional.empty(); + private Optional resourceServerIdentifier = Optional.empty(); private Optional> asyncApprovalNotificationChannels = @@ -1045,6 +1084,9 @@ public Builder from(CreateClientResponseContent other) { parRequestExpiry(other.getParRequestExpiry()); tokenQuota(other.getTokenQuota()); expressConfiguration(other.getExpressConfiguration()); + myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + thirdPartySecurityMode(other.getThirdPartySecurityMode()); + redirectionPolicy(other.getRedirectionPolicy()); resourceServerIdentifier(other.getResourceServerIdentifier()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); externalMetadataType(other.getExternalMetadataType()); @@ -1880,6 +1922,41 @@ public Builder expressConfiguration(ExpressConfiguration expressConfiguration) { return this; } + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) + public Builder myOrganizationConfiguration( + Optional myOrganizationConfiguration) { + this.myOrganizationConfiguration = myOrganizationConfiguration; + return this; + } + + public Builder myOrganizationConfiguration( + ClientMyOrganizationResponseConfiguration myOrganizationConfiguration) { + this.myOrganizationConfiguration = Optional.ofNullable(myOrganizationConfiguration); + return this; + } + + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) + public Builder thirdPartySecurityMode(Optional thirdPartySecurityMode) { + this.thirdPartySecurityMode = thirdPartySecurityMode; + return this; + } + + public Builder thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPartySecurityMode) { + this.thirdPartySecurityMode = Optional.ofNullable(thirdPartySecurityMode); + return this; + } + + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) + public Builder redirectionPolicy(Optional redirectionPolicy) { + this.redirectionPolicy = redirectionPolicy; + return this; + } + + public Builder redirectionPolicy(ClientRedirectionPolicyEnum redirectionPolicy) { + this.redirectionPolicy = Optional.ofNullable(redirectionPolicy); + return this; + } + /** *

The identifier of the resource server that this client is linked to.

*/ @@ -2011,6 +2088,9 @@ public CreateClientResponseContent build() { parRequestExpiry, tokenQuota, expressConfiguration, + myOrganizationConfiguration, + thirdPartySecurityMode, + redirectionPolicy, resourceServerIdentifier, asyncApprovalNotificationChannels, externalMetadataType, diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickr.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickr.java deleted file mode 100644 index cfdc7c1c9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickr.java +++ /dev/null @@ -1,332 +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.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.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 = CreateConnectionRequestContentFlickr.Builder.class) -public final class CreateConnectionRequestContentFlickr implements ICreateConnectionCommon { - private final String name; - - private final Optional> enabledClients; - - private final Optional displayName; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentFlickrStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentFlickr( - String name, - Optional> enabledClients, - Optional displayName, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentFlickrStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.enabledClients = enabledClients; - this.displayName = displayName; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public String getName() { - return name; - } - - /** - * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. - */ - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentFlickrStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentFlickr - && equalTo((CreateConnectionRequestContentFlickr) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentFlickr other) { - return name.equals(other.name) - && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.enabledClients, - this.displayName, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - StrategyStage name(@NotNull String name); - - Builder from(CreateConnectionRequestContentFlickr other); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentFlickrStrategy strategy); - } - - public interface _FinalStage { - CreateConnectionRequestContentFlickr 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); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsFlickr options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - - private CreateConnectionRequestContentFlickrStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentFlickr other) { - name(other.getName()); - enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - 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 CreateConnectionRequestContentFlickrStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsFlickr options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - 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; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage 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; - 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); - 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; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentFlickr build() { - return new CreateConnectionRequestContentFlickr( - name, - enabledClients, - displayName, - isDomainConnection, - metadata, - strategy, - options, - 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/CreateDirectoryProvisioningRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningRequestContent.java index 3b9e88b66..fcd9e53f1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningRequestContent.java @@ -25,14 +25,14 @@ public final class CreateDirectoryProvisioningRequestContent { private final Optional synchronizeAutomatically; - private final Optional synchronizeGroups; + private final Optional synchronizeGroups; private final Map additionalProperties; private CreateDirectoryProvisioningRequestContent( Optional> mapping, Optional synchronizeAutomatically, - Optional synchronizeGroups, + Optional synchronizeGroups, Map additionalProperties) { this.mapping = mapping; this.synchronizeAutomatically = synchronizeAutomatically; @@ -57,7 +57,7 @@ public Optional getSynchronizeAutomatically() { } @JsonProperty("synchronize_groups") - public Optional getSynchronizeGroups() { + public Optional getSynchronizeGroups() { return synchronizeGroups; } @@ -99,7 +99,7 @@ public static final class Builder { private Optional synchronizeAutomatically = Optional.empty(); - private Optional synchronizeGroups = Optional.empty(); + private Optional synchronizeGroups = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -142,12 +142,12 @@ public Builder synchronizeAutomatically(Boolean synchronizeAutomatically) { } @JsonSetter(value = "synchronize_groups", nulls = Nulls.SKIP) - public Builder synchronizeGroups(Optional synchronizeGroups) { + public Builder synchronizeGroups(Optional synchronizeGroups) { this.synchronizeGroups = synchronizeGroups; return this; } - public Builder synchronizeGroups(String synchronizeGroups) { + public Builder synchronizeGroups(SynchronizeGroupsEnum synchronizeGroups) { this.synchronizeGroups = Optional.ofNullable(synchronizeGroups); return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java index 7a3abb5bb..9538773e6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java @@ -34,7 +34,7 @@ public final class CreateDirectoryProvisioningResponseContent { private final boolean synchronizeAutomatically; - private final Optional synchronizeGroups; + private final Optional synchronizeGroups; private final OffsetDateTime createdAt; @@ -54,7 +54,7 @@ private CreateDirectoryProvisioningResponseContent( String strategy, List mapping, boolean synchronizeAutomatically, - Optional synchronizeGroups, + Optional synchronizeGroups, OffsetDateTime createdAt, OffsetDateTime updatedAt, Optional lastSynchronizationAt, @@ -116,7 +116,7 @@ public boolean getSynchronizeAutomatically() { } @JsonProperty("synchronize_groups") - public Optional getSynchronizeGroups() { + public Optional getSynchronizeGroups() { return synchronizeGroups; } @@ -271,9 +271,9 @@ public interface _FinalStage { _FinalStage addAllMapping(List mapping); - _FinalStage synchronizeGroups(Optional synchronizeGroups); + _FinalStage synchronizeGroups(Optional synchronizeGroups); - _FinalStage synchronizeGroups(String synchronizeGroups); + _FinalStage synchronizeGroups(SynchronizeGroupsEnum synchronizeGroups); /** *

The timestamp at which the connection was last synchronized

@@ -324,7 +324,7 @@ public static final class Builder private Optional lastSynchronizationAt = Optional.empty(); - private Optional synchronizeGroups = Optional.empty(); + private Optional synchronizeGroups = Optional.empty(); private List mapping = new ArrayList<>(); @@ -482,14 +482,14 @@ public _FinalStage lastSynchronizationAt(Optional lastSynchroniz } @java.lang.Override - public _FinalStage synchronizeGroups(String synchronizeGroups) { + public _FinalStage synchronizeGroups(SynchronizeGroupsEnum synchronizeGroups) { this.synchronizeGroups = Optional.ofNullable(synchronizeGroups); return this; } @java.lang.Override @JsonSetter(value = "synchronize_groups", nulls = Nulls.SKIP) - public _FinalStage synchronizeGroups(Optional synchronizeGroups) { + public _FinalStage synchronizeGroups(Optional synchronizeGroups) { this.synchronizeGroups = synchronizeGroups; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationAllConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationAllConnectionResponseContent.java new file mode 100644 index 000000000..72848bb6e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationAllConnectionResponseContent.java @@ -0,0 +1,426 @@ +/** + * 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 = CreateOrganizationAllConnectionResponseContent.Builder.class) +public final class CreateOrganizationAllConnectionResponseContent { + private final Optional organizationConnectionName; + + private final Optional assignMembershipOnLogin; + + private final Optional showAsButton; + + private final Optional isSignupEnabled; + + private final Optional organizationAccessLevel; + + private final Optional isEnabled; + + private final String connectionId; + + private final Optional connection; + + private final Map additionalProperties; + + private CreateOrganizationAllConnectionResponseContent( + Optional organizationConnectionName, + Optional assignMembershipOnLogin, + Optional showAsButton, + Optional isSignupEnabled, + Optional organizationAccessLevel, + Optional isEnabled, + String connectionId, + Optional connection, + Map additionalProperties) { + this.organizationConnectionName = organizationConnectionName; + this.assignMembershipOnLogin = assignMembershipOnLogin; + this.showAsButton = showAsButton; + this.isSignupEnabled = isSignupEnabled; + this.organizationAccessLevel = organizationAccessLevel; + this.isEnabled = isEnabled; + this.connectionId = connectionId; + this.connection = connection; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection in the scope of this organization. + */ + @JsonProperty("organization_connection_name") + public Optional getOrganizationConnectionName() { + return organizationConnectionName; + } + + /** + * @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. Default: true. + */ + @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. Default: false. + */ + @JsonProperty("is_signup_enabled") + public Optional getIsSignupEnabled() { + return isSignupEnabled; + } + + @JsonProperty("organization_access_level") + public Optional getOrganizationAccessLevel() { + return organizationAccessLevel; + } + + /** + * @return Whether the connection is enabled for the organization. + */ + @JsonProperty("is_enabled") + public Optional getIsEnabled() { + return isEnabled; + } + + /** + * @return Connection identifier. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @JsonProperty("connection") + public Optional getConnection() { + return connection; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateOrganizationAllConnectionResponseContent + && equalTo((CreateOrganizationAllConnectionResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateOrganizationAllConnectionResponseContent other) { + return organizationConnectionName.equals(other.organizationConnectionName) + && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) + && showAsButton.equals(other.showAsButton) + && isSignupEnabled.equals(other.isSignupEnabled) + && organizationAccessLevel.equals(other.organizationAccessLevel) + && isEnabled.equals(other.isEnabled) + && connectionId.equals(other.connectionId) + && connection.equals(other.connection); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.organizationConnectionName, + this.assignMembershipOnLogin, + this.showAsButton, + this.isSignupEnabled, + this.organizationAccessLevel, + this.isEnabled, + this.connectionId, + this.connection); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionIdStage builder() { + return new Builder(); + } + + public interface ConnectionIdStage { + /** + *

Connection identifier.

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

Name of the connection in the scope of this organization.

+ */ + _FinalStage organizationConnectionName(Optional organizationConnectionName); + + _FinalStage organizationConnectionName(String organizationConnectionName); + + /** + *

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. Default: true.

+ */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + + /** + *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

+ */ + _FinalStage isSignupEnabled(Optional isSignupEnabled); + + _FinalStage isSignupEnabled(Boolean isSignupEnabled); + + _FinalStage organizationAccessLevel(Optional organizationAccessLevel); + + _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel); + + /** + *

Whether the connection is enabled for the organization.

+ */ + _FinalStage isEnabled(Optional isEnabled); + + _FinalStage isEnabled(Boolean isEnabled); + + _FinalStage connection(Optional connection); + + _FinalStage connection(OrganizationConnectionInformation connection); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConnectionIdStage, _FinalStage { + private String connectionId; + + private Optional connection = Optional.empty(); + + private Optional isEnabled = Optional.empty(); + + private Optional organizationAccessLevel = Optional.empty(); + + private Optional isSignupEnabled = Optional.empty(); + + private Optional showAsButton = Optional.empty(); + + private Optional assignMembershipOnLogin = Optional.empty(); + + private Optional organizationConnectionName = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateOrganizationAllConnectionResponseContent other) { + organizationConnectionName(other.getOrganizationConnectionName()); + assignMembershipOnLogin(other.getAssignMembershipOnLogin()); + showAsButton(other.getShowAsButton()); + isSignupEnabled(other.getIsSignupEnabled()); + organizationAccessLevel(other.getOrganizationAccessLevel()); + isEnabled(other.getIsEnabled()); + connectionId(other.getConnectionId()); + connection(other.getConnection()); + return this; + } + + /** + *

Connection identifier.

+ *

Connection identifier.

+ * @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 _FinalStage connection(OrganizationConnectionInformation 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; + } + + /** + *

Whether the connection is enabled for the organization.

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

Whether the connection is enabled for the organization.

+ */ + @java.lang.Override + @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) + public _FinalStage isEnabled(Optional isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + @java.lang.Override + public _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel) { + this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationAccessLevel(Optional organizationAccessLevel) { + this.organizationAccessLevel = organizationAccessLevel; + return this; + } + + /** + *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

+ * @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. Default: false.

+ */ + @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. Default: true.

+ * @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. Default: true.

+ */ + @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; + } + + /** + *

Name of the connection in the scope of this organization.

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

Name of the connection in the scope of this organization.

+ */ + @java.lang.Override + @JsonSetter(value = "organization_connection_name", nulls = Nulls.SKIP) + public _FinalStage organizationConnectionName(Optional organizationConnectionName) { + this.organizationConnectionName = organizationConnectionName; + return this; + } + + @java.lang.Override + public CreateOrganizationAllConnectionResponseContent build() { + return new CreateOrganizationAllConnectionResponseContent( + organizationConnectionName, + assignMembershipOnLogin, + showAsButton, + isSignupEnabled, + organizationAccessLevel, + isEnabled, + connectionId, + 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/DirectoryProvisioning.java b/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java index b1807dda2..dcddd0b3f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java +++ b/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java @@ -34,7 +34,7 @@ public final class DirectoryProvisioning { private final boolean synchronizeAutomatically; - private final Optional synchronizeGroups; + private final Optional synchronizeGroups; private final OffsetDateTime createdAt; @@ -54,7 +54,7 @@ private DirectoryProvisioning( String strategy, List mapping, boolean synchronizeAutomatically, - Optional synchronizeGroups, + Optional synchronizeGroups, OffsetDateTime createdAt, OffsetDateTime updatedAt, Optional lastSynchronizationAt, @@ -116,7 +116,7 @@ public boolean getSynchronizeAutomatically() { } @JsonProperty("synchronize_groups") - public Optional getSynchronizeGroups() { + public Optional getSynchronizeGroups() { return synchronizeGroups; } @@ -270,9 +270,9 @@ public interface _FinalStage { _FinalStage addAllMapping(List mapping); - _FinalStage synchronizeGroups(Optional synchronizeGroups); + _FinalStage synchronizeGroups(Optional synchronizeGroups); - _FinalStage synchronizeGroups(String synchronizeGroups); + _FinalStage synchronizeGroups(SynchronizeGroupsEnum synchronizeGroups); /** *

The timestamp at which the connection was last synchronized

@@ -323,7 +323,7 @@ public static final class Builder private Optional lastSynchronizationAt = Optional.empty(); - private Optional synchronizeGroups = Optional.empty(); + private Optional synchronizeGroups = Optional.empty(); private List mapping = new ArrayList<>(); @@ -481,14 +481,14 @@ public _FinalStage lastSynchronizationAt(Optional lastSynchroniz } @java.lang.Override - public _FinalStage synchronizeGroups(String synchronizeGroups) { + public _FinalStage synchronizeGroups(SynchronizeGroupsEnum synchronizeGroups) { this.synchronizeGroups = Optional.ofNullable(synchronizeGroups); return this; } @java.lang.Override @JsonSetter(value = "synchronize_groups", nulls = Nulls.SKIP) - public _FinalStage synchronizeGroups(Optional synchronizeGroups) { + public _FinalStage synchronizeGroups(Optional synchronizeGroups) { this.synchronizeGroups = synchronizeGroups; return this; } 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 356649e1e..f1ea3cdc0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java @@ -23,6 +23,9 @@ public final class EventStreamDeliveryEventTypeEnum { 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"); + public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_CREATED = new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); @@ -35,22 +38,33 @@ public final class EventStreamDeliveryEventTypeEnum { public static final EventStreamDeliveryEventTypeEnum GROUP_MEMBER_ADDED = new EventStreamDeliveryEventTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); + public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = + new EventStreamDeliveryEventTypeEnum( + Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + 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 USER_CREATED = - new EventStreamDeliveryEventTypeEnum(Value.USER_CREATED, "user.created"); + 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"); + public static final EventStreamDeliveryEventTypeEnum USER_CREATED = + new EventStreamDeliveryEventTypeEnum(Value.USER_CREATED, "user.created"); + 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 ORGANIZATION_MEMBER_ROLE_ASSIGNED = new EventStreamDeliveryEventTypeEnum( Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); @@ -108,6 +122,8 @@ public T visit(Visitor visitor) { 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: @@ -116,16 +132,22 @@ public T visit(Visitor visitor) { 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 GROUP_UPDATED: return visitor.visitGroupUpdated(); - case USER_CREATED: - return visitor.visitUserCreated(); + 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 ORGANIZATION_DELETED: @@ -153,6 +175,8 @@ public static EventStreamDeliveryEventTypeEnum valueOf(String value) { 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": @@ -161,16 +185,22 @@ public static EventStreamDeliveryEventTypeEnum valueOf(String value) { 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 "group.updated": return GROUP_UPDATED; - case "user.created": - return USER_CREATED; + 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 "organization.deleted": @@ -185,18 +215,34 @@ public static EventStreamDeliveryEventTypeEnum valueOf(String value) { } public enum Value { - USER_CREATED, + GROUP_CREATED, - USER_DELETED, + GROUP_DELETED, - USER_UPDATED, + GROUP_MEMBER_ADDED, - ORGANIZATION_CREATED, + GROUP_MEMBER_DELETED, - ORGANIZATION_UPDATED, + 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, @@ -205,38 +251,46 @@ public enum Value { ORGANIZATION_MEMBER_ROLE_DELETED, - ORGANIZATION_CONNECTION_ADDED, + ORGANIZATION_UPDATED, - ORGANIZATION_CONNECTION_UPDATED, + USER_CREATED, - ORGANIZATION_CONNECTION_REMOVED, + USER_DELETED, - GROUP_CREATED, + USER_UPDATED, - GROUP_UPDATED, + UNKNOWN + } - GROUP_DELETED, + public interface Visitor { + T visitGroupCreated(); - GROUP_MEMBER_ADDED, + T visitGroupDeleted(); - GROUP_MEMBER_DELETED, + T visitGroupMemberAdded(); - UNKNOWN - } + T visitGroupMemberDeleted(); - public interface Visitor { - T visitUserCreated(); + T visitGroupRoleAssigned(); - T visitUserDeleted(); + T visitGroupRoleDeleted(); - T visitUserUpdated(); + T visitGroupUpdated(); - T visitOrganizationCreated(); + T visitOrganizationConnectionAdded(); - T visitOrganizationUpdated(); + T visitOrganizationConnectionRemoved(); + + T visitOrganizationConnectionUpdated(); + + T visitOrganizationCreated(); T visitOrganizationDeleted(); + T visitOrganizationGroupRoleAssigned(); + + T visitOrganizationGroupRoleDeleted(); + T visitOrganizationMemberAdded(); T visitOrganizationMemberDeleted(); @@ -245,21 +299,13 @@ public interface Visitor { T visitOrganizationMemberRoleDeleted(); - T visitOrganizationConnectionAdded(); - - T visitOrganizationConnectionUpdated(); - - T visitOrganizationConnectionRemoved(); - - T visitGroupCreated(); - - T visitGroupUpdated(); + T visitOrganizationUpdated(); - T visitGroupDeleted(); + T visitUserCreated(); - T visitGroupMemberAdded(); + T visitUserDeleted(); - T visitGroupMemberDeleted(); + T visitUserUpdated(); T visitUnknown(String unknownType); } 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 ec22b82f0..b904bd391 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java @@ -22,6 +22,9 @@ public final class EventStreamEventTypeEnum { 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"); + public static final EventStreamEventTypeEnum ORGANIZATION_CREATED = new EventStreamEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); @@ -34,21 +37,30 @@ public final class EventStreamEventTypeEnum { public static final EventStreamEventTypeEnum GROUP_MEMBER_ADDED = new EventStreamEventTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); + public static final EventStreamEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = + new EventStreamEventTypeEnum(Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + 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 USER_CREATED = - new EventStreamEventTypeEnum(Value.USER_CREATED, "user.created"); + 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"); + public static final EventStreamEventTypeEnum USER_CREATED = + new EventStreamEventTypeEnum(Value.USER_CREATED, "user.created"); + 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 ORGANIZATION_MEMBER_ROLE_ASSIGNED = new EventStreamEventTypeEnum(Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); @@ -104,6 +116,8 @@ public T visit(Visitor visitor) { 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: @@ -112,16 +126,22 @@ public T visit(Visitor visitor) { 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 GROUP_UPDATED: return visitor.visitGroupUpdated(); - case USER_CREATED: - return visitor.visitUserCreated(); + 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 ORGANIZATION_DELETED: @@ -149,6 +169,8 @@ public static EventStreamEventTypeEnum valueOf(String value) { 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": @@ -157,16 +179,22 @@ public static EventStreamEventTypeEnum valueOf(String value) { 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 "group.updated": return GROUP_UPDATED; - case "user.created": - return USER_CREATED; + 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 "organization.deleted": @@ -181,18 +209,34 @@ public static EventStreamEventTypeEnum valueOf(String value) { } public enum Value { - USER_CREATED, + GROUP_CREATED, - USER_DELETED, + GROUP_DELETED, - USER_UPDATED, + GROUP_MEMBER_ADDED, - ORGANIZATION_CREATED, + GROUP_MEMBER_DELETED, - ORGANIZATION_UPDATED, + 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, @@ -201,38 +245,46 @@ public enum Value { ORGANIZATION_MEMBER_ROLE_DELETED, - ORGANIZATION_CONNECTION_ADDED, + ORGANIZATION_UPDATED, - ORGANIZATION_CONNECTION_UPDATED, + USER_CREATED, - ORGANIZATION_CONNECTION_REMOVED, + USER_DELETED, - GROUP_CREATED, + USER_UPDATED, - GROUP_UPDATED, + UNKNOWN + } - GROUP_DELETED, + public interface Visitor { + T visitGroupCreated(); - GROUP_MEMBER_ADDED, + T visitGroupDeleted(); - GROUP_MEMBER_DELETED, + T visitGroupMemberAdded(); - UNKNOWN - } + T visitGroupMemberDeleted(); - public interface Visitor { - T visitUserCreated(); + T visitGroupRoleAssigned(); - T visitUserDeleted(); + T visitGroupRoleDeleted(); - T visitUserUpdated(); + T visitGroupUpdated(); - T visitOrganizationCreated(); + T visitOrganizationConnectionAdded(); - T visitOrganizationUpdated(); + T visitOrganizationConnectionRemoved(); + + T visitOrganizationConnectionUpdated(); + + T visitOrganizationCreated(); T visitOrganizationDeleted(); + T visitOrganizationGroupRoleAssigned(); + + T visitOrganizationGroupRoleDeleted(); + T visitOrganizationMemberAdded(); T visitOrganizationMemberDeleted(); @@ -241,21 +293,13 @@ public interface Visitor { T visitOrganizationMemberRoleDeleted(); - T visitOrganizationConnectionAdded(); - - T visitOrganizationConnectionUpdated(); - - T visitOrganizationConnectionRemoved(); - - T visitGroupCreated(); - - T visitGroupUpdated(); + T visitOrganizationUpdated(); - T visitGroupDeleted(); + T visitUserCreated(); - T visitGroupMemberAdded(); + T visitUserDeleted(); - T visitGroupMemberDeleted(); + T visitUserUpdated(); T visitUnknown(String unknownType); } 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 d1ac98504..dcc6ac104 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java @@ -22,6 +22,9 @@ public final class EventStreamTestEventTypeEnum { 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"); + public static final EventStreamTestEventTypeEnum ORGANIZATION_CREATED = new EventStreamTestEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); @@ -34,21 +37,31 @@ public final class EventStreamTestEventTypeEnum { public static final EventStreamTestEventTypeEnum GROUP_MEMBER_ADDED = new EventStreamTestEventTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); + public static final EventStreamTestEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = + new EventStreamTestEventTypeEnum( + Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + 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 USER_CREATED = - new EventStreamTestEventTypeEnum(Value.USER_CREATED, "user.created"); + 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"); + public static final EventStreamTestEventTypeEnum USER_CREATED = + new EventStreamTestEventTypeEnum(Value.USER_CREATED, "user.created"); + 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 ORGANIZATION_MEMBER_ROLE_ASSIGNED = new EventStreamTestEventTypeEnum( Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); @@ -106,6 +119,8 @@ public T visit(Visitor visitor) { 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: @@ -114,16 +129,22 @@ public T visit(Visitor visitor) { 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 GROUP_UPDATED: return visitor.visitGroupUpdated(); - case USER_CREATED: - return visitor.visitUserCreated(); + 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 ORGANIZATION_DELETED: @@ -151,6 +172,8 @@ public static EventStreamTestEventTypeEnum valueOf(String value) { 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": @@ -159,16 +182,22 @@ public static EventStreamTestEventTypeEnum valueOf(String value) { 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 "group.updated": return GROUP_UPDATED; - case "user.created": - return USER_CREATED; + 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 "organization.deleted": @@ -183,18 +212,34 @@ public static EventStreamTestEventTypeEnum valueOf(String value) { } public enum Value { - USER_CREATED, + GROUP_CREATED, - USER_DELETED, + GROUP_DELETED, - USER_UPDATED, + GROUP_MEMBER_ADDED, - ORGANIZATION_CREATED, + GROUP_MEMBER_DELETED, - ORGANIZATION_UPDATED, + 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, @@ -203,38 +248,46 @@ public enum Value { ORGANIZATION_MEMBER_ROLE_DELETED, - ORGANIZATION_CONNECTION_ADDED, + ORGANIZATION_UPDATED, - ORGANIZATION_CONNECTION_UPDATED, + USER_CREATED, - ORGANIZATION_CONNECTION_REMOVED, + USER_DELETED, - GROUP_CREATED, + USER_UPDATED, - GROUP_UPDATED, + UNKNOWN + } - GROUP_DELETED, + public interface Visitor { + T visitGroupCreated(); - GROUP_MEMBER_ADDED, + T visitGroupDeleted(); - GROUP_MEMBER_DELETED, + T visitGroupMemberAdded(); - UNKNOWN - } + T visitGroupMemberDeleted(); - public interface Visitor { - T visitUserCreated(); + T visitGroupRoleAssigned(); - T visitUserDeleted(); + T visitGroupRoleDeleted(); - T visitUserUpdated(); + T visitGroupUpdated(); - T visitOrganizationCreated(); + T visitOrganizationConnectionAdded(); - T visitOrganizationUpdated(); + T visitOrganizationConnectionRemoved(); + + T visitOrganizationConnectionUpdated(); + + T visitOrganizationCreated(); T visitOrganizationDeleted(); + T visitOrganizationGroupRoleAssigned(); + + T visitOrganizationGroupRoleDeleted(); + T visitOrganizationMemberAdded(); T visitOrganizationMemberDeleted(); @@ -243,21 +296,13 @@ public interface Visitor { T visitOrganizationMemberRoleDeleted(); - T visitOrganizationConnectionAdded(); - - T visitOrganizationConnectionUpdated(); - - T visitOrganizationConnectionRemoved(); - - T visitGroupCreated(); - - T visitGroupUpdated(); + T visitOrganizationUpdated(); - T visitGroupDeleted(); + T visitUserCreated(); - T visitGroupMemberAdded(); + T visitUserDeleted(); - T visitGroupMemberDeleted(); + T visitUserUpdated(); T visitUnknown(String unknownType); } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetClientGrantResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetClientGrantResponseContent.java index 7f8797d75..d158ba411 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetClientGrantResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetClientGrantResponseContent.java @@ -33,6 +33,8 @@ public final class GetClientGrantResponseContent { private final Optional allowAnyOrganization; + private final Optional defaultFor; + private final Optional isSystem; private final Optional subjectType; @@ -50,6 +52,7 @@ private GetClientGrantResponseContent( Optional> scope, Optional organizationUsage, Optional allowAnyOrganization, + Optional defaultFor, Optional isSystem, Optional subjectType, Optional> authorizationDetailsTypes, @@ -61,6 +64,7 @@ private GetClientGrantResponseContent( this.scope = scope; this.organizationUsage = organizationUsage; this.allowAnyOrganization = allowAnyOrganization; + this.defaultFor = defaultFor; this.isSystem = isSystem; this.subjectType = subjectType; this.authorizationDetailsTypes = authorizationDetailsTypes; @@ -113,6 +117,11 @@ public Optional getAllowAnyOrganization() { return allowAnyOrganization; } + @JsonProperty("default_for") + public Optional getDefaultFor() { + return defaultFor; + } + /** * @return If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly. */ @@ -160,6 +169,7 @@ private boolean equalTo(GetClientGrantResponseContent other) { && scope.equals(other.scope) && organizationUsage.equals(other.organizationUsage) && allowAnyOrganization.equals(other.allowAnyOrganization) + && defaultFor.equals(other.defaultFor) && isSystem.equals(other.isSystem) && subjectType.equals(other.subjectType) && authorizationDetailsTypes.equals(other.authorizationDetailsTypes) @@ -175,6 +185,7 @@ public int hashCode() { this.scope, this.organizationUsage, this.allowAnyOrganization, + this.defaultFor, this.isSystem, this.subjectType, this.authorizationDetailsTypes, @@ -204,6 +215,8 @@ public static final class Builder { private Optional allowAnyOrganization = Optional.empty(); + private Optional defaultFor = Optional.empty(); + private Optional isSystem = Optional.empty(); private Optional subjectType = Optional.empty(); @@ -224,6 +237,7 @@ public Builder from(GetClientGrantResponseContent other) { scope(other.getScope()); organizationUsage(other.getOrganizationUsage()); allowAnyOrganization(other.getAllowAnyOrganization()); + defaultFor(other.getDefaultFor()); isSystem(other.getIsSystem()); subjectType(other.getSubjectType()); authorizationDetailsTypes(other.getAuthorizationDetailsTypes()); @@ -312,6 +326,17 @@ public Builder allowAnyOrganization(Boolean allowAnyOrganization) { return this; } + @JsonSetter(value = "default_for", nulls = Nulls.SKIP) + public Builder defaultFor(Optional defaultFor) { + this.defaultFor = defaultFor; + return this; + } + + public Builder defaultFor(ClientGrantDefaultForEnum defaultFor) { + this.defaultFor = Optional.ofNullable(defaultFor); + return this; + } + /** *

If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.

*/ @@ -373,6 +398,7 @@ public GetClientGrantResponseContent build() { scope, organizationUsage, allowAnyOrganization, + defaultFor, isSystem, subjectType, authorizationDetailsTypes, diff --git a/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java index 055ebd4b8..543dc75b9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java @@ -126,6 +126,12 @@ public final class GetClientResponseContent { private final Optional expressConfiguration; + private final Optional myOrganizationConfiguration; + + private final Optional thirdPartySecurityMode; + + private final Optional redirectionPolicy; + private final Optional resourceServerIdentifier; private final Optional> asyncApprovalNotificationChannels; @@ -192,6 +198,9 @@ private GetClientResponseContent( OptionalNullable parRequestExpiry, Optional tokenQuota, Optional expressConfiguration, + Optional myOrganizationConfiguration, + Optional thirdPartySecurityMode, + Optional redirectionPolicy, Optional resourceServerIdentifier, Optional> asyncApprovalNotificationChannels, Optional externalMetadataType, @@ -250,6 +259,9 @@ private GetClientResponseContent( this.parRequestExpiry = parRequestExpiry; this.tokenQuota = tokenQuota; this.expressConfiguration = expressConfiguration; + this.myOrganizationConfiguration = myOrganizationConfiguration; + this.thirdPartySecurityMode = thirdPartySecurityMode; + this.redirectionPolicy = redirectionPolicy; this.resourceServerIdentifier = resourceServerIdentifier; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; this.externalMetadataType = externalMetadataType; @@ -641,6 +653,21 @@ public Optional getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("my_organization_configuration") + public Optional getMyOrganizationConfiguration() { + return myOrganizationConfiguration; + } + + @JsonProperty("third_party_security_mode") + public Optional getThirdPartySecurityMode() { + return thirdPartySecurityMode; + } + + @JsonProperty("redirection_policy") + public Optional getRedirectionPolicy() { + return redirectionPolicy; + } + /** * @return The identifier of the resource server that this client is linked to. */ @@ -792,6 +819,9 @@ private boolean equalTo(GetClientResponseContent other) { && parRequestExpiry.equals(other.parRequestExpiry) && tokenQuota.equals(other.tokenQuota) && expressConfiguration.equals(other.expressConfiguration) + && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && redirectionPolicy.equals(other.redirectionPolicy) && resourceServerIdentifier.equals(other.resourceServerIdentifier) && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) && externalMetadataType.equals(other.externalMetadataType) @@ -854,6 +884,9 @@ public int hashCode() { this.parRequestExpiry, this.tokenQuota, this.expressConfiguration, + this.myOrganizationConfiguration, + this.thirdPartySecurityMode, + this.redirectionPolicy, this.resourceServerIdentifier, this.asyncApprovalNotificationChannels, this.externalMetadataType, @@ -975,6 +1008,12 @@ public static final class Builder { private Optional expressConfiguration = Optional.empty(); + private Optional myOrganizationConfiguration = Optional.empty(); + + private Optional thirdPartySecurityMode = Optional.empty(); + + private Optional redirectionPolicy = Optional.empty(); + private Optional resourceServerIdentifier = Optional.empty(); private Optional> asyncApprovalNotificationChannels = @@ -1045,6 +1084,9 @@ public Builder from(GetClientResponseContent other) { parRequestExpiry(other.getParRequestExpiry()); tokenQuota(other.getTokenQuota()); expressConfiguration(other.getExpressConfiguration()); + myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + thirdPartySecurityMode(other.getThirdPartySecurityMode()); + redirectionPolicy(other.getRedirectionPolicy()); resourceServerIdentifier(other.getResourceServerIdentifier()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); externalMetadataType(other.getExternalMetadataType()); @@ -1880,6 +1922,41 @@ public Builder expressConfiguration(ExpressConfiguration expressConfiguration) { return this; } + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) + public Builder myOrganizationConfiguration( + Optional myOrganizationConfiguration) { + this.myOrganizationConfiguration = myOrganizationConfiguration; + return this; + } + + public Builder myOrganizationConfiguration( + ClientMyOrganizationResponseConfiguration myOrganizationConfiguration) { + this.myOrganizationConfiguration = Optional.ofNullable(myOrganizationConfiguration); + return this; + } + + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) + public Builder thirdPartySecurityMode(Optional thirdPartySecurityMode) { + this.thirdPartySecurityMode = thirdPartySecurityMode; + return this; + } + + public Builder thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPartySecurityMode) { + this.thirdPartySecurityMode = Optional.ofNullable(thirdPartySecurityMode); + return this; + } + + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) + public Builder redirectionPolicy(Optional redirectionPolicy) { + this.redirectionPolicy = redirectionPolicy; + return this; + } + + public Builder redirectionPolicy(ClientRedirectionPolicyEnum redirectionPolicy) { + this.redirectionPolicy = Optional.ofNullable(redirectionPolicy); + return this; + } + /** *

The identifier of the resource server that this client is linked to.

*/ @@ -2011,6 +2088,9 @@ public GetClientResponseContent build() { parRequestExpiry, tokenQuota, expressConfiguration, + myOrganizationConfiguration, + thirdPartySecurityMode, + redirectionPolicy, resourceServerIdentifier, asyncApprovalNotificationChannels, externalMetadataType, diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java index 1947b1e64..09ed2315a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java @@ -34,7 +34,7 @@ public final class GetDirectoryProvisioningResponseContent { private final boolean synchronizeAutomatically; - private final Optional synchronizeGroups; + private final Optional synchronizeGroups; private final OffsetDateTime createdAt; @@ -54,7 +54,7 @@ private GetDirectoryProvisioningResponseContent( String strategy, List mapping, boolean synchronizeAutomatically, - Optional synchronizeGroups, + Optional synchronizeGroups, OffsetDateTime createdAt, OffsetDateTime updatedAt, Optional lastSynchronizationAt, @@ -116,7 +116,7 @@ public boolean getSynchronizeAutomatically() { } @JsonProperty("synchronize_groups") - public Optional getSynchronizeGroups() { + public Optional getSynchronizeGroups() { return synchronizeGroups; } @@ -271,9 +271,9 @@ public interface _FinalStage { _FinalStage addAllMapping(List mapping); - _FinalStage synchronizeGroups(Optional synchronizeGroups); + _FinalStage synchronizeGroups(Optional synchronizeGroups); - _FinalStage synchronizeGroups(String synchronizeGroups); + _FinalStage synchronizeGroups(SynchronizeGroupsEnum synchronizeGroups); /** *

The timestamp at which the connection was last synchronized

@@ -324,7 +324,7 @@ public static final class Builder private Optional lastSynchronizationAt = Optional.empty(); - private Optional synchronizeGroups = Optional.empty(); + private Optional synchronizeGroups = Optional.empty(); private List mapping = new ArrayList<>(); @@ -482,14 +482,14 @@ public _FinalStage lastSynchronizationAt(Optional lastSynchroniz } @java.lang.Override - public _FinalStage synchronizeGroups(String synchronizeGroups) { + public _FinalStage synchronizeGroups(SynchronizeGroupsEnum synchronizeGroups) { this.synchronizeGroups = Optional.ofNullable(synchronizeGroups); return this; } @java.lang.Override @JsonSetter(value = "synchronize_groups", nulls = Nulls.SKIP) - public _FinalStage synchronizeGroups(Optional synchronizeGroups) { + public _FinalStage synchronizeGroups(Optional synchronizeGroups) { this.synchronizeGroups = synchronizeGroups; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationAllConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationAllConnectionResponseContent.java new file mode 100644 index 000000000..180a87756 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationAllConnectionResponseContent.java @@ -0,0 +1,426 @@ +/** + * 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 = GetOrganizationAllConnectionResponseContent.Builder.class) +public final class GetOrganizationAllConnectionResponseContent { + private final Optional organizationConnectionName; + + private final Optional assignMembershipOnLogin; + + private final Optional showAsButton; + + private final Optional isSignupEnabled; + + private final Optional organizationAccessLevel; + + private final Optional isEnabled; + + private final String connectionId; + + private final Optional connection; + + private final Map additionalProperties; + + private GetOrganizationAllConnectionResponseContent( + Optional organizationConnectionName, + Optional assignMembershipOnLogin, + Optional showAsButton, + Optional isSignupEnabled, + Optional organizationAccessLevel, + Optional isEnabled, + String connectionId, + Optional connection, + Map additionalProperties) { + this.organizationConnectionName = organizationConnectionName; + this.assignMembershipOnLogin = assignMembershipOnLogin; + this.showAsButton = showAsButton; + this.isSignupEnabled = isSignupEnabled; + this.organizationAccessLevel = organizationAccessLevel; + this.isEnabled = isEnabled; + this.connectionId = connectionId; + this.connection = connection; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection in the scope of this organization. + */ + @JsonProperty("organization_connection_name") + public Optional getOrganizationConnectionName() { + return organizationConnectionName; + } + + /** + * @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. Default: true. + */ + @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. Default: false. + */ + @JsonProperty("is_signup_enabled") + public Optional getIsSignupEnabled() { + return isSignupEnabled; + } + + @JsonProperty("organization_access_level") + public Optional getOrganizationAccessLevel() { + return organizationAccessLevel; + } + + /** + * @return Whether the connection is enabled for the organization. + */ + @JsonProperty("is_enabled") + public Optional getIsEnabled() { + return isEnabled; + } + + /** + * @return Connection identifier. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @JsonProperty("connection") + public Optional getConnection() { + return connection; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetOrganizationAllConnectionResponseContent + && equalTo((GetOrganizationAllConnectionResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetOrganizationAllConnectionResponseContent other) { + return organizationConnectionName.equals(other.organizationConnectionName) + && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) + && showAsButton.equals(other.showAsButton) + && isSignupEnabled.equals(other.isSignupEnabled) + && organizationAccessLevel.equals(other.organizationAccessLevel) + && isEnabled.equals(other.isEnabled) + && connectionId.equals(other.connectionId) + && connection.equals(other.connection); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.organizationConnectionName, + this.assignMembershipOnLogin, + this.showAsButton, + this.isSignupEnabled, + this.organizationAccessLevel, + this.isEnabled, + this.connectionId, + this.connection); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionIdStage builder() { + return new Builder(); + } + + public interface ConnectionIdStage { + /** + *

Connection identifier.

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

Name of the connection in the scope of this organization.

+ */ + _FinalStage organizationConnectionName(Optional organizationConnectionName); + + _FinalStage organizationConnectionName(String organizationConnectionName); + + /** + *

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. Default: true.

+ */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + + /** + *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

+ */ + _FinalStage isSignupEnabled(Optional isSignupEnabled); + + _FinalStage isSignupEnabled(Boolean isSignupEnabled); + + _FinalStage organizationAccessLevel(Optional organizationAccessLevel); + + _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel); + + /** + *

Whether the connection is enabled for the organization.

+ */ + _FinalStage isEnabled(Optional isEnabled); + + _FinalStage isEnabled(Boolean isEnabled); + + _FinalStage connection(Optional connection); + + _FinalStage connection(OrganizationConnectionInformation connection); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConnectionIdStage, _FinalStage { + private String connectionId; + + private Optional connection = Optional.empty(); + + private Optional isEnabled = Optional.empty(); + + private Optional organizationAccessLevel = Optional.empty(); + + private Optional isSignupEnabled = Optional.empty(); + + private Optional showAsButton = Optional.empty(); + + private Optional assignMembershipOnLogin = Optional.empty(); + + private Optional organizationConnectionName = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GetOrganizationAllConnectionResponseContent other) { + organizationConnectionName(other.getOrganizationConnectionName()); + assignMembershipOnLogin(other.getAssignMembershipOnLogin()); + showAsButton(other.getShowAsButton()); + isSignupEnabled(other.getIsSignupEnabled()); + organizationAccessLevel(other.getOrganizationAccessLevel()); + isEnabled(other.getIsEnabled()); + connectionId(other.getConnectionId()); + connection(other.getConnection()); + return this; + } + + /** + *

Connection identifier.

+ *

Connection identifier.

+ * @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 _FinalStage connection(OrganizationConnectionInformation 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; + } + + /** + *

Whether the connection is enabled for the organization.

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

Whether the connection is enabled for the organization.

+ */ + @java.lang.Override + @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) + public _FinalStage isEnabled(Optional isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + @java.lang.Override + public _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel) { + this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationAccessLevel(Optional organizationAccessLevel) { + this.organizationAccessLevel = organizationAccessLevel; + return this; + } + + /** + *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

+ * @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. Default: false.

+ */ + @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. Default: true.

+ * @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. Default: true.

+ */ + @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; + } + + /** + *

Name of the connection in the scope of this organization.

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

Name of the connection in the scope of this organization.

+ */ + @java.lang.Override + @JsonSetter(value = "organization_connection_name", nulls = Nulls.SKIP) + public _FinalStage organizationConnectionName(Optional organizationConnectionName) { + this.organizationConnectionName = organizationConnectionName; + return this; + } + + @java.lang.Override + public GetOrganizationAllConnectionResponseContent build() { + return new GetOrganizationAllConnectionResponseContent( + organizationConnectionName, + assignMembershipOnLogin, + showAsButton, + isSignupEnabled, + organizationAccessLevel, + isEnabled, + connectionId, + 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/GetTenantSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java index f606c1dc2..6cd3faabd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java @@ -90,10 +90,14 @@ public final class GetTenantSettingsResponseContent { private final Optional resourceParameterProfile; + private final Optional clientIdMetadataDocumentSupported; + private final Optional phoneConsolidatedExperience; private final Optional enableAiGuide; + private final Optional dynamicClientRegistrationSecurityMode; + private final Map additionalProperties; private GetTenantSettingsResponseContent( @@ -130,8 +134,10 @@ private GetTenantSettingsResponseContent( OptionalNullable authorizationResponseIssParameterSupported, OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt, Optional resourceParameterProfile, + Optional clientIdMetadataDocumentSupported, Optional phoneConsolidatedExperience, Optional enableAiGuide, + Optional dynamicClientRegistrationSecurityMode, Map additionalProperties) { this.changePassword = changePassword; this.guardianMfaPage = guardianMfaPage; @@ -166,8 +172,10 @@ private GetTenantSettingsResponseContent( this.authorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.resourceParameterProfile = resourceParameterProfile; + this.clientIdMetadataDocumentSupported = clientIdMetadataDocumentSupported; this.phoneConsolidatedExperience = phoneConsolidatedExperience; this.enableAiGuide = enableAiGuide; + this.dynamicClientRegistrationSecurityMode = dynamicClientRegistrationSecurityMode; this.additionalProperties = additionalProperties; } @@ -448,6 +456,14 @@ public Optional getResourceParameterProf return resourceParameterProfile; } + /** + * @return Whether the authorization server supports retrieving client metadata from a client_id URL. + */ + @JsonProperty("client_id_metadata_document_supported") + public Optional getClientIdMetadataDocumentSupported() { + return clientIdMetadataDocumentSupported; + } + /** * @return Whether Phone Consolidated Experience is enabled for this tenant. */ @@ -464,6 +480,11 @@ public Optional getEnableAiGuide() { return enableAiGuide; } + @JsonProperty("dynamic_client_registration_security_mode") + public Optional getDynamicClientRegistrationSecurityMode() { + return dynamicClientRegistrationSecurityMode; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("change_password") private OptionalNullable _getChangePassword() { @@ -576,8 +597,10 @@ private boolean equalTo(GetTenantSettingsResponseContent other) { && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) && resourceParameterProfile.equals(other.resourceParameterProfile) + && clientIdMetadataDocumentSupported.equals(other.clientIdMetadataDocumentSupported) && phoneConsolidatedExperience.equals(other.phoneConsolidatedExperience) - && enableAiGuide.equals(other.enableAiGuide); + && enableAiGuide.equals(other.enableAiGuide) + && dynamicClientRegistrationSecurityMode.equals(other.dynamicClientRegistrationSecurityMode); } @java.lang.Override @@ -616,8 +639,10 @@ public int hashCode() { this.authorizationResponseIssParameterSupported, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.resourceParameterProfile, + this.clientIdMetadataDocumentSupported, this.phoneConsolidatedExperience, - this.enableAiGuide); + this.enableAiGuide, + this.dynamicClientRegistrationSecurityMode); } @java.lang.Override @@ -697,10 +722,15 @@ public static final class Builder { private Optional resourceParameterProfile = Optional.empty(); + private Optional clientIdMetadataDocumentSupported = Optional.empty(); + private Optional phoneConsolidatedExperience = Optional.empty(); private Optional enableAiGuide = Optional.empty(); + private Optional dynamicClientRegistrationSecurityMode = + Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -740,8 +770,10 @@ public Builder from(GetTenantSettingsResponseContent other) { authorizationResponseIssParameterSupported(other.getAuthorizationResponseIssParameterSupported()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); resourceParameterProfile(other.getResourceParameterProfile()); + clientIdMetadataDocumentSupported(other.getClientIdMetadataDocumentSupported()); phoneConsolidatedExperience(other.getPhoneConsolidatedExperience()); enableAiGuide(other.getEnableAiGuide()); + dynamicClientRegistrationSecurityMode(other.getDynamicClientRegistrationSecurityMode()); return this; } @@ -1413,6 +1445,20 @@ public Builder resourceParameterProfile(TenantSettingsResourceParameterProfile r return this; } + /** + *

Whether the authorization server supports retrieving client metadata from a client_id URL.

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

Whether Phone Consolidated Experience is enabled for this tenant.

*/ @@ -1441,6 +1487,19 @@ public Builder enableAiGuide(Boolean enableAiGuide) { return this; } + @JsonSetter(value = "dynamic_client_registration_security_mode", nulls = Nulls.SKIP) + public Builder dynamicClientRegistrationSecurityMode( + Optional dynamicClientRegistrationSecurityMode) { + this.dynamicClientRegistrationSecurityMode = dynamicClientRegistrationSecurityMode; + return this; + } + + public Builder dynamicClientRegistrationSecurityMode( + TenantSettingsDynamicClientRegistrationSecurityMode dynamicClientRegistrationSecurityMode) { + this.dynamicClientRegistrationSecurityMode = Optional.ofNullable(dynamicClientRegistrationSecurityMode); + return this; + } + public GetTenantSettingsResponseContent build() { return new GetTenantSettingsResponseContent( changePassword, @@ -1476,8 +1535,10 @@ public GetTenantSettingsResponseContent build() { authorizationResponseIssParameterSupported, skipNonVerifiableCallbackUriConfirmationPrompt, resourceParameterProfile, + clientIdMetadataDocumentSupported, phoneConsolidatedExperience, enableAiGuide, + dynamicClientRegistrationSecurityMode, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java index efcaeaf8d..81697eb4f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java @@ -19,6 +19,8 @@ public interface IConnectionOptionsCommonOidc { Optional> getDomainAliases(); + Optional getDpopSigningAlg(); + OptionalNullable getFederatedConnectionsAccessTokens(); Optional getIconUrl(); 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 b0f517830..31c8b2ab0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/IdentityProviderEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/IdentityProviderEnum.java @@ -13,8 +13,6 @@ public final class IdentityProviderEnum { public static final IdentityProviderEnum DWOLLA = new IdentityProviderEnum(Value.DWOLLA, "dwolla"); - public static final IdentityProviderEnum FLICKR = new IdentityProviderEnum(Value.FLICKR, "flickr"); - public static final IdentityProviderEnum OKTA = new IdentityProviderEnum(Value.OKTA, "okta"); public static final IdentityProviderEnum PLANNINGCENTER = @@ -165,8 +163,6 @@ public T visit(Visitor visitor) { return visitor.visitAuth0Oidc(); case DWOLLA: return visitor.visitDwolla(); - case FLICKR: - return visitor.visitFlickr(); case OKTA: return visitor.visitOkta(); case PLANNINGCENTER: @@ -286,8 +282,6 @@ public static IdentityProviderEnum valueOf(String value) { return AUTH0OIDC; case "dwolla": return DWOLLA; - case "flickr": - return FLICKR; case "okta": return OKTA; case "planningcenter": @@ -438,8 +432,6 @@ public enum Value { FITBIT, - FLICKR, - GITHUB, GOOGLE_APPS, @@ -554,8 +546,6 @@ public interface Visitor { T visitFitbit(); - T visitFlickr(); - T visitGithub(); T visitGoogleApps(); 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 2622eca57..649aa7465 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListClientGrantsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListClientGrantsRequestParameters.java @@ -35,6 +35,8 @@ public final class ListClientGrantsRequestParameters { private final OptionalNullable subjectType; + private final OptionalNullable defaultFor; + private final Map additionalProperties; private ListClientGrantsRequestParameters( @@ -44,6 +46,7 @@ private ListClientGrantsRequestParameters( OptionalNullable clientId, OptionalNullable allowAnyOrganization, OptionalNullable subjectType, + OptionalNullable defaultFor, Map additionalProperties) { this.from = from; this.take = take; @@ -51,6 +54,7 @@ private ListClientGrantsRequestParameters( this.clientId = clientId; this.allowAnyOrganization = allowAnyOrganization; this.subjectType = subjectType; + this.defaultFor = defaultFor; this.additionalProperties = additionalProperties; } @@ -123,6 +127,18 @@ public OptionalNullable getSubjectType() { return subjectType; } + /** + * @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. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("default_for") + public OptionalNullable getDefaultFor() { + if (defaultFor == null) { + return OptionalNullable.absent(); + } + return defaultFor; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("from") private OptionalNullable _getFrom() { @@ -153,6 +169,12 @@ private OptionalNullable _getSubjectType() { return subjectType; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("default_for") + private OptionalNullable _getDefaultFor() { + return defaultFor; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -170,13 +192,20 @@ private boolean equalTo(ListClientGrantsRequestParameters other) { && audience.equals(other.audience) && clientId.equals(other.clientId) && allowAnyOrganization.equals(other.allowAnyOrganization) - && subjectType.equals(other.subjectType); + && subjectType.equals(other.subjectType) + && defaultFor.equals(other.defaultFor); } @java.lang.Override public int hashCode() { return Objects.hash( - this.from, this.take, this.audience, this.clientId, this.allowAnyOrganization, this.subjectType); + this.from, + this.take, + this.audience, + this.clientId, + this.allowAnyOrganization, + this.subjectType, + this.defaultFor); } @java.lang.Override @@ -202,6 +231,8 @@ public static final class Builder { private OptionalNullable subjectType = OptionalNullable.absent(); + private OptionalNullable defaultFor = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -214,6 +245,7 @@ public Builder from(ListClientGrantsRequestParameters other) { clientId(other.getClientId()); allowAnyOrganization(other.getAllowAnyOrganization()); subjectType(other.getSubjectType()); + defaultFor(other.getDefaultFor()); return this; } @@ -421,9 +453,50 @@ 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.

+ */ + @JsonSetter(value = "default_for", nulls = Nulls.SKIP) + public Builder defaultFor(@Nullable OptionalNullable defaultFor) { + this.defaultFor = defaultFor; + return this; + } + + public Builder defaultFor(ClientGrantDefaultForEnum defaultFor) { + this.defaultFor = OptionalNullable.of(defaultFor); + return this; + } + + public Builder defaultFor(Optional defaultFor) { + if (defaultFor.isPresent()) { + this.defaultFor = OptionalNullable.of(defaultFor.get()); + } else { + this.defaultFor = OptionalNullable.absent(); + } + return this; + } + + public Builder defaultFor(com.auth0.client.mgmt.core.Nullable defaultFor) { + if (defaultFor.isNull()) { + this.defaultFor = OptionalNullable.ofNull(); + } else if (defaultFor.isEmpty()) { + this.defaultFor = OptionalNullable.absent(); + } else { + this.defaultFor = OptionalNullable.of(defaultFor.get()); + } + return this; + } + public ListClientGrantsRequestParameters build() { return new ListClientGrantsRequestParameters( - from, take, audience, clientId, allowAnyOrganization, subjectType, additionalProperties); + from, + take, + audience, + clientId, + allowAnyOrganization, + subjectType, + defaultFor, + additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationAllConnectionsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationAllConnectionsOffsetPaginatedResponseContent.java new file mode 100644 index 000000000..c987542e2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationAllConnectionsOffsetPaginatedResponseContent.java @@ -0,0 +1,182 @@ +/** + * 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 = ListOrganizationAllConnectionsOffsetPaginatedResponseContent.Builder.class) +public final class ListOrganizationAllConnectionsOffsetPaginatedResponseContent { + private final Optional start; + + private final Optional limit; + + private final Optional total; + + private final Optional> connections; + + private final Map additionalProperties; + + private ListOrganizationAllConnectionsOffsetPaginatedResponseContent( + Optional start, + Optional limit, + Optional total, + Optional> connections, + Map additionalProperties) { + this.start = start; + this.limit = limit; + this.total = total; + this.connections = connections; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("start") + public Optional getStart() { + return start; + } + + @JsonProperty("limit") + public Optional getLimit() { + return limit; + } + + @JsonProperty("total") + public Optional getTotal() { + return total; + } + + @JsonProperty("connections") + public Optional> getConnections() { + return connections; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListOrganizationAllConnectionsOffsetPaginatedResponseContent + && equalTo((ListOrganizationAllConnectionsOffsetPaginatedResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListOrganizationAllConnectionsOffsetPaginatedResponseContent other) { + return start.equals(other.start) + && limit.equals(other.limit) + && total.equals(other.total) + && connections.equals(other.connections); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.start, this.limit, this.total, this.connections); + } + + @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 start = Optional.empty(); + + private Optional limit = Optional.empty(); + + private Optional total = Optional.empty(); + + private Optional> connections = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListOrganizationAllConnectionsOffsetPaginatedResponseContent other) { + start(other.getStart()); + limit(other.getLimit()); + total(other.getTotal()); + connections(other.getConnections()); + return this; + } + + @JsonSetter(value = "start", nulls = Nulls.SKIP) + public Builder start(Optional start) { + this.start = start; + return this; + } + + public Builder start(Double start) { + this.start = Optional.ofNullable(start); + return this; + } + + @JsonSetter(value = "limit", nulls = Nulls.SKIP) + public Builder limit(Optional limit) { + this.limit = limit; + return this; + } + + public Builder limit(Double limit) { + this.limit = Optional.ofNullable(limit); + return this; + } + + @JsonSetter(value = "total", nulls = Nulls.SKIP) + public Builder total(Optional total) { + this.total = total; + return this; + } + + public Builder total(Double total) { + this.total = Optional.ofNullable(total); + return this; + } + + @JsonSetter(value = "connections", nulls = Nulls.SKIP) + public Builder connections(Optional> connections) { + this.connections = connections; + return this; + } + + public Builder connections(List connections) { + this.connections = Optional.ofNullable(connections); + return this; + } + + public ListOrganizationAllConnectionsOffsetPaginatedResponseContent build() { + return new ListOrganizationAllConnectionsOffsetPaginatedResponseContent( + start, limit, total, connections, 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/ListSynchronizedGroupsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListSynchronizedGroupsResponseContent.java new file mode 100644 index 000000000..956a0956d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListSynchronizedGroupsResponseContent.java @@ -0,0 +1,153 @@ +/** + * 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.ArrayList; +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 = ListSynchronizedGroupsResponseContent.Builder.class) +public final class ListSynchronizedGroupsResponseContent { + private final List groups; + + private final Optional next; + + private final Map additionalProperties; + + private ListSynchronizedGroupsResponseContent( + List groups, Optional next, Map additionalProperties) { + this.groups = groups; + this.next = next; + this.additionalProperties = additionalProperties; + } + + /** + * @return Array of Google Workspace group ids configured for synchronization. + */ + @JsonProperty("groups") + public List getGroups() { + return groups; + } + + /** + * @return The cursor to be used as the "from" query parameter for the next page of results. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListSynchronizedGroupsResponseContent + && equalTo((ListSynchronizedGroupsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListSynchronizedGroupsResponseContent other) { + return groups.equals(other.groups) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.groups, this.next); + } + + @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 List groups = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListSynchronizedGroupsResponseContent other) { + groups(other.getGroups()); + next(other.getNext()); + return this; + } + + /** + *

Array of Google Workspace group ids configured for synchronization.

+ */ + @JsonSetter(value = "groups", nulls = Nulls.SKIP) + public Builder groups(List groups) { + this.groups.clear(); + if (groups != null) { + this.groups.addAll(groups); + } + return this; + } + + public Builder addGroups(SynchronizedGroupPayload groups) { + this.groups.add(groups); + return this; + } + + public Builder addAllGroups(List groups) { + if (groups != null) { + this.groups.addAll(groups); + } + return this; + } + + /** + *

The cursor to be used as the "from" query parameter for the next page of results.

+ */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public ListSynchronizedGroupsResponseContent build() { + return new ListSynchronizedGroupsResponseContent(groups, next, 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/NetworkAclMatch.java b/src/main/java/com/auth0/client/mgmt/types/NetworkAclMatch.java index 381be950c..5ba55c50c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/NetworkAclMatch.java +++ b/src/main/java/com/auth0/client/mgmt/types/NetworkAclMatch.java @@ -23,8 +23,6 @@ public final class NetworkAclMatch { private final Optional> asns; - private final Optional> auth0Managed; - private final Optional> geoCountryCodes; private final Optional> geoSubdivisionCodes; @@ -49,7 +47,6 @@ public final class NetworkAclMatch { private NetworkAclMatch( Optional> asns, - Optional> auth0Managed, Optional> geoCountryCodes, Optional> geoSubdivisionCodes, Optional> ipv4Cidrs, @@ -62,7 +59,6 @@ private NetworkAclMatch( Optional> connectingIpv6Cidrs, Map additionalProperties) { this.asns = asns; - this.auth0Managed = auth0Managed; this.geoCountryCodes = geoCountryCodes; this.geoSubdivisionCodes = geoSubdivisionCodes; this.ipv4Cidrs = ipv4Cidrs; @@ -81,11 +77,6 @@ public Optional> getAsns() { return asns; } - @JsonProperty("auth0_managed") - public Optional> getAuth0Managed() { - return auth0Managed; - } - @JsonProperty("geo_country_codes") public Optional> getGeoCountryCodes() { return geoCountryCodes; @@ -149,7 +140,6 @@ public Map getAdditionalProperties() { private boolean equalTo(NetworkAclMatch other) { return asns.equals(other.asns) - && auth0Managed.equals(other.auth0Managed) && geoCountryCodes.equals(other.geoCountryCodes) && geoSubdivisionCodes.equals(other.geoSubdivisionCodes) && ipv4Cidrs.equals(other.ipv4Cidrs) @@ -166,7 +156,6 @@ private boolean equalTo(NetworkAclMatch other) { public int hashCode() { return Objects.hash( this.asns, - this.auth0Managed, this.geoCountryCodes, this.geoSubdivisionCodes, this.ipv4Cidrs, @@ -192,8 +181,6 @@ public static Builder builder() { public static final class Builder { private Optional> asns = Optional.empty(); - private Optional> auth0Managed = Optional.empty(); - private Optional> geoCountryCodes = Optional.empty(); private Optional> geoSubdivisionCodes = Optional.empty(); @@ -221,7 +208,6 @@ private Builder() {} public Builder from(NetworkAclMatch other) { asns(other.getAsns()); - auth0Managed(other.getAuth0Managed()); geoCountryCodes(other.getGeoCountryCodes()); geoSubdivisionCodes(other.getGeoSubdivisionCodes()); ipv4Cidrs(other.getIpv4Cidrs()); @@ -246,17 +232,6 @@ public Builder asns(List asns) { return this; } - @JsonSetter(value = "auth0_managed", nulls = Nulls.SKIP) - public Builder auth0Managed(Optional> auth0Managed) { - this.auth0Managed = auth0Managed; - return this; - } - - public Builder auth0Managed(List auth0Managed) { - this.auth0Managed = Optional.ofNullable(auth0Managed); - return this; - } - @JsonSetter(value = "geo_country_codes", nulls = Nulls.SKIP) public Builder geoCountryCodes(Optional> geoCountryCodes) { this.geoCountryCodes = geoCountryCodes; @@ -370,7 +345,6 @@ public Builder connectingIpv6Cidrs(List connectingIpv6Cidrs) { public NetworkAclMatch build() { return new NetworkAclMatch( asns, - auth0Managed, geoCountryCodes, geoSubdivisionCodes, ipv4Cidrs, diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationAccessLevelEnum.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationAccessLevelEnum.java new file mode 100644 index 000000000..936ba5f11 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationAccessLevelEnum.java @@ -0,0 +1,105 @@ +/** + * 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 OrganizationAccessLevelEnum { + public static final OrganizationAccessLevelEnum READONLY = + new OrganizationAccessLevelEnum(Value.READONLY, "readonly"); + + public static final OrganizationAccessLevelEnum FULL = new OrganizationAccessLevelEnum(Value.FULL, "full"); + + public static final OrganizationAccessLevelEnum LIMITED = new OrganizationAccessLevelEnum(Value.LIMITED, "limited"); + + public static final OrganizationAccessLevelEnum NONE = new OrganizationAccessLevelEnum(Value.NONE, "none"); + + private final Value value; + + private final String string; + + OrganizationAccessLevelEnum(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 OrganizationAccessLevelEnum + && this.string.equals(((OrganizationAccessLevelEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case READONLY: + return visitor.visitReadonly(); + case FULL: + return visitor.visitFull(); + case LIMITED: + return visitor.visitLimited(); + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static OrganizationAccessLevelEnum valueOf(String value) { + switch (value) { + case "readonly": + return READONLY; + case "full": + return FULL; + case "limited": + return LIMITED; + case "none": + return NONE; + default: + return new OrganizationAccessLevelEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + NONE, + + READONLY, + + LIMITED, + + FULL, + + UNKNOWN + } + + public interface Visitor { + T visitNone(); + + T visitReadonly(); + + T visitLimited(); + + T visitFull(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationAccessLevelEnumWithNull.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationAccessLevelEnumWithNull.java new file mode 100644 index 000000000..c0c550ee6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationAccessLevelEnumWithNull.java @@ -0,0 +1,108 @@ +/** + * 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 OrganizationAccessLevelEnumWithNull { + public static final OrganizationAccessLevelEnumWithNull READONLY = + new OrganizationAccessLevelEnumWithNull(Value.READONLY, "readonly"); + + public static final OrganizationAccessLevelEnumWithNull FULL = + new OrganizationAccessLevelEnumWithNull(Value.FULL, "full"); + + public static final OrganizationAccessLevelEnumWithNull LIMITED = + new OrganizationAccessLevelEnumWithNull(Value.LIMITED, "limited"); + + public static final OrganizationAccessLevelEnumWithNull NONE = + new OrganizationAccessLevelEnumWithNull(Value.NONE, "none"); + + private final Value value; + + private final String string; + + OrganizationAccessLevelEnumWithNull(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 OrganizationAccessLevelEnumWithNull + && this.string.equals(((OrganizationAccessLevelEnumWithNull) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case READONLY: + return visitor.visitReadonly(); + case FULL: + return visitor.visitFull(); + case LIMITED: + return visitor.visitLimited(); + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static OrganizationAccessLevelEnumWithNull valueOf(String value) { + switch (value) { + case "readonly": + return READONLY; + case "full": + return FULL; + case "limited": + return LIMITED; + case "none": + return NONE; + default: + return new OrganizationAccessLevelEnumWithNull(Value.UNKNOWN, value); + } + } + + public enum Value { + NONE, + + READONLY, + + LIMITED, + + FULL, + + UNKNOWN + } + + public interface Visitor { + T visitNone(); + + T visitReadonly(); + + T visitLimited(); + + T visitFull(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationAllConnectionPost.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationAllConnectionPost.java new file mode 100644 index 000000000..14de55cac --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationAllConnectionPost.java @@ -0,0 +1,425 @@ +/** + * 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 = OrganizationAllConnectionPost.Builder.class) +public final class OrganizationAllConnectionPost { + private final Optional organizationConnectionName; + + private final Optional assignMembershipOnLogin; + + private final Optional showAsButton; + + private final Optional isSignupEnabled; + + private final Optional organizationAccessLevel; + + private final Optional isEnabled; + + private final String connectionId; + + private final Optional connection; + + private final Map additionalProperties; + + private OrganizationAllConnectionPost( + Optional organizationConnectionName, + Optional assignMembershipOnLogin, + Optional showAsButton, + Optional isSignupEnabled, + Optional organizationAccessLevel, + Optional isEnabled, + String connectionId, + Optional connection, + Map additionalProperties) { + this.organizationConnectionName = organizationConnectionName; + this.assignMembershipOnLogin = assignMembershipOnLogin; + this.showAsButton = showAsButton; + this.isSignupEnabled = isSignupEnabled; + this.organizationAccessLevel = organizationAccessLevel; + this.isEnabled = isEnabled; + this.connectionId = connectionId; + this.connection = connection; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection in the scope of this organization. + */ + @JsonProperty("organization_connection_name") + public Optional getOrganizationConnectionName() { + return organizationConnectionName; + } + + /** + * @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. Default: true. + */ + @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. Default: false. + */ + @JsonProperty("is_signup_enabled") + public Optional getIsSignupEnabled() { + return isSignupEnabled; + } + + @JsonProperty("organization_access_level") + public Optional getOrganizationAccessLevel() { + return organizationAccessLevel; + } + + /** + * @return Whether the connection is enabled for the organization. + */ + @JsonProperty("is_enabled") + public Optional getIsEnabled() { + return isEnabled; + } + + /** + * @return Connection identifier. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @JsonProperty("connection") + public Optional getConnection() { + return connection; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationAllConnectionPost && equalTo((OrganizationAllConnectionPost) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(OrganizationAllConnectionPost other) { + return organizationConnectionName.equals(other.organizationConnectionName) + && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) + && showAsButton.equals(other.showAsButton) + && isSignupEnabled.equals(other.isSignupEnabled) + && organizationAccessLevel.equals(other.organizationAccessLevel) + && isEnabled.equals(other.isEnabled) + && connectionId.equals(other.connectionId) + && connection.equals(other.connection); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.organizationConnectionName, + this.assignMembershipOnLogin, + this.showAsButton, + this.isSignupEnabled, + this.organizationAccessLevel, + this.isEnabled, + this.connectionId, + this.connection); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionIdStage builder() { + return new Builder(); + } + + public interface ConnectionIdStage { + /** + *

Connection identifier.

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

Name of the connection in the scope of this organization.

+ */ + _FinalStage organizationConnectionName(Optional organizationConnectionName); + + _FinalStage organizationConnectionName(String organizationConnectionName); + + /** + *

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. Default: true.

+ */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + + /** + *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

+ */ + _FinalStage isSignupEnabled(Optional isSignupEnabled); + + _FinalStage isSignupEnabled(Boolean isSignupEnabled); + + _FinalStage organizationAccessLevel(Optional organizationAccessLevel); + + _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel); + + /** + *

Whether the connection is enabled for the organization.

+ */ + _FinalStage isEnabled(Optional isEnabled); + + _FinalStage isEnabled(Boolean isEnabled); + + _FinalStage connection(Optional connection); + + _FinalStage connection(OrganizationConnectionInformation connection); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConnectionIdStage, _FinalStage { + private String connectionId; + + private Optional connection = Optional.empty(); + + private Optional isEnabled = Optional.empty(); + + private Optional organizationAccessLevel = Optional.empty(); + + private Optional isSignupEnabled = Optional.empty(); + + private Optional showAsButton = Optional.empty(); + + private Optional assignMembershipOnLogin = Optional.empty(); + + private Optional organizationConnectionName = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(OrganizationAllConnectionPost other) { + organizationConnectionName(other.getOrganizationConnectionName()); + assignMembershipOnLogin(other.getAssignMembershipOnLogin()); + showAsButton(other.getShowAsButton()); + isSignupEnabled(other.getIsSignupEnabled()); + organizationAccessLevel(other.getOrganizationAccessLevel()); + isEnabled(other.getIsEnabled()); + connectionId(other.getConnectionId()); + connection(other.getConnection()); + return this; + } + + /** + *

Connection identifier.

+ *

Connection identifier.

+ * @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 _FinalStage connection(OrganizationConnectionInformation 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; + } + + /** + *

Whether the connection is enabled for the organization.

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

Whether the connection is enabled for the organization.

+ */ + @java.lang.Override + @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) + public _FinalStage isEnabled(Optional isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + @java.lang.Override + public _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel) { + this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationAccessLevel(Optional organizationAccessLevel) { + this.organizationAccessLevel = organizationAccessLevel; + return this; + } + + /** + *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

+ * @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. Default: false.

+ */ + @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. Default: true.

+ * @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. Default: true.

+ */ + @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; + } + + /** + *

Name of the connection in the scope of this organization.

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

Name of the connection in the scope of this organization.

+ */ + @java.lang.Override + @JsonSetter(value = "organization_connection_name", nulls = Nulls.SKIP) + public _FinalStage organizationConnectionName(Optional organizationConnectionName) { + this.organizationConnectionName = organizationConnectionName; + return this; + } + + @java.lang.Override + public OrganizationAllConnectionPost build() { + return new OrganizationAllConnectionPost( + organizationConnectionName, + assignMembershipOnLogin, + showAsButton, + isSignupEnabled, + organizationAccessLevel, + isEnabled, + connectionId, + 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/RotateClientSecretResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java index 045993b10..83bb3b674 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java @@ -126,6 +126,12 @@ public final class RotateClientSecretResponseContent { private final Optional expressConfiguration; + private final Optional myOrganizationConfiguration; + + private final Optional thirdPartySecurityMode; + + private final Optional redirectionPolicy; + private final Optional resourceServerIdentifier; private final Optional> asyncApprovalNotificationChannels; @@ -192,6 +198,9 @@ private RotateClientSecretResponseContent( OptionalNullable parRequestExpiry, Optional tokenQuota, Optional expressConfiguration, + Optional myOrganizationConfiguration, + Optional thirdPartySecurityMode, + Optional redirectionPolicy, Optional resourceServerIdentifier, Optional> asyncApprovalNotificationChannels, Optional externalMetadataType, @@ -250,6 +259,9 @@ private RotateClientSecretResponseContent( this.parRequestExpiry = parRequestExpiry; this.tokenQuota = tokenQuota; this.expressConfiguration = expressConfiguration; + this.myOrganizationConfiguration = myOrganizationConfiguration; + this.thirdPartySecurityMode = thirdPartySecurityMode; + this.redirectionPolicy = redirectionPolicy; this.resourceServerIdentifier = resourceServerIdentifier; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; this.externalMetadataType = externalMetadataType; @@ -641,6 +653,21 @@ public Optional getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("my_organization_configuration") + public Optional getMyOrganizationConfiguration() { + return myOrganizationConfiguration; + } + + @JsonProperty("third_party_security_mode") + public Optional getThirdPartySecurityMode() { + return thirdPartySecurityMode; + } + + @JsonProperty("redirection_policy") + public Optional getRedirectionPolicy() { + return redirectionPolicy; + } + /** * @return The identifier of the resource server that this client is linked to. */ @@ -792,6 +819,9 @@ private boolean equalTo(RotateClientSecretResponseContent other) { && parRequestExpiry.equals(other.parRequestExpiry) && tokenQuota.equals(other.tokenQuota) && expressConfiguration.equals(other.expressConfiguration) + && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && redirectionPolicy.equals(other.redirectionPolicy) && resourceServerIdentifier.equals(other.resourceServerIdentifier) && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) && externalMetadataType.equals(other.externalMetadataType) @@ -854,6 +884,9 @@ public int hashCode() { this.parRequestExpiry, this.tokenQuota, this.expressConfiguration, + this.myOrganizationConfiguration, + this.thirdPartySecurityMode, + this.redirectionPolicy, this.resourceServerIdentifier, this.asyncApprovalNotificationChannels, this.externalMetadataType, @@ -975,6 +1008,12 @@ public static final class Builder { private Optional expressConfiguration = Optional.empty(); + private Optional myOrganizationConfiguration = Optional.empty(); + + private Optional thirdPartySecurityMode = Optional.empty(); + + private Optional redirectionPolicy = Optional.empty(); + private Optional resourceServerIdentifier = Optional.empty(); private Optional> asyncApprovalNotificationChannels = @@ -1045,6 +1084,9 @@ public Builder from(RotateClientSecretResponseContent other) { parRequestExpiry(other.getParRequestExpiry()); tokenQuota(other.getTokenQuota()); expressConfiguration(other.getExpressConfiguration()); + myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + thirdPartySecurityMode(other.getThirdPartySecurityMode()); + redirectionPolicy(other.getRedirectionPolicy()); resourceServerIdentifier(other.getResourceServerIdentifier()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); externalMetadataType(other.getExternalMetadataType()); @@ -1880,6 +1922,41 @@ public Builder expressConfiguration(ExpressConfiguration expressConfiguration) { return this; } + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) + public Builder myOrganizationConfiguration( + Optional myOrganizationConfiguration) { + this.myOrganizationConfiguration = myOrganizationConfiguration; + return this; + } + + public Builder myOrganizationConfiguration( + ClientMyOrganizationResponseConfiguration myOrganizationConfiguration) { + this.myOrganizationConfiguration = Optional.ofNullable(myOrganizationConfiguration); + return this; + } + + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) + public Builder thirdPartySecurityMode(Optional thirdPartySecurityMode) { + this.thirdPartySecurityMode = thirdPartySecurityMode; + return this; + } + + public Builder thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPartySecurityMode) { + this.thirdPartySecurityMode = Optional.ofNullable(thirdPartySecurityMode); + return this; + } + + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) + public Builder redirectionPolicy(Optional redirectionPolicy) { + this.redirectionPolicy = redirectionPolicy; + return this; + } + + public Builder redirectionPolicy(ClientRedirectionPolicyEnum redirectionPolicy) { + this.redirectionPolicy = Optional.ofNullable(redirectionPolicy); + return this; + } + /** *

The identifier of the resource server that this client is linked to.

*/ @@ -2011,6 +2088,9 @@ public RotateClientSecretResponseContent build() { parRequestExpiry, tokenQuota, expressConfiguration, + myOrganizationConfiguration, + thirdPartySecurityMode, + redirectionPolicy, resourceServerIdentifier, asyncApprovalNotificationChannels, externalMetadataType, 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 df9496f43..6ef8089c7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainAliasesConfig.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainAliasesConfig.java @@ -10,10 +10,13 @@ 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) @@ -21,12 +24,16 @@ public final class SelfServiceProfileSsoTicketDomainAliasesConfig { private final SelfServiceProfileSsoTicketDomainVerificationEnum domainVerification; + private final Optional> pendingDomains; + private final Map additionalProperties; private SelfServiceProfileSsoTicketDomainAliasesConfig( SelfServiceProfileSsoTicketDomainVerificationEnum domainVerification, + Optional> pendingDomains, Map additionalProperties) { this.domainVerification = domainVerification; + this.pendingDomains = pendingDomains; this.additionalProperties = additionalProperties; } @@ -35,6 +42,14 @@ public SelfServiceProfileSsoTicketDomainVerificationEnum getDomainVerification() return domainVerification; } + /** + * @return List of domains that will be submitted for verification during the self-service SSO flow. + */ + @JsonProperty("pending_domains") + public Optional> getPendingDomains() { + return pendingDomains; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -48,12 +63,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(SelfServiceProfileSsoTicketDomainAliasesConfig other) { - return domainVerification.equals(other.domainVerification); + return domainVerification.equals(other.domainVerification) && pendingDomains.equals(other.pendingDomains); } @java.lang.Override public int hashCode() { - return Objects.hash(this.domainVerification); + return Objects.hash(this.domainVerification, this.pendingDomains); } @java.lang.Override @@ -77,12 +92,21 @@ public interface _FinalStage { _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); + + /** + *

List of domains that will be submitted for verification during the self-service SSO flow.

+ */ + _FinalStage pendingDomains(Optional> pendingDomains); + + _FinalStage pendingDomains(List pendingDomains); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements DomainVerificationStage, _FinalStage { private SelfServiceProfileSsoTicketDomainVerificationEnum domainVerification; + private Optional> pendingDomains = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -91,6 +115,7 @@ private Builder() {} @java.lang.Override public Builder from(SelfServiceProfileSsoTicketDomainAliasesConfig other) { domainVerification(other.getDomainVerification()); + pendingDomains(other.getPendingDomains()); return this; } @@ -102,9 +127,30 @@ public _FinalStage domainVerification( return this; } + /** + *

List of domains that will be submitted for verification during the self-service SSO flow.

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

List of domains that will be submitted for verification during the self-service SSO flow.

+ */ + @java.lang.Override + @JsonSetter(value = "pending_domains", nulls = Nulls.SKIP) + public _FinalStage pendingDomains(Optional> pendingDomains) { + this.pendingDomains = pendingDomains; + return this; + } + @java.lang.Override public SelfServiceProfileSsoTicketDomainAliasesConfig build() { - return new SelfServiceProfileSsoTicketDomainAliasesConfig(domainVerification, additionalProperties); + return new SelfServiceProfileSsoTicketDomainAliasesConfig( + domainVerification, pendingDomains, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketEnabledFeatures.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketEnabledFeatures.java new file mode 100644 index 000000000..2427d636d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketEnabledFeatures.java @@ -0,0 +1,175 @@ +/** + * 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 = SelfServiceProfileSsoTicketEnabledFeatures.Builder.class) +public final class SelfServiceProfileSsoTicketEnabledFeatures { + private final Optional sso; + + private final Optional domainVerification; + + private final Optional provisioning; + + private final Map additionalProperties; + + private SelfServiceProfileSsoTicketEnabledFeatures( + Optional sso, + Optional domainVerification, + Optional provisioning, + Map additionalProperties) { + this.sso = sso; + this.domainVerification = domainVerification; + this.provisioning = provisioning; + this.additionalProperties = additionalProperties; + } + + /** + * @return Whether SSO configuration is enabled in this ticket. + */ + @JsonProperty("sso") + public Optional getSso() { + return sso; + } + + /** + * @return Whether domain verification is enabled in this ticket. + */ + @JsonProperty("domain_verification") + public Optional getDomainVerification() { + return domainVerification; + } + + /** + * @return Whether provisioning configuration is enabled in this ticket. + */ + @JsonProperty("provisioning") + public Optional getProvisioning() { + return provisioning; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SelfServiceProfileSsoTicketEnabledFeatures + && equalTo((SelfServiceProfileSsoTicketEnabledFeatures) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SelfServiceProfileSsoTicketEnabledFeatures other) { + return sso.equals(other.sso) + && domainVerification.equals(other.domainVerification) + && provisioning.equals(other.provisioning); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.sso, this.domainVerification, this.provisioning); + } + + @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 sso = Optional.empty(); + + private Optional domainVerification = Optional.empty(); + + private Optional provisioning = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SelfServiceProfileSsoTicketEnabledFeatures other) { + sso(other.getSso()); + domainVerification(other.getDomainVerification()); + provisioning(other.getProvisioning()); + return this; + } + + /** + *

Whether SSO configuration is enabled in this ticket.

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

Whether domain verification is enabled in this ticket.

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

Whether provisioning configuration is enabled in this ticket.

+ */ + @JsonSetter(value = "provisioning", nulls = Nulls.SKIP) + public Builder provisioning(Optional provisioning) { + this.provisioning = provisioning; + return this; + } + + public Builder provisioning(Boolean provisioning) { + this.provisioning = Optional.ofNullable(provisioning); + return this; + } + + public SelfServiceProfileSsoTicketEnabledFeatures build() { + return new SelfServiceProfileSsoTicketEnabledFeatures( + sso, domainVerification, provisioning, 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/SynchronizeGroupsEaEnum.java b/src/main/java/com/auth0/client/mgmt/types/SynchronizeGroupsEnum.java similarity index 65% rename from src/main/java/com/auth0/client/mgmt/types/SynchronizeGroupsEaEnum.java rename to src/main/java/com/auth0/client/mgmt/types/SynchronizeGroupsEnum.java index 8e27f3a8c..df35dff6d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SynchronizeGroupsEaEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/SynchronizeGroupsEnum.java @@ -6,16 +6,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class SynchronizeGroupsEaEnum { - public static final SynchronizeGroupsEaEnum ALL = new SynchronizeGroupsEaEnum(Value.ALL, "all"); +public final class SynchronizeGroupsEnum { + public static final SynchronizeGroupsEnum ALL = new SynchronizeGroupsEnum(Value.ALL, "all"); - public static final SynchronizeGroupsEaEnum OFF = new SynchronizeGroupsEaEnum(Value.OFF, "off"); + public static final SynchronizeGroupsEnum OFF = new SynchronizeGroupsEnum(Value.OFF, "off"); + + public static final SynchronizeGroupsEnum SELECTED = new SynchronizeGroupsEnum(Value.SELECTED, "selected"); private final Value value; private final String string; - SynchronizeGroupsEaEnum(Value value, String string) { + SynchronizeGroupsEnum(Value value, String string) { this.value = value; this.string = string; } @@ -33,8 +35,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof SynchronizeGroupsEaEnum - && this.string.equals(((SynchronizeGroupsEaEnum) other).string)); + || (other instanceof SynchronizeGroupsEnum + && this.string.equals(((SynchronizeGroupsEnum) other).string)); } @java.lang.Override @@ -48,6 +50,8 @@ public T visit(Visitor visitor) { return visitor.visitAll(); case OFF: return visitor.visitOff(); + case SELECTED: + return visitor.visitSelected(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -55,14 +59,16 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SynchronizeGroupsEaEnum valueOf(String value) { + public static SynchronizeGroupsEnum valueOf(String value) { switch (value) { case "all": return ALL; case "off": return OFF; + case "selected": + return SELECTED; default: - return new SynchronizeGroupsEaEnum(Value.UNKNOWN, value); + return new SynchronizeGroupsEnum(Value.UNKNOWN, value); } } @@ -71,6 +77,8 @@ public enum Value { OFF, + SELECTED, + UNKNOWN } @@ -79,6 +87,8 @@ public interface Visitor { T visitOff(); + T visitSelected(); + T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/SynchronizedGroupPayload.java b/src/main/java/com/auth0/client/mgmt/types/SynchronizedGroupPayload.java new file mode 100644 index 000000000..2dd23798e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SynchronizedGroupPayload.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 = SynchronizedGroupPayload.Builder.class) +public final class SynchronizedGroupPayload { + private final String id; + + private final Map additionalProperties; + + private SynchronizedGroupPayload(String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return Google Workspace Directory group ID. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SynchronizedGroupPayload && equalTo((SynchronizedGroupPayload) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SynchronizedGroupPayload 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 { + /** + *

Google Workspace Directory group ID.

+ */ + _FinalStage id(@NotNull String id); + + Builder from(SynchronizedGroupPayload other); + } + + public interface _FinalStage { + SynchronizedGroupPayload 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(SynchronizedGroupPayload other) { + id(other.getId()); + return this; + } + + /** + *

Google Workspace Directory group ID.

+ *

Google Workspace Directory group ID.

+ * @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 SynchronizedGroupPayload build() { + return new SynchronizedGroupPayload(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/TenantSettingsDynamicClientRegistrationSecurityMode.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsDynamicClientRegistrationSecurityMode.java new file mode 100644 index 000000000..0897fb2f2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsDynamicClientRegistrationSecurityMode.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 TenantSettingsDynamicClientRegistrationSecurityMode { + public static final TenantSettingsDynamicClientRegistrationSecurityMode STRICT = + new TenantSettingsDynamicClientRegistrationSecurityMode(Value.STRICT, "strict"); + + public static final TenantSettingsDynamicClientRegistrationSecurityMode PERMISSIVE = + new TenantSettingsDynamicClientRegistrationSecurityMode(Value.PERMISSIVE, "permissive"); + + private final Value value; + + private final String string; + + TenantSettingsDynamicClientRegistrationSecurityMode(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 TenantSettingsDynamicClientRegistrationSecurityMode + && this.string.equals(((TenantSettingsDynamicClientRegistrationSecurityMode) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case STRICT: + return visitor.visitStrict(); + case PERMISSIVE: + return visitor.visitPermissive(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static TenantSettingsDynamicClientRegistrationSecurityMode valueOf(String value) { + switch (value) { + case "strict": + return STRICT; + case "permissive": + return PERMISSIVE; + default: + return new TenantSettingsDynamicClientRegistrationSecurityMode(Value.UNKNOWN, value); + } + } + + public enum Value { + STRICT, + + PERMISSIVE, + + UNKNOWN + } + + public interface Visitor { + T visitStrict(); + + T visitPermissive(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantResponseContent.java index cc0feaf11..29de13196 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantResponseContent.java @@ -33,6 +33,8 @@ public final class UpdateClientGrantResponseContent { private final Optional allowAnyOrganization; + private final Optional defaultFor; + private final Optional isSystem; private final Optional subjectType; @@ -50,6 +52,7 @@ private UpdateClientGrantResponseContent( Optional> scope, Optional organizationUsage, Optional allowAnyOrganization, + Optional defaultFor, Optional isSystem, Optional subjectType, Optional> authorizationDetailsTypes, @@ -61,6 +64,7 @@ private UpdateClientGrantResponseContent( this.scope = scope; this.organizationUsage = organizationUsage; this.allowAnyOrganization = allowAnyOrganization; + this.defaultFor = defaultFor; this.isSystem = isSystem; this.subjectType = subjectType; this.authorizationDetailsTypes = authorizationDetailsTypes; @@ -113,6 +117,11 @@ public Optional getAllowAnyOrganization() { return allowAnyOrganization; } + @JsonProperty("default_for") + public Optional getDefaultFor() { + return defaultFor; + } + /** * @return If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly. */ @@ -160,6 +169,7 @@ private boolean equalTo(UpdateClientGrantResponseContent other) { && scope.equals(other.scope) && organizationUsage.equals(other.organizationUsage) && allowAnyOrganization.equals(other.allowAnyOrganization) + && defaultFor.equals(other.defaultFor) && isSystem.equals(other.isSystem) && subjectType.equals(other.subjectType) && authorizationDetailsTypes.equals(other.authorizationDetailsTypes) @@ -175,6 +185,7 @@ public int hashCode() { this.scope, this.organizationUsage, this.allowAnyOrganization, + this.defaultFor, this.isSystem, this.subjectType, this.authorizationDetailsTypes, @@ -204,6 +215,8 @@ public static final class Builder { private Optional allowAnyOrganization = Optional.empty(); + private Optional defaultFor = Optional.empty(); + private Optional isSystem = Optional.empty(); private Optional subjectType = Optional.empty(); @@ -224,6 +237,7 @@ public Builder from(UpdateClientGrantResponseContent other) { scope(other.getScope()); organizationUsage(other.getOrganizationUsage()); allowAnyOrganization(other.getAllowAnyOrganization()); + defaultFor(other.getDefaultFor()); isSystem(other.getIsSystem()); subjectType(other.getSubjectType()); authorizationDetailsTypes(other.getAuthorizationDetailsTypes()); @@ -312,6 +326,17 @@ public Builder allowAnyOrganization(Boolean allowAnyOrganization) { return this; } + @JsonSetter(value = "default_for", nulls = Nulls.SKIP) + public Builder defaultFor(Optional defaultFor) { + this.defaultFor = defaultFor; + return this; + } + + public Builder defaultFor(ClientGrantDefaultForEnum defaultFor) { + this.defaultFor = Optional.ofNullable(defaultFor); + return this; + } + /** *

If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.

*/ @@ -373,6 +398,7 @@ public UpdateClientGrantResponseContent build() { scope, organizationUsage, allowAnyOrganization, + defaultFor, isSystem, subjectType, authorizationDetailsTypes, diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java index 2a177d1c5..316025ace 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java @@ -122,8 +122,14 @@ public final class UpdateClientRequestContent { private final OptionalNullable expressConfiguration; + private final OptionalNullable myOrganizationConfiguration; + private final OptionalNullable> asyncApprovalNotificationChannels; + private final Optional thirdPartySecurityMode; + + private final Optional redirectionPolicy; + private final Map additionalProperties; private UpdateClientRequestContent( @@ -176,7 +182,10 @@ private UpdateClientRequestContent( OptionalNullable tokenExchange, OptionalNullable parRequestExpiry, OptionalNullable expressConfiguration, + OptionalNullable myOrganizationConfiguration, OptionalNullable> asyncApprovalNotificationChannels, + Optional thirdPartySecurityMode, + Optional redirectionPolicy, Map additionalProperties) { this.name = name; this.description = description; @@ -227,7 +236,10 @@ private UpdateClientRequestContent( this.tokenExchange = tokenExchange; this.parRequestExpiry = parRequestExpiry; this.expressConfiguration = expressConfiguration; + this.myOrganizationConfiguration = myOrganizationConfiguration; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; + this.thirdPartySecurityMode = thirdPartySecurityMode; + this.redirectionPolicy = redirectionPolicy; this.additionalProperties = additionalProperties; } @@ -635,6 +647,15 @@ public OptionalNullable getExpressConfiguration() { return expressConfiguration; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("my_organization_configuration") + public OptionalNullable getMyOrganizationConfiguration() { + if (myOrganizationConfiguration == null) { + return OptionalNullable.absent(); + } + return myOrganizationConfiguration; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("async_approval_notification_channels") public OptionalNullable> getAsyncApprovalNotificationChannels() { @@ -644,6 +665,16 @@ public OptionalNullable> getAsyncAp return asyncApprovalNotificationChannels; } + @JsonProperty("third_party_security_mode") + public Optional getThirdPartySecurityMode() { + return thirdPartySecurityMode; + } + + @JsonProperty("redirection_policy") + public Optional getRedirectionPolicy() { + return redirectionPolicy; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("session_transfer") private OptionalNullable _getSessionTransfer() { @@ -740,6 +771,12 @@ private OptionalNullable _getExpressConfiguration() return expressConfiguration; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("my_organization_configuration") + private OptionalNullable _getMyOrganizationConfiguration() { + return myOrganizationConfiguration; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("async_approval_notification_channels") private OptionalNullable> _getAsyncApprovalNotificationChannels() { @@ -808,7 +845,10 @@ private boolean equalTo(UpdateClientRequestContent other) { && tokenExchange.equals(other.tokenExchange) && parRequestExpiry.equals(other.parRequestExpiry) && expressConfiguration.equals(other.expressConfiguration) - && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels); + && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) + && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && redirectionPolicy.equals(other.redirectionPolicy); } @java.lang.Override @@ -863,7 +903,10 @@ public int hashCode() { this.tokenExchange, this.parRequestExpiry, this.expressConfiguration, - this.asyncApprovalNotificationChannels); + this.myOrganizationConfiguration, + this.asyncApprovalNotificationChannels, + this.thirdPartySecurityMode, + this.redirectionPolicy); } @java.lang.Override @@ -978,9 +1021,16 @@ public static final class Builder { private OptionalNullable expressConfiguration = OptionalNullable.absent(); + private OptionalNullable myOrganizationConfiguration = + OptionalNullable.absent(); + private OptionalNullable> asyncApprovalNotificationChannels = OptionalNullable.absent(); + private Optional thirdPartySecurityMode = Optional.empty(); + + private Optional redirectionPolicy = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -1036,7 +1086,10 @@ public Builder from(UpdateClientRequestContent other) { tokenExchange(other.getTokenExchange()); parRequestExpiry(other.getParRequestExpiry()); expressConfiguration(other.getExpressConfiguration()); + myOrganizationConfiguration(other.getMyOrganizationConfiguration()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); + thirdPartySecurityMode(other.getThirdPartySecurityMode()); + redirectionPolicy(other.getRedirectionPolicy()); return this; } @@ -2023,6 +2076,41 @@ public Builder expressConfiguration( return this; } + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) + public Builder myOrganizationConfiguration( + @Nullable OptionalNullable myOrganizationConfiguration) { + this.myOrganizationConfiguration = myOrganizationConfiguration; + return this; + } + + public Builder myOrganizationConfiguration(ClientMyOrganizationPatchConfiguration myOrganizationConfiguration) { + this.myOrganizationConfiguration = OptionalNullable.of(myOrganizationConfiguration); + return this; + } + + public Builder myOrganizationConfiguration( + Optional myOrganizationConfiguration) { + if (myOrganizationConfiguration.isPresent()) { + this.myOrganizationConfiguration = OptionalNullable.of(myOrganizationConfiguration.get()); + } else { + this.myOrganizationConfiguration = OptionalNullable.absent(); + } + return this; + } + + public Builder myOrganizationConfiguration( + com.auth0.client.mgmt.core.Nullable + myOrganizationConfiguration) { + if (myOrganizationConfiguration.isNull()) { + this.myOrganizationConfiguration = OptionalNullable.ofNull(); + } else if (myOrganizationConfiguration.isEmpty()) { + this.myOrganizationConfiguration = OptionalNullable.absent(); + } else { + this.myOrganizationConfiguration = OptionalNullable.of(myOrganizationConfiguration.get()); + } + return this; + } + @JsonSetter(value = "async_approval_notification_channels", nulls = Nulls.SKIP) public Builder asyncApprovalNotificationChannels( @Nullable @@ -2061,6 +2149,28 @@ public Builder asyncApprovalNotificationChannels( return this; } + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) + public Builder thirdPartySecurityMode(Optional thirdPartySecurityMode) { + this.thirdPartySecurityMode = thirdPartySecurityMode; + return this; + } + + public Builder thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPartySecurityMode) { + this.thirdPartySecurityMode = Optional.ofNullable(thirdPartySecurityMode); + return this; + } + + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) + public Builder redirectionPolicy(Optional redirectionPolicy) { + this.redirectionPolicy = redirectionPolicy; + return this; + } + + public Builder redirectionPolicy(ClientRedirectionPolicyEnum redirectionPolicy) { + this.redirectionPolicy = Optional.ofNullable(redirectionPolicy); + return this; + } + public UpdateClientRequestContent build() { return new UpdateClientRequestContent( name, @@ -2112,7 +2222,10 @@ public UpdateClientRequestContent build() { tokenExchange, parRequestExpiry, expressConfiguration, + myOrganizationConfiguration, asyncApprovalNotificationChannels, + thirdPartySecurityMode, + redirectionPolicy, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java index 6dfc755dc..2d25bf1f9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java @@ -126,6 +126,12 @@ public final class UpdateClientResponseContent { private final Optional expressConfiguration; + private final Optional myOrganizationConfiguration; + + private final Optional thirdPartySecurityMode; + + private final Optional redirectionPolicy; + private final Optional resourceServerIdentifier; private final Optional> asyncApprovalNotificationChannels; @@ -192,6 +198,9 @@ private UpdateClientResponseContent( OptionalNullable parRequestExpiry, Optional tokenQuota, Optional expressConfiguration, + Optional myOrganizationConfiguration, + Optional thirdPartySecurityMode, + Optional redirectionPolicy, Optional resourceServerIdentifier, Optional> asyncApprovalNotificationChannels, Optional externalMetadataType, @@ -250,6 +259,9 @@ private UpdateClientResponseContent( this.parRequestExpiry = parRequestExpiry; this.tokenQuota = tokenQuota; this.expressConfiguration = expressConfiguration; + this.myOrganizationConfiguration = myOrganizationConfiguration; + this.thirdPartySecurityMode = thirdPartySecurityMode; + this.redirectionPolicy = redirectionPolicy; this.resourceServerIdentifier = resourceServerIdentifier; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; this.externalMetadataType = externalMetadataType; @@ -641,6 +653,21 @@ public Optional getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("my_organization_configuration") + public Optional getMyOrganizationConfiguration() { + return myOrganizationConfiguration; + } + + @JsonProperty("third_party_security_mode") + public Optional getThirdPartySecurityMode() { + return thirdPartySecurityMode; + } + + @JsonProperty("redirection_policy") + public Optional getRedirectionPolicy() { + return redirectionPolicy; + } + /** * @return The identifier of the resource server that this client is linked to. */ @@ -792,6 +819,9 @@ private boolean equalTo(UpdateClientResponseContent other) { && parRequestExpiry.equals(other.parRequestExpiry) && tokenQuota.equals(other.tokenQuota) && expressConfiguration.equals(other.expressConfiguration) + && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && redirectionPolicy.equals(other.redirectionPolicy) && resourceServerIdentifier.equals(other.resourceServerIdentifier) && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) && externalMetadataType.equals(other.externalMetadataType) @@ -854,6 +884,9 @@ public int hashCode() { this.parRequestExpiry, this.tokenQuota, this.expressConfiguration, + this.myOrganizationConfiguration, + this.thirdPartySecurityMode, + this.redirectionPolicy, this.resourceServerIdentifier, this.asyncApprovalNotificationChannels, this.externalMetadataType, @@ -975,6 +1008,12 @@ public static final class Builder { private Optional expressConfiguration = Optional.empty(); + private Optional myOrganizationConfiguration = Optional.empty(); + + private Optional thirdPartySecurityMode = Optional.empty(); + + private Optional redirectionPolicy = Optional.empty(); + private Optional resourceServerIdentifier = Optional.empty(); private Optional> asyncApprovalNotificationChannels = @@ -1045,6 +1084,9 @@ public Builder from(UpdateClientResponseContent other) { parRequestExpiry(other.getParRequestExpiry()); tokenQuota(other.getTokenQuota()); expressConfiguration(other.getExpressConfiguration()); + myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + thirdPartySecurityMode(other.getThirdPartySecurityMode()); + redirectionPolicy(other.getRedirectionPolicy()); resourceServerIdentifier(other.getResourceServerIdentifier()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); externalMetadataType(other.getExternalMetadataType()); @@ -1880,6 +1922,41 @@ public Builder expressConfiguration(ExpressConfiguration expressConfiguration) { return this; } + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) + public Builder myOrganizationConfiguration( + Optional myOrganizationConfiguration) { + this.myOrganizationConfiguration = myOrganizationConfiguration; + return this; + } + + public Builder myOrganizationConfiguration( + ClientMyOrganizationResponseConfiguration myOrganizationConfiguration) { + this.myOrganizationConfiguration = Optional.ofNullable(myOrganizationConfiguration); + return this; + } + + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) + public Builder thirdPartySecurityMode(Optional thirdPartySecurityMode) { + this.thirdPartySecurityMode = thirdPartySecurityMode; + return this; + } + + public Builder thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPartySecurityMode) { + this.thirdPartySecurityMode = Optional.ofNullable(thirdPartySecurityMode); + return this; + } + + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) + public Builder redirectionPolicy(Optional redirectionPolicy) { + this.redirectionPolicy = redirectionPolicy; + return this; + } + + public Builder redirectionPolicy(ClientRedirectionPolicyEnum redirectionPolicy) { + this.redirectionPolicy = Optional.ofNullable(redirectionPolicy); + return this; + } + /** *

The identifier of the resource server that this client is linked to.

*/ @@ -2011,6 +2088,9 @@ public UpdateClientResponseContent build() { parRequestExpiry, tokenQuota, expressConfiguration, + myOrganizationConfiguration, + thirdPartySecurityMode, + redirectionPolicy, resourceServerIdentifier, asyncApprovalNotificationChannels, externalMetadataType, 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 bb50f76b9..2e4ed55c0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java @@ -58,6 +58,8 @@ public final class UpdateConnectionOptions { private final Optional apiEnableUsers; + private final Optional apiEnableGroups; + private final Optional basicProfile; private final Optional extAdmin; @@ -105,6 +107,7 @@ private UpdateConnectionOptions( OptionalNullable passwordNoPersonalInfo, OptionalNullable passwordDictionary, Optional apiEnableUsers, + Optional apiEnableGroups, Optional basicProfile, Optional extAdmin, Optional extIsSuspended, @@ -136,6 +139,7 @@ private UpdateConnectionOptions( this.passwordNoPersonalInfo = passwordNoPersonalInfo; this.passwordDictionary = passwordDictionary; this.apiEnableUsers = apiEnableUsers; + this.apiEnableGroups = apiEnableGroups; this.basicProfile = basicProfile; this.extAdmin = extAdmin; this.extIsSuspended = extIsSuspended; @@ -295,6 +299,11 @@ public Optional getApiEnableUsers() { return apiEnableUsers; } + @JsonProperty("api_enable_groups") + public Optional getApiEnableGroups() { + return apiEnableGroups; + } + @JsonProperty("basic_profile") public Optional getBasicProfile() { return basicProfile; @@ -480,6 +489,7 @@ private boolean equalTo(UpdateConnectionOptions other) { && passwordNoPersonalInfo.equals(other.passwordNoPersonalInfo) && passwordDictionary.equals(other.passwordDictionary) && apiEnableUsers.equals(other.apiEnableUsers) + && apiEnableGroups.equals(other.apiEnableGroups) && basicProfile.equals(other.basicProfile) && extAdmin.equals(other.extAdmin) && extIsSuspended.equals(other.extIsSuspended) @@ -515,6 +525,7 @@ public int hashCode() { this.passwordNoPersonalInfo, this.passwordDictionary, this.apiEnableUsers, + this.apiEnableGroups, this.basicProfile, this.extAdmin, this.extIsSuspended, @@ -577,6 +588,8 @@ public static final class Builder { private Optional apiEnableUsers = Optional.empty(); + private Optional apiEnableGroups = Optional.empty(); + private Optional basicProfile = Optional.empty(); private Optional extAdmin = Optional.empty(); @@ -628,6 +641,7 @@ public Builder from(UpdateConnectionOptions other) { passwordNoPersonalInfo(other.getPasswordNoPersonalInfo()); passwordDictionary(other.getPasswordDictionary()); apiEnableUsers(other.getApiEnableUsers()); + apiEnableGroups(other.getApiEnableGroups()); basicProfile(other.getBasicProfile()); extAdmin(other.getExtAdmin()); extIsSuspended(other.getExtIsSuspended()); @@ -1062,6 +1076,17 @@ public Builder apiEnableUsers(Boolean apiEnableUsers) { return this; } + @JsonSetter(value = "api_enable_groups", nulls = Nulls.SKIP) + public Builder apiEnableGroups(Optional apiEnableGroups) { + this.apiEnableGroups = apiEnableGroups; + return this; + } + + public Builder apiEnableGroups(Boolean apiEnableGroups) { + this.apiEnableGroups = Optional.ofNullable(apiEnableGroups); + return this; + } + @JsonSetter(value = "basic_profile", nulls = Nulls.SKIP) public Builder basicProfile(Optional basicProfile) { this.basicProfile = basicProfile; @@ -1300,6 +1325,7 @@ public UpdateConnectionOptions build() { passwordNoPersonalInfo, passwordDictionary, apiEnableUsers, + apiEnableGroups, basicProfile, extAdmin, extIsSuspended, diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFlickr.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFlickr.java deleted file mode 100644 index feb47f369..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFlickr.java +++ /dev/null @@ -1,212 +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.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.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentFlickr.Builder.class) -public final class UpdateConnectionRequestContentFlickr implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentFlickr( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentFlickr - && equalTo((UpdateConnectionRequestContentFlickr) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentFlickr other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @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 displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentFlickr other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @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; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @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; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsFlickr options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentFlickr build() { - return new UpdateConnectionRequestContentFlickr( - displayName, enabledClients, isDomainConnection, metadata, options, 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/UpdateDirectoryProvisioningRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningRequestContent.java index 7190a4cd3..cbf14575a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningRequestContent.java @@ -25,14 +25,14 @@ public final class UpdateDirectoryProvisioningRequestContent { private final Optional synchronizeAutomatically; - private final Optional synchronizeGroups; + private final Optional synchronizeGroups; private final Map additionalProperties; private UpdateDirectoryProvisioningRequestContent( Optional> mapping, Optional synchronizeAutomatically, - Optional synchronizeGroups, + Optional synchronizeGroups, Map additionalProperties) { this.mapping = mapping; this.synchronizeAutomatically = synchronizeAutomatically; @@ -57,7 +57,7 @@ public Optional getSynchronizeAutomatically() { } @JsonProperty("synchronize_groups") - public Optional getSynchronizeGroups() { + public Optional getSynchronizeGroups() { return synchronizeGroups; } @@ -99,7 +99,7 @@ public static final class Builder { private Optional synchronizeAutomatically = Optional.empty(); - private Optional synchronizeGroups = Optional.empty(); + private Optional synchronizeGroups = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -142,12 +142,12 @@ public Builder synchronizeAutomatically(Boolean synchronizeAutomatically) { } @JsonSetter(value = "synchronize_groups", nulls = Nulls.SKIP) - public Builder synchronizeGroups(Optional synchronizeGroups) { + public Builder synchronizeGroups(Optional synchronizeGroups) { this.synchronizeGroups = synchronizeGroups; return this; } - public Builder synchronizeGroups(String synchronizeGroups) { + public Builder synchronizeGroups(SynchronizeGroupsEnum synchronizeGroups) { this.synchronizeGroups = Optional.ofNullable(synchronizeGroups); return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java index dd9ecff07..75dfb1d00 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java @@ -34,7 +34,7 @@ public final class UpdateDirectoryProvisioningResponseContent { private final boolean synchronizeAutomatically; - private final Optional synchronizeGroups; + private final Optional synchronizeGroups; private final OffsetDateTime createdAt; @@ -54,7 +54,7 @@ private UpdateDirectoryProvisioningResponseContent( String strategy, List mapping, boolean synchronizeAutomatically, - Optional synchronizeGroups, + Optional synchronizeGroups, OffsetDateTime createdAt, OffsetDateTime updatedAt, Optional lastSynchronizationAt, @@ -116,7 +116,7 @@ public boolean getSynchronizeAutomatically() { } @JsonProperty("synchronize_groups") - public Optional getSynchronizeGroups() { + public Optional getSynchronizeGroups() { return synchronizeGroups; } @@ -271,9 +271,9 @@ public interface _FinalStage { _FinalStage addAllMapping(List mapping); - _FinalStage synchronizeGroups(Optional synchronizeGroups); + _FinalStage synchronizeGroups(Optional synchronizeGroups); - _FinalStage synchronizeGroups(String synchronizeGroups); + _FinalStage synchronizeGroups(SynchronizeGroupsEnum synchronizeGroups); /** *

The timestamp at which the connection was last synchronized

@@ -324,7 +324,7 @@ public static final class Builder private Optional lastSynchronizationAt = Optional.empty(); - private Optional synchronizeGroups = Optional.empty(); + private Optional synchronizeGroups = Optional.empty(); private List mapping = new ArrayList<>(); @@ -482,14 +482,14 @@ public _FinalStage lastSynchronizationAt(Optional lastSynchroniz } @java.lang.Override - public _FinalStage synchronizeGroups(String synchronizeGroups) { + public _FinalStage synchronizeGroups(SynchronizeGroupsEnum synchronizeGroups) { this.synchronizeGroups = Optional.ofNullable(synchronizeGroups); return this; } @java.lang.Override @JsonSetter(value = "synchronize_groups", nulls = Nulls.SKIP) - public _FinalStage synchronizeGroups(Optional synchronizeGroups) { + public _FinalStage synchronizeGroups(Optional synchronizeGroups) { this.synchronizeGroups = synchronizeGroups; return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationAllConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationAllConnectionResponseContent.java new file mode 100644 index 000000000..c73c1e9fc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationAllConnectionResponseContent.java @@ -0,0 +1,426 @@ +/** + * 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 = UpdateOrganizationAllConnectionResponseContent.Builder.class) +public final class UpdateOrganizationAllConnectionResponseContent { + private final Optional organizationConnectionName; + + private final Optional assignMembershipOnLogin; + + private final Optional showAsButton; + + private final Optional isSignupEnabled; + + private final Optional organizationAccessLevel; + + private final Optional isEnabled; + + private final String connectionId; + + private final Optional connection; + + private final Map additionalProperties; + + private UpdateOrganizationAllConnectionResponseContent( + Optional organizationConnectionName, + Optional assignMembershipOnLogin, + Optional showAsButton, + Optional isSignupEnabled, + Optional organizationAccessLevel, + Optional isEnabled, + String connectionId, + Optional connection, + Map additionalProperties) { + this.organizationConnectionName = organizationConnectionName; + this.assignMembershipOnLogin = assignMembershipOnLogin; + this.showAsButton = showAsButton; + this.isSignupEnabled = isSignupEnabled; + this.organizationAccessLevel = organizationAccessLevel; + this.isEnabled = isEnabled; + this.connectionId = connectionId; + this.connection = connection; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection in the scope of this organization. + */ + @JsonProperty("organization_connection_name") + public Optional getOrganizationConnectionName() { + return organizationConnectionName; + } + + /** + * @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. Default: true. + */ + @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. Default: false. + */ + @JsonProperty("is_signup_enabled") + public Optional getIsSignupEnabled() { + return isSignupEnabled; + } + + @JsonProperty("organization_access_level") + public Optional getOrganizationAccessLevel() { + return organizationAccessLevel; + } + + /** + * @return Whether the connection is enabled for the organization. + */ + @JsonProperty("is_enabled") + public Optional getIsEnabled() { + return isEnabled; + } + + /** + * @return Connection identifier. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @JsonProperty("connection") + public Optional getConnection() { + return connection; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateOrganizationAllConnectionResponseContent + && equalTo((UpdateOrganizationAllConnectionResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateOrganizationAllConnectionResponseContent other) { + return organizationConnectionName.equals(other.organizationConnectionName) + && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) + && showAsButton.equals(other.showAsButton) + && isSignupEnabled.equals(other.isSignupEnabled) + && organizationAccessLevel.equals(other.organizationAccessLevel) + && isEnabled.equals(other.isEnabled) + && connectionId.equals(other.connectionId) + && connection.equals(other.connection); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.organizationConnectionName, + this.assignMembershipOnLogin, + this.showAsButton, + this.isSignupEnabled, + this.organizationAccessLevel, + this.isEnabled, + this.connectionId, + this.connection); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionIdStage builder() { + return new Builder(); + } + + public interface ConnectionIdStage { + /** + *

Connection identifier.

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

Name of the connection in the scope of this organization.

+ */ + _FinalStage organizationConnectionName(Optional organizationConnectionName); + + _FinalStage organizationConnectionName(String organizationConnectionName); + + /** + *

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. Default: true.

+ */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + + /** + *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

+ */ + _FinalStage isSignupEnabled(Optional isSignupEnabled); + + _FinalStage isSignupEnabled(Boolean isSignupEnabled); + + _FinalStage organizationAccessLevel(Optional organizationAccessLevel); + + _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel); + + /** + *

Whether the connection is enabled for the organization.

+ */ + _FinalStage isEnabled(Optional isEnabled); + + _FinalStage isEnabled(Boolean isEnabled); + + _FinalStage connection(Optional connection); + + _FinalStage connection(OrganizationConnectionInformation connection); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConnectionIdStage, _FinalStage { + private String connectionId; + + private Optional connection = Optional.empty(); + + private Optional isEnabled = Optional.empty(); + + private Optional organizationAccessLevel = Optional.empty(); + + private Optional isSignupEnabled = Optional.empty(); + + private Optional showAsButton = Optional.empty(); + + private Optional assignMembershipOnLogin = Optional.empty(); + + private Optional organizationConnectionName = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateOrganizationAllConnectionResponseContent other) { + organizationConnectionName(other.getOrganizationConnectionName()); + assignMembershipOnLogin(other.getAssignMembershipOnLogin()); + showAsButton(other.getShowAsButton()); + isSignupEnabled(other.getIsSignupEnabled()); + organizationAccessLevel(other.getOrganizationAccessLevel()); + isEnabled(other.getIsEnabled()); + connectionId(other.getConnectionId()); + connection(other.getConnection()); + return this; + } + + /** + *

Connection identifier.

+ *

Connection identifier.

+ * @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 _FinalStage connection(OrganizationConnectionInformation 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; + } + + /** + *

Whether the connection is enabled for the organization.

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

Whether the connection is enabled for the organization.

+ */ + @java.lang.Override + @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) + public _FinalStage isEnabled(Optional isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + @java.lang.Override + public _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel) { + this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationAccessLevel(Optional organizationAccessLevel) { + this.organizationAccessLevel = organizationAccessLevel; + return this; + } + + /** + *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

+ * @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. Default: false.

+ */ + @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. Default: true.

+ * @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. Default: true.

+ */ + @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; + } + + /** + *

Name of the connection in the scope of this organization.

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

Name of the connection in the scope of this organization.

+ */ + @java.lang.Override + @JsonSetter(value = "organization_connection_name", nulls = Nulls.SKIP) + public _FinalStage organizationConnectionName(Optional organizationConnectionName) { + this.organizationConnectionName = organizationConnectionName; + return this; + } + + @java.lang.Override + public UpdateOrganizationAllConnectionResponseContent build() { + return new UpdateOrganizationAllConnectionResponseContent( + organizationConnectionName, + assignMembershipOnLogin, + showAsButton, + isSignupEnabled, + organizationAccessLevel, + isEnabled, + connectionId, + 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/UpdateTenantSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java index 9c451010e..1295982f1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java @@ -90,10 +90,14 @@ public final class UpdateTenantSettingsResponseContent { private final Optional resourceParameterProfile; + private final Optional clientIdMetadataDocumentSupported; + private final Optional phoneConsolidatedExperience; private final Optional enableAiGuide; + private final Optional dynamicClientRegistrationSecurityMode; + private final Map additionalProperties; private UpdateTenantSettingsResponseContent( @@ -130,8 +134,10 @@ private UpdateTenantSettingsResponseContent( OptionalNullable authorizationResponseIssParameterSupported, OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt, Optional resourceParameterProfile, + Optional clientIdMetadataDocumentSupported, Optional phoneConsolidatedExperience, Optional enableAiGuide, + Optional dynamicClientRegistrationSecurityMode, Map additionalProperties) { this.changePassword = changePassword; this.guardianMfaPage = guardianMfaPage; @@ -166,8 +172,10 @@ private UpdateTenantSettingsResponseContent( this.authorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.resourceParameterProfile = resourceParameterProfile; + this.clientIdMetadataDocumentSupported = clientIdMetadataDocumentSupported; this.phoneConsolidatedExperience = phoneConsolidatedExperience; this.enableAiGuide = enableAiGuide; + this.dynamicClientRegistrationSecurityMode = dynamicClientRegistrationSecurityMode; this.additionalProperties = additionalProperties; } @@ -448,6 +456,14 @@ public Optional getResourceParameterProf return resourceParameterProfile; } + /** + * @return Whether the authorization server supports retrieving client metadata from a client_id URL. + */ + @JsonProperty("client_id_metadata_document_supported") + public Optional getClientIdMetadataDocumentSupported() { + return clientIdMetadataDocumentSupported; + } + /** * @return Whether Phone Consolidated Experience is enabled for this tenant. */ @@ -464,6 +480,11 @@ public Optional getEnableAiGuide() { return enableAiGuide; } + @JsonProperty("dynamic_client_registration_security_mode") + public Optional getDynamicClientRegistrationSecurityMode() { + return dynamicClientRegistrationSecurityMode; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("change_password") private OptionalNullable _getChangePassword() { @@ -577,8 +598,10 @@ private boolean equalTo(UpdateTenantSettingsResponseContent other) { && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) && resourceParameterProfile.equals(other.resourceParameterProfile) + && clientIdMetadataDocumentSupported.equals(other.clientIdMetadataDocumentSupported) && phoneConsolidatedExperience.equals(other.phoneConsolidatedExperience) - && enableAiGuide.equals(other.enableAiGuide); + && enableAiGuide.equals(other.enableAiGuide) + && dynamicClientRegistrationSecurityMode.equals(other.dynamicClientRegistrationSecurityMode); } @java.lang.Override @@ -617,8 +640,10 @@ public int hashCode() { this.authorizationResponseIssParameterSupported, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.resourceParameterProfile, + this.clientIdMetadataDocumentSupported, this.phoneConsolidatedExperience, - this.enableAiGuide); + this.enableAiGuide, + this.dynamicClientRegistrationSecurityMode); } @java.lang.Override @@ -698,10 +723,15 @@ public static final class Builder { private Optional resourceParameterProfile = Optional.empty(); + private Optional clientIdMetadataDocumentSupported = Optional.empty(); + private Optional phoneConsolidatedExperience = Optional.empty(); private Optional enableAiGuide = Optional.empty(); + private Optional dynamicClientRegistrationSecurityMode = + Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -741,8 +771,10 @@ public Builder from(UpdateTenantSettingsResponseContent other) { authorizationResponseIssParameterSupported(other.getAuthorizationResponseIssParameterSupported()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); resourceParameterProfile(other.getResourceParameterProfile()); + clientIdMetadataDocumentSupported(other.getClientIdMetadataDocumentSupported()); phoneConsolidatedExperience(other.getPhoneConsolidatedExperience()); enableAiGuide(other.getEnableAiGuide()); + dynamicClientRegistrationSecurityMode(other.getDynamicClientRegistrationSecurityMode()); return this; } @@ -1414,6 +1446,20 @@ public Builder resourceParameterProfile(TenantSettingsResourceParameterProfile r return this; } + /** + *

Whether the authorization server supports retrieving client metadata from a client_id URL.

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

Whether Phone Consolidated Experience is enabled for this tenant.

*/ @@ -1442,6 +1488,19 @@ public Builder enableAiGuide(Boolean enableAiGuide) { return this; } + @JsonSetter(value = "dynamic_client_registration_security_mode", nulls = Nulls.SKIP) + public Builder dynamicClientRegistrationSecurityMode( + Optional dynamicClientRegistrationSecurityMode) { + this.dynamicClientRegistrationSecurityMode = dynamicClientRegistrationSecurityMode; + return this; + } + + public Builder dynamicClientRegistrationSecurityMode( + TenantSettingsDynamicClientRegistrationSecurityMode dynamicClientRegistrationSecurityMode) { + this.dynamicClientRegistrationSecurityMode = Optional.ofNullable(dynamicClientRegistrationSecurityMode); + return this; + } + public UpdateTenantSettingsResponseContent build() { return new UpdateTenantSettingsResponseContent( changePassword, @@ -1477,8 +1536,10 @@ public UpdateTenantSettingsResponseContent build() { authorizationResponseIssParameterSupported, skipNonVerifiableCallbackUriConfirmationPrompt, resourceParameterProfile, + clientIdMetadataDocumentSupported, phoneConsolidatedExperience, enableAiGuide, + dynamicClientRegistrationSecurityMode, additionalProperties); } 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 56a593463..4897abd71 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserIdentityProviderEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserIdentityProviderEnum.java @@ -14,8 +14,6 @@ public final class UserIdentityProviderEnum { public static final UserIdentityProviderEnum DWOLLA = new UserIdentityProviderEnum(Value.DWOLLA, "dwolla"); - public static final UserIdentityProviderEnum FLICKR = new UserIdentityProviderEnum(Value.FLICKR, "flickr"); - public static final UserIdentityProviderEnum OKTA = new UserIdentityProviderEnum(Value.OKTA, "okta"); public static final UserIdentityProviderEnum PLANNINGCENTER = @@ -172,8 +170,6 @@ public T visit(Visitor visitor) { return visitor.visitAuth0Oidc(); case DWOLLA: return visitor.visitDwolla(); - case FLICKR: - return visitor.visitFlickr(); case OKTA: return visitor.visitOkta(); case PLANNINGCENTER: @@ -293,8 +289,6 @@ public static UserIdentityProviderEnum valueOf(String value) { return AUTH0OIDC; case "dwolla": return DWOLLA; - case "flickr": - return FLICKR; case "okta": return OKTA; case "planningcenter": @@ -445,8 +439,6 @@ public enum Value { FITBIT, - FLICKR, - GITHUB, GOOGLE_APPS, @@ -561,8 +553,6 @@ public interface Visitor { T visitFitbit(); - T visitFlickr(); - T visitGithub(); T visitGoogleApps(); diff --git a/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java index 48191e530..399a1a846 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java @@ -3,6 +3,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.types.ClientGrantDefaultForEnum; import com.auth0.client.mgmt.types.ClientGrantResponseContent; import com.auth0.client.mgmt.types.ClientGrantSubjectTypeEnum; import com.auth0.client.mgmt.types.CreateClientGrantRequestContent; @@ -47,7 +48,7 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"next\":\"next\",\"client_grants\":[{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}]}")); + "{\"next\":\"next\",\"client_grants\":[{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"default_for\":\"third_party_clients\",\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}]}")); SyncPagingIterable response = client.clientGrants() .list(ListClientGrantsRequestParameters.builder() .from(OptionalNullable.of("from")) @@ -56,6 +57,7 @@ public void testList() throws Exception { .clientId(OptionalNullable.of("client_id")) .allowAnyOrganization(OptionalNullable.of(true)) .subjectType(OptionalNullable.of(ClientGrantSubjectTypeEnum.CLIENT)) + .defaultFor(OptionalNullable.of(ClientGrantDefaultForEnum.THIRD_PARTY_CLIENTS)) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -73,7 +75,7 @@ public void testCreate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}")); + "{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"default_for\":\"third_party_clients\",\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}")); CreateClientGrantResponseContent response = client.clientGrants() .create(CreateClientGrantRequestContent.builder() .audience("audience") @@ -124,6 +126,7 @@ else if (actualJson.has("kind")) + " ],\n" + " \"organization_usage\": \"deny\",\n" + " \"allow_any_organization\": true,\n" + + " \"default_for\": \"third_party_clients\",\n" + " \"is_system\": true,\n" + " \"subject_type\": \"client\",\n" + " \"authorization_details_types\": [\n" @@ -168,7 +171,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}")); + "{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"default_for\":\"third_party_clients\",\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}")); GetClientGrantResponseContent response = client.clientGrants().get("id"); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -187,6 +190,7 @@ public void testGet() throws Exception { + " ],\n" + " \"organization_usage\": \"deny\",\n" + " \"allow_any_organization\": true,\n" + + " \"default_for\": \"third_party_clients\",\n" + " \"is_system\": true,\n" + " \"subject_type\": \"client\",\n" + " \"authorization_details_types\": [\n" @@ -240,7 +244,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}")); + "{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"default_for\":\"third_party_clients\",\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}")); UpdateClientGrantResponseContent response = client.clientGrants() .update("id", UpdateClientGrantRequestContent.builder().build()); RecordedRequest request = server.takeRequest(); @@ -289,6 +293,7 @@ else if (actualJson.has("kind")) + " ],\n" + " \"organization_usage\": \"deny\",\n" + " \"allow_any_organization\": true,\n" + + " \"default_for\": \"third_party_clients\",\n" + " \"is_system\": true,\n" + " \"subject_type\": \"client\",\n" + " \"authorization_details_types\": [\n" diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java index 5bfa36669..57635a08f 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java @@ -1,6 +1,8 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; +import com.auth0.client.mgmt.connections.types.ListSynchronizedGroupsRequestParameters; +import com.auth0.client.mgmt.connections.types.ReplaceSynchronizedGroupsRequestContent; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; @@ -8,9 +10,11 @@ import com.auth0.client.mgmt.types.DirectoryProvisioning; import com.auth0.client.mgmt.types.GetDirectoryProvisioningDefaultMappingResponseContent; import com.auth0.client.mgmt.types.GetDirectoryProvisioningResponseContent; +import com.auth0.client.mgmt.types.SynchronizedGroupPayload; import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningResponseContent; 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; @@ -45,7 +49,7 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"directory_provisionings\":[{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"synchronize_groups\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}],\"next\":\"next\"}")); + "{\"directory_provisionings\":[{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"all\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}],\"next\":\"next\"}")); SyncPagingIterable response = client.connections() .directoryProvisioning() .list(ListDirectoryProvisioningsRequestParameters.builder() @@ -68,7 +72,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"synchronize_groups\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); + "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"all\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); GetDirectoryProvisioningResponseContent response = client.connections().directoryProvisioning().get("id"); RecordedRequest request = server.takeRequest(); @@ -90,7 +94,7 @@ public void testGet() throws Exception { + " }\n" + " ],\n" + " \"synchronize_automatically\": true,\n" - + " \"synchronize_groups\": \"synchronize_groups\",\n" + + " \"synchronize_groups\": \"all\",\n" + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + " \"last_synchronization_at\": \"2024-01-15T09:30:00Z\",\n" @@ -134,7 +138,7 @@ public void testCreate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"synchronize_groups\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); + "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"all\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); CreateDirectoryProvisioningResponseContent response = client.connections().directoryProvisioning().create("id", OptionalNullable.absent()); RecordedRequest request = server.takeRequest(); @@ -156,7 +160,7 @@ public void testCreate() throws Exception { + " }\n" + " ],\n" + " \"synchronize_automatically\": true,\n" - + " \"synchronize_groups\": \"synchronize_groups\",\n" + + " \"synchronize_groups\": \"all\",\n" + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + " \"last_synchronization_at\": \"2024-01-15T09:30:00Z\",\n" @@ -209,7 +213,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"synchronize_groups\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); + "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"all\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); UpdateDirectoryProvisioningResponseContent response = client.connections().directoryProvisioning().update("id", OptionalNullable.absent()); RecordedRequest request = server.takeRequest(); @@ -231,7 +235,7 @@ public void testUpdate() throws Exception { + " }\n" + " ],\n" + " \"synchronize_automatically\": true,\n" - + " \"synchronize_groups\": \"synchronize_groups\",\n" + + " \"synchronize_groups\": \"all\",\n" + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + " \"last_synchronization_at\": \"2024-01-15T09:30:00Z\",\n" @@ -323,6 +327,75 @@ else if (actualResponseNode.has("kind")) } } + @Test + public void testListSynchronizedGroups() throws Exception { + server.enqueue( + new MockResponse().setResponseCode(200).setBody("{\"groups\":[{\"id\":\"id\"}],\"next\":\"next\"}")); + SyncPagingIterable response = client.connections() + .directoryProvisioning() + .listSynchronizedGroups( + "id", + ListSynchronizedGroupsRequestParameters.builder() + .from(OptionalNullable.of("from")) + .take(OptionalNullable.of(1)) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + + @Test + public void testSet() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.connections() + .directoryProvisioning() + .set( + "id", + ReplaceSynchronizedGroupsRequestContent.builder() + .groups(Arrays.asList(SynchronizedGroupPayload.builder() + .id("id") + .build())) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PUT", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = + "" + "{\n" + " \"groups\": [\n" + " {\n" + " \"id\": \"id\"\n" + " }\n" + " ]\n" + "}"; + 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"); + } + } + /** * Compares two JsonNodes with numeric equivalence and null safety. * For objects, checks that all fields in 'expected' exist in 'actual' with matching values. diff --git a/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java b/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java index 60c22b59a..f7859be51 100644 --- a/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java @@ -42,7 +42,7 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "[{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"user.created\",\"attempts\":[{\"status\":\"failed\",\"timestamp\":\"2024-01-15T09:30:00Z\"}],\"event\":{\"id\":\"id\",\"source\":\"source\",\"specversion\":\"specversion\",\"type\":\"type\",\"time\":\"2024-01-15T09:30:00Z\",\"data\":\"data\"}}]")); + "[{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"group.created\",\"attempts\":[{\"status\":\"failed\",\"timestamp\":\"2024-01-15T09:30:00Z\"}],\"event\":{\"id\":\"id\",\"source\":\"source\",\"specversion\":\"specversion\",\"type\":\"type\",\"time\":\"2024-01-15T09:30:00Z\",\"data\":\"data\"}}]")); List response = client.eventStreams() .deliveries() .list( @@ -68,7 +68,7 @@ public void testList() throws Exception { + " \"id\": \"id\",\n" + " \"event_stream_id\": \"event_stream_id\",\n" + " \"status\": \"failed\",\n" - + " \"event_type\": \"user.created\",\n" + + " \"event_type\": \"group.created\",\n" + " \"attempts\": [\n" + " {\n" + " \"status\": \"failed\",\n" @@ -122,7 +122,7 @@ public void testGetHistory() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"user.created\",\"attempts\":[{\"status\":\"failed\",\"timestamp\":\"2024-01-15T09:30:00Z\",\"error_message\":\"error_message\"}],\"event\":{\"id\":\"id\",\"source\":\"source\",\"specversion\":\"specversion\",\"type\":\"type\",\"time\":\"2024-01-15T09:30:00Z\",\"data\":\"data\"}}")); + "{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"group.created\",\"attempts\":[{\"status\":\"failed\",\"timestamp\":\"2024-01-15T09:30:00Z\",\"error_message\":\"error_message\"}],\"event\":{\"id\":\"id\",\"source\":\"source\",\"specversion\":\"specversion\",\"type\":\"type\",\"time\":\"2024-01-15T09:30:00Z\",\"data\":\"data\"}}")); GetEventStreamDeliveryHistoryResponseContent response = client.eventStreams().deliveries().getHistory("id", "event_id"); RecordedRequest request = server.takeRequest(); @@ -137,7 +137,7 @@ public void testGetHistory() throws Exception { + " \"id\": \"id\",\n" + " \"event_stream_id\": \"event_stream_id\",\n" + " \"status\": \"failed\",\n" - + " \"event_type\": \"user.created\",\n" + + " \"event_type\": \"group.created\",\n" + " \"attempts\": [\n" + " {\n" + " \"status\": \"failed\",\n" diff --git a/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java b/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java index 0bcaf1813..5f4e16ba3 100644 --- a/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java @@ -39,7 +39,7 @@ public void testCreate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"date_from\":\"2024-01-15T09:30:00Z\",\"date_to\":\"2024-01-15T09:30:00Z\",\"statuses\":[\"failed\"],\"event_types\":[\"user.created\"]}")); + "{\"date_from\":\"2024-01-15T09:30:00Z\",\"date_to\":\"2024-01-15T09:30:00Z\",\"statuses\":[\"failed\"],\"event_types\":[\"group.created\"]}")); CreateEventStreamRedeliveryResponseContent response = client.eventStreams() .redeliveries() .create( @@ -89,7 +89,7 @@ else if (actualJson.has("kind")) + " \"failed\"\n" + " ],\n" + " \"event_types\": [\n" - + " \"user.created\"\n" + + " \"group.created\"\n" + " ]\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); diff --git a/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java b/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java index a710d3c0c..9ab910df6 100644 --- a/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java @@ -378,19 +378,19 @@ public void testTest() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"user.created\",\"attempts\":[{\"status\":\"failed\",\"timestamp\":\"2024-01-15T09:30:00Z\",\"error_message\":\"error_message\"}],\"event\":{\"id\":\"id\",\"source\":\"source\",\"specversion\":\"specversion\",\"type\":\"type\",\"time\":\"2024-01-15T09:30:00Z\",\"data\":\"data\"}}")); + "{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"group.created\",\"attempts\":[{\"status\":\"failed\",\"timestamp\":\"2024-01-15T09:30:00Z\",\"error_message\":\"error_message\"}],\"event\":{\"id\":\"id\",\"source\":\"source\",\"specversion\":\"specversion\",\"type\":\"type\",\"time\":\"2024-01-15T09:30:00Z\",\"data\":\"data\"}}")); CreateEventStreamTestEventResponseContent response = client.eventStreams() .test( "id", CreateEventStreamTestEventRequestContent.builder() - .eventType(EventStreamTestEventTypeEnum.USER_CREATED) + .eventType(EventStreamTestEventTypeEnum.GROUP_CREATED) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("POST", request.getMethod()); // Validate request body String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"event_type\": \"user.created\"\n" + "}"; + String expectedRequestBody = "" + "{\n" + " \"event_type\": \"group.created\"\n" + "}"; JsonNode actualJson = objectMapper.readTree(actualRequestBody); JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); @@ -426,7 +426,7 @@ else if (actualJson.has("kind")) + " \"id\": \"id\",\n" + " \"event_stream_id\": \"event_stream_id\",\n" + " \"status\": \"failed\",\n" - + " \"event_type\": \"user.created\",\n" + + " \"event_type\": \"group.created\",\n" + " \"attempts\": [\n" + " {\n" + " \"status\": \"failed\",\n" diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsConnectionsWireTest.java new file mode 100644 index 000000000..d66a2e69b --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsConnectionsWireTest.java @@ -0,0 +1,358 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.organizations.types.CreateOrganizationAllConnectionRequestParameters; +import com.auth0.client.mgmt.organizations.types.ListOrganizationAllConnectionsRequestParameters; +import com.auth0.client.mgmt.organizations.types.UpdateOrganizationConnectionRequestParameters; +import com.auth0.client.mgmt.types.CreateOrganizationAllConnectionResponseContent; +import com.auth0.client.mgmt.types.GetOrganizationAllConnectionResponseContent; +import com.auth0.client.mgmt.types.OrganizationAllConnectionPost; +import com.auth0.client.mgmt.types.UpdateOrganizationAllConnectionResponseContent; +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 OrganizationsConnectionsWireTest { + 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 testList() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"connections\":[{\"organization_connection_name\":\"organization_connection_name\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"organization_access_level\":\"none\",\"is_enabled\":true,\"connection_id\":\"connection_id\"}]}")); + SyncPagingIterable response = client.organizations() + .connections() + .list( + "id", + ListOrganizationAllConnectionsRequestParameters.builder() + .page(OptionalNullable.of(1)) + .perPage(OptionalNullable.of(1)) + .includeTotals(OptionalNullable.of(true)) + .isEnabled(OptionalNullable.of(true)) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + + @Test + public void testCreate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"organization_connection_name\":\"organization_connection_name\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"organization_access_level\":\"none\",\"is_enabled\":true,\"connection_id\":\"connection_id\",\"connection\":{\"name\":\"name\",\"strategy\":\"strategy\"}}")); + CreateOrganizationAllConnectionResponseContent response = client.organizations() + .connections() + .create( + "id", + CreateOrganizationAllConnectionRequestParameters.builder() + .connectionId("connection_id") + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("POST", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{\n" + " \"connection_id\": \"connection_id\"\n" + "}"; + 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"); + } + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + String actualResponseJson = objectMapper.writeValueAsString(response); + String expectedResponseBody = "" + + "{\n" + + " \"organization_connection_name\": \"organization_connection_name\",\n" + + " \"assign_membership_on_login\": true,\n" + + " \"show_as_button\": true,\n" + + " \"is_signup_enabled\": true,\n" + + " \"organization_access_level\": \"none\",\n" + + " \"is_enabled\": true,\n" + + " \"connection_id\": \"connection_id\",\n" + + " \"connection\": {\n" + + " \"name\": \"name\",\n" + + " \"strategy\": \"strategy\"\n" + + " }\n" + + "}"; + JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); + JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); + Assertions.assertTrue( + jsonEquals(expectedResponseNode, actualResponseNode), + "Response body structure does not match expected"); + if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { + String discriminator = null; + if (actualResponseNode.has("type")) + discriminator = actualResponseNode.get("type").asText(); + else if (actualResponseNode.has("_type")) + discriminator = actualResponseNode.get("_type").asText(); + else if (actualResponseNode.has("kind")) + discriminator = actualResponseNode.get("kind").asText(); + Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); + Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); + } + + if (!actualResponseNode.isNull()) { + Assertions.assertTrue( + actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), + "response should be a valid JSON value"); + } + + if (actualResponseNode.isArray()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); + } + if (actualResponseNode.isObject()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); + } + } + + @Test + public void testGet() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"organization_connection_name\":\"organization_connection_name\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"organization_access_level\":\"none\",\"is_enabled\":true,\"connection_id\":\"connection_id\",\"connection\":{\"name\":\"name\",\"strategy\":\"strategy\"}}")); + GetOrganizationAllConnectionResponseContent response = + client.organizations().connections().get("id", "connection_id"); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + String actualResponseJson = objectMapper.writeValueAsString(response); + String expectedResponseBody = "" + + "{\n" + + " \"organization_connection_name\": \"organization_connection_name\",\n" + + " \"assign_membership_on_login\": true,\n" + + " \"show_as_button\": true,\n" + + " \"is_signup_enabled\": true,\n" + + " \"organization_access_level\": \"none\",\n" + + " \"is_enabled\": true,\n" + + " \"connection_id\": \"connection_id\",\n" + + " \"connection\": {\n" + + " \"name\": \"name\",\n" + + " \"strategy\": \"strategy\"\n" + + " }\n" + + "}"; + JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); + JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); + Assertions.assertTrue( + jsonEquals(expectedResponseNode, actualResponseNode), + "Response body structure does not match expected"); + if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { + String discriminator = null; + if (actualResponseNode.has("type")) + discriminator = actualResponseNode.get("type").asText(); + else if (actualResponseNode.has("_type")) + discriminator = actualResponseNode.get("_type").asText(); + else if (actualResponseNode.has("kind")) + discriminator = actualResponseNode.get("kind").asText(); + Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); + Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); + } + + if (!actualResponseNode.isNull()) { + Assertions.assertTrue( + actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), + "response should be a valid JSON value"); + } + + if (actualResponseNode.isArray()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); + } + if (actualResponseNode.isObject()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); + } + } + + @Test + public void testDelete() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.organizations().connections().delete("id", "connection_id"); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("DELETE", request.getMethod()); + } + + @Test + public void testUpdate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"organization_connection_name\":\"organization_connection_name\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"organization_access_level\":\"none\",\"is_enabled\":true,\"connection_id\":\"connection_id\",\"connection\":{\"name\":\"name\",\"strategy\":\"strategy\"}}")); + UpdateOrganizationAllConnectionResponseContent response = client.organizations() + .connections() + .update( + "id", + "connection_id", + UpdateOrganizationConnectionRequestParameters.builder().build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PATCH", 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"); + } + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + String actualResponseJson = objectMapper.writeValueAsString(response); + String expectedResponseBody = "" + + "{\n" + + " \"organization_connection_name\": \"organization_connection_name\",\n" + + " \"assign_membership_on_login\": true,\n" + + " \"show_as_button\": true,\n" + + " \"is_signup_enabled\": true,\n" + + " \"organization_access_level\": \"none\",\n" + + " \"is_enabled\": true,\n" + + " \"connection_id\": \"connection_id\",\n" + + " \"connection\": {\n" + + " \"name\": \"name\",\n" + + " \"strategy\": \"strategy\"\n" + + " }\n" + + "}"; + JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); + JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); + Assertions.assertTrue( + jsonEquals(expectedResponseNode, actualResponseNode), + "Response body structure does not match expected"); + if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { + String discriminator = null; + if (actualResponseNode.has("type")) + discriminator = actualResponseNode.get("type").asText(); + else if (actualResponseNode.has("_type")) + discriminator = actualResponseNode.get("_type").asText(); + else if (actualResponseNode.has("kind")) + discriminator = actualResponseNode.get("kind").asText(); + Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); + Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); + } + + if (!actualResponseNode.isNull()) { + Assertions.assertTrue( + actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), + "response should be a valid JSON value"); + } + + if (actualResponseNode.isArray()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); + } + if (actualResponseNode.isObject()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); + } + } + + /** + * 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 || !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/UsersConnectedAccountsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java index f0db4daf3..55e071acb 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java @@ -41,7 +41,7 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"connected_accounts\":[{\"id\":\"id\",\"connection\":\"connection\",\"connection_id\":\"connection_id\",\"strategy\":\"strategy\",\"access_type\":\"offline\",\"scopes\":[\"scopes\"],\"created_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\"}")); + "{\"connected_accounts\":[{\"id\":\"id\",\"connection\":\"connection\",\"connection_id\":\"connection_id\",\"strategy\":\"strategy\",\"access_type\":\"offline\",\"scopes\":[\"scopes\"],\"created_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"organization_id\":\"organization_id\"}],\"next\":\"next\"}")); SyncPagingIterable response = client.users() .connectedAccounts() .list( diff --git a/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json b/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json index 9f7ca6d8a..b262af6c9 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json @@ -35,7 +35,11 @@ ], "enforce_device_binding": "ip", "allow_refresh_token": true, - "enforce_online_refresh_tokens": true + "enforce_online_refresh_tokens": true, + "delegation": { + "allow_delegated_access": true, + "enforce_device_binding": "ip" + } }, "oidc_logout": { "backchannel_logout_urls": [ @@ -342,6 +346,16 @@ "admin_login_domain": "admin_login_domain", "oin_submission_id": "oin_submission_id" }, + "my_organization_configuration": { + "connection_profile_id": "connection_profile_id", + "user_attribute_profile_id": "user_attribute_profile_id", + "allowed_strategies": [ + "pingfederate" + ], + "connection_deletion_behavior": "allow" + }, + "third_party_security_mode": "strict", + "redirection_policy": "allow_always", "resource_server_identifier": "resource_server_identifier", "async_approval_notification_channels": [ "guardian-push" diff --git a/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json b/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json index 9f7ca6d8a..b262af6c9 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json @@ -35,7 +35,11 @@ ], "enforce_device_binding": "ip", "allow_refresh_token": true, - "enforce_online_refresh_tokens": true + "enforce_online_refresh_tokens": true, + "delegation": { + "allow_delegated_access": true, + "enforce_device_binding": "ip" + } }, "oidc_logout": { "backchannel_logout_urls": [ @@ -342,6 +346,16 @@ "admin_login_domain": "admin_login_domain", "oin_submission_id": "oin_submission_id" }, + "my_organization_configuration": { + "connection_profile_id": "connection_profile_id", + "user_attribute_profile_id": "user_attribute_profile_id", + "allowed_strategies": [ + "pingfederate" + ], + "connection_deletion_behavior": "allow" + }, + "third_party_security_mode": "strict", + "redirection_policy": "allow_always", "resource_server_identifier": "resource_server_identifier", "async_approval_notification_channels": [ "guardian-push" diff --git a/src/test/resources/wire-tests/ClientsWireTest_testList_response.json b/src/test/resources/wire-tests/ClientsWireTest_testList_response.json index b2abc4a59..035c9d56b 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testList_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testList_response.json @@ -84,6 +84,14 @@ "okta_oin_client_id": "okta_oin_client_id", "admin_login_domain": "admin_login_domain" }, + "my_organization_configuration": { + "allowed_strategies": [ + "pingfederate" + ], + "connection_deletion_behavior": "allow" + }, + "third_party_security_mode": "strict", + "redirection_policy": "allow_always", "resource_server_identifier": "resource_server_identifier", "async_approval_notification_channels": [ "guardian-push" diff --git a/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json b/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json index 9f7ca6d8a..b262af6c9 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json @@ -35,7 +35,11 @@ ], "enforce_device_binding": "ip", "allow_refresh_token": true, - "enforce_online_refresh_tokens": true + "enforce_online_refresh_tokens": true, + "delegation": { + "allow_delegated_access": true, + "enforce_device_binding": "ip" + } }, "oidc_logout": { "backchannel_logout_urls": [ @@ -342,6 +346,16 @@ "admin_login_domain": "admin_login_domain", "oin_submission_id": "oin_submission_id" }, + "my_organization_configuration": { + "connection_profile_id": "connection_profile_id", + "user_attribute_profile_id": "user_attribute_profile_id", + "allowed_strategies": [ + "pingfederate" + ], + "connection_deletion_behavior": "allow" + }, + "third_party_security_mode": "strict", + "redirection_policy": "allow_always", "resource_server_identifier": "resource_server_identifier", "async_approval_notification_channels": [ "guardian-push" diff --git a/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json b/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json index 9f7ca6d8a..b262af6c9 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json @@ -35,7 +35,11 @@ ], "enforce_device_binding": "ip", "allow_refresh_token": true, - "enforce_online_refresh_tokens": true + "enforce_online_refresh_tokens": true, + "delegation": { + "allow_delegated_access": true, + "enforce_device_binding": "ip" + } }, "oidc_logout": { "backchannel_logout_urls": [ @@ -342,6 +346,16 @@ "admin_login_domain": "admin_login_domain", "oin_submission_id": "oin_submission_id" }, + "my_organization_configuration": { + "connection_profile_id": "connection_profile_id", + "user_attribute_profile_id": "user_attribute_profile_id", + "allowed_strategies": [ + "pingfederate" + ], + "connection_deletion_behavior": "allow" + }, + "third_party_security_mode": "strict", + "redirection_policy": "allow_always", "resource_server_identifier": "resource_server_identifier", "async_approval_notification_channels": [ "guardian-push" diff --git a/src/test/resources/wire-tests/NetworkAclsWireTest_testGet_response.json b/src/test/resources/wire-tests/NetworkAclsWireTest_testGet_response.json index 3dc352a50..d8b0169a8 100644 --- a/src/test/resources/wire-tests/NetworkAclsWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/NetworkAclsWireTest_testGet_response.json @@ -15,9 +15,6 @@ "asns": [ 1 ], - "auth0_managed": [ - "auth0_managed" - ], "geo_country_codes": [ "geo_country_codes" ], @@ -53,9 +50,6 @@ "asns": [ 1 ], - "auth0_managed": [ - "auth0_managed" - ], "geo_country_codes": [ "geo_country_codes" ], diff --git a/src/test/resources/wire-tests/NetworkAclsWireTest_testSet_response.json b/src/test/resources/wire-tests/NetworkAclsWireTest_testSet_response.json index 3dc352a50..d8b0169a8 100644 --- a/src/test/resources/wire-tests/NetworkAclsWireTest_testSet_response.json +++ b/src/test/resources/wire-tests/NetworkAclsWireTest_testSet_response.json @@ -15,9 +15,6 @@ "asns": [ 1 ], - "auth0_managed": [ - "auth0_managed" - ], "geo_country_codes": [ "geo_country_codes" ], @@ -53,9 +50,6 @@ "asns": [ 1 ], - "auth0_managed": [ - "auth0_managed" - ], "geo_country_codes": [ "geo_country_codes" ], diff --git a/src/test/resources/wire-tests/NetworkAclsWireTest_testUpdate_response.json b/src/test/resources/wire-tests/NetworkAclsWireTest_testUpdate_response.json index 3dc352a50..d8b0169a8 100644 --- a/src/test/resources/wire-tests/NetworkAclsWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/NetworkAclsWireTest_testUpdate_response.json @@ -15,9 +15,6 @@ "asns": [ 1 ], - "auth0_managed": [ - "auth0_managed" - ], "geo_country_codes": [ "geo_country_codes" ], @@ -53,9 +50,6 @@ "asns": [ 1 ], - "auth0_managed": [ - "auth0_managed" - ], "geo_country_codes": [ "geo_country_codes" ], diff --git a/src/test/resources/wire-tests/TenantsSettingsWireTest_testGet_response.json b/src/test/resources/wire-tests/TenantsSettingsWireTest_testGet_response.json index 6426dafda..77d5e4623 100644 --- a/src/test/resources/wire-tests/TenantsSettingsWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/TenantsSettingsWireTest_testGet_response.json @@ -98,6 +98,8 @@ "authorization_response_iss_parameter_supported": true, "skip_non_verifiable_callback_uri_confirmation_prompt": true, "resource_parameter_profile": "audience", + "client_id_metadata_document_supported": true, "phone_consolidated_experience": true, - "enable_ai_guide": true + "enable_ai_guide": true, + "dynamic_client_registration_security_mode": "strict" } \ No newline at end of file diff --git a/src/test/resources/wire-tests/TenantsSettingsWireTest_testUpdate_response.json b/src/test/resources/wire-tests/TenantsSettingsWireTest_testUpdate_response.json index 6426dafda..77d5e4623 100644 --- a/src/test/resources/wire-tests/TenantsSettingsWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/TenantsSettingsWireTest_testUpdate_response.json @@ -98,6 +98,8 @@ "authorization_response_iss_parameter_supported": true, "skip_non_verifiable_callback_uri_confirmation_prompt": true, "resource_parameter_profile": "audience", + "client_id_metadata_document_supported": true, "phone_consolidated_experience": true, - "enable_ai_guide": true + "enable_ai_guide": true, + "dynamic_client_registration_security_mode": "strict" } \ No newline at end of file