From ff82350d543a3f5738a5de5cd36fadb7f2eecc1a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 20 Oct 2023 20:39:38 +0000 Subject: [PATCH] CodeGen from PR 26202 in Azure/azure-rest-api-specs Merge 5dc7afd2300f2ffffa880913dbb1a4fdcac5abce into ee9e300b2bc6e68da09d6c98f321675d33ad6c5d --- eng/versioning/version_client.txt | 1 + pom.xml | 1 + .../CHANGELOG.md | 5 + .../README.md | 107 + .../SAMPLE.md | 1465 +++++++++++ .../pom.xml | 62 + .../AzureintegrationspacesManager.java | 384 +++ .../fluent/ApplicationResourcesClient.java | 217 ++ .../fluent/ApplicationsClient.java | 385 +++ .../fluent/BusinessProcessVersionsClient.java | 111 + .../fluent/BusinessProcessesClient.java | 225 ++ .../fluent/InfrastructureResourcesClient.java | 200 ++ .../fluent/MicrosoftIntegrationSpaces.java | 95 + .../fluent/OperationsClient.java | 38 + .../fluent/SpacesClient.java | 193 ++ .../fluent/models/ApplicationInner.java | 131 + .../fluent/models/ApplicationProperties.java | 114 + .../models/ApplicationResourceInner.java | 138 + .../models/ApplicationResourceProperties.java | 133 + .../ApplicationResourceUpdateProperties.java | 102 + .../models/ApplicationUpdateProperties.java | 90 + .../fluent/models/BusinessProcessInner.java | 221 ++ .../models/BusinessProcessProperties.java | 243 ++ .../BusinessProcessUpdateProperties.java | 212 ++ .../models/BusinessProcessVersionInner.java | 222 ++ .../models/InfrastructureResourceInner.java | 115 + .../InfrastructureResourceProperties.java | 107 + ...nfrastructureResourceUpdateProperties.java | 76 + ...cessDevelopmentArtifactsResponseInner.java | 65 + .../fluent/models/OperationInner.java | 127 + ...ocessDevelopmentArtifactResponseInner.java | 108 + .../fluent/models/SpaceInner.java | 107 + .../models/SpaceResourceProperties.java | 66 + .../fluent/models/SpaceUpdateProperties.java | 50 + .../fluent/models/package-info.java | 9 + .../fluent/package-info.java | 9 + .../implementation/ApplicationImpl.java | 309 +++ .../ApplicationResourceImpl.java | 202 ++ .../ApplicationResourcesClientImpl.java | 1424 ++++++++++ .../ApplicationResourcesImpl.java | 251 ++ .../ApplicationsClientImpl.java | 2312 +++++++++++++++++ .../implementation/ApplicationsImpl.java | 362 +++ .../implementation/BusinessProcessImpl.java | 263 ++ .../BusinessProcessVersionImpl.java | 94 + .../BusinessProcessVersionsClientImpl.java | 852 ++++++ .../BusinessProcessVersionsImpl.java | 125 + .../BusinessProcessesClientImpl.java | 1457 +++++++++++ .../implementation/BusinessProcessesImpl.java | 269 ++ .../InfrastructureResourceImpl.java | 182 ++ .../InfrastructureResourcesClientImpl.java | 1304 ++++++++++ .../InfrastructureResourcesImpl.java | 220 ++ ...ocessDevelopmentArtifactsResponseImpl.java | 51 + .../MicrosoftIntegrationSpacesBuilder.java | 144 + .../MicrosoftIntegrationSpacesImpl.java | 374 +++ .../implementation/OperationImpl.java | 52 + .../implementation/OperationsClientImpl.java | 276 ++ .../implementation/OperationsImpl.java | 46 + ...rocessDevelopmentArtifactResponseImpl.java | 44 + .../implementation/SpaceImpl.java | 204 ++ .../implementation/SpacesClientImpl.java | 1386 ++++++++++ .../implementation/SpacesImpl.java | 184 ++ .../implementation/Utils.java | 204 ++ .../implementation/package-info.java | 9 + .../models/ActionType.java | 44 + .../models/Application.java | 402 +++ .../models/ApplicationListResult.java | 88 + .../models/ApplicationResource.java | 240 ++ .../models/ApplicationResourceListResult.java | 89 + .../models/ApplicationResourceUpdate.java | 112 + .../models/ApplicationResources.java | 171 ++ .../models/ApplicationUpdate.java | 118 + .../models/Applications.java | 342 +++ .../models/BusinessProcess.java | 344 +++ ...sProcessDevelopmentArtifactProperties.java | 195 ++ .../models/BusinessProcessIdentifier.java | 76 + .../models/BusinessProcessListResult.java | 88 + .../models/BusinessProcessMappingItem.java | 128 + .../models/BusinessProcessReference.java | 76 + .../models/BusinessProcessStage.java | 106 + .../models/BusinessProcessUpdate.java | 183 ++ .../models/BusinessProcessVersion.java | 103 + .../BusinessProcessVersionListResult.java | 89 + .../models/BusinessProcessVersions.java | 104 + .../models/BusinessProcesses.java | 179 ++ .../models/FlowTrackingDefinition.java | 92 + ...nessProcessDevelopmentArtifactRequest.java | 61 + .../models/InfrastructureResource.java | 207 ++ .../InfrastructureResourceListResult.java | 89 + .../models/InfrastructureResourceUpdate.java | 89 + .../models/InfrastructureResources.java | 163 ++ ...ssProcessDevelopmentArtifactsResponse.java | 27 + .../models/Operation.java | 56 + .../models/OperationDisplay.java | 91 + .../models/OperationListResult.java | 62 + .../models/Operations.java | 33 + .../azureintegrationspaces/models/Origin.java | 53 + .../models/ProvisioningState.java | 62 + ...essProcessDevelopmentArtifactResponse.java | 41 + ...nessProcessDevelopmentArtifactRequest.java | 91 + .../azureintegrationspaces/models/Space.java | 251 ++ .../models/SpaceListResult.java | 88 + .../models/SpaceUpdate.java | 95 + .../azureintegrationspaces/models/Spaces.java | 174 ++ .../models/TrackingCorrelationContext.java | 128 + .../models/TrackingDataStore.java | 153 ++ .../models/TrackingEventDefinition.java | 105 + .../models/TrackingProfileDefinition.java | 118 + .../models/package-info.java | 8 + .../azureintegrationspaces/package-info.java | 6 + .../src/main/java/module-info.java | 19 + .../proxy-config.json | 1 + .../reflect-config.json | 236 ++ ...icationResourcesCreateOrUpdateSamples.java | 29 + .../ApplicationResourcesDeleteSamples.java | 23 + .../ApplicationResourcesGetSamples.java | 23 + ...tionResourcesListByApplicationSamples.java | 34 + .../ApplicationResourcesPatchSamples.java | 34 + .../ApplicationsCreateOrUpdateSamples.java | 60 + ...nessProcessDevelopmentArtifactSamples.java | 30 + .../generated/ApplicationsDeleteSamples.java | 21 + ...nessProcessDevelopmentArtifactSamples.java | 30 + .../generated/ApplicationsGetSamples.java | 21 + ...essProcessDevelopmentArtifactsSamples.java | 24 + .../ApplicationsListBySpaceSamples.java | 24 + .../generated/ApplicationsPatchSamples.java | 46 + ...nessProcessDevelopmentArtifactSamples.java | 217 ++ ...nessProcessDevelopmentArtifactSamples.java | 217 ++ .../BusinessProcessVersionsGetSamples.java | 29 + ...sVersionsListByBusinessProcessSamples.java | 35 + ...usinessProcessesCreateOrUpdateSamples.java | 108 + .../BusinessProcessesDeleteSamples.java | 24 + .../BusinessProcessesGetSamples.java | 23 + ...nessProcessesListByApplicationSamples.java | 34 + .../BusinessProcessesPatchSamples.java | 29 + ...ructureResourcesCreateOrUpdateSamples.java | 28 + .../InfrastructureResourcesDeleteSamples.java | 23 + .../InfrastructureResourcesGetSamples.java | 23 + ...astructureResourcesListBySpaceSamples.java | 24 + .../InfrastructureResourcesPatchSamples.java | 33 + .../generated/OperationsListSamples.java | 21 + .../SpacesCreateOrUpdateSamples.java | 43 + .../generated/SpacesDeleteSamples.java | 21 + .../SpacesGetByResourceGroupSamples.java | 21 + .../SpacesListByResourceGroupSamples.java | 23 + .../generated/SpacesListSamples.java | 21 + .../generated/SpacesPatchSamples.java | 46 + sdk/azureintegrationspaces/ci.yml | 47 + sdk/azureintegrationspaces/pom.xml | 15 + 148 files changed, 25914 insertions(+) create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/CHANGELOG.md create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/README.md create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/SAMPLE.md create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/pom.xml create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/AzureintegrationspacesManager.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/ApplicationResourcesClient.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/ApplicationsClient.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/BusinessProcessVersionsClient.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/BusinessProcessesClient.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/InfrastructureResourcesClient.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/MicrosoftIntegrationSpaces.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/OperationsClient.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/SpacesClient.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationInner.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationProperties.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationResourceInner.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationResourceProperties.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationResourceUpdateProperties.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationUpdateProperties.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessInner.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessProperties.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessUpdateProperties.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessVersionInner.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/InfrastructureResourceInner.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/InfrastructureResourceProperties.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/InfrastructureResourceUpdateProperties.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ListBusinessProcessDevelopmentArtifactsResponseInner.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/OperationInner.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SaveOrGetBusinessProcessDevelopmentArtifactResponseInner.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SpaceInner.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SpaceResourceProperties.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SpaceUpdateProperties.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/package-info.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/package-info.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationResourceImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationResourcesClientImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationResourcesImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationsClientImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationsImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessVersionImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessVersionsClientImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessVersionsImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessesClientImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessesImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/InfrastructureResourceImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/InfrastructureResourcesClientImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/InfrastructureResourcesImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ListBusinessProcessDevelopmentArtifactsResponseImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/MicrosoftIntegrationSpacesBuilder.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/MicrosoftIntegrationSpacesImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/OperationImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/OperationsClientImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/OperationsImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SaveOrGetBusinessProcessDevelopmentArtifactResponseImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SpaceImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SpacesClientImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SpacesImpl.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/Utils.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/package-info.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ActionType.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Application.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationListResult.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResource.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResourceListResult.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResourceUpdate.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResources.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationUpdate.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Applications.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcess.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessDevelopmentArtifactProperties.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessIdentifier.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessListResult.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessMappingItem.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessReference.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessStage.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessUpdate.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessVersion.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessVersionListResult.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessVersions.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcesses.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/FlowTrackingDefinition.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/GetOrDeleteBusinessProcessDevelopmentArtifactRequest.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResource.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResourceListResult.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResourceUpdate.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResources.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ListBusinessProcessDevelopmentArtifactsResponse.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Operation.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/OperationDisplay.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/OperationListResult.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Operations.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Origin.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ProvisioningState.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SaveOrGetBusinessProcessDevelopmentArtifactResponse.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SaveOrValidateBusinessProcessDevelopmentArtifactRequest.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Space.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SpaceListResult.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SpaceUpdate.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Spaces.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingCorrelationContext.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingDataStore.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingEventDefinition.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingProfileDefinition.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/package-info.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/package-info.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/module-info.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azureintegrationspaces/proxy-config.json create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azureintegrationspaces/reflect-config.json create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesCreateOrUpdateSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesDeleteSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesGetSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesListByApplicationSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesPatchSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsCreateOrUpdateSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsDeleteBusinessProcessDevelopmentArtifactSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsDeleteSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsGetBusinessProcessDevelopmentArtifactSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsGetSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsListBusinessProcessDevelopmentArtifactsSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsListBySpaceSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsPatchSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsSaveBusinessProcessDevelopmentArtifactSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsValidateBusinessProcessDevelopmentArtifactSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessVersionsGetSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessVersionsListByBusinessProcessSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesCreateOrUpdateSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesDeleteSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesGetSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesListByApplicationSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesPatchSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesCreateOrUpdateSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesDeleteSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesGetSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesListBySpaceSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesPatchSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/OperationsListSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesCreateOrUpdateSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesDeleteSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesGetByResourceGroupSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesListByResourceGroupSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesListSamples.java create mode 100644 sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesPatchSamples.java create mode 100644 sdk/azureintegrationspaces/ci.yml create mode 100644 sdk/azureintegrationspaces/pom.xml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 89c4a024c6fb..f5f28faa3eaa 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -431,6 +431,7 @@ com.azure.resourcemanager:azure-resourcemanager-hdinsight-containers;1.0.0-beta. com.azure.resourcemanager:azure-resourcemanager-apicenter;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-hybridconnectivity;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-playwrighttesting;1.0.0-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-azureintegrationspaces;1.0.0-beta.1;1.0.0-beta.1 com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1 com.azure.tools:azure-sdk-build-tool;1.0.0;1.1.0-beta.1 diff --git a/pom.xml b/pom.xml index 2933b7b5264a..69efaeb186d9 100644 --- a/pom.xml +++ b/pom.xml @@ -28,6 +28,7 @@ sdk/avs sdk/azureadexternalidentities sdk/azurearcdata + sdk/azureintegrationspaces sdk/azurestack sdk/azurestackhci sdk/baremetalinfrastructure diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/CHANGELOG.md b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/CHANGELOG.md new file mode 100644 index 000000000000..b8d4bdd406a2 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2023-10-20) + +- Azure Resource Manager azureintegrationspaces client library for Java. This package contains Microsoft Azure SDK for azureintegrationspaces Management SDK. The azure integration spaces resource provider. Package tag package-2023-11-14-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/README.md b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/README.md new file mode 100644 index 000000000000..7ab7511f5315 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/README.md @@ -0,0 +1,107 @@ +# Azure Resource Manager azureintegrationspaces client library for Java + +Azure Resource Manager azureintegrationspaces client library for Java. + +This package contains Microsoft Azure SDK for azureintegrationspaces Management SDK. The azure integration spaces resource provider. Package tag package-2023-11-14-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +## We'd love to hear your feedback + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-azureintegrationspaces;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-azureintegrationspaces + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. + +### Authentication + +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. + +- `AZURE_CLIENT_ID` for Azure client ID. +- `AZURE_TENANT_ID` for Azure tenant ID. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. + +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. + +With above configuration, `azure` client can be authenticated using the following code: + +```java +AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +AzureintegrationspacesManager manager = AzureintegrationspacesManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide][cg]. + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fazureintegrationspaces%2Fazure-resourcemanager-azureintegrationspaces%2FREADME.png) diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/SAMPLE.md b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/SAMPLE.md new file mode 100644 index 000000000000..19b20bb71845 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/SAMPLE.md @@ -0,0 +1,1465 @@ +# Code snippets and samples + + +## ApplicationResources + +- [CreateOrUpdate](#applicationresources_createorupdate) +- [Delete](#applicationresources_delete) +- [Get](#applicationresources_get) +- [ListByApplication](#applicationresources_listbyapplication) +- [Patch](#applicationresources_patch) + +## Applications + +- [CreateOrUpdate](#applications_createorupdate) +- [Delete](#applications_delete) +- [DeleteBusinessProcessDevelopmentArtifact](#applications_deletebusinessprocessdevelopmentartifact) +- [Get](#applications_get) +- [GetBusinessProcessDevelopmentArtifact](#applications_getbusinessprocessdevelopmentartifact) +- [ListBusinessProcessDevelopmentArtifacts](#applications_listbusinessprocessdevelopmentartifacts) +- [ListBySpace](#applications_listbyspace) +- [Patch](#applications_patch) +- [SaveBusinessProcessDevelopmentArtifact](#applications_savebusinessprocessdevelopmentartifact) +- [ValidateBusinessProcessDevelopmentArtifact](#applications_validatebusinessprocessdevelopmentartifact) + +## BusinessProcessVersions + +- [Get](#businessprocessversions_get) +- [ListByBusinessProcess](#businessprocessversions_listbybusinessprocess) + +## BusinessProcesses + +- [CreateOrUpdate](#businessprocesses_createorupdate) +- [Delete](#businessprocesses_delete) +- [Get](#businessprocesses_get) +- [ListByApplication](#businessprocesses_listbyapplication) +- [Patch](#businessprocesses_patch) + +## InfrastructureResources + +- [CreateOrUpdate](#infrastructureresources_createorupdate) +- [Delete](#infrastructureresources_delete) +- [Get](#infrastructureresources_get) +- [ListBySpace](#infrastructureresources_listbyspace) +- [Patch](#infrastructureresources_patch) + +## Operations + +- [List](#operations_list) + +## Spaces + +- [CreateOrUpdate](#spaces_createorupdate) +- [Delete](#spaces_delete) +- [GetByResourceGroup](#spaces_getbyresourcegroup) +- [List](#spaces_list) +- [ListByResourceGroup](#spaces_listbyresourcegroup) +- [Patch](#spaces_patch) +### ApplicationResources_CreateOrUpdate + +```java +/** Samples for ApplicationResources CreateOrUpdate. */ +public final class ApplicationResourcesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/ApplicationResources_CreateOrUpdate.json + */ + /** + * Sample code: CreateOrUpdateApplicationResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void createOrUpdateApplicationResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applicationResources() + .define("Resource1") + .withExistingApplication("testrg", "Space1", "Application1") + .withResourceType("Microsoft.Web/sites") + .withResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Web/sites/LogicApp1") + .withResourceKind("LogicApp") + .create(); + } +} +``` + +### ApplicationResources_Delete + +```java +/** Samples for ApplicationResources Delete. */ +public final class ApplicationResourcesDeleteSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/ApplicationResources_Delete.json + */ + /** + * Sample code: DeleteApplicationResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void deleteApplicationResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applicationResources() + .deleteWithResponse("testrg", "Space1", "Application1", "Resource1", com.azure.core.util.Context.NONE); + } +} +``` + +### ApplicationResources_Get + +```java +/** Samples for ApplicationResources Get. */ +public final class ApplicationResourcesGetSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/ApplicationResources_Get.json + */ + /** + * Sample code: GetApplicationResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getApplicationResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applicationResources() + .getWithResponse("testrg", "Space1", "Application1", "Resource1", com.azure.core.util.Context.NONE); + } +} +``` + +### ApplicationResources_ListByApplication + +```java +/** Samples for ApplicationResources ListByApplication. */ +public final class ApplicationResourcesListByApplicationSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/ApplicationResources_ListByApplication.json + */ + /** + * Sample code: ListApplicationResourceByApplication. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listApplicationResourceByApplication( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applicationResources() + .listByApplication( + "testrg", + "Space1", + "Application1", + null, + null, + null, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### ApplicationResources_Patch + +```java +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationResource; + +/** Samples for ApplicationResources Patch. */ +public final class ApplicationResourcesPatchSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/ApplicationResources_Patch.json + */ + /** + * Sample code: PatchApplicationResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void patchApplicationResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + ApplicationResource resource = + manager + .applicationResources() + .getWithResponse("testrg", "Space1", "Application1", "Resource1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withResourceType("Microsoft.Web/sites") + .withResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Web/sites/LogicApp1") + .withResourceKind("LogicApp") + .apply(); + } +} +``` + +### Applications_CreateOrUpdate + +```java +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingDataStore; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Applications CreateOrUpdate. */ +public final class ApplicationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_CreateOrUpdate.json + */ + /** + * Sample code: CreateOrUpdateApplication. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void createOrUpdateApplication( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .define("Application1") + .withRegion("CentralUS") + .withExistingSpace("testrg", "Space1") + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withDescription("This is the user provided description of the application.") + .withTrackingDataStores( + mapOf( + "dataStoreName1", + new TrackingDataStore() + .withDatabaseName("testDatabase1") + .withDataStoreResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1") + .withDataStoreUri("https://someClusterName.someRegionName.kusto.windows.net") + .withDataStoreIngestionUri("https://ingest-someClusterName.someRegionName.kusto.windows.net"), + "dataStoreName2", + new TrackingDataStore() + .withDatabaseName("testDatabase1") + .withDataStoreResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1") + .withDataStoreUri("https://someClusterName.someRegionName.kusto.windows.net") + .withDataStoreIngestionUri("https://ingest-someClusterName.someRegionName.kusto.windows.net"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Applications_Delete + +```java +/** Samples for Applications Delete. */ +public final class ApplicationsDeleteSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_Delete.json + */ + /** + * Sample code: DeleteApplication. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void deleteApplication( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager.applications().deleteWithResponse("testrg", "Space1", "Application1", com.azure.core.util.Context.NONE); + } +} +``` + +### Applications_DeleteBusinessProcessDevelopmentArtifact + +```java +import com.azure.resourcemanager.azureintegrationspaces.models.GetOrDeleteBusinessProcessDevelopmentArtifactRequest; + +/** Samples for Applications DeleteBusinessProcessDevelopmentArtifact. */ +public final class ApplicationsDeleteBusinessProcessDevelopmentArtifactSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_DeleteBusinessProcessDevelopmentArtifact.json + */ + /** + * Sample code: DeleteBusinessProcessDevelopmentArtifact. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void deleteBusinessProcessDevelopmentArtifact( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .deleteBusinessProcessDevelopmentArtifactWithResponse( + "testrg", + "Space1", + "Application1", + new GetOrDeleteBusinessProcessDevelopmentArtifactRequest().withName("BusinessProcess1"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Applications_Get + +```java +/** Samples for Applications Get. */ +public final class ApplicationsGetSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_Get.json + */ + /** + * Sample code: GetApplication. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getApplication( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager.applications().getWithResponse("testrg", "Space1", "Application1", com.azure.core.util.Context.NONE); + } +} +``` + +### Applications_GetBusinessProcessDevelopmentArtifact + +```java +import com.azure.resourcemanager.azureintegrationspaces.models.GetOrDeleteBusinessProcessDevelopmentArtifactRequest; + +/** Samples for Applications GetBusinessProcessDevelopmentArtifact. */ +public final class ApplicationsGetBusinessProcessDevelopmentArtifactSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_GetBusinessProcessDevelopmentArtifact.json + */ + /** + * Sample code: GetBusinessProcessDevelopmentArtifact. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getBusinessProcessDevelopmentArtifact( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .getBusinessProcessDevelopmentArtifactWithResponse( + "testrg", + "Space1", + "Application1", + new GetOrDeleteBusinessProcessDevelopmentArtifactRequest().withName("BusinessProcess1"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Applications_ListBusinessProcessDevelopmentArtifacts + +```java +/** Samples for Applications ListBusinessProcessDevelopmentArtifacts. */ +public final class ApplicationsListBusinessProcessDevelopmentArtifactsSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_ListBusinessProcessDevelopmentArtifacts.json + */ + /** + * Sample code: ListBusinessProcessDevelopmentArtifacts. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listBusinessProcessDevelopmentArtifacts( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .listBusinessProcessDevelopmentArtifactsWithResponse( + "testrg", "Space1", "Application1", com.azure.core.util.Context.NONE); + } +} +``` + +### Applications_ListBySpace + +```java +/** Samples for Applications ListBySpace. */ +public final class ApplicationsListBySpaceSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_ListBySpace.json + */ + /** + * Sample code: ListApplicationsBySpace. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listApplicationsBySpace( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .listBySpace( + "testrg", "Space1", null, null, null, null, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### Applications_Patch + +```java +import com.azure.resourcemanager.azureintegrationspaces.models.Application; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Applications Patch. */ +public final class ApplicationsPatchSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_Patch.json + */ + /** + * Sample code: PatchApplication. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void patchApplication( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + Application resource = + manager + .applications() + .getWithResponse("testrg", "Space1", "Application1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withDescription("This is the user provided PATCHED description of the application.") + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Applications_SaveBusinessProcessDevelopmentArtifact + +```java +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessDevelopmentArtifactProperties; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessReference; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage; +import com.azure.resourcemanager.azureintegrationspaces.models.FlowTrackingDefinition; +import com.azure.resourcemanager.azureintegrationspaces.models.SaveOrValidateBusinessProcessDevelopmentArtifactRequest; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingCorrelationContext; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingEventDefinition; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingProfileDefinition; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Applications SaveBusinessProcessDevelopmentArtifact. */ +public final class ApplicationsSaveBusinessProcessDevelopmentArtifactSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_SaveBusinessProcessDevelopmentArtifact.json + */ + /** + * Sample code: SaveBusinessProcessDevelopmentArtifact. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void saveBusinessProcessDevelopmentArtifact( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .saveBusinessProcessDevelopmentArtifactWithResponse( + "testrg", + "Space1", + "Application1", + new SaveOrValidateBusinessProcessDevelopmentArtifactRequest() + .withName("BusinessProcess1") + .withProperties( + new BusinessProcessDevelopmentArtifactProperties() + .withDescription("First Business Process") + .withIdentifier( + new BusinessProcessIdentifier() + .withPropertyName("businessIdentifier-1") + .withPropertyType("String")) + .withBusinessProcessStages( + mapOf( + "Completed", + new BusinessProcessStage() + .withDescription("Completed") + .withStagesBefore(Arrays.asList("Shipped")), + "Denied", + new BusinessProcessStage() + .withDescription("Denied") + .withStagesBefore(Arrays.asList("Processing")), + "Processing", + new BusinessProcessStage() + .withDescription("Processing") + .withProperties( + mapOf( + "ApprovalState", + "String", + "ApproverName", + "String", + "POAmount", + "Integer")) + .withStagesBefore(Arrays.asList("Received")), + "Received", + new BusinessProcessStage() + .withDescription("received") + .withProperties( + mapOf( + "City", + "String", + "Product", + "String", + "Quantity", + "Integer", + "State", + "String")), + "Shipped", + new BusinessProcessStage() + .withDescription("Shipped") + .withProperties(mapOf("ShipPriority", "Integer", "TrackingID", "Integer")) + .withStagesBefore(Arrays.asList("Denied")))) + .withBusinessProcessMapping( + mapOf( + "Completed", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("CompletedPO") + .withOperationType("Action"), + "Denied", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("DeniedPO") + .withOperationType("Action"), + "Processing", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("PurchaseOrder") + .withOperationName("ApprovedPO") + .withOperationType("Action"), + "Received", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("PurchaseOrder") + .withOperationName("manual") + .withOperationType("Trigger"), + "Shipped", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("ShippedPO") + .withOperationType("Action"))) + .withTrackingProfiles( + mapOf( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + new TrackingProfileDefinition() + .withSchema( + "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#") + .withBusinessProcess( + new BusinessProcessReference() + .withName("businessProcess1") + .withVersion("d52c9c91-6e10-4a90-9c1f-08ee5d01c656")) + .withTrackingDefinitions( + mapOf( + "Fulfillment", + new FlowTrackingDefinition() + .withCorrelationContext( + new TrackingCorrelationContext() + .withOperationType("Trigger") + .withOperationName("manual") + .withPropertyName("OrderNumber") + .withValue("@trigger().outputs.body.OrderNumber")) + .withEvents( + mapOf( + "Completed", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("CompletedPO") + .withProperties(mapOf()), + "Denied", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("DeniedPO") + .withProperties(mapOf()), + "Shipped", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("ShippedPO") + .withProperties( + mapOf( + "ShipPriority", + "@action().inputs.shipPriority", + "TrackingID", + "@action().inputs.trackingID")))), + "PurchaseOrder", + new FlowTrackingDefinition() + .withCorrelationContext( + new TrackingCorrelationContext() + .withOperationType("Trigger") + .withOperationName("manual") + .withPropertyName("OrderNumber") + .withValue("@trigger().outputs.body.OrderNumber")) + .withEvents( + mapOf( + "Processing", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("ApprovedPO") + .withProperties( + mapOf( + "ApprovalStatus", + "@action().inputs.ApprovalStatus", + "ApproverName", + "@action().inputs.ApproverName", + "POAmount", + "@action().inputs.POamount")), + "Received", + new TrackingEventDefinition() + .withOperationType("Trigger") + .withOperationName("manual") + .withProperties( + mapOf( + "City", + "@trigger().outputs.body.Address.City", + "Product", + "@trigger().outputs.body.Product", + "Quantity", + "@trigger().outputs.body.Quantity", + "State", + "@trigger().outputs.body.Address.State"))))))))), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Applications_ValidateBusinessProcessDevelopmentArtifact + +```java +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessDevelopmentArtifactProperties; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessReference; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage; +import com.azure.resourcemanager.azureintegrationspaces.models.FlowTrackingDefinition; +import com.azure.resourcemanager.azureintegrationspaces.models.SaveOrValidateBusinessProcessDevelopmentArtifactRequest; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingCorrelationContext; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingEventDefinition; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingProfileDefinition; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Applications ValidateBusinessProcessDevelopmentArtifact. */ +public final class ApplicationsValidateBusinessProcessDevelopmentArtifactSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_ValidateBusinessProcessDevelopmentArtifact.json + */ + /** + * Sample code: ValidateBusinessProcessDevelopmentArtifact. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void validateBusinessProcessDevelopmentArtifact( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .validateBusinessProcessDevelopmentArtifactWithResponse( + "testrg", + "Space1", + "Application1", + new SaveOrValidateBusinessProcessDevelopmentArtifactRequest() + .withName("BusinessProcess1") + .withProperties( + new BusinessProcessDevelopmentArtifactProperties() + .withDescription("First Business Process") + .withIdentifier( + new BusinessProcessIdentifier() + .withPropertyName("businessIdentifier-1") + .withPropertyType("String")) + .withBusinessProcessStages( + mapOf( + "Completed", + new BusinessProcessStage() + .withDescription("Completed") + .withStagesBefore(Arrays.asList("Shipped")), + "Denied", + new BusinessProcessStage() + .withDescription("Denied") + .withStagesBefore(Arrays.asList("Processing")), + "Processing", + new BusinessProcessStage() + .withDescription("Processing") + .withProperties( + mapOf( + "ApprovalState", + "String", + "ApproverName", + "String", + "POAmount", + "Integer")) + .withStagesBefore(Arrays.asList("Received")), + "Received@", + new BusinessProcessStage() + .withDescription("received") + .withProperties( + mapOf( + "City", + "String", + "Product", + "String", + "Quantity", + "Integer", + "State", + "String")), + "Shipped", + new BusinessProcessStage() + .withDescription("Shipped") + .withProperties(mapOf("ShipPriority", "Integer", "TrackingID", "Integer")) + .withStagesBefore(Arrays.asList("Denied")))) + .withBusinessProcessMapping( + mapOf( + "Completed", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("CompletedPO") + .withOperationType("Action"), + "Denied", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("DeniedPO") + .withOperationType("Action"), + "Processing", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("PurchaseOrder") + .withOperationName("ApprovedPO") + .withOperationType("Action"), + "Received", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("PurchaseOrder") + .withOperationName("manual") + .withOperationType("Trigger"), + "Shipped", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("ShippedPO") + .withOperationType("Action"))) + .withTrackingProfiles( + mapOf( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + new TrackingProfileDefinition() + .withSchema( + "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#") + .withBusinessProcess( + new BusinessProcessReference() + .withName("businessProcess1") + .withVersion("d52c9c91-6e10-4a90-9c1f-08ee5d01c656")) + .withTrackingDefinitions( + mapOf( + "Fulfillment", + new FlowTrackingDefinition() + .withCorrelationContext( + new TrackingCorrelationContext() + .withOperationType("Trigger") + .withOperationName("manual") + .withPropertyName("OrderNumber") + .withValue("@trigger().outputs.body.OrderNumber")) + .withEvents( + mapOf( + "Completed", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("CompletedPO") + .withProperties(mapOf()), + "Denied", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("DeniedPO") + .withProperties(mapOf()), + "Shipped", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("ShippedPO") + .withProperties( + mapOf( + "ShipPriority", + "@action().inputs.shipPriority", + "TrackingID", + "@action().inputs.trackingID")))), + "PurchaseOrder", + new FlowTrackingDefinition() + .withCorrelationContext( + new TrackingCorrelationContext() + .withOperationType("Trigger") + .withOperationName("manual") + .withPropertyName("OrderNumber") + .withValue("@trigger().outputs.body.OrderNumber")) + .withEvents( + mapOf( + "Processing", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("ApprovedPO") + .withProperties( + mapOf( + "ApprovalStatus", + "@action().inputs.ApprovalStatus", + "ApproverName", + "@action().inputs.ApproverName", + "POAmount", + "@action().inputs.POamount")), + "Received", + new TrackingEventDefinition() + .withOperationType("Trigger") + .withOperationName("manual") + .withProperties( + mapOf( + "City", + "@trigger().outputs.body.Address.City", + "Product", + "@trigger().outputs.body.Product", + "Quantity", + "@trigger().outputs.body.Quantity", + "State", + "@trigger().outputs.body.Address.State"))))))))), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### BusinessProcessVersions_Get + +```java +/** Samples for BusinessProcessVersions Get. */ +public final class BusinessProcessVersionsGetSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcessVersions_Get.json + */ + /** + * Sample code: GetBusinessProcessVersion. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getBusinessProcessVersion( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .businessProcessVersions() + .getWithResponse( + "testrg", + "Space1", + "Application1", + "BusinessProcess1", + "08585074782265427079", + com.azure.core.util.Context.NONE); + } +} +``` + +### BusinessProcessVersions_ListByBusinessProcess + +```java +/** Samples for BusinessProcessVersions ListByBusinessProcess. */ +public final class BusinessProcessVersionsListByBusinessProcessSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcessVersions_ListByBusinessProcess.json + */ + /** + * Sample code: ListBusinessProcessVersionsByBusinessProcess. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listBusinessProcessVersionsByBusinessProcess( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .businessProcessVersions() + .listByBusinessProcess( + "testrg", + "Space1", + "Application1", + "BusinessProcess1", + null, + null, + null, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### BusinessProcesses_CreateOrUpdate + +```java +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for BusinessProcesses CreateOrUpdate. */ +public final class BusinessProcessesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcesses_CreateOrUpdate.json + */ + /** + * Sample code: CreateOrUpdateBusinessProcess. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void createOrUpdateBusinessProcess( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .businessProcesses() + .define("BusinessProcess1") + .withExistingApplication("testrg", "Space1", "Application1") + .withDescription("First Business Process") + .withTableName("table1") + .withTrackingDataStoreReferenceName("trackingDataStoreReferenceName1") + .withIdentifier( + new BusinessProcessIdentifier().withPropertyName("businessIdentifier-1").withPropertyType("String")) + .withBusinessProcessStages( + mapOf( + "Completed", + new BusinessProcessStage().withDescription("Completed").withStagesBefore(Arrays.asList("Shipped")), + "Denied", + new BusinessProcessStage().withDescription("Denied").withStagesBefore(Arrays.asList("Processing")), + "Processing", + new BusinessProcessStage() + .withDescription("Processing") + .withProperties( + mapOf("ApprovalState", "String", "ApproverName", "String", "POAmount", "Integer")) + .withStagesBefore(Arrays.asList("Received")), + "Received", + new BusinessProcessStage() + .withDescription("received") + .withProperties( + mapOf("City", "String", "Product", "String", "Quantity", "Integer", "State", "String")), + "Shipped", + new BusinessProcessStage() + .withDescription("Shipped") + .withProperties(mapOf("ShipPriority", "Integer", "TrackingID", "Integer")) + .withStagesBefore(Arrays.asList("Denied")))) + .withBusinessProcessMapping( + mapOf( + "Completed", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("CompletedPO") + .withOperationType("Action"), + "Denied", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("DeniedPO") + .withOperationType("Action"), + "Processing", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("PurchaseOrder") + .withOperationName("ApprovedPO") + .withOperationType("Action"), + "Received", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("PurchaseOrder") + .withOperationName("manual") + .withOperationType("Trigger"), + "Shipped", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("ShippedPO") + .withOperationType("Action"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### BusinessProcesses_Delete + +```java +/** Samples for BusinessProcesses Delete. */ +public final class BusinessProcessesDeleteSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcesses_Delete.json + */ + /** + * Sample code: DeleteBusinessProcess. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void deleteBusinessProcess( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .businessProcesses() + .deleteWithResponse( + "testrg", "Space1", "Application1", "BusinessProcess1", com.azure.core.util.Context.NONE); + } +} +``` + +### BusinessProcesses_Get + +```java +/** Samples for BusinessProcesses Get. */ +public final class BusinessProcessesGetSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcesses_Get.json + */ + /** + * Sample code: GetBusinessProcess. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getBusinessProcess( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .businessProcesses() + .getWithResponse("testrg", "Space1", "Application1", "BusinessProcess1", com.azure.core.util.Context.NONE); + } +} +``` + +### BusinessProcesses_ListByApplication + +```java +/** Samples for BusinessProcesses ListByApplication. */ +public final class BusinessProcessesListByApplicationSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcesses_ListByApplication.json + */ + /** + * Sample code: ListBusinessProcessesByApplication. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listBusinessProcessesByApplication( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .businessProcesses() + .listByApplication( + "testrg", + "Space1", + "Application1", + null, + null, + null, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### BusinessProcesses_Patch + +```java +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcess; + +/** Samples for BusinessProcesses Patch. */ +public final class BusinessProcessesPatchSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcesses_Patch.json + */ + /** + * Sample code: PatchBusinessProcess. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void patchBusinessProcess( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + BusinessProcess resource = + manager + .businessProcesses() + .getWithResponse( + "testrg", "Space1", "Application1", "BusinessProcess1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withDescription("First updated business process.").apply(); + } +} +``` + +### InfrastructureResources_CreateOrUpdate + +```java +/** Samples for InfrastructureResources CreateOrUpdate. */ +public final class InfrastructureResourcesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/InfrastructureResources_CreateOrUpdate.json + */ + /** + * Sample code: CreateOrUpdateInfrastructureResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void createOrUpdateInfrastructureResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .infrastructureResources() + .define("InfrastructureResource1") + .withExistingSpace("testrg", "Space1") + .withResourceType("Microsoft.ApiManagement/service") + .withResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1") + .create(); + } +} +``` + +### InfrastructureResources_Delete + +```java +/** Samples for InfrastructureResources Delete. */ +public final class InfrastructureResourcesDeleteSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/InfrastructureResources_Delete.json + */ + /** + * Sample code: DeleteInfrastructureResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void deleteInfrastructureResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .infrastructureResources() + .deleteWithResponse("testrg", "Space1", "InfrastructureResource1", com.azure.core.util.Context.NONE); + } +} +``` + +### InfrastructureResources_Get + +```java +/** Samples for InfrastructureResources Get. */ +public final class InfrastructureResourcesGetSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/InfrastructureResources_Get.json + */ + /** + * Sample code: GetInfrastructureResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getInfrastructureResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .infrastructureResources() + .getWithResponse("testrg", "Space1", "InfrastructureResource1", com.azure.core.util.Context.NONE); + } +} +``` + +### InfrastructureResources_ListBySpace + +```java +/** Samples for InfrastructureResources ListBySpace. */ +public final class InfrastructureResourcesListBySpaceSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/InfrastructureResources_ListBySpace.json + */ + /** + * Sample code: ListInfrastructureResourcesBySpace. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listInfrastructureResourcesBySpace( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .infrastructureResources() + .listBySpace( + "testrg", "Space1", null, null, null, null, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### InfrastructureResources_Patch + +```java +import com.azure.resourcemanager.azureintegrationspaces.models.InfrastructureResource; + +/** Samples for InfrastructureResources Patch. */ +public final class InfrastructureResourcesPatchSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/InfrastructureResources_Patch.json + */ + /** + * Sample code: PatchInfrastructureResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void patchInfrastructureResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + InfrastructureResource resource = + manager + .infrastructureResources() + .getWithResponse("testrg", "Space1", "InfrastructureResource1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withResourceType("Microsoft.ApiManagement/service") + .withResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1") + .apply(); + } +} +``` + +### Operations_List + +```java +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Operations_List.json + */ + /** + * Sample code: Operations_List. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void operationsList( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Spaces_CreateOrUpdate + +```java +import java.util.HashMap; +import java.util.Map; + +/** Samples for Spaces CreateOrUpdate. */ +public final class SpacesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Spaces_CreateOrUpdate.json + */ + /** + * Sample code: CreateOrUpdateSpace. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void createOrUpdateSpace( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .spaces() + .define("Space1") + .withRegion("CentralUS") + .withExistingResourceGroup("testrg") + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withDescription("This is the user provided description of the space resource.") + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Spaces_Delete + +```java +/** Samples for Spaces Delete. */ +public final class SpacesDeleteSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Spaces_Delete.json + */ + /** + * Sample code: DeleteSpace. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void deleteSpace( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager.spaces().deleteByResourceGroupWithResponse("testrg", "Space1", com.azure.core.util.Context.NONE); + } +} +``` + +### Spaces_GetByResourceGroup + +```java +/** Samples for Spaces GetByResourceGroup. */ +public final class SpacesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Spaces_Get.json + */ + /** + * Sample code: GetSpace. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getSpace( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager.spaces().getByResourceGroupWithResponse("testrg", "Space1", com.azure.core.util.Context.NONE); + } +} +``` + +### Spaces_List + +```java +/** Samples for Spaces List. */ +public final class SpacesListSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Spaces_ListBySubscription.json + */ + /** + * Sample code: ListSpacesBySubscription. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listSpacesBySubscription( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager.spaces().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Spaces_ListByResourceGroup + +```java +/** Samples for Spaces ListByResourceGroup. */ +public final class SpacesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Spaces_ListByResourceGroup.json + */ + /** + * Sample code: ListSpacesByResourceGroup. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listSpacesByResourceGroup( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .spaces() + .listByResourceGroup("testrg", null, null, null, null, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### Spaces_Patch + +```java +import com.azure.resourcemanager.azureintegrationspaces.models.Space; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Spaces Patch. */ +public final class SpacesPatchSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Spaces_Patch.json + */ + /** + * Sample code: PatchSpace. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void patchSpace( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + Space resource = + manager + .spaces() + .getByResourceGroupWithResponse("testrg", "Space1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withDescription("This is the user provided description of the space resource.") + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/pom.xml b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/pom.xml new file mode 100644 index 000000000000..5b7623e2884d --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-azureintegrationspaces + 1.0.0-beta.1 + jar + + Microsoft Azure SDK for azureintegrationspaces Management + This package contains Microsoft Azure SDK for azureintegrationspaces Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The azure integration spaces resource provider. Package tag package-2023-11-14-preview. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0 + 0 + true + + + + com.azure + azure-core + 1.44.1 + + + com.azure + azure-core-management + 1.11.7 + + + diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/AzureintegrationspacesManager.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/AzureintegrationspacesManager.java new file mode 100644 index 000000000000..45b578f5958c --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/AzureintegrationspacesManager.java @@ -0,0 +1,384 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.MicrosoftIntegrationSpaces; +import com.azure.resourcemanager.azureintegrationspaces.implementation.ApplicationResourcesImpl; +import com.azure.resourcemanager.azureintegrationspaces.implementation.ApplicationsImpl; +import com.azure.resourcemanager.azureintegrationspaces.implementation.BusinessProcessVersionsImpl; +import com.azure.resourcemanager.azureintegrationspaces.implementation.BusinessProcessesImpl; +import com.azure.resourcemanager.azureintegrationspaces.implementation.InfrastructureResourcesImpl; +import com.azure.resourcemanager.azureintegrationspaces.implementation.MicrosoftIntegrationSpacesBuilder; +import com.azure.resourcemanager.azureintegrationspaces.implementation.OperationsImpl; +import com.azure.resourcemanager.azureintegrationspaces.implementation.SpacesImpl; +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationResources; +import com.azure.resourcemanager.azureintegrationspaces.models.Applications; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessVersions; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcesses; +import com.azure.resourcemanager.azureintegrationspaces.models.InfrastructureResources; +import com.azure.resourcemanager.azureintegrationspaces.models.Operations; +import com.azure.resourcemanager.azureintegrationspaces.models.Spaces; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** Entry point to AzureintegrationspacesManager. The azure integration spaces resource provider. */ +public final class AzureintegrationspacesManager { + private Operations operations; + + private Spaces spaces; + + private Applications applications; + + private BusinessProcesses businessProcesses; + + private BusinessProcessVersions businessProcessVersions; + + private ApplicationResources applicationResources; + + private InfrastructureResources infrastructureResources; + + private final MicrosoftIntegrationSpaces clientObject; + + private AzureintegrationspacesManager( + HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = + new MicrosoftIntegrationSpacesBuilder() + .pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); + } + + /** + * Creates an instance of azureintegrationspaces service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the azureintegrationspaces service API instance. + */ + public static AzureintegrationspacesManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * Creates an instance of azureintegrationspaces service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the azureintegrationspaces service API instance. + */ + public static AzureintegrationspacesManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new AzureintegrationspacesManager(httpPipeline, profile, null); + } + + /** + * Gets a Configurable instance that can be used to create AzureintegrationspacesManager with optional + * configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new AzureintegrationspacesManager.Configurable(); + } + + /** The Configurable allowing configurations to be set. */ + public static final class Configurable { + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of azureintegrationspaces service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the azureintegrationspaces service API instance. + */ + public AzureintegrationspacesManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder + .append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.azureintegrationspaces") + .append("/") + .append("1.0.0-beta.1"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder + .append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); + policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = + new HttpPipelineBuilder() + .httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); + return new AzureintegrationspacesManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of Spaces. It manages Space. + * + * @return Resource collection API of Spaces. + */ + public Spaces spaces() { + if (this.spaces == null) { + this.spaces = new SpacesImpl(clientObject.getSpaces(), this); + } + return spaces; + } + + /** + * Gets the resource collection API of Applications. It manages Application. + * + * @return Resource collection API of Applications. + */ + public Applications applications() { + if (this.applications == null) { + this.applications = new ApplicationsImpl(clientObject.getApplications(), this); + } + return applications; + } + + /** + * Gets the resource collection API of BusinessProcesses. It manages BusinessProcess. + * + * @return Resource collection API of BusinessProcesses. + */ + public BusinessProcesses businessProcesses() { + if (this.businessProcesses == null) { + this.businessProcesses = new BusinessProcessesImpl(clientObject.getBusinessProcesses(), this); + } + return businessProcesses; + } + + /** + * Gets the resource collection API of BusinessProcessVersions. + * + * @return Resource collection API of BusinessProcessVersions. + */ + public BusinessProcessVersions businessProcessVersions() { + if (this.businessProcessVersions == null) { + this.businessProcessVersions = + new BusinessProcessVersionsImpl(clientObject.getBusinessProcessVersions(), this); + } + return businessProcessVersions; + } + + /** + * Gets the resource collection API of ApplicationResources. It manages ApplicationResource. + * + * @return Resource collection API of ApplicationResources. + */ + public ApplicationResources applicationResources() { + if (this.applicationResources == null) { + this.applicationResources = new ApplicationResourcesImpl(clientObject.getApplicationResources(), this); + } + return applicationResources; + } + + /** + * Gets the resource collection API of InfrastructureResources. It manages InfrastructureResource. + * + * @return Resource collection API of InfrastructureResources. + */ + public InfrastructureResources infrastructureResources() { + if (this.infrastructureResources == null) { + this.infrastructureResources = + new InfrastructureResourcesImpl(clientObject.getInfrastructureResources(), this); + } + return infrastructureResources; + } + + /** + * Gets wrapped service client MicrosoftIntegrationSpaces providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. + * + * @return Wrapped service client MicrosoftIntegrationSpaces. + */ + public MicrosoftIntegrationSpaces serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/ApplicationResourcesClient.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/ApplicationResourcesClient.java new file mode 100644 index 000000000000..d719952b9add --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/ApplicationResourcesClient.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationResourceInner; +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationResourceUpdate; +import java.util.List; + +/** An instance of this class provides access to all the operations defined in ApplicationResourcesClient. */ +public interface ApplicationResourcesClient { + /** + * List ApplicationResource resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByApplication( + String resourceGroupName, String spaceName, String applicationName); + + /** + * List ApplicationResource resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByApplication( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context); + + /** + * Get a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ApplicationResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String spaceName, String applicationName, String resourceName, Context context); + + /** + * Get a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ApplicationResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationResourceInner get( + String resourceGroupName, String spaceName, String applicationName, String resourceName); + + /** + * Create a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceInner resource, + Context context); + + /** + * Create a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationResourceInner createOrUpdate( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceInner resource); + + /** + * Update a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response patchWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceUpdate properties, + Context context); + + /** + * Update a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationResourceInner patch( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceUpdate properties); + + /** + * Delete a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String spaceName, String applicationName, String resourceName, Context context); + + /** + * Delete a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String spaceName, String applicationName, String resourceName); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/ApplicationsClient.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/ApplicationsClient.java new file mode 100644 index 000000000000..253822c30c1f --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/ApplicationsClient.java @@ -0,0 +1,385 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationInner; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ListBusinessProcessDevelopmentArtifactsResponseInner; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SaveOrGetBusinessProcessDevelopmentArtifactResponseInner; +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationUpdate; +import com.azure.resourcemanager.azureintegrationspaces.models.GetOrDeleteBusinessProcessDevelopmentArtifactRequest; +import com.azure.resourcemanager.azureintegrationspaces.models.SaveOrValidateBusinessProcessDevelopmentArtifactRequest; +import java.util.List; + +/** An instance of this class provides access to all the operations defined in ApplicationsClient. */ +public interface ApplicationsClient { + /** + * List Application resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySpace(String resourceGroupName, String spaceName); + + /** + * List Application resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySpace( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context); + + /** + * Get a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Application along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String spaceName, String applicationName, Context context); + + /** + * Get a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationInner get(String resourceGroupName, String spaceName, String applicationName); + + /** + * Create a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, String spaceName, String applicationName, ApplicationInner resource, Context context); + + /** + * Create a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationInner createOrUpdate( + String resourceGroupName, String spaceName, String applicationName, ApplicationInner resource); + + /** + * Update a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response patchWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + ApplicationUpdate properties, + Context context); + + /** + * Update a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationInner patch( + String resourceGroupName, String spaceName, String applicationName, ApplicationUpdate properties); + + /** + * Delete a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String spaceName, String applicationName, Context context); + + /** + * Delete a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String spaceName, String applicationName); + + /** + * The delete business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, + Context context); + + /** + * The delete business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body); + + /** + * The get business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response + getBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, + Context context); + + /** + * The get business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SaveOrGetBusinessProcessDevelopmentArtifactResponseInner getBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body); + + /** + * The list business process development artifacts action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact get collection response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listBusinessProcessDevelopmentArtifactsWithResponse( + String resourceGroupName, String spaceName, String applicationName, Context context); + + /** + * The list business process development artifacts action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact get collection response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ListBusinessProcessDevelopmentArtifactsResponseInner listBusinessProcessDevelopmentArtifacts( + String resourceGroupName, String spaceName, String applicationName); + + /** + * The save business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response + saveBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, + Context context); + + /** + * The save business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SaveOrGetBusinessProcessDevelopmentArtifactResponseInner saveBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body); + + /** + * The validate business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response validateBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, + Context context); + + /** + * The validate business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void validateBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/BusinessProcessVersionsClient.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/BusinessProcessVersionsClient.java new file mode 100644 index 000000000000..13a718c07d16 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/BusinessProcessVersionsClient.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessVersionInner; +import java.util.List; + +/** An instance of this class provides access to all the operations defined in BusinessProcessVersionsClient. */ +public interface BusinessProcessVersionsClient { + /** + * List BusinessProcessVersion resources by BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByBusinessProcess( + String resourceGroupName, String spaceName, String applicationName, String businessProcessName); + + /** + * List BusinessProcessVersion resources by BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByBusinessProcess( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context); + + /** + * Get a BusinessProcessVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param businessProcessVersion The version of the business process. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcessVersion along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + String businessProcessVersion, + Context context); + + /** + * Get a BusinessProcessVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param businessProcessVersion The version of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcessVersion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BusinessProcessVersionInner get( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + String businessProcessVersion); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/BusinessProcessesClient.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/BusinessProcessesClient.java new file mode 100644 index 000000000000..822972ee813f --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/BusinessProcessesClient.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessInner; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessUpdate; +import java.util.List; + +/** An instance of this class provides access to all the operations defined in BusinessProcessesClient. */ +public interface BusinessProcessesClient { + /** + * List BusinessProcess resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByApplication( + String resourceGroupName, String spaceName, String applicationName); + + /** + * List BusinessProcess resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByApplication( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context); + + /** + * Get a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcess along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Context context); + + /** + * Get a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcess. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BusinessProcessInner get( + String resourceGroupName, String spaceName, String applicationName, String businessProcessName); + + /** + * Create a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessInner resource, + Context context); + + /** + * Create a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BusinessProcessInner createOrUpdate( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessInner resource); + + /** + * Update a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response patchWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessUpdate properties, + Context context); + + /** + * Update a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BusinessProcessInner patch( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessUpdate properties); + + /** + * Delete a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Context context); + + /** + * Delete a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String spaceName, String applicationName, String businessProcessName); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/InfrastructureResourcesClient.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/InfrastructureResourcesClient.java new file mode 100644 index 000000000000..6a6ead676113 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/InfrastructureResourcesClient.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.InfrastructureResourceInner; +import com.azure.resourcemanager.azureintegrationspaces.models.InfrastructureResourceUpdate; +import java.util.List; + +/** An instance of this class provides access to all the operations defined in InfrastructureResourcesClient. */ +public interface InfrastructureResourcesClient { + /** + * List InfrastructureResource resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySpace(String resourceGroupName, String spaceName); + + /** + * List InfrastructureResource resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySpace( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context); + + /** + * Get a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a InfrastructureResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String spaceName, String infrastructureResourceName, Context context); + + /** + * Get a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a InfrastructureResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InfrastructureResourceInner get(String resourceGroupName, String spaceName, String infrastructureResourceName); + + /** + * Create a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceInner resource, + Context context); + + /** + * Create a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InfrastructureResourceInner createOrUpdate( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceInner resource); + + /** + * Update a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response patchWithResponse( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceUpdate properties, + Context context); + + /** + * Update a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InfrastructureResourceInner patch( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceUpdate properties); + + /** + * Delete a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String spaceName, String infrastructureResourceName, Context context); + + /** + * Delete a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String spaceName, String infrastructureResourceName); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/MicrosoftIntegrationSpaces.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/MicrosoftIntegrationSpaces.java new file mode 100644 index 000000000000..4a5d9d1c7add --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/MicrosoftIntegrationSpaces.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** The interface for MicrosoftIntegrationSpaces class. */ +public interface MicrosoftIntegrationSpaces { + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the SpacesClient object to access its operations. + * + * @return the SpacesClient object. + */ + SpacesClient getSpaces(); + + /** + * Gets the ApplicationsClient object to access its operations. + * + * @return the ApplicationsClient object. + */ + ApplicationsClient getApplications(); + + /** + * Gets the BusinessProcessesClient object to access its operations. + * + * @return the BusinessProcessesClient object. + */ + BusinessProcessesClient getBusinessProcesses(); + + /** + * Gets the BusinessProcessVersionsClient object to access its operations. + * + * @return the BusinessProcessVersionsClient object. + */ + BusinessProcessVersionsClient getBusinessProcessVersions(); + + /** + * Gets the ApplicationResourcesClient object to access its operations. + * + * @return the ApplicationResourcesClient object. + */ + ApplicationResourcesClient getApplicationResources(); + + /** + * Gets the InfrastructureResourcesClient object to access its operations. + * + * @return the InfrastructureResourcesClient object. + */ + InfrastructureResourcesClient getInfrastructureResources(); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/OperationsClient.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/OperationsClient.java new file mode 100644 index 000000000000..af63eb745e75 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/OperationsClient.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.OperationInner; + +/** An instance of this class provides access to all the operations defined in OperationsClient. */ +public interface OperationsClient { + /** + * List the operations for the provider. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/SpacesClient.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/SpacesClient.java new file mode 100644 index 000000000000..ee554334f8c1 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/SpacesClient.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SpaceInner; +import com.azure.resourcemanager.azureintegrationspaces.models.SpaceUpdate; +import java.util.List; + +/** An instance of this class provides access to all the operations defined in SpacesClient. */ +public interface SpacesClient { + /** + * List Space resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List Space resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List Space resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Space resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup( + String resourceGroupName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context); + + /** + * Get a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String spaceName, Context context); + + /** + * Get a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SpaceInner getByResourceGroup(String resourceGroupName, String spaceName); + + /** + * Create a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, String spaceName, SpaceInner resource, Context context); + + /** + * Create a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SpaceInner createOrUpdate(String resourceGroupName, String spaceName, SpaceInner resource); + + /** + * Update a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response patchWithResponse( + String resourceGroupName, String spaceName, SpaceUpdate properties, Context context); + + /** + * Update a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SpaceInner patch(String resourceGroupName, String spaceName, SpaceUpdate properties); + + /** + * Delete a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String spaceName, Context context); + + /** + * Delete a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String spaceName); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationInner.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationInner.java new file mode 100644 index 000000000000..9964325d864b --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationInner.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingDataStore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** An integration application under space. */ +@Fluent +public final class ApplicationInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private ApplicationProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ApplicationInner class. */ + public ApplicationInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private ApplicationProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public ApplicationInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ApplicationInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the description property: The description of the resource. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the resource. + * + * @param description the description value to set. + * @return the ApplicationInner object itself. + */ + public ApplicationInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the trackingDataStores property: The tracking data stores. + * + * @return the trackingDataStores value. + */ + public Map trackingDataStores() { + return this.innerProperties() == null ? null : this.innerProperties().trackingDataStores(); + } + + /** + * Set the trackingDataStores property: The tracking data stores. + * + * @param trackingDataStores the trackingDataStores value to set. + * @return the ApplicationInner object itself. + */ + public ApplicationInner withTrackingDataStores(Map trackingDataStores) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationProperties(); + } + this.innerProperties().withTrackingDataStores(trackingDataStores); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationProperties.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationProperties.java new file mode 100644 index 000000000000..4a11fce5aacf --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationProperties.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingDataStore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The properties of application. */ +@Fluent +public final class ApplicationProperties { + /* + * The status of the last operation. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The description of the resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The tracking data stores. + */ + @JsonProperty(value = "trackingDataStores", required = true) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map trackingDataStores; + + /** Creates an instance of ApplicationProperties class. */ + public ApplicationProperties() { + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the description property: The description of the resource. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the resource. + * + * @param description the description value to set. + * @return the ApplicationProperties object itself. + */ + public ApplicationProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the trackingDataStores property: The tracking data stores. + * + * @return the trackingDataStores value. + */ + public Map trackingDataStores() { + return this.trackingDataStores; + } + + /** + * Set the trackingDataStores property: The tracking data stores. + * + * @param trackingDataStores the trackingDataStores value to set. + * @return the ApplicationProperties object itself. + */ + public ApplicationProperties withTrackingDataStores(Map trackingDataStores) { + this.trackingDataStores = trackingDataStores; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (trackingDataStores() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property trackingDataStores in model ApplicationProperties")); + } else { + trackingDataStores() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationProperties.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationResourceInner.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationResourceInner.java new file mode 100644 index 000000000000..442024b891f5 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationResourceInner.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A resource under application. */ +@Fluent +public final class ApplicationResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private ApplicationResourceProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ApplicationResourceInner class. */ + public ApplicationResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private ApplicationResourceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the resourceType property: The type of the application resource. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.innerProperties() == null ? null : this.innerProperties().resourceType(); + } + + /** + * Set the resourceType property: The type of the application resource. + * + * @param resourceType the resourceType value to set. + * @return the ApplicationResourceInner object itself. + */ + public ApplicationResourceInner withResourceType(String resourceType) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationResourceProperties(); + } + this.innerProperties().withResourceType(resourceType); + return this; + } + + /** + * Get the resourceId property: The Arm id of the application resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.innerProperties() == null ? null : this.innerProperties().resourceId(); + } + + /** + * Set the resourceId property: The Arm id of the application resource. + * + * @param resourceId the resourceId value to set. + * @return the ApplicationResourceInner object itself. + */ + public ApplicationResourceInner withResourceId(String resourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationResourceProperties(); + } + this.innerProperties().withResourceId(resourceId); + return this; + } + + /** + * Get the resourceKind property: The kind of the application resource. + * + * @return the resourceKind value. + */ + public String resourceKind() { + return this.innerProperties() == null ? null : this.innerProperties().resourceKind(); + } + + /** + * Set the resourceKind property: The kind of the application resource. + * + * @param resourceKind the resourceKind value to set. + * @return the ApplicationResourceInner object itself. + */ + public ApplicationResourceInner withResourceKind(String resourceKind) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationResourceProperties(); + } + this.innerProperties().withResourceKind(resourceKind); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationResourceProperties.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationResourceProperties.java new file mode 100644 index 000000000000..e5c59574f080 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationResourceProperties.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of application resource. */ +@Fluent +public final class ApplicationResourceProperties { + /* + * The status of the last operation. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The type of the application resource. + */ + @JsonProperty(value = "resourceType", required = true) + private String resourceType; + + /* + * The Arm id of the application resource. + */ + @JsonProperty(value = "resourceId", required = true) + private String resourceId; + + /* + * The kind of the application resource. + */ + @JsonProperty(value = "resourceKind") + private String resourceKind; + + /** Creates an instance of ApplicationResourceProperties class. */ + public ApplicationResourceProperties() { + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the resourceType property: The type of the application resource. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: The type of the application resource. + * + * @param resourceType the resourceType value to set. + * @return the ApplicationResourceProperties object itself. + */ + public ApplicationResourceProperties withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the resourceId property: The Arm id of the application resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The Arm id of the application resource. + * + * @param resourceId the resourceId value to set. + * @return the ApplicationResourceProperties object itself. + */ + public ApplicationResourceProperties withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the resourceKind property: The kind of the application resource. + * + * @return the resourceKind value. + */ + public String resourceKind() { + return this.resourceKind; + } + + /** + * Set the resourceKind property: The kind of the application resource. + * + * @param resourceKind the resourceKind value to set. + * @return the ApplicationResourceProperties object itself. + */ + public ApplicationResourceProperties withResourceKind(String resourceKind) { + this.resourceKind = resourceKind; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property resourceType in model ApplicationResourceProperties")); + } + if (resourceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property resourceId in model ApplicationResourceProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationResourceProperties.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationResourceUpdateProperties.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationResourceUpdateProperties.java new file mode 100644 index 000000000000..0a289b23763e --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationResourceUpdateProperties.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The updatable properties of the ApplicationResource. */ +@Fluent +public final class ApplicationResourceUpdateProperties { + /* + * The type of the application resource. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /* + * The Arm id of the application resource. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * The kind of the application resource. + */ + @JsonProperty(value = "resourceKind") + private String resourceKind; + + /** Creates an instance of ApplicationResourceUpdateProperties class. */ + public ApplicationResourceUpdateProperties() { + } + + /** + * Get the resourceType property: The type of the application resource. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: The type of the application resource. + * + * @param resourceType the resourceType value to set. + * @return the ApplicationResourceUpdateProperties object itself. + */ + public ApplicationResourceUpdateProperties withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the resourceId property: The Arm id of the application resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The Arm id of the application resource. + * + * @param resourceId the resourceId value to set. + * @return the ApplicationResourceUpdateProperties object itself. + */ + public ApplicationResourceUpdateProperties withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the resourceKind property: The kind of the application resource. + * + * @return the resourceKind value. + */ + public String resourceKind() { + return this.resourceKind; + } + + /** + * Set the resourceKind property: The kind of the application resource. + * + * @param resourceKind the resourceKind value to set. + * @return the ApplicationResourceUpdateProperties object itself. + */ + public ApplicationResourceUpdateProperties withResourceKind(String resourceKind) { + this.resourceKind = resourceKind; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationUpdateProperties.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationUpdateProperties.java new file mode 100644 index 000000000000..d663bdc8ee6d --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ApplicationUpdateProperties.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingDataStore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The updatable properties of the Application. */ +@Fluent +public final class ApplicationUpdateProperties { + /* + * The description of the resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The tracking data stores. + */ + @JsonProperty(value = "trackingDataStores") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map trackingDataStores; + + /** Creates an instance of ApplicationUpdateProperties class. */ + public ApplicationUpdateProperties() { + } + + /** + * Get the description property: The description of the resource. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the resource. + * + * @param description the description value to set. + * @return the ApplicationUpdateProperties object itself. + */ + public ApplicationUpdateProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the trackingDataStores property: The tracking data stores. + * + * @return the trackingDataStores value. + */ + public Map trackingDataStores() { + return this.trackingDataStores; + } + + /** + * Set the trackingDataStores property: The tracking data stores. + * + * @param trackingDataStores the trackingDataStores value to set. + * @return the ApplicationUpdateProperties object itself. + */ + public ApplicationUpdateProperties withTrackingDataStores(Map trackingDataStores) { + this.trackingDataStores = trackingDataStores; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (trackingDataStores() != null) { + trackingDataStores() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessInner.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessInner.java new file mode 100644 index 000000000000..fbdd39de887d --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessInner.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** A business process under application. */ +@Fluent +public final class BusinessProcessInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private BusinessProcessProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of BusinessProcessInner class. */ + public BusinessProcessInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private BusinessProcessProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the version property: The version of the business process. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Get the description property: The description of the business process. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the business process. + * + * @param description the description value to set. + * @return the BusinessProcessInner object itself. + */ + public BusinessProcessInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the tableName property: The table name of the business process. + * + * @return the tableName value. + */ + public String tableName() { + return this.innerProperties() == null ? null : this.innerProperties().tableName(); + } + + /** + * Set the tableName property: The table name of the business process. + * + * @param tableName the tableName value to set. + * @return the BusinessProcessInner object itself. + */ + public BusinessProcessInner withTableName(String tableName) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessProperties(); + } + this.innerProperties().withTableName(tableName); + return this; + } + + /** + * Get the trackingDataStoreReferenceName property: The tracking data store reference name. + * + * @return the trackingDataStoreReferenceName value. + */ + public String trackingDataStoreReferenceName() { + return this.innerProperties() == null ? null : this.innerProperties().trackingDataStoreReferenceName(); + } + + /** + * Set the trackingDataStoreReferenceName property: The tracking data store reference name. + * + * @param trackingDataStoreReferenceName the trackingDataStoreReferenceName value to set. + * @return the BusinessProcessInner object itself. + */ + public BusinessProcessInner withTrackingDataStoreReferenceName(String trackingDataStoreReferenceName) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessProperties(); + } + this.innerProperties().withTrackingDataStoreReferenceName(trackingDataStoreReferenceName); + return this; + } + + /** + * Get the identifier property: The business process identifier. + * + * @return the identifier value. + */ + public BusinessProcessIdentifier identifier() { + return this.innerProperties() == null ? null : this.innerProperties().identifier(); + } + + /** + * Set the identifier property: The business process identifier. + * + * @param identifier the identifier value to set. + * @return the BusinessProcessInner object itself. + */ + public BusinessProcessInner withIdentifier(BusinessProcessIdentifier identifier) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessProperties(); + } + this.innerProperties().withIdentifier(identifier); + return this; + } + + /** + * Get the businessProcessStages property: The business process stages. + * + * @return the businessProcessStages value. + */ + public Map businessProcessStages() { + return this.innerProperties() == null ? null : this.innerProperties().businessProcessStages(); + } + + /** + * Set the businessProcessStages property: The business process stages. + * + * @param businessProcessStages the businessProcessStages value to set. + * @return the BusinessProcessInner object itself. + */ + public BusinessProcessInner withBusinessProcessStages(Map businessProcessStages) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessProperties(); + } + this.innerProperties().withBusinessProcessStages(businessProcessStages); + return this; + } + + /** + * Get the businessProcessMapping property: The business process mapping. + * + * @return the businessProcessMapping value. + */ + public Map businessProcessMapping() { + return this.innerProperties() == null ? null : this.innerProperties().businessProcessMapping(); + } + + /** + * Set the businessProcessMapping property: The business process mapping. + * + * @param businessProcessMapping the businessProcessMapping value to set. + * @return the BusinessProcessInner object itself. + */ + public BusinessProcessInner withBusinessProcessMapping( + Map businessProcessMapping) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessProperties(); + } + this.innerProperties().withBusinessProcessMapping(businessProcessMapping); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessProperties.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessProperties.java new file mode 100644 index 000000000000..f31446b138e3 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessProperties.java @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The properties of business process. */ +@Fluent +public final class BusinessProcessProperties { + /* + * The status of the last operation. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The version of the business process. + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /* + * The description of the business process. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The table name of the business process. + */ + @JsonProperty(value = "tableName") + private String tableName; + + /* + * The tracking data store reference name. + */ + @JsonProperty(value = "trackingDataStoreReferenceName") + private String trackingDataStoreReferenceName; + + /* + * The business process identifier. + */ + @JsonProperty(value = "identifier") + private BusinessProcessIdentifier identifier; + + /* + * The business process stages. + */ + @JsonProperty(value = "businessProcessStages") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map businessProcessStages; + + /* + * The business process mapping. + */ + @JsonProperty(value = "businessProcessMapping") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map businessProcessMapping; + + /** Creates an instance of BusinessProcessProperties class. */ + public BusinessProcessProperties() { + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the version property: The version of the business process. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the description property: The description of the business process. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the business process. + * + * @param description the description value to set. + * @return the BusinessProcessProperties object itself. + */ + public BusinessProcessProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the tableName property: The table name of the business process. + * + * @return the tableName value. + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the tableName property: The table name of the business process. + * + * @param tableName the tableName value to set. + * @return the BusinessProcessProperties object itself. + */ + public BusinessProcessProperties withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the trackingDataStoreReferenceName property: The tracking data store reference name. + * + * @return the trackingDataStoreReferenceName value. + */ + public String trackingDataStoreReferenceName() { + return this.trackingDataStoreReferenceName; + } + + /** + * Set the trackingDataStoreReferenceName property: The tracking data store reference name. + * + * @param trackingDataStoreReferenceName the trackingDataStoreReferenceName value to set. + * @return the BusinessProcessProperties object itself. + */ + public BusinessProcessProperties withTrackingDataStoreReferenceName(String trackingDataStoreReferenceName) { + this.trackingDataStoreReferenceName = trackingDataStoreReferenceName; + return this; + } + + /** + * Get the identifier property: The business process identifier. + * + * @return the identifier value. + */ + public BusinessProcessIdentifier identifier() { + return this.identifier; + } + + /** + * Set the identifier property: The business process identifier. + * + * @param identifier the identifier value to set. + * @return the BusinessProcessProperties object itself. + */ + public BusinessProcessProperties withIdentifier(BusinessProcessIdentifier identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get the businessProcessStages property: The business process stages. + * + * @return the businessProcessStages value. + */ + public Map businessProcessStages() { + return this.businessProcessStages; + } + + /** + * Set the businessProcessStages property: The business process stages. + * + * @param businessProcessStages the businessProcessStages value to set. + * @return the BusinessProcessProperties object itself. + */ + public BusinessProcessProperties withBusinessProcessStages( + Map businessProcessStages) { + this.businessProcessStages = businessProcessStages; + return this; + } + + /** + * Get the businessProcessMapping property: The business process mapping. + * + * @return the businessProcessMapping value. + */ + public Map businessProcessMapping() { + return this.businessProcessMapping; + } + + /** + * Set the businessProcessMapping property: The business process mapping. + * + * @param businessProcessMapping the businessProcessMapping value to set. + * @return the BusinessProcessProperties object itself. + */ + public BusinessProcessProperties withBusinessProcessMapping( + Map businessProcessMapping) { + this.businessProcessMapping = businessProcessMapping; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identifier() != null) { + identifier().validate(); + } + if (businessProcessStages() != null) { + businessProcessStages() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (businessProcessMapping() != null) { + businessProcessMapping() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessUpdateProperties.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessUpdateProperties.java new file mode 100644 index 000000000000..db9bf63ffa16 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessUpdateProperties.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The updatable properties of the BusinessProcess. */ +@Fluent +public final class BusinessProcessUpdateProperties { + /* + * The description of the business process. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The table name of the business process. + */ + @JsonProperty(value = "tableName") + private String tableName; + + /* + * The tracking data store reference name. + */ + @JsonProperty(value = "trackingDataStoreReferenceName") + private String trackingDataStoreReferenceName; + + /* + * The business process identifier. + */ + @JsonProperty(value = "identifier") + private BusinessProcessIdentifier identifier; + + /* + * The business process stages. + */ + @JsonProperty(value = "businessProcessStages") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map businessProcessStages; + + /* + * The business process mapping. + */ + @JsonProperty(value = "businessProcessMapping") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map businessProcessMapping; + + /** Creates an instance of BusinessProcessUpdateProperties class. */ + public BusinessProcessUpdateProperties() { + } + + /** + * Get the description property: The description of the business process. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the business process. + * + * @param description the description value to set. + * @return the BusinessProcessUpdateProperties object itself. + */ + public BusinessProcessUpdateProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the tableName property: The table name of the business process. + * + * @return the tableName value. + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the tableName property: The table name of the business process. + * + * @param tableName the tableName value to set. + * @return the BusinessProcessUpdateProperties object itself. + */ + public BusinessProcessUpdateProperties withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the trackingDataStoreReferenceName property: The tracking data store reference name. + * + * @return the trackingDataStoreReferenceName value. + */ + public String trackingDataStoreReferenceName() { + return this.trackingDataStoreReferenceName; + } + + /** + * Set the trackingDataStoreReferenceName property: The tracking data store reference name. + * + * @param trackingDataStoreReferenceName the trackingDataStoreReferenceName value to set. + * @return the BusinessProcessUpdateProperties object itself. + */ + public BusinessProcessUpdateProperties withTrackingDataStoreReferenceName(String trackingDataStoreReferenceName) { + this.trackingDataStoreReferenceName = trackingDataStoreReferenceName; + return this; + } + + /** + * Get the identifier property: The business process identifier. + * + * @return the identifier value. + */ + public BusinessProcessIdentifier identifier() { + return this.identifier; + } + + /** + * Set the identifier property: The business process identifier. + * + * @param identifier the identifier value to set. + * @return the BusinessProcessUpdateProperties object itself. + */ + public BusinessProcessUpdateProperties withIdentifier(BusinessProcessIdentifier identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get the businessProcessStages property: The business process stages. + * + * @return the businessProcessStages value. + */ + public Map businessProcessStages() { + return this.businessProcessStages; + } + + /** + * Set the businessProcessStages property: The business process stages. + * + * @param businessProcessStages the businessProcessStages value to set. + * @return the BusinessProcessUpdateProperties object itself. + */ + public BusinessProcessUpdateProperties withBusinessProcessStages( + Map businessProcessStages) { + this.businessProcessStages = businessProcessStages; + return this; + } + + /** + * Get the businessProcessMapping property: The business process mapping. + * + * @return the businessProcessMapping value. + */ + public Map businessProcessMapping() { + return this.businessProcessMapping; + } + + /** + * Set the businessProcessMapping property: The business process mapping. + * + * @param businessProcessMapping the businessProcessMapping value to set. + * @return the BusinessProcessUpdateProperties object itself. + */ + public BusinessProcessUpdateProperties withBusinessProcessMapping( + Map businessProcessMapping) { + this.businessProcessMapping = businessProcessMapping; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identifier() != null) { + identifier().validate(); + } + if (businessProcessStages() != null) { + businessProcessStages() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (businessProcessMapping() != null) { + businessProcessMapping() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessVersionInner.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessVersionInner.java new file mode 100644 index 000000000000..2da5483aca62 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/BusinessProcessVersionInner.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** A business process version. */ +@Fluent +public final class BusinessProcessVersionInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private BusinessProcessProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of BusinessProcessVersionInner class. */ + public BusinessProcessVersionInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private BusinessProcessProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the version property: The version of the business process. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Get the description property: The description of the business process. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the business process. + * + * @param description the description value to set. + * @return the BusinessProcessVersionInner object itself. + */ + public BusinessProcessVersionInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the tableName property: The table name of the business process. + * + * @return the tableName value. + */ + public String tableName() { + return this.innerProperties() == null ? null : this.innerProperties().tableName(); + } + + /** + * Set the tableName property: The table name of the business process. + * + * @param tableName the tableName value to set. + * @return the BusinessProcessVersionInner object itself. + */ + public BusinessProcessVersionInner withTableName(String tableName) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessProperties(); + } + this.innerProperties().withTableName(tableName); + return this; + } + + /** + * Get the trackingDataStoreReferenceName property: The tracking data store reference name. + * + * @return the trackingDataStoreReferenceName value. + */ + public String trackingDataStoreReferenceName() { + return this.innerProperties() == null ? null : this.innerProperties().trackingDataStoreReferenceName(); + } + + /** + * Set the trackingDataStoreReferenceName property: The tracking data store reference name. + * + * @param trackingDataStoreReferenceName the trackingDataStoreReferenceName value to set. + * @return the BusinessProcessVersionInner object itself. + */ + public BusinessProcessVersionInner withTrackingDataStoreReferenceName(String trackingDataStoreReferenceName) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessProperties(); + } + this.innerProperties().withTrackingDataStoreReferenceName(trackingDataStoreReferenceName); + return this; + } + + /** + * Get the identifier property: The business process identifier. + * + * @return the identifier value. + */ + public BusinessProcessIdentifier identifier() { + return this.innerProperties() == null ? null : this.innerProperties().identifier(); + } + + /** + * Set the identifier property: The business process identifier. + * + * @param identifier the identifier value to set. + * @return the BusinessProcessVersionInner object itself. + */ + public BusinessProcessVersionInner withIdentifier(BusinessProcessIdentifier identifier) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessProperties(); + } + this.innerProperties().withIdentifier(identifier); + return this; + } + + /** + * Get the businessProcessStages property: The business process stages. + * + * @return the businessProcessStages value. + */ + public Map businessProcessStages() { + return this.innerProperties() == null ? null : this.innerProperties().businessProcessStages(); + } + + /** + * Set the businessProcessStages property: The business process stages. + * + * @param businessProcessStages the businessProcessStages value to set. + * @return the BusinessProcessVersionInner object itself. + */ + public BusinessProcessVersionInner withBusinessProcessStages( + Map businessProcessStages) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessProperties(); + } + this.innerProperties().withBusinessProcessStages(businessProcessStages); + return this; + } + + /** + * Get the businessProcessMapping property: The business process mapping. + * + * @return the businessProcessMapping value. + */ + public Map businessProcessMapping() { + return this.innerProperties() == null ? null : this.innerProperties().businessProcessMapping(); + } + + /** + * Set the businessProcessMapping property: The business process mapping. + * + * @param businessProcessMapping the businessProcessMapping value to set. + * @return the BusinessProcessVersionInner object itself. + */ + public BusinessProcessVersionInner withBusinessProcessMapping( + Map businessProcessMapping) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessProperties(); + } + this.innerProperties().withBusinessProcessMapping(businessProcessMapping); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/InfrastructureResourceInner.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/InfrastructureResourceInner.java new file mode 100644 index 000000000000..286684a0c66a --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/InfrastructureResourceInner.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** An infrastructure resource under Space. */ +@Fluent +public final class InfrastructureResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private InfrastructureResourceProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of InfrastructureResourceInner class. */ + public InfrastructureResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private InfrastructureResourceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the resourceType property: The type of the infrastructure resource. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.innerProperties() == null ? null : this.innerProperties().resourceType(); + } + + /** + * Set the resourceType property: The type of the infrastructure resource. + * + * @param resourceType the resourceType value to set. + * @return the InfrastructureResourceInner object itself. + */ + public InfrastructureResourceInner withResourceType(String resourceType) { + if (this.innerProperties() == null) { + this.innerProperties = new InfrastructureResourceProperties(); + } + this.innerProperties().withResourceType(resourceType); + return this; + } + + /** + * Get the resourceId property: The id of the infrastructure resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.innerProperties() == null ? null : this.innerProperties().resourceId(); + } + + /** + * Set the resourceId property: The id of the infrastructure resource. + * + * @param resourceId the resourceId value to set. + * @return the InfrastructureResourceInner object itself. + */ + public InfrastructureResourceInner withResourceId(String resourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new InfrastructureResourceProperties(); + } + this.innerProperties().withResourceId(resourceId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/InfrastructureResourceProperties.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/InfrastructureResourceProperties.java new file mode 100644 index 000000000000..3fd4379a8e55 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/InfrastructureResourceProperties.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of infrastructure resource. */ +@Fluent +public final class InfrastructureResourceProperties { + /* + * The status of the last operation. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The type of the infrastructure resource. + */ + @JsonProperty(value = "resourceType", required = true) + private String resourceType; + + /* + * The id of the infrastructure resource. + */ + @JsonProperty(value = "resourceId", required = true) + private String resourceId; + + /** Creates an instance of InfrastructureResourceProperties class. */ + public InfrastructureResourceProperties() { + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the resourceType property: The type of the infrastructure resource. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: The type of the infrastructure resource. + * + * @param resourceType the resourceType value to set. + * @return the InfrastructureResourceProperties object itself. + */ + public InfrastructureResourceProperties withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the resourceId property: The id of the infrastructure resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The id of the infrastructure resource. + * + * @param resourceId the resourceId value to set. + * @return the InfrastructureResourceProperties object itself. + */ + public InfrastructureResourceProperties withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property resourceType in model InfrastructureResourceProperties")); + } + if (resourceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property resourceId in model InfrastructureResourceProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(InfrastructureResourceProperties.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/InfrastructureResourceUpdateProperties.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/InfrastructureResourceUpdateProperties.java new file mode 100644 index 000000000000..744307ad59f9 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/InfrastructureResourceUpdateProperties.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The updatable properties of the InfrastructureResource. */ +@Fluent +public final class InfrastructureResourceUpdateProperties { + /* + * The type of the infrastructure resource. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /* + * The id of the infrastructure resource. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** Creates an instance of InfrastructureResourceUpdateProperties class. */ + public InfrastructureResourceUpdateProperties() { + } + + /** + * Get the resourceType property: The type of the infrastructure resource. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: The type of the infrastructure resource. + * + * @param resourceType the resourceType value to set. + * @return the InfrastructureResourceUpdateProperties object itself. + */ + public InfrastructureResourceUpdateProperties withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the resourceId property: The id of the infrastructure resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The id of the infrastructure resource. + * + * @param resourceId the resourceId value to set. + * @return the InfrastructureResourceUpdateProperties object itself. + */ + public InfrastructureResourceUpdateProperties withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ListBusinessProcessDevelopmentArtifactsResponseInner.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ListBusinessProcessDevelopmentArtifactsResponseInner.java new file mode 100644 index 000000000000..854d6df3f83e --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/ListBusinessProcessDevelopmentArtifactsResponseInner.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The business process development artifact get collection response. */ +@Fluent +public final class ListBusinessProcessDevelopmentArtifactsResponseInner { + /* + * The list of the business process development artifact. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** Creates an instance of ListBusinessProcessDevelopmentArtifactsResponseInner class. */ + public ListBusinessProcessDevelopmentArtifactsResponseInner() { + } + + /** + * Get the value property: The list of the business process development artifact. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of the business process development artifact. + * + * @param value the value value to set. + * @return the ListBusinessProcessDevelopmentArtifactsResponseInner object itself. + */ + public ListBusinessProcessDevelopmentArtifactsResponseInner withValue( + List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model" + + " ListBusinessProcessDevelopmentArtifactsResponseInner")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = + new ClientLogger(ListBusinessProcessDevelopmentArtifactsResponseInner.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/OperationInner.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/OperationInner.java new file mode 100644 index 000000000000..285b6fbbb7bb --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/OperationInner.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azureintegrationspaces.models.ActionType; +import com.azure.resourcemanager.azureintegrationspaces.models.OperationDisplay; +import com.azure.resourcemanager.azureintegrationspaces.models.Origin; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * REST API Operation + * + *

Details of a REST API operation, returned from the Resource Provider Operations API. + */ +@Fluent +public final class OperationInner { + /* + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for + * ARM/control-plane operations. + */ + @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDataAction; + + /* + * Localized display information for this particular operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /* + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private Origin origin; + + /* + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ + @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + private ActionType actionType; + + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + + /** + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Get the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display property: Localized display information for this particular operation. + * + * @param display the display value to set. + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + public Origin origin() { + return this.origin; + } + + /** + * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + public ActionType actionType() { + return this.actionType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SaveOrGetBusinessProcessDevelopmentArtifactResponseInner.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SaveOrGetBusinessProcessDevelopmentArtifactResponseInner.java new file mode 100644 index 000000000000..24dbdcaadd18 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SaveOrGetBusinessProcessDevelopmentArtifactResponseInner.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessDevelopmentArtifactProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The business process development artifact save or get response. */ +@Fluent +public final class SaveOrGetBusinessProcessDevelopmentArtifactResponseInner { + /* + * The name of the business process development artifact. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The system data of the business process development artifact. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * The properties of the business process development artifact. + */ + @JsonProperty(value = "properties") + private BusinessProcessDevelopmentArtifactProperties properties; + + /** Creates an instance of SaveOrGetBusinessProcessDevelopmentArtifactResponseInner class. */ + public SaveOrGetBusinessProcessDevelopmentArtifactResponseInner() { + } + + /** + * Get the name property: The name of the business process development artifact. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the business process development artifact. + * + * @param name the name value to set. + * @return the SaveOrGetBusinessProcessDevelopmentArtifactResponseInner object itself. + */ + public SaveOrGetBusinessProcessDevelopmentArtifactResponseInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the systemData property: The system data of the business process development artifact. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the properties property: The properties of the business process development artifact. + * + * @return the properties value. + */ + public BusinessProcessDevelopmentArtifactProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of the business process development artifact. + * + * @param properties the properties value to set. + * @return the SaveOrGetBusinessProcessDevelopmentArtifactResponseInner object itself. + */ + public SaveOrGetBusinessProcessDevelopmentArtifactResponseInner withProperties( + BusinessProcessDevelopmentArtifactProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model" + + " SaveOrGetBusinessProcessDevelopmentArtifactResponseInner")); + } + if (properties() != null) { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = + new ClientLogger(SaveOrGetBusinessProcessDevelopmentArtifactResponseInner.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SpaceInner.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SpaceInner.java new file mode 100644 index 000000000000..530319a0dd6a --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SpaceInner.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** An integration space. */ +@Fluent +public final class SpaceInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private SpaceResourceProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of SpaceInner class. */ + public SpaceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private SpaceResourceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public SpaceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public SpaceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the description property: The description of the resource. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the resource. + * + * @param description the description value to set. + * @return the SpaceInner object itself. + */ + public SpaceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new SpaceResourceProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SpaceResourceProperties.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SpaceResourceProperties.java new file mode 100644 index 000000000000..fb797d992122 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SpaceResourceProperties.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of space. */ +@Fluent +public final class SpaceResourceProperties { + /* + * The status of the last operation. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The description of the resource. + */ + @JsonProperty(value = "description") + private String description; + + /** Creates an instance of SpaceResourceProperties class. */ + public SpaceResourceProperties() { + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the description property: The description of the resource. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the resource. + * + * @param description the description value to set. + * @return the SpaceResourceProperties object itself. + */ + public SpaceResourceProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SpaceUpdateProperties.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SpaceUpdateProperties.java new file mode 100644 index 000000000000..82be29466dea --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/SpaceUpdateProperties.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The updatable properties of the Space. */ +@Fluent +public final class SpaceUpdateProperties { + /* + * The description of the resource. + */ + @JsonProperty(value = "description") + private String description; + + /** Creates an instance of SpaceUpdateProperties class. */ + public SpaceUpdateProperties() { + } + + /** + * Get the description property: The description of the resource. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the resource. + * + * @param description the description value to set. + * @return the SpaceUpdateProperties object itself. + */ + public SpaceUpdateProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/package-info.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/package-info.java new file mode 100644 index 000000000000..00dd6eb12204 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the inner data models for MicrosoftIntegrationSpaces. The azure integration spaces resource + * provider. + */ +package com.azure.resourcemanager.azureintegrationspaces.fluent.models; diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/package-info.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/package-info.java new file mode 100644 index 000000000000..697e62698738 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/fluent/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the service clients for MicrosoftIntegrationSpaces. The azure integration spaces resource + * provider. + */ +package com.azure.resourcemanager.azureintegrationspaces.fluent; diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationImpl.java new file mode 100644 index 000000000000..3c1a18d8b106 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationImpl.java @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationInner; +import com.azure.resourcemanager.azureintegrationspaces.models.Application; +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationUpdate; +import com.azure.resourcemanager.azureintegrationspaces.models.GetOrDeleteBusinessProcessDevelopmentArtifactRequest; +import com.azure.resourcemanager.azureintegrationspaces.models.ListBusinessProcessDevelopmentArtifactsResponse; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.azure.resourcemanager.azureintegrationspaces.models.SaveOrGetBusinessProcessDevelopmentArtifactResponse; +import com.azure.resourcemanager.azureintegrationspaces.models.SaveOrValidateBusinessProcessDevelopmentArtifactRequest; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingDataStore; +import java.util.Collections; +import java.util.Map; + +public final class ApplicationImpl implements Application, Application.Definition, Application.Update { + private ApplicationInner innerObject; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String description() { + return this.innerModel().description(); + } + + public Map trackingDataStores() { + Map inner = this.innerModel().trackingDataStores(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ApplicationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String spaceName; + + private String applicationName; + + private ApplicationUpdate updateProperties; + + public ApplicationImpl withExistingSpace(String resourceGroupName, String spaceName) { + this.resourceGroupName = resourceGroupName; + this.spaceName = spaceName; + return this; + } + + public Application create() { + this.innerObject = + serviceManager + .serviceClient() + .getApplications() + .createOrUpdateWithResponse( + resourceGroupName, spaceName, applicationName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public Application create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getApplications() + .createOrUpdateWithResponse(resourceGroupName, spaceName, applicationName, this.innerModel(), context) + .getValue(); + return this; + } + + ApplicationImpl( + String name, com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = new ApplicationInner(); + this.serviceManager = serviceManager; + this.applicationName = name; + } + + public ApplicationImpl update() { + this.updateProperties = new ApplicationUpdate(); + return this; + } + + public Application apply() { + this.innerObject = + serviceManager + .serviceClient() + .getApplications() + .patchWithResponse(resourceGroupName, spaceName, applicationName, updateProperties, Context.NONE) + .getValue(); + return this; + } + + public Application apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getApplications() + .patchWithResponse(resourceGroupName, spaceName, applicationName, updateProperties, context) + .getValue(); + return this; + } + + ApplicationImpl( + ApplicationInner innerObject, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.spaceName = Utils.getValueFromIdByName(innerObject.id(), "spaces"); + this.applicationName = Utils.getValueFromIdByName(innerObject.id(), "applications"); + } + + public Application refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getApplications() + .getWithResponse(resourceGroupName, spaceName, applicationName, Context.NONE) + .getValue(); + return this; + } + + public Application refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getApplications() + .getWithResponse(resourceGroupName, spaceName, applicationName, context) + .getValue(); + return this; + } + + public Response deleteBusinessProcessDevelopmentArtifactWithResponse( + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, Context context) { + return serviceManager + .applications() + .deleteBusinessProcessDevelopmentArtifactWithResponse( + resourceGroupName, spaceName, applicationName, body, context); + } + + public void deleteBusinessProcessDevelopmentArtifact(GetOrDeleteBusinessProcessDevelopmentArtifactRequest body) { + serviceManager + .applications() + .deleteBusinessProcessDevelopmentArtifact(resourceGroupName, spaceName, applicationName, body); + } + + public Response + getBusinessProcessDevelopmentArtifactWithResponse( + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, Context context) { + return serviceManager + .applications() + .getBusinessProcessDevelopmentArtifactWithResponse( + resourceGroupName, spaceName, applicationName, body, context); + } + + public SaveOrGetBusinessProcessDevelopmentArtifactResponse getBusinessProcessDevelopmentArtifact( + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body) { + return serviceManager + .applications() + .getBusinessProcessDevelopmentArtifact(resourceGroupName, spaceName, applicationName, body); + } + + public Response + listBusinessProcessDevelopmentArtifactsWithResponse(Context context) { + return serviceManager + .applications() + .listBusinessProcessDevelopmentArtifactsWithResponse( + resourceGroupName, spaceName, applicationName, context); + } + + public ListBusinessProcessDevelopmentArtifactsResponse listBusinessProcessDevelopmentArtifacts() { + return serviceManager + .applications() + .listBusinessProcessDevelopmentArtifacts(resourceGroupName, spaceName, applicationName); + } + + public Response + saveBusinessProcessDevelopmentArtifactWithResponse( + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, Context context) { + return serviceManager + .applications() + .saveBusinessProcessDevelopmentArtifactWithResponse( + resourceGroupName, spaceName, applicationName, body, context); + } + + public SaveOrGetBusinessProcessDevelopmentArtifactResponse saveBusinessProcessDevelopmentArtifact( + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body) { + return serviceManager + .applications() + .saveBusinessProcessDevelopmentArtifact(resourceGroupName, spaceName, applicationName, body); + } + + public Response validateBusinessProcessDevelopmentArtifactWithResponse( + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, Context context) { + return serviceManager + .applications() + .validateBusinessProcessDevelopmentArtifactWithResponse( + resourceGroupName, spaceName, applicationName, body, context); + } + + public void validateBusinessProcessDevelopmentArtifact( + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body) { + serviceManager + .applications() + .validateBusinessProcessDevelopmentArtifact(resourceGroupName, spaceName, applicationName, body); + } + + public ApplicationImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ApplicationImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ApplicationImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public ApplicationImpl withDescription(String description) { + if (isInCreateMode()) { + this.innerModel().withDescription(description); + return this; + } else { + this.updateProperties.withDescription(description); + return this; + } + } + + public ApplicationImpl withTrackingDataStores(Map trackingDataStores) { + if (isInCreateMode()) { + this.innerModel().withTrackingDataStores(trackingDataStores); + return this; + } else { + this.updateProperties.withTrackingDataStores(trackingDataStores); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationResourceImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationResourceImpl.java new file mode 100644 index 000000000000..6e0778908a1c --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationResourceImpl.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationResourceInner; +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationResource; +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationResourceUpdate; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; + +public final class ApplicationResourceImpl + implements ApplicationResource, ApplicationResource.Definition, ApplicationResource.Update { + private ApplicationResourceInner innerObject; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceType() { + return this.innerModel().resourceType(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public String resourceKind() { + return this.innerModel().resourceKind(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ApplicationResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String spaceName; + + private String applicationName; + + private String resourceName; + + private ApplicationResourceUpdate updateProperties; + + public ApplicationResourceImpl withExistingApplication( + String resourceGroupName, String spaceName, String applicationName) { + this.resourceGroupName = resourceGroupName; + this.spaceName = spaceName; + this.applicationName = applicationName; + return this; + } + + public ApplicationResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getApplicationResources() + .createOrUpdateWithResponse( + resourceGroupName, spaceName, applicationName, resourceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ApplicationResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getApplicationResources() + .createOrUpdateWithResponse( + resourceGroupName, spaceName, applicationName, resourceName, this.innerModel(), context) + .getValue(); + return this; + } + + ApplicationResourceImpl( + String name, com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = new ApplicationResourceInner(); + this.serviceManager = serviceManager; + this.resourceName = name; + } + + public ApplicationResourceImpl update() { + this.updateProperties = new ApplicationResourceUpdate(); + return this; + } + + public ApplicationResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getApplicationResources() + .patchWithResponse( + resourceGroupName, spaceName, applicationName, resourceName, updateProperties, Context.NONE) + .getValue(); + return this; + } + + public ApplicationResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getApplicationResources() + .patchWithResponse( + resourceGroupName, spaceName, applicationName, resourceName, updateProperties, context) + .getValue(); + return this; + } + + ApplicationResourceImpl( + ApplicationResourceInner innerObject, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.spaceName = Utils.getValueFromIdByName(innerObject.id(), "spaces"); + this.applicationName = Utils.getValueFromIdByName(innerObject.id(), "applications"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "resources"); + } + + public ApplicationResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getApplicationResources() + .getWithResponse(resourceGroupName, spaceName, applicationName, resourceName, Context.NONE) + .getValue(); + return this; + } + + public ApplicationResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getApplicationResources() + .getWithResponse(resourceGroupName, spaceName, applicationName, resourceName, context) + .getValue(); + return this; + } + + public ApplicationResourceImpl withResourceType(String resourceType) { + if (isInCreateMode()) { + this.innerModel().withResourceType(resourceType); + return this; + } else { + this.updateProperties.withResourceType(resourceType); + return this; + } + } + + public ApplicationResourceImpl withResourceId(String resourceId) { + if (isInCreateMode()) { + this.innerModel().withResourceId(resourceId); + return this; + } else { + this.updateProperties.withResourceId(resourceId); + return this; + } + } + + public ApplicationResourceImpl withResourceKind(String resourceKind) { + if (isInCreateMode()) { + this.innerModel().withResourceKind(resourceKind); + return this; + } else { + this.updateProperties.withResourceKind(resourceKind); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationResourcesClientImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationResourcesClientImpl.java new file mode 100644 index 000000000000..0f2cce38764e --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationResourcesClientImpl.java @@ -0,0 +1,1424 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azureintegrationspaces.fluent.ApplicationResourcesClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationResourceInner; +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationResourceListResult; +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationResourceUpdate; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ApplicationResourcesClient. */ +public final class ApplicationResourcesClientImpl implements ApplicationResourcesClient { + /** The proxy service used to perform REST calls. */ + private final ApplicationResourcesService service; + + /** The service client containing this operation class. */ + private final MicrosoftIntegrationSpacesImpl client; + + /** + * Initializes an instance of ApplicationResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ApplicationResourcesClientImpl(MicrosoftIntegrationSpacesImpl client) { + this.service = + RestProxy + .create(ApplicationResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftIntegrationSpacesApplicationResources to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftIntegration") + public interface ApplicationResourcesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByApplication( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("top") Integer top, + @QueryParam("skip") Integer skip, + @QueryParam("maxpagesize") Integer maxPageSize, + @QueryParam("filter") String filter, + @QueryParam(value = "select", multipleQueryParams = true) List select, + @QueryParam(value = "expand", multipleQueryParams = true) List expand, + @QueryParam(value = "orderby", multipleQueryParams = true) List orderBy, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @PathParam("resourceName") String resourceName, + @BodyParam("application/json") ApplicationResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> patch( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @PathParam("resourceName") String resourceName, + @BodyParam("application/json") ApplicationResourceUpdate properties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByApplicationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List ApplicationResource resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByApplicationSinglePageAsync( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + final String accept = "application/json"; + List selectConverted = + (select == null) + ? new ArrayList<>() + : select.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List expandConverted = + (expand == null) + ? new ArrayList<>() + : expand.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = + (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return FluxUtil + .withContext( + context -> + service + .listByApplication( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + skip, + maxPageSize, + filter, + selectConverted, + expandConverted, + orderByConverted, + spaceName, + applicationName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List ApplicationResource resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByApplicationSinglePageAsync( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + final String accept = "application/json"; + List selectConverted = + (select == null) + ? new ArrayList<>() + : select.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List expandConverted = + (expand == null) + ? new ArrayList<>() + : expand.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = + (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + context = this.client.mergeContext(context); + return service + .listByApplication( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + skip, + maxPageSize, + filter, + selectConverted, + expandConverted, + orderByConverted, + spaceName, + applicationName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List ApplicationResource resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByApplicationAsync( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy) { + return new PagedFlux<>( + () -> + listByApplicationSinglePageAsync( + resourceGroupName, + spaceName, + applicationName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy), + nextLink -> listByApplicationNextSinglePageAsync(nextLink)); + } + + /** + * List ApplicationResource resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByApplicationAsync( + String resourceGroupName, String spaceName, String applicationName) { + final Integer top = null; + final Integer skip = null; + final Integer maxPageSize = null; + final String filter = null; + final List select = null; + final List expand = null; + final List orderBy = null; + return new PagedFlux<>( + () -> + listByApplicationSinglePageAsync( + resourceGroupName, + spaceName, + applicationName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy), + nextLink -> listByApplicationNextSinglePageAsync(nextLink)); + } + + /** + * List ApplicationResource resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByApplicationAsync( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + return new PagedFlux<>( + () -> + listByApplicationSinglePageAsync( + resourceGroupName, + spaceName, + applicationName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy, + context), + nextLink -> listByApplicationNextSinglePageAsync(nextLink, context)); + } + + /** + * List ApplicationResource resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByApplication( + String resourceGroupName, String spaceName, String applicationName) { + final Integer top = null; + final Integer skip = null; + final Integer maxPageSize = null; + final String filter = null; + final List select = null; + final List expand = null; + final List orderBy = null; + return new PagedIterable<>( + listByApplicationAsync( + resourceGroupName, + spaceName, + applicationName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy)); + } + + /** + * List ApplicationResource resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByApplication( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + return new PagedIterable<>( + listByApplicationAsync( + resourceGroupName, + spaceName, + applicationName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy, + context)); + } + + /** + * Get a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ApplicationResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ApplicationResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName, String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + resourceName, + accept, + context); + } + + /** + * Get a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ApplicationResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String spaceName, String applicationName, String resourceName) { + return getWithResponseAsync(resourceGroupName, spaceName, applicationName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ApplicationResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String spaceName, String applicationName, String resourceName, Context context) { + return getWithResponseAsync(resourceGroupName, spaceName, applicationName, resourceName, context).block(); + } + + /** + * Get a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ApplicationResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplicationResourceInner get( + String resourceGroupName, String spaceName, String applicationName, String resourceName) { + return getWithResponse(resourceGroupName, spaceName, applicationName, resourceName, Context.NONE).getValue(); + } + + /** + * Create a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + resourceName, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceInner resource, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + resourceName, + resource, + accept, + context); + } + + /** + * Create a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceInner resource) { + return createOrUpdateWithResponseAsync(resourceGroupName, spaceName, applicationName, resourceName, resource) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceInner resource, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, spaceName, applicationName, resourceName, resource, context) + .block(); + } + + /** + * Create a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplicationResourceInner createOrUpdate( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceInner resource) { + return createOrUpdateWithResponse( + resourceGroupName, spaceName, applicationName, resourceName, resource, Context.NONE) + .getValue(); + } + + /** + * Update a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> patchWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .patch( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + resourceName, + properties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> patchWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceUpdate properties, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .patch( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + resourceName, + properties, + accept, + context); + } + + /** + * Update a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono patchAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceUpdate properties) { + return patchWithResponseAsync(resourceGroupName, spaceName, applicationName, resourceName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response patchWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceUpdate properties, + Context context) { + return patchWithResponseAsync(resourceGroupName, spaceName, applicationName, resourceName, properties, context) + .block(); + } + + /** + * Update a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a resource under application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplicationResourceInner patch( + String resourceGroupName, + String spaceName, + String applicationName, + String resourceName, + ApplicationResourceUpdate properties) { + return patchWithResponse(resourceGroupName, spaceName, applicationName, resourceName, properties, Context.NONE) + .getValue(); + } + + /** + * Delete a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName, String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + resourceName, + accept, + context); + } + + /** + * Delete a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String spaceName, String applicationName, String resourceName) { + return deleteWithResponseAsync(resourceGroupName, spaceName, applicationName, resourceName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String spaceName, String applicationName, String resourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, spaceName, applicationName, resourceName, context).block(); + } + + /** + * Delete a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String spaceName, String applicationName, String resourceName) { + deleteWithResponse(resourceGroupName, spaceName, applicationName, resourceName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByApplicationNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByApplicationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByApplicationNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByApplicationNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationResourcesImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationResourcesImpl.java new file mode 100644 index 000000000000..55db8e327304 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationResourcesImpl.java @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.ApplicationResourcesClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationResourceInner; +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationResource; +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationResources; +import java.util.List; + +public final class ApplicationResourcesImpl implements ApplicationResources { + private static final ClientLogger LOGGER = new ClientLogger(ApplicationResourcesImpl.class); + + private final ApplicationResourcesClient innerClient; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + public ApplicationResourcesImpl( + ApplicationResourcesClient innerClient, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByApplication( + String resourceGroupName, String spaceName, String applicationName) { + PagedIterable inner = + this.serviceClient().listByApplication(resourceGroupName, spaceName, applicationName); + return Utils.mapPage(inner, inner1 -> new ApplicationResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByApplication( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + PagedIterable inner = + this + .serviceClient() + .listByApplication( + resourceGroupName, + spaceName, + applicationName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy, + context); + return Utils.mapPage(inner, inner1 -> new ApplicationResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String spaceName, String applicationName, String resourceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, spaceName, applicationName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ApplicationResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ApplicationResource get( + String resourceGroupName, String spaceName, String applicationName, String resourceName) { + ApplicationResourceInner inner = + this.serviceClient().get(resourceGroupName, spaceName, applicationName, resourceName); + if (inner != null) { + return new ApplicationResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String spaceName, String applicationName, String resourceName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, spaceName, applicationName, resourceName, context); + } + + public void delete(String resourceGroupName, String spaceName, String applicationName, String resourceName) { + this.serviceClient().delete(resourceGroupName, spaceName, applicationName, resourceName); + } + + public ApplicationResource getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String applicationName = Utils.getValueFromIdByName(id, "applications"); + if (applicationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "resources"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resources'.", id))); + } + return this + .getWithResponse(resourceGroupName, spaceName, applicationName, resourceName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String applicationName = Utils.getValueFromIdByName(id, "applications"); + if (applicationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "resources"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resources'.", id))); + } + return this.getWithResponse(resourceGroupName, spaceName, applicationName, resourceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String applicationName = Utils.getValueFromIdByName(id, "applications"); + if (applicationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "resources"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resources'.", id))); + } + this.deleteWithResponse(resourceGroupName, spaceName, applicationName, resourceName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String applicationName = Utils.getValueFromIdByName(id, "applications"); + if (applicationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "resources"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resources'.", id))); + } + return this.deleteWithResponse(resourceGroupName, spaceName, applicationName, resourceName, context); + } + + private ApplicationResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } + + public ApplicationResourceImpl define(String name) { + return new ApplicationResourceImpl(name, this.manager()); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationsClientImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationsClientImpl.java new file mode 100644 index 000000000000..9426084138b0 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationsClientImpl.java @@ -0,0 +1,2312 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azureintegrationspaces.fluent.ApplicationsClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationInner; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ListBusinessProcessDevelopmentArtifactsResponseInner; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SaveOrGetBusinessProcessDevelopmentArtifactResponseInner; +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationListResult; +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationUpdate; +import com.azure.resourcemanager.azureintegrationspaces.models.GetOrDeleteBusinessProcessDevelopmentArtifactRequest; +import com.azure.resourcemanager.azureintegrationspaces.models.SaveOrValidateBusinessProcessDevelopmentArtifactRequest; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ApplicationsClient. */ +public final class ApplicationsClientImpl implements ApplicationsClient { + /** The proxy service used to perform REST calls. */ + private final ApplicationsService service; + + /** The service client containing this operation class. */ + private final MicrosoftIntegrationSpacesImpl client; + + /** + * Initializes an instance of ApplicationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ApplicationsClientImpl(MicrosoftIntegrationSpacesImpl client) { + this.service = + RestProxy.create(ApplicationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftIntegrationSpacesApplications to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftIntegration") + public interface ApplicationsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySpace( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("top") Integer top, + @QueryParam("skip") Integer skip, + @QueryParam("maxpagesize") Integer maxPageSize, + @QueryParam("filter") String filter, + @QueryParam(value = "select", multipleQueryParams = true) List select, + @QueryParam(value = "expand", multipleQueryParams = true) List expand, + @QueryParam(value = "orderby", multipleQueryParams = true) List orderBy, + @PathParam("spaceName") String spaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @BodyParam("application/json") ApplicationInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> patch( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @BodyParam("application/json") ApplicationUpdate properties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/deleteBusinessProcessDevelopmentArtifact") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteBusinessProcessDevelopmentArtifact( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @BodyParam("application/json") GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/getBusinessProcessDevelopmentArtifact") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getBusinessProcessDevelopmentArtifact( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @BodyParam("application/json") GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/listBusinessProcessDevelopmentArtifacts") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBusinessProcessDevelopmentArtifacts( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/saveBusinessProcessDevelopmentArtifact") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> saveBusinessProcessDevelopmentArtifact( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @BodyParam("application/json") SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/validateBusinessProcessDevelopmentArtifact") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> validateBusinessProcessDevelopmentArtifact( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @BodyParam("application/json") SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySpaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List Application resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySpaceSinglePageAsync( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + final String accept = "application/json"; + List selectConverted = + (select == null) + ? new ArrayList<>() + : select.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List expandConverted = + (expand == null) + ? new ArrayList<>() + : expand.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = + (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return FluxUtil + .withContext( + context -> + service + .listBySpace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + skip, + maxPageSize, + filter, + selectConverted, + expandConverted, + orderByConverted, + spaceName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Application resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySpaceSinglePageAsync( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + final String accept = "application/json"; + List selectConverted = + (select == null) + ? new ArrayList<>() + : select.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List expandConverted = + (expand == null) + ? new ArrayList<>() + : expand.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = + (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + context = this.client.mergeContext(context); + return service + .listBySpace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + skip, + maxPageSize, + filter, + selectConverted, + expandConverted, + orderByConverted, + spaceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Application resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySpaceAsync( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy) { + return new PagedFlux<>( + () -> + listBySpaceSinglePageAsync( + resourceGroupName, spaceName, top, skip, maxPageSize, filter, select, expand, orderBy), + nextLink -> listBySpaceNextSinglePageAsync(nextLink)); + } + + /** + * List Application resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySpaceAsync(String resourceGroupName, String spaceName) { + final Integer top = null; + final Integer skip = null; + final Integer maxPageSize = null; + final String filter = null; + final List select = null; + final List expand = null; + final List orderBy = null; + return new PagedFlux<>( + () -> + listBySpaceSinglePageAsync( + resourceGroupName, spaceName, top, skip, maxPageSize, filter, select, expand, orderBy), + nextLink -> listBySpaceNextSinglePageAsync(nextLink)); + } + + /** + * List Application resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySpaceAsync( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + return new PagedFlux<>( + () -> + listBySpaceSinglePageAsync( + resourceGroupName, spaceName, top, skip, maxPageSize, filter, select, expand, orderBy, context), + nextLink -> listBySpaceNextSinglePageAsync(nextLink, context)); + } + + /** + * List Application resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySpace(String resourceGroupName, String spaceName) { + final Integer top = null; + final Integer skip = null; + final Integer maxPageSize = null; + final String filter = null; + final List select = null; + final List expand = null; + final List orderBy = null; + return new PagedIterable<>( + listBySpaceAsync(resourceGroupName, spaceName, top, skip, maxPageSize, filter, select, expand, orderBy)); + } + + /** + * List Application resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySpace( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + return new PagedIterable<>( + listBySpaceAsync( + resourceGroupName, spaceName, top, skip, maxPageSize, filter, select, expand, orderBy, context)); + } + + /** + * Get a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Application along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Application along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + accept, + context); + } + + /** + * Get a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Application on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String spaceName, String applicationName) { + return getWithResponseAsync(resourceGroupName, spaceName, applicationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Application along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String spaceName, String applicationName, Context context) { + return getWithResponseAsync(resourceGroupName, spaceName, applicationName, context).block(); + } + + /** + * Get a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplicationInner get(String resourceGroupName, String spaceName, String applicationName) { + return getWithResponse(resourceGroupName, spaceName, applicationName, Context.NONE).getValue(); + } + + /** + * Create a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName, ApplicationInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + ApplicationInner resource, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + resource, + accept, + context); + } + + /** + * Create a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String spaceName, String applicationName, ApplicationInner resource) { + return createOrUpdateWithResponseAsync(resourceGroupName, spaceName, applicationName, resource) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + ApplicationInner resource, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, spaceName, applicationName, resource, context) + .block(); + } + + /** + * Create a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplicationInner createOrUpdate( + String resourceGroupName, String spaceName, String applicationName, ApplicationInner resource) { + return createOrUpdateWithResponse(resourceGroupName, spaceName, applicationName, resource, Context.NONE) + .getValue(); + } + + /** + * Update a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> patchWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName, ApplicationUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .patch( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + properties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> patchWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + ApplicationUpdate properties, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .patch( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + properties, + accept, + context); + } + + /** + * Update a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono patchAsync( + String resourceGroupName, String spaceName, String applicationName, ApplicationUpdate properties) { + return patchWithResponseAsync(resourceGroupName, spaceName, applicationName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response patchWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + ApplicationUpdate properties, + Context context) { + return patchWithResponseAsync(resourceGroupName, spaceName, applicationName, properties, context).block(); + } + + /** + * Update a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration application under space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplicationInner patch( + String resourceGroupName, String spaceName, String applicationName, ApplicationUpdate properties) { + return patchWithResponse(resourceGroupName, spaceName, applicationName, properties, Context.NONE).getValue(); + } + + /** + * Delete a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + accept, + context); + } + + /** + * Delete a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String spaceName, String applicationName) { + return deleteWithResponseAsync(resourceGroupName, spaceName, applicationName).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String spaceName, String applicationName, Context context) { + return deleteWithResponseAsync(resourceGroupName, spaceName, applicationName, context).block(); + } + + /** + * Delete a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String spaceName, String applicationName) { + deleteWithResponse(resourceGroupName, spaceName, applicationName, Context.NONE); + } + + /** + * The delete business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteBusinessProcessDevelopmentArtifactWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .deleteBusinessProcessDevelopmentArtifact( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The delete business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteBusinessProcessDevelopmentArtifactWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .deleteBusinessProcessDevelopmentArtifact( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + body, + accept, + context); + } + + /** + * The delete business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteBusinessProcessDevelopmentArtifactAsync( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body) { + return deleteBusinessProcessDevelopmentArtifactWithResponseAsync( + resourceGroupName, spaceName, applicationName, body) + .flatMap(ignored -> Mono.empty()); + } + + /** + * The delete business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, + Context context) { + return deleteBusinessProcessDevelopmentArtifactWithResponseAsync( + resourceGroupName, spaceName, applicationName, body, context) + .block(); + } + + /** + * The delete business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body) { + deleteBusinessProcessDevelopmentArtifactWithResponse( + resourceGroupName, spaceName, applicationName, body, Context.NONE); + } + + /** + * The get business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getBusinessProcessDevelopmentArtifactWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getBusinessProcessDevelopmentArtifact( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The get business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getBusinessProcessDevelopmentArtifactWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getBusinessProcessDevelopmentArtifact( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + body, + accept, + context); + } + + /** + * The get business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getBusinessProcessDevelopmentArtifactAsync( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body) { + return getBusinessProcessDevelopmentArtifactWithResponseAsync( + resourceGroupName, spaceName, applicationName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The get business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + getBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, + Context context) { + return getBusinessProcessDevelopmentArtifactWithResponseAsync( + resourceGroupName, spaceName, applicationName, body, context) + .block(); + } + + /** + * The get business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SaveOrGetBusinessProcessDevelopmentArtifactResponseInner getBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body) { + return getBusinessProcessDevelopmentArtifactWithResponse( + resourceGroupName, spaceName, applicationName, body, Context.NONE) + .getValue(); + } + + /** + * The list business process development artifacts action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact get collection response along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBusinessProcessDevelopmentArtifactsWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listBusinessProcessDevelopmentArtifacts( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The list business process development artifacts action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact get collection response along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBusinessProcessDevelopmentArtifactsWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBusinessProcessDevelopmentArtifacts( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + accept, + context); + } + + /** + * The list business process development artifacts action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact get collection response on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listBusinessProcessDevelopmentArtifactsAsync( + String resourceGroupName, String spaceName, String applicationName) { + return listBusinessProcessDevelopmentArtifactsWithResponseAsync(resourceGroupName, spaceName, applicationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The list business process development artifacts action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact get collection response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + listBusinessProcessDevelopmentArtifactsWithResponse( + String resourceGroupName, String spaceName, String applicationName, Context context) { + return listBusinessProcessDevelopmentArtifactsWithResponseAsync( + resourceGroupName, spaceName, applicationName, context) + .block(); + } + + /** + * The list business process development artifacts action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact get collection response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListBusinessProcessDevelopmentArtifactsResponseInner listBusinessProcessDevelopmentArtifacts( + String resourceGroupName, String spaceName, String applicationName) { + return listBusinessProcessDevelopmentArtifactsWithResponse( + resourceGroupName, spaceName, applicationName, Context.NONE) + .getValue(); + } + + /** + * The save business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + saveBusinessProcessDevelopmentArtifactWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .saveBusinessProcessDevelopmentArtifact( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The save business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + saveBusinessProcessDevelopmentArtifactWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .saveBusinessProcessDevelopmentArtifact( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + body, + accept, + context); + } + + /** + * The save business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono saveBusinessProcessDevelopmentArtifactAsync( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body) { + return saveBusinessProcessDevelopmentArtifactWithResponseAsync( + resourceGroupName, spaceName, applicationName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The save business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + saveBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, + Context context) { + return saveBusinessProcessDevelopmentArtifactWithResponseAsync( + resourceGroupName, spaceName, applicationName, body, context) + .block(); + } + + /** + * The save business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SaveOrGetBusinessProcessDevelopmentArtifactResponseInner saveBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body) { + return saveBusinessProcessDevelopmentArtifactWithResponse( + resourceGroupName, spaceName, applicationName, body, Context.NONE) + .getValue(); + } + + /** + * The validate business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> validateBusinessProcessDevelopmentArtifactWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .validateBusinessProcessDevelopmentArtifact( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The validate business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> validateBusinessProcessDevelopmentArtifactWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .validateBusinessProcessDevelopmentArtifact( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + body, + accept, + context); + } + + /** + * The validate business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateBusinessProcessDevelopmentArtifactAsync( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body) { + return validateBusinessProcessDevelopmentArtifactWithResponseAsync( + resourceGroupName, spaceName, applicationName, body) + .flatMap(ignored -> Mono.empty()); + } + + /** + * The validate business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response validateBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, + Context context) { + return validateBusinessProcessDevelopmentArtifactWithResponseAsync( + resourceGroupName, spaceName, applicationName, body, context) + .block(); + } + + /** + * The validate business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void validateBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body) { + validateBusinessProcessDevelopmentArtifactWithResponse( + resourceGroupName, spaceName, applicationName, body, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySpaceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listBySpaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySpaceNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySpaceNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationsImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationsImpl.java new file mode 100644 index 000000000000..524682443797 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ApplicationsImpl.java @@ -0,0 +1,362 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.ApplicationsClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationInner; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ListBusinessProcessDevelopmentArtifactsResponseInner; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SaveOrGetBusinessProcessDevelopmentArtifactResponseInner; +import com.azure.resourcemanager.azureintegrationspaces.models.Application; +import com.azure.resourcemanager.azureintegrationspaces.models.Applications; +import com.azure.resourcemanager.azureintegrationspaces.models.GetOrDeleteBusinessProcessDevelopmentArtifactRequest; +import com.azure.resourcemanager.azureintegrationspaces.models.ListBusinessProcessDevelopmentArtifactsResponse; +import com.azure.resourcemanager.azureintegrationspaces.models.SaveOrGetBusinessProcessDevelopmentArtifactResponse; +import com.azure.resourcemanager.azureintegrationspaces.models.SaveOrValidateBusinessProcessDevelopmentArtifactRequest; +import java.util.List; + +public final class ApplicationsImpl implements Applications { + private static final ClientLogger LOGGER = new ClientLogger(ApplicationsImpl.class); + + private final ApplicationsClient innerClient; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + public ApplicationsImpl( + ApplicationsClient innerClient, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listBySpace(String resourceGroupName, String spaceName) { + PagedIterable inner = this.serviceClient().listBySpace(resourceGroupName, spaceName); + return Utils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); + } + + public PagedIterable listBySpace( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + PagedIterable inner = + this + .serviceClient() + .listBySpace( + resourceGroupName, spaceName, top, skip, maxPageSize, filter, select, expand, orderBy, context); + return Utils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String spaceName, String applicationName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, spaceName, applicationName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ApplicationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Application get(String resourceGroupName, String spaceName, String applicationName) { + ApplicationInner inner = this.serviceClient().get(resourceGroupName, spaceName, applicationName); + if (inner != null) { + return new ApplicationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String spaceName, String applicationName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, spaceName, applicationName, context); + } + + public void delete(String resourceGroupName, String spaceName, String applicationName) { + this.serviceClient().delete(resourceGroupName, spaceName, applicationName); + } + + public Response deleteBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, + Context context) { + return this + .serviceClient() + .deleteBusinessProcessDevelopmentArtifactWithResponse( + resourceGroupName, spaceName, applicationName, body, context); + } + + public void deleteBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body) { + this + .serviceClient() + .deleteBusinessProcessDevelopmentArtifact(resourceGroupName, spaceName, applicationName, body); + } + + public Response + getBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, + Context context) { + Response inner = + this + .serviceClient() + .getBusinessProcessDevelopmentArtifactWithResponse( + resourceGroupName, spaceName, applicationName, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SaveOrGetBusinessProcessDevelopmentArtifactResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SaveOrGetBusinessProcessDevelopmentArtifactResponse getBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body) { + SaveOrGetBusinessProcessDevelopmentArtifactResponseInner inner = + this + .serviceClient() + .getBusinessProcessDevelopmentArtifact(resourceGroupName, spaceName, applicationName, body); + if (inner != null) { + return new SaveOrGetBusinessProcessDevelopmentArtifactResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response + listBusinessProcessDevelopmentArtifactsWithResponse( + String resourceGroupName, String spaceName, String applicationName, Context context) { + Response inner = + this + .serviceClient() + .listBusinessProcessDevelopmentArtifactsWithResponse( + resourceGroupName, spaceName, applicationName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ListBusinessProcessDevelopmentArtifactsResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ListBusinessProcessDevelopmentArtifactsResponse listBusinessProcessDevelopmentArtifacts( + String resourceGroupName, String spaceName, String applicationName) { + ListBusinessProcessDevelopmentArtifactsResponseInner inner = + this.serviceClient().listBusinessProcessDevelopmentArtifacts(resourceGroupName, spaceName, applicationName); + if (inner != null) { + return new ListBusinessProcessDevelopmentArtifactsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response + saveBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, + Context context) { + Response inner = + this + .serviceClient() + .saveBusinessProcessDevelopmentArtifactWithResponse( + resourceGroupName, spaceName, applicationName, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SaveOrGetBusinessProcessDevelopmentArtifactResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SaveOrGetBusinessProcessDevelopmentArtifactResponse saveBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body) { + SaveOrGetBusinessProcessDevelopmentArtifactResponseInner inner = + this + .serviceClient() + .saveBusinessProcessDevelopmentArtifact(resourceGroupName, spaceName, applicationName, body); + if (inner != null) { + return new SaveOrGetBusinessProcessDevelopmentArtifactResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response validateBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, + Context context) { + return this + .serviceClient() + .validateBusinessProcessDevelopmentArtifactWithResponse( + resourceGroupName, spaceName, applicationName, body, context); + } + + public void validateBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body) { + this + .serviceClient() + .validateBusinessProcessDevelopmentArtifact(resourceGroupName, spaceName, applicationName, body); + } + + public Application getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String applicationName = Utils.getValueFromIdByName(id, "applications"); + if (applicationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + } + return this.getWithResponse(resourceGroupName, spaceName, applicationName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String applicationName = Utils.getValueFromIdByName(id, "applications"); + if (applicationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + } + return this.getWithResponse(resourceGroupName, spaceName, applicationName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String applicationName = Utils.getValueFromIdByName(id, "applications"); + if (applicationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + } + this.deleteWithResponse(resourceGroupName, spaceName, applicationName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String applicationName = Utils.getValueFromIdByName(id, "applications"); + if (applicationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + } + return this.deleteWithResponse(resourceGroupName, spaceName, applicationName, context); + } + + private ApplicationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } + + public ApplicationImpl define(String name) { + return new ApplicationImpl(name, this.manager()); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessImpl.java new file mode 100644 index 000000000000..efc036a9eafe --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessImpl.java @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessInner; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcess; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessUpdate; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import java.util.Collections; +import java.util.Map; + +public final class BusinessProcessImpl implements BusinessProcess, BusinessProcess.Definition, BusinessProcess.Update { + private BusinessProcessInner innerObject; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String version() { + return this.innerModel().version(); + } + + public String description() { + return this.innerModel().description(); + } + + public String tableName() { + return this.innerModel().tableName(); + } + + public String trackingDataStoreReferenceName() { + return this.innerModel().trackingDataStoreReferenceName(); + } + + public BusinessProcessIdentifier identifier() { + return this.innerModel().identifier(); + } + + public Map businessProcessStages() { + Map inner = this.innerModel().businessProcessStages(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Map businessProcessMapping() { + Map inner = this.innerModel().businessProcessMapping(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public BusinessProcessInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String spaceName; + + private String applicationName; + + private String businessProcessName; + + private BusinessProcessUpdate updateProperties; + + public BusinessProcessImpl withExistingApplication( + String resourceGroupName, String spaceName, String applicationName) { + this.resourceGroupName = resourceGroupName; + this.spaceName = spaceName; + this.applicationName = applicationName; + return this; + } + + public BusinessProcess create() { + this.innerObject = + serviceManager + .serviceClient() + .getBusinessProcesses() + .createOrUpdateWithResponse( + resourceGroupName, spaceName, applicationName, businessProcessName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public BusinessProcess create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBusinessProcesses() + .createOrUpdateWithResponse( + resourceGroupName, spaceName, applicationName, businessProcessName, this.innerModel(), context) + .getValue(); + return this; + } + + BusinessProcessImpl( + String name, com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = new BusinessProcessInner(); + this.serviceManager = serviceManager; + this.businessProcessName = name; + } + + public BusinessProcessImpl update() { + this.updateProperties = new BusinessProcessUpdate(); + return this; + } + + public BusinessProcess apply() { + this.innerObject = + serviceManager + .serviceClient() + .getBusinessProcesses() + .patchWithResponse( + resourceGroupName, spaceName, applicationName, businessProcessName, updateProperties, Context.NONE) + .getValue(); + return this; + } + + public BusinessProcess apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBusinessProcesses() + .patchWithResponse( + resourceGroupName, spaceName, applicationName, businessProcessName, updateProperties, context) + .getValue(); + return this; + } + + BusinessProcessImpl( + BusinessProcessInner innerObject, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.spaceName = Utils.getValueFromIdByName(innerObject.id(), "spaces"); + this.applicationName = Utils.getValueFromIdByName(innerObject.id(), "applications"); + this.businessProcessName = Utils.getValueFromIdByName(innerObject.id(), "businessProcesses"); + } + + public BusinessProcess refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getBusinessProcesses() + .getWithResponse(resourceGroupName, spaceName, applicationName, businessProcessName, Context.NONE) + .getValue(); + return this; + } + + public BusinessProcess refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBusinessProcesses() + .getWithResponse(resourceGroupName, spaceName, applicationName, businessProcessName, context) + .getValue(); + return this; + } + + public BusinessProcessImpl withDescription(String description) { + if (isInCreateMode()) { + this.innerModel().withDescription(description); + return this; + } else { + this.updateProperties.withDescription(description); + return this; + } + } + + public BusinessProcessImpl withTableName(String tableName) { + if (isInCreateMode()) { + this.innerModel().withTableName(tableName); + return this; + } else { + this.updateProperties.withTableName(tableName); + return this; + } + } + + public BusinessProcessImpl withTrackingDataStoreReferenceName(String trackingDataStoreReferenceName) { + if (isInCreateMode()) { + this.innerModel().withTrackingDataStoreReferenceName(trackingDataStoreReferenceName); + return this; + } else { + this.updateProperties.withTrackingDataStoreReferenceName(trackingDataStoreReferenceName); + return this; + } + } + + public BusinessProcessImpl withIdentifier(BusinessProcessIdentifier identifier) { + if (isInCreateMode()) { + this.innerModel().withIdentifier(identifier); + return this; + } else { + this.updateProperties.withIdentifier(identifier); + return this; + } + } + + public BusinessProcessImpl withBusinessProcessStages(Map businessProcessStages) { + if (isInCreateMode()) { + this.innerModel().withBusinessProcessStages(businessProcessStages); + return this; + } else { + this.updateProperties.withBusinessProcessStages(businessProcessStages); + return this; + } + } + + public BusinessProcessImpl withBusinessProcessMapping( + Map businessProcessMapping) { + if (isInCreateMode()) { + this.innerModel().withBusinessProcessMapping(businessProcessMapping); + return this; + } else { + this.updateProperties.withBusinessProcessMapping(businessProcessMapping); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessVersionImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessVersionImpl.java new file mode 100644 index 000000000000..b11958a1712d --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessVersionImpl.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessVersionInner; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessVersion; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import java.util.Collections; +import java.util.Map; + +public final class BusinessProcessVersionImpl implements BusinessProcessVersion { + private BusinessProcessVersionInner innerObject; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + BusinessProcessVersionImpl( + BusinessProcessVersionInner innerObject, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String version() { + return this.innerModel().version(); + } + + public String description() { + return this.innerModel().description(); + } + + public String tableName() { + return this.innerModel().tableName(); + } + + public String trackingDataStoreReferenceName() { + return this.innerModel().trackingDataStoreReferenceName(); + } + + public BusinessProcessIdentifier identifier() { + return this.innerModel().identifier(); + } + + public Map businessProcessStages() { + Map inner = this.innerModel().businessProcessStages(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Map businessProcessMapping() { + Map inner = this.innerModel().businessProcessMapping(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public BusinessProcessVersionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessVersionsClientImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessVersionsClientImpl.java new file mode 100644 index 000000000000..4210e26f4e21 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessVersionsClientImpl.java @@ -0,0 +1,852 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azureintegrationspaces.fluent.BusinessProcessVersionsClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessVersionInner; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessVersionListResult; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in BusinessProcessVersionsClient. */ +public final class BusinessProcessVersionsClientImpl implements BusinessProcessVersionsClient { + /** The proxy service used to perform REST calls. */ + private final BusinessProcessVersionsService service; + + /** The service client containing this operation class. */ + private final MicrosoftIntegrationSpacesImpl client; + + /** + * Initializes an instance of BusinessProcessVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BusinessProcessVersionsClientImpl(MicrosoftIntegrationSpacesImpl client) { + this.service = + RestProxy + .create(BusinessProcessVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftIntegrationSpacesBusinessProcessVersions to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftIntegration") + public interface BusinessProcessVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses/{businessProcessName}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByBusinessProcess( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("top") Integer top, + @QueryParam("skip") Integer skip, + @QueryParam("maxpagesize") Integer maxPageSize, + @QueryParam("filter") String filter, + @QueryParam(value = "select", multipleQueryParams = true) List select, + @QueryParam(value = "expand", multipleQueryParams = true) List expand, + @QueryParam(value = "orderby", multipleQueryParams = true) List orderBy, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @PathParam("businessProcessName") String businessProcessName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses/{businessProcessName}/versions/{businessProcessVersion}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @PathParam("businessProcessName") String businessProcessName, + @PathParam("businessProcessVersion") String businessProcessVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByBusinessProcessNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List BusinessProcessVersion resources by BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByBusinessProcessSinglePageAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (businessProcessName == null) { + return Mono + .error(new IllegalArgumentException("Parameter businessProcessName is required and cannot be null.")); + } + final String accept = "application/json"; + List selectConverted = + (select == null) + ? new ArrayList<>() + : select.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List expandConverted = + (expand == null) + ? new ArrayList<>() + : expand.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = + (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return FluxUtil + .withContext( + context -> + service + .listByBusinessProcess( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + skip, + maxPageSize, + filter, + selectConverted, + expandConverted, + orderByConverted, + spaceName, + applicationName, + businessProcessName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List BusinessProcessVersion resources by BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByBusinessProcessSinglePageAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (businessProcessName == null) { + return Mono + .error(new IllegalArgumentException("Parameter businessProcessName is required and cannot be null.")); + } + final String accept = "application/json"; + List selectConverted = + (select == null) + ? new ArrayList<>() + : select.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List expandConverted = + (expand == null) + ? new ArrayList<>() + : expand.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = + (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + context = this.client.mergeContext(context); + return service + .listByBusinessProcess( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + skip, + maxPageSize, + filter, + selectConverted, + expandConverted, + orderByConverted, + spaceName, + applicationName, + businessProcessName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List BusinessProcessVersion resources by BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByBusinessProcessAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy) { + return new PagedFlux<>( + () -> + listByBusinessProcessSinglePageAsync( + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy), + nextLink -> listByBusinessProcessNextSinglePageAsync(nextLink)); + } + + /** + * List BusinessProcessVersion resources by BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByBusinessProcessAsync( + String resourceGroupName, String spaceName, String applicationName, String businessProcessName) { + final Integer top = null; + final Integer skip = null; + final Integer maxPageSize = null; + final String filter = null; + final List select = null; + final List expand = null; + final List orderBy = null; + return new PagedFlux<>( + () -> + listByBusinessProcessSinglePageAsync( + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy), + nextLink -> listByBusinessProcessNextSinglePageAsync(nextLink)); + } + + /** + * List BusinessProcessVersion resources by BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByBusinessProcessAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + return new PagedFlux<>( + () -> + listByBusinessProcessSinglePageAsync( + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy, + context), + nextLink -> listByBusinessProcessNextSinglePageAsync(nextLink, context)); + } + + /** + * List BusinessProcessVersion resources by BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByBusinessProcess( + String resourceGroupName, String spaceName, String applicationName, String businessProcessName) { + final Integer top = null; + final Integer skip = null; + final Integer maxPageSize = null; + final String filter = null; + final List select = null; + final List expand = null; + final List orderBy = null; + return new PagedIterable<>( + listByBusinessProcessAsync( + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy)); + } + + /** + * List BusinessProcessVersion resources by BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByBusinessProcess( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + return new PagedIterable<>( + listByBusinessProcessAsync( + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy, + context)); + } + + /** + * Get a BusinessProcessVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param businessProcessVersion The version of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcessVersion along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + String businessProcessVersion) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (businessProcessName == null) { + return Mono + .error(new IllegalArgumentException("Parameter businessProcessName is required and cannot be null.")); + } + if (businessProcessVersion == null) { + return Mono + .error( + new IllegalArgumentException("Parameter businessProcessVersion is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + businessProcessVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a BusinessProcessVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param businessProcessVersion The version of the business process. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcessVersion along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + String businessProcessVersion, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (businessProcessName == null) { + return Mono + .error(new IllegalArgumentException("Parameter businessProcessName is required and cannot be null.")); + } + if (businessProcessVersion == null) { + return Mono + .error( + new IllegalArgumentException("Parameter businessProcessVersion is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + businessProcessVersion, + accept, + context); + } + + /** + * Get a BusinessProcessVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param businessProcessVersion The version of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcessVersion on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + String businessProcessVersion) { + return getWithResponseAsync( + resourceGroupName, spaceName, applicationName, businessProcessName, businessProcessVersion) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a BusinessProcessVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param businessProcessVersion The version of the business process. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcessVersion along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + String businessProcessVersion, + Context context) { + return getWithResponseAsync( + resourceGroupName, spaceName, applicationName, businessProcessName, businessProcessVersion, context) + .block(); + } + + /** + * Get a BusinessProcessVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param businessProcessVersion The version of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcessVersion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BusinessProcessVersionInner get( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + String businessProcessVersion) { + return getWithResponse( + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + businessProcessVersion, + Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByBusinessProcessNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByBusinessProcessNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByBusinessProcessNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByBusinessProcessNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessVersionsImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessVersionsImpl.java new file mode 100644 index 000000000000..5a5b9531cdb5 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessVersionsImpl.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.BusinessProcessVersionsClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessVersionInner; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessVersion; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessVersions; +import java.util.List; + +public final class BusinessProcessVersionsImpl implements BusinessProcessVersions { + private static final ClientLogger LOGGER = new ClientLogger(BusinessProcessVersionsImpl.class); + + private final BusinessProcessVersionsClient innerClient; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + public BusinessProcessVersionsImpl( + BusinessProcessVersionsClient innerClient, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByBusinessProcess( + String resourceGroupName, String spaceName, String applicationName, String businessProcessName) { + PagedIterable inner = + this + .serviceClient() + .listByBusinessProcess(resourceGroupName, spaceName, applicationName, businessProcessName); + return Utils.mapPage(inner, inner1 -> new BusinessProcessVersionImpl(inner1, this.manager())); + } + + public PagedIterable listByBusinessProcess( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + PagedIterable inner = + this + .serviceClient() + .listByBusinessProcess( + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy, + context); + return Utils.mapPage(inner, inner1 -> new BusinessProcessVersionImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + String businessProcessVersion, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse( + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + businessProcessVersion, + context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BusinessProcessVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BusinessProcessVersion get( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + String businessProcessVersion) { + BusinessProcessVersionInner inner = + this + .serviceClient() + .get(resourceGroupName, spaceName, applicationName, businessProcessName, businessProcessVersion); + if (inner != null) { + return new BusinessProcessVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + private BusinessProcessVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessesClientImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessesClientImpl.java new file mode 100644 index 000000000000..92c46e99ba5c --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessesClientImpl.java @@ -0,0 +1,1457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azureintegrationspaces.fluent.BusinessProcessesClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessInner; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessListResult; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessUpdate; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in BusinessProcessesClient. */ +public final class BusinessProcessesClientImpl implements BusinessProcessesClient { + /** The proxy service used to perform REST calls. */ + private final BusinessProcessesService service; + + /** The service client containing this operation class. */ + private final MicrosoftIntegrationSpacesImpl client; + + /** + * Initializes an instance of BusinessProcessesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BusinessProcessesClientImpl(MicrosoftIntegrationSpacesImpl client) { + this.service = + RestProxy.create(BusinessProcessesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftIntegrationSpacesBusinessProcesses to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftIntegration") + public interface BusinessProcessesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByApplication( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("top") Integer top, + @QueryParam("skip") Integer skip, + @QueryParam("maxpagesize") Integer maxPageSize, + @QueryParam("filter") String filter, + @QueryParam(value = "select", multipleQueryParams = true) List select, + @QueryParam(value = "expand", multipleQueryParams = true) List expand, + @QueryParam(value = "orderby", multipleQueryParams = true) List orderBy, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses/{businessProcessName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @PathParam("businessProcessName") String businessProcessName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses/{businessProcessName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @PathParam("businessProcessName") String businessProcessName, + @BodyParam("application/json") BusinessProcessInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses/{businessProcessName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> patch( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @PathParam("businessProcessName") String businessProcessName, + @BodyParam("application/json") BusinessProcessUpdate properties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses/{businessProcessName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("applicationName") String applicationName, + @PathParam("businessProcessName") String businessProcessName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByApplicationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List BusinessProcess resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByApplicationSinglePageAsync( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + final String accept = "application/json"; + List selectConverted = + (select == null) + ? new ArrayList<>() + : select.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List expandConverted = + (expand == null) + ? new ArrayList<>() + : expand.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = + (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return FluxUtil + .withContext( + context -> + service + .listByApplication( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + skip, + maxPageSize, + filter, + selectConverted, + expandConverted, + orderByConverted, + spaceName, + applicationName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List BusinessProcess resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByApplicationSinglePageAsync( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + final String accept = "application/json"; + List selectConverted = + (select == null) + ? new ArrayList<>() + : select.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List expandConverted = + (expand == null) + ? new ArrayList<>() + : expand.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = + (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + context = this.client.mergeContext(context); + return service + .listByApplication( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + skip, + maxPageSize, + filter, + selectConverted, + expandConverted, + orderByConverted, + spaceName, + applicationName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List BusinessProcess resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByApplicationAsync( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy) { + return new PagedFlux<>( + () -> + listByApplicationSinglePageAsync( + resourceGroupName, + spaceName, + applicationName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy), + nextLink -> listByApplicationNextSinglePageAsync(nextLink)); + } + + /** + * List BusinessProcess resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByApplicationAsync( + String resourceGroupName, String spaceName, String applicationName) { + final Integer top = null; + final Integer skip = null; + final Integer maxPageSize = null; + final String filter = null; + final List select = null; + final List expand = null; + final List orderBy = null; + return new PagedFlux<>( + () -> + listByApplicationSinglePageAsync( + resourceGroupName, + spaceName, + applicationName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy), + nextLink -> listByApplicationNextSinglePageAsync(nextLink)); + } + + /** + * List BusinessProcess resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByApplicationAsync( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + return new PagedFlux<>( + () -> + listByApplicationSinglePageAsync( + resourceGroupName, + spaceName, + applicationName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy, + context), + nextLink -> listByApplicationNextSinglePageAsync(nextLink, context)); + } + + /** + * List BusinessProcess resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByApplication( + String resourceGroupName, String spaceName, String applicationName) { + final Integer top = null; + final Integer skip = null; + final Integer maxPageSize = null; + final String filter = null; + final List select = null; + final List expand = null; + final List orderBy = null; + return new PagedIterable<>( + listByApplicationAsync( + resourceGroupName, + spaceName, + applicationName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy)); + } + + /** + * List BusinessProcess resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByApplication( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + return new PagedIterable<>( + listByApplicationAsync( + resourceGroupName, + spaceName, + applicationName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy, + context)); + } + + /** + * Get a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcess along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName, String businessProcessName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (businessProcessName == null) { + return Mono + .error(new IllegalArgumentException("Parameter businessProcessName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcess along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (businessProcessName == null) { + return Mono + .error(new IllegalArgumentException("Parameter businessProcessName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + accept, + context); + } + + /** + * Get a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcess on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String spaceName, String applicationName, String businessProcessName) { + return getWithResponseAsync(resourceGroupName, spaceName, applicationName, businessProcessName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcess along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Context context) { + return getWithResponseAsync(resourceGroupName, spaceName, applicationName, businessProcessName, context) + .block(); + } + + /** + * Get a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcess. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BusinessProcessInner get( + String resourceGroupName, String spaceName, String applicationName, String businessProcessName) { + return getWithResponse(resourceGroupName, spaceName, applicationName, businessProcessName, Context.NONE) + .getValue(); + } + + /** + * Create a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (businessProcessName == null) { + return Mono + .error(new IllegalArgumentException("Parameter businessProcessName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessInner resource, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (businessProcessName == null) { + return Mono + .error(new IllegalArgumentException("Parameter businessProcessName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + resource, + accept, + context); + } + + /** + * Create a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessInner resource) { + return createOrUpdateWithResponseAsync( + resourceGroupName, spaceName, applicationName, businessProcessName, resource) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessInner resource, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, spaceName, applicationName, businessProcessName, resource, context) + .block(); + } + + /** + * Create a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BusinessProcessInner createOrUpdate( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessInner resource) { + return createOrUpdateWithResponse( + resourceGroupName, spaceName, applicationName, businessProcessName, resource, Context.NONE) + .getValue(); + } + + /** + * Update a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> patchWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (businessProcessName == null) { + return Mono + .error(new IllegalArgumentException("Parameter businessProcessName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .patch( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + properties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> patchWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessUpdate properties, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (businessProcessName == null) { + return Mono + .error(new IllegalArgumentException("Parameter businessProcessName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .patch( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + properties, + accept, + context); + } + + /** + * Update a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono patchAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessUpdate properties) { + return patchWithResponseAsync(resourceGroupName, spaceName, applicationName, businessProcessName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response patchWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessUpdate properties, + Context context) { + return patchWithResponseAsync( + resourceGroupName, spaceName, applicationName, businessProcessName, properties, context) + .block(); + } + + /** + * Update a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a business process under application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BusinessProcessInner patch( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + BusinessProcessUpdate properties) { + return patchWithResponse( + resourceGroupName, spaceName, applicationName, businessProcessName, properties, Context.NONE) + .getValue(); + } + + /** + * Delete a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String spaceName, String applicationName, String businessProcessName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (businessProcessName == null) { + return Mono + .error(new IllegalArgumentException("Parameter businessProcessName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (businessProcessName == null) { + return Mono + .error(new IllegalArgumentException("Parameter businessProcessName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + applicationName, + businessProcessName, + accept, + context); + } + + /** + * Delete a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String spaceName, String applicationName, String businessProcessName) { + return deleteWithResponseAsync(resourceGroupName, spaceName, applicationName, businessProcessName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Context context) { + return deleteWithResponseAsync(resourceGroupName, spaceName, applicationName, businessProcessName, context) + .block(); + } + + /** + * Delete a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String spaceName, String applicationName, String businessProcessName) { + deleteWithResponse(resourceGroupName, spaceName, applicationName, businessProcessName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByApplicationNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByApplicationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByApplicationNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByApplicationNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessesImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessesImpl.java new file mode 100644 index 000000000000..0a71d008fd03 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/BusinessProcessesImpl.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.BusinessProcessesClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessInner; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcess; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcesses; +import java.util.List; + +public final class BusinessProcessesImpl implements BusinessProcesses { + private static final ClientLogger LOGGER = new ClientLogger(BusinessProcessesImpl.class); + + private final BusinessProcessesClient innerClient; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + public BusinessProcessesImpl( + BusinessProcessesClient innerClient, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByApplication( + String resourceGroupName, String spaceName, String applicationName) { + PagedIterable inner = + this.serviceClient().listByApplication(resourceGroupName, spaceName, applicationName); + return Utils.mapPage(inner, inner1 -> new BusinessProcessImpl(inner1, this.manager())); + } + + public PagedIterable listByApplication( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + PagedIterable inner = + this + .serviceClient() + .listByApplication( + resourceGroupName, + spaceName, + applicationName, + top, + skip, + maxPageSize, + filter, + select, + expand, + orderBy, + context); + return Utils.mapPage(inner, inner1 -> new BusinessProcessImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, spaceName, applicationName, businessProcessName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BusinessProcessImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BusinessProcess get( + String resourceGroupName, String spaceName, String applicationName, String businessProcessName) { + BusinessProcessInner inner = + this.serviceClient().get(resourceGroupName, spaceName, applicationName, businessProcessName); + if (inner != null) { + return new BusinessProcessImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, spaceName, applicationName, businessProcessName, context); + } + + public void delete(String resourceGroupName, String spaceName, String applicationName, String businessProcessName) { + this.serviceClient().delete(resourceGroupName, spaceName, applicationName, businessProcessName); + } + + public BusinessProcess getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String applicationName = Utils.getValueFromIdByName(id, "applications"); + if (applicationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + } + String businessProcessName = Utils.getValueFromIdByName(id, "businessProcesses"); + if (businessProcessName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'businessProcesses'.", id))); + } + return this + .getWithResponse(resourceGroupName, spaceName, applicationName, businessProcessName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String applicationName = Utils.getValueFromIdByName(id, "applications"); + if (applicationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + } + String businessProcessName = Utils.getValueFromIdByName(id, "businessProcesses"); + if (businessProcessName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'businessProcesses'.", id))); + } + return this.getWithResponse(resourceGroupName, spaceName, applicationName, businessProcessName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String applicationName = Utils.getValueFromIdByName(id, "applications"); + if (applicationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + } + String businessProcessName = Utils.getValueFromIdByName(id, "businessProcesses"); + if (businessProcessName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'businessProcesses'.", id))); + } + this.deleteWithResponse(resourceGroupName, spaceName, applicationName, businessProcessName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String applicationName = Utils.getValueFromIdByName(id, "applications"); + if (applicationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + } + String businessProcessName = Utils.getValueFromIdByName(id, "businessProcesses"); + if (businessProcessName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'businessProcesses'.", id))); + } + return this.deleteWithResponse(resourceGroupName, spaceName, applicationName, businessProcessName, context); + } + + private BusinessProcessesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } + + public BusinessProcessImpl define(String name) { + return new BusinessProcessImpl(name, this.manager()); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/InfrastructureResourceImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/InfrastructureResourceImpl.java new file mode 100644 index 000000000000..5c95accf7e9e --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/InfrastructureResourceImpl.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.InfrastructureResourceInner; +import com.azure.resourcemanager.azureintegrationspaces.models.InfrastructureResource; +import com.azure.resourcemanager.azureintegrationspaces.models.InfrastructureResourceUpdate; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; + +public final class InfrastructureResourceImpl + implements InfrastructureResource, InfrastructureResource.Definition, InfrastructureResource.Update { + private InfrastructureResourceInner innerObject; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceType() { + return this.innerModel().resourceType(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public InfrastructureResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String spaceName; + + private String infrastructureResourceName; + + private InfrastructureResourceUpdate updateProperties; + + public InfrastructureResourceImpl withExistingSpace(String resourceGroupName, String spaceName) { + this.resourceGroupName = resourceGroupName; + this.spaceName = spaceName; + return this; + } + + public InfrastructureResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getInfrastructureResources() + .createOrUpdateWithResponse( + resourceGroupName, spaceName, infrastructureResourceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public InfrastructureResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getInfrastructureResources() + .createOrUpdateWithResponse( + resourceGroupName, spaceName, infrastructureResourceName, this.innerModel(), context) + .getValue(); + return this; + } + + InfrastructureResourceImpl( + String name, com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = new InfrastructureResourceInner(); + this.serviceManager = serviceManager; + this.infrastructureResourceName = name; + } + + public InfrastructureResourceImpl update() { + this.updateProperties = new InfrastructureResourceUpdate(); + return this; + } + + public InfrastructureResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getInfrastructureResources() + .patchWithResponse( + resourceGroupName, spaceName, infrastructureResourceName, updateProperties, Context.NONE) + .getValue(); + return this; + } + + public InfrastructureResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getInfrastructureResources() + .patchWithResponse(resourceGroupName, spaceName, infrastructureResourceName, updateProperties, context) + .getValue(); + return this; + } + + InfrastructureResourceImpl( + InfrastructureResourceInner innerObject, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.spaceName = Utils.getValueFromIdByName(innerObject.id(), "spaces"); + this.infrastructureResourceName = Utils.getValueFromIdByName(innerObject.id(), "infrastructureResources"); + } + + public InfrastructureResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getInfrastructureResources() + .getWithResponse(resourceGroupName, spaceName, infrastructureResourceName, Context.NONE) + .getValue(); + return this; + } + + public InfrastructureResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getInfrastructureResources() + .getWithResponse(resourceGroupName, spaceName, infrastructureResourceName, context) + .getValue(); + return this; + } + + public InfrastructureResourceImpl withResourceType(String resourceType) { + if (isInCreateMode()) { + this.innerModel().withResourceType(resourceType); + return this; + } else { + this.updateProperties.withResourceType(resourceType); + return this; + } + } + + public InfrastructureResourceImpl withResourceId(String resourceId) { + if (isInCreateMode()) { + this.innerModel().withResourceId(resourceId); + return this; + } else { + this.updateProperties.withResourceId(resourceId); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/InfrastructureResourcesClientImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/InfrastructureResourcesClientImpl.java new file mode 100644 index 000000000000..4deeeaa88787 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/InfrastructureResourcesClientImpl.java @@ -0,0 +1,1304 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azureintegrationspaces.fluent.InfrastructureResourcesClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.InfrastructureResourceInner; +import com.azure.resourcemanager.azureintegrationspaces.models.InfrastructureResourceListResult; +import com.azure.resourcemanager.azureintegrationspaces.models.InfrastructureResourceUpdate; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in InfrastructureResourcesClient. */ +public final class InfrastructureResourcesClientImpl implements InfrastructureResourcesClient { + /** The proxy service used to perform REST calls. */ + private final InfrastructureResourcesService service; + + /** The service client containing this operation class. */ + private final MicrosoftIntegrationSpacesImpl client; + + /** + * Initializes an instance of InfrastructureResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InfrastructureResourcesClientImpl(MicrosoftIntegrationSpacesImpl client) { + this.service = + RestProxy + .create(InfrastructureResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftIntegrationSpacesInfrastructureResources to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftIntegration") + public interface InfrastructureResourcesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/infrastructureResources") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySpace( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("top") Integer top, + @QueryParam("skip") Integer skip, + @QueryParam("maxpagesize") Integer maxPageSize, + @QueryParam("filter") String filter, + @QueryParam(value = "select", multipleQueryParams = true) List select, + @QueryParam(value = "expand", multipleQueryParams = true) List expand, + @QueryParam(value = "orderby", multipleQueryParams = true) List orderBy, + @PathParam("spaceName") String spaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/infrastructureResources/{infrastructureResourceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("infrastructureResourceName") String infrastructureResourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/infrastructureResources/{infrastructureResourceName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("infrastructureResourceName") String infrastructureResourceName, + @BodyParam("application/json") InfrastructureResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/infrastructureResources/{infrastructureResourceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> patch( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("infrastructureResourceName") String infrastructureResourceName, + @BodyParam("application/json") InfrastructureResourceUpdate properties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/infrastructureResources/{infrastructureResourceName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @PathParam("infrastructureResourceName") String infrastructureResourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySpaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List InfrastructureResource resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySpaceSinglePageAsync( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + final String accept = "application/json"; + List selectConverted = + (select == null) + ? new ArrayList<>() + : select.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List expandConverted = + (expand == null) + ? new ArrayList<>() + : expand.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = + (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return FluxUtil + .withContext( + context -> + service + .listBySpace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + skip, + maxPageSize, + filter, + selectConverted, + expandConverted, + orderByConverted, + spaceName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List InfrastructureResource resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySpaceSinglePageAsync( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + final String accept = "application/json"; + List selectConverted = + (select == null) + ? new ArrayList<>() + : select.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List expandConverted = + (expand == null) + ? new ArrayList<>() + : expand.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = + (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + context = this.client.mergeContext(context); + return service + .listBySpace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + skip, + maxPageSize, + filter, + selectConverted, + expandConverted, + orderByConverted, + spaceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List InfrastructureResource resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySpaceAsync( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy) { + return new PagedFlux<>( + () -> + listBySpaceSinglePageAsync( + resourceGroupName, spaceName, top, skip, maxPageSize, filter, select, expand, orderBy), + nextLink -> listBySpaceNextSinglePageAsync(nextLink)); + } + + /** + * List InfrastructureResource resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySpaceAsync(String resourceGroupName, String spaceName) { + final Integer top = null; + final Integer skip = null; + final Integer maxPageSize = null; + final String filter = null; + final List select = null; + final List expand = null; + final List orderBy = null; + return new PagedFlux<>( + () -> + listBySpaceSinglePageAsync( + resourceGroupName, spaceName, top, skip, maxPageSize, filter, select, expand, orderBy), + nextLink -> listBySpaceNextSinglePageAsync(nextLink)); + } + + /** + * List InfrastructureResource resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySpaceAsync( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + return new PagedFlux<>( + () -> + listBySpaceSinglePageAsync( + resourceGroupName, spaceName, top, skip, maxPageSize, filter, select, expand, orderBy, context), + nextLink -> listBySpaceNextSinglePageAsync(nextLink, context)); + } + + /** + * List InfrastructureResource resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySpace(String resourceGroupName, String spaceName) { + final Integer top = null; + final Integer skip = null; + final Integer maxPageSize = null; + final String filter = null; + final List select = null; + final List expand = null; + final List orderBy = null; + return new PagedIterable<>( + listBySpaceAsync(resourceGroupName, spaceName, top, skip, maxPageSize, filter, select, expand, orderBy)); + } + + /** + * List InfrastructureResource resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySpace( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + return new PagedIterable<>( + listBySpaceAsync( + resourceGroupName, spaceName, top, skip, maxPageSize, filter, select, expand, orderBy, context)); + } + + /** + * Get a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a InfrastructureResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String spaceName, String infrastructureResourceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (infrastructureResourceName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter infrastructureResourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + infrastructureResourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a InfrastructureResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String spaceName, String infrastructureResourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (infrastructureResourceName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter infrastructureResourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + infrastructureResourceName, + accept, + context); + } + + /** + * Get a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a InfrastructureResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String spaceName, String infrastructureResourceName) { + return getWithResponseAsync(resourceGroupName, spaceName, infrastructureResourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a InfrastructureResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String spaceName, String infrastructureResourceName, Context context) { + return getWithResponseAsync(resourceGroupName, spaceName, infrastructureResourceName, context).block(); + } + + /** + * Get a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a InfrastructureResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InfrastructureResourceInner get( + String resourceGroupName, String spaceName, String infrastructureResourceName) { + return getWithResponse(resourceGroupName, spaceName, infrastructureResourceName, Context.NONE).getValue(); + } + + /** + * Create a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (infrastructureResourceName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter infrastructureResourceName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + infrastructureResourceName, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceInner resource, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (infrastructureResourceName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter infrastructureResourceName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + infrastructureResourceName, + resource, + accept, + context); + } + + /** + * Create a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceInner resource) { + return createOrUpdateWithResponseAsync(resourceGroupName, spaceName, infrastructureResourceName, resource) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceInner resource, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, spaceName, infrastructureResourceName, resource, context) + .block(); + } + + /** + * Create a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InfrastructureResourceInner createOrUpdate( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceInner resource) { + return createOrUpdateWithResponse( + resourceGroupName, spaceName, infrastructureResourceName, resource, Context.NONE) + .getValue(); + } + + /** + * Update a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> patchWithResponseAsync( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (infrastructureResourceName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter infrastructureResourceName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .patch( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + infrastructureResourceName, + properties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> patchWithResponseAsync( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceUpdate properties, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (infrastructureResourceName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter infrastructureResourceName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .patch( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + infrastructureResourceName, + properties, + accept, + context); + } + + /** + * Update a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono patchAsync( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceUpdate properties) { + return patchWithResponseAsync(resourceGroupName, spaceName, infrastructureResourceName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response patchWithResponse( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceUpdate properties, + Context context) { + return patchWithResponseAsync(resourceGroupName, spaceName, infrastructureResourceName, properties, context) + .block(); + } + + /** + * Update a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an infrastructure resource under Space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InfrastructureResourceInner patch( + String resourceGroupName, + String spaceName, + String infrastructureResourceName, + InfrastructureResourceUpdate properties) { + return patchWithResponse(resourceGroupName, spaceName, infrastructureResourceName, properties, Context.NONE) + .getValue(); + } + + /** + * Delete a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String spaceName, String infrastructureResourceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (infrastructureResourceName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter infrastructureResourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + infrastructureResourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String spaceName, String infrastructureResourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (infrastructureResourceName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter infrastructureResourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + infrastructureResourceName, + accept, + context); + } + + /** + * Delete a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String spaceName, String infrastructureResourceName) { + return deleteWithResponseAsync(resourceGroupName, spaceName, infrastructureResourceName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String spaceName, String infrastructureResourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, spaceName, infrastructureResourceName, context).block(); + } + + /** + * Delete a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String spaceName, String infrastructureResourceName) { + deleteWithResponse(resourceGroupName, spaceName, infrastructureResourceName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySpaceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listBySpaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySpaceNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySpaceNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/InfrastructureResourcesImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/InfrastructureResourcesImpl.java new file mode 100644 index 000000000000..5bee38d0a893 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/InfrastructureResourcesImpl.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.InfrastructureResourcesClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.InfrastructureResourceInner; +import com.azure.resourcemanager.azureintegrationspaces.models.InfrastructureResource; +import com.azure.resourcemanager.azureintegrationspaces.models.InfrastructureResources; +import java.util.List; + +public final class InfrastructureResourcesImpl implements InfrastructureResources { + private static final ClientLogger LOGGER = new ClientLogger(InfrastructureResourcesImpl.class); + + private final InfrastructureResourcesClient innerClient; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + public InfrastructureResourcesImpl( + InfrastructureResourcesClient innerClient, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listBySpace(String resourceGroupName, String spaceName) { + PagedIterable inner = + this.serviceClient().listBySpace(resourceGroupName, spaceName); + return Utils.mapPage(inner, inner1 -> new InfrastructureResourceImpl(inner1, this.manager())); + } + + public PagedIterable listBySpace( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + PagedIterable inner = + this + .serviceClient() + .listBySpace( + resourceGroupName, spaceName, top, skip, maxPageSize, filter, select, expand, orderBy, context); + return Utils.mapPage(inner, inner1 -> new InfrastructureResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String spaceName, String infrastructureResourceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, spaceName, infrastructureResourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new InfrastructureResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public InfrastructureResource get(String resourceGroupName, String spaceName, String infrastructureResourceName) { + InfrastructureResourceInner inner = + this.serviceClient().get(resourceGroupName, spaceName, infrastructureResourceName); + if (inner != null) { + return new InfrastructureResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String spaceName, String infrastructureResourceName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, spaceName, infrastructureResourceName, context); + } + + public void delete(String resourceGroupName, String spaceName, String infrastructureResourceName) { + this.serviceClient().delete(resourceGroupName, spaceName, infrastructureResourceName); + } + + public InfrastructureResource getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String infrastructureResourceName = Utils.getValueFromIdByName(id, "infrastructureResources"); + if (infrastructureResourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'infrastructureResources'.", + id))); + } + return this.getWithResponse(resourceGroupName, spaceName, infrastructureResourceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String infrastructureResourceName = Utils.getValueFromIdByName(id, "infrastructureResources"); + if (infrastructureResourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'infrastructureResources'.", + id))); + } + return this.getWithResponse(resourceGroupName, spaceName, infrastructureResourceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String infrastructureResourceName = Utils.getValueFromIdByName(id, "infrastructureResources"); + if (infrastructureResourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'infrastructureResources'.", + id))); + } + this.deleteWithResponse(resourceGroupName, spaceName, infrastructureResourceName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + String infrastructureResourceName = Utils.getValueFromIdByName(id, "infrastructureResources"); + if (infrastructureResourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'infrastructureResources'.", + id))); + } + return this.deleteWithResponse(resourceGroupName, spaceName, infrastructureResourceName, context); + } + + private InfrastructureResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } + + public InfrastructureResourceImpl define(String name) { + return new InfrastructureResourceImpl(name, this.manager()); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ListBusinessProcessDevelopmentArtifactsResponseImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ListBusinessProcessDevelopmentArtifactsResponseImpl.java new file mode 100644 index 000000000000..113ee9e342db --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/ListBusinessProcessDevelopmentArtifactsResponseImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ListBusinessProcessDevelopmentArtifactsResponseInner; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SaveOrGetBusinessProcessDevelopmentArtifactResponseInner; +import com.azure.resourcemanager.azureintegrationspaces.models.ListBusinessProcessDevelopmentArtifactsResponse; +import com.azure.resourcemanager.azureintegrationspaces.models.SaveOrGetBusinessProcessDevelopmentArtifactResponse; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class ListBusinessProcessDevelopmentArtifactsResponseImpl + implements ListBusinessProcessDevelopmentArtifactsResponse { + private ListBusinessProcessDevelopmentArtifactsResponseInner innerObject; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + ListBusinessProcessDevelopmentArtifactsResponseImpl( + ListBusinessProcessDevelopmentArtifactsResponseInner innerObject, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map( + inner1 -> + new SaveOrGetBusinessProcessDevelopmentArtifactResponseImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ListBusinessProcessDevelopmentArtifactsResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/MicrosoftIntegrationSpacesBuilder.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/MicrosoftIntegrationSpacesBuilder.java new file mode 100644 index 000000000000..87a4d97ea706 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/MicrosoftIntegrationSpacesBuilder.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** A builder for creating a new instance of the MicrosoftIntegrationSpacesImpl type. */ +@ServiceClientBuilder(serviceClients = {MicrosoftIntegrationSpacesImpl.class}) +public final class MicrosoftIntegrationSpacesBuilder { + /* + * The ID of the target subscription. + */ + private String subscriptionId; + + /** + * Sets The ID of the target subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the MicrosoftIntegrationSpacesBuilder. + */ + public MicrosoftIntegrationSpacesBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the MicrosoftIntegrationSpacesBuilder. + */ + public MicrosoftIntegrationSpacesBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the MicrosoftIntegrationSpacesBuilder. + */ + public MicrosoftIntegrationSpacesBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the MicrosoftIntegrationSpacesBuilder. + */ + public MicrosoftIntegrationSpacesBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the MicrosoftIntegrationSpacesBuilder. + */ + public MicrosoftIntegrationSpacesBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the MicrosoftIntegrationSpacesBuilder. + */ + public MicrosoftIntegrationSpacesBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of MicrosoftIntegrationSpacesImpl with the provided parameters. + * + * @return an instance of MicrosoftIntegrationSpacesImpl. + */ + public MicrosoftIntegrationSpacesImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + MicrosoftIntegrationSpacesImpl client = + new MicrosoftIntegrationSpacesImpl( + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + this.subscriptionId, + localEndpoint); + return client; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/MicrosoftIntegrationSpacesImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/MicrosoftIntegrationSpacesImpl.java new file mode 100644 index 000000000000..ade51208f330 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/MicrosoftIntegrationSpacesImpl.java @@ -0,0 +1,374 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.azureintegrationspaces.fluent.ApplicationResourcesClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.ApplicationsClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.BusinessProcessVersionsClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.BusinessProcessesClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.InfrastructureResourcesClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.MicrosoftIntegrationSpaces; +import com.azure.resourcemanager.azureintegrationspaces.fluent.OperationsClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.SpacesClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the MicrosoftIntegrationSpacesImpl type. */ +@ServiceClient(builder = MicrosoftIntegrationSpacesBuilder.class) +public final class MicrosoftIntegrationSpacesImpl implements MicrosoftIntegrationSpaces { + /** The ID of the target subscription. */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** server parameter. */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The default poll interval for long-running operation. */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** The OperationsClient object to access its operations. */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** The SpacesClient object to access its operations. */ + private final SpacesClient spaces; + + /** + * Gets the SpacesClient object to access its operations. + * + * @return the SpacesClient object. + */ + public SpacesClient getSpaces() { + return this.spaces; + } + + /** The ApplicationsClient object to access its operations. */ + private final ApplicationsClient applications; + + /** + * Gets the ApplicationsClient object to access its operations. + * + * @return the ApplicationsClient object. + */ + public ApplicationsClient getApplications() { + return this.applications; + } + + /** The BusinessProcessesClient object to access its operations. */ + private final BusinessProcessesClient businessProcesses; + + /** + * Gets the BusinessProcessesClient object to access its operations. + * + * @return the BusinessProcessesClient object. + */ + public BusinessProcessesClient getBusinessProcesses() { + return this.businessProcesses; + } + + /** The BusinessProcessVersionsClient object to access its operations. */ + private final BusinessProcessVersionsClient businessProcessVersions; + + /** + * Gets the BusinessProcessVersionsClient object to access its operations. + * + * @return the BusinessProcessVersionsClient object. + */ + public BusinessProcessVersionsClient getBusinessProcessVersions() { + return this.businessProcessVersions; + } + + /** The ApplicationResourcesClient object to access its operations. */ + private final ApplicationResourcesClient applicationResources; + + /** + * Gets the ApplicationResourcesClient object to access its operations. + * + * @return the ApplicationResourcesClient object. + */ + public ApplicationResourcesClient getApplicationResources() { + return this.applicationResources; + } + + /** The InfrastructureResourcesClient object to access its operations. */ + private final InfrastructureResourcesClient infrastructureResources; + + /** + * Gets the InfrastructureResourcesClient object to access its operations. + * + * @return the InfrastructureResourcesClient object. + */ + public InfrastructureResourcesClient getInfrastructureResources() { + return this.infrastructureResources; + } + + /** + * Initializes an instance of MicrosoftIntegrationSpaces client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + * @param subscriptionId The ID of the target subscription. + * @param endpoint server parameter. + */ + MicrosoftIntegrationSpacesImpl( + HttpPipeline httpPipeline, + SerializerAdapter serializerAdapter, + Duration defaultPollInterval, + AzureEnvironment environment, + String subscriptionId, + String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2023-11-14-preview"; + this.operations = new OperationsClientImpl(this); + this.spaces = new SpacesClientImpl(this); + this.applications = new ApplicationsClientImpl(this); + this.businessProcesses = new BusinessProcessesClientImpl(this); + this.businessProcessVersions = new BusinessProcessVersionsClientImpl(this); + this.applicationResources = new ApplicationResourcesClientImpl(this); + this.infrastructureResources = new InfrastructureResourcesClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult( + Mono>> activationResponse, + HttpPipeline httpPipeline, + Type pollResultType, + Type finalResultType, + Context context) { + return PollerFactory + .create( + serializerAdapter, + httpPipeline, + pollResultType, + finalResultType, + defaultPollInterval, + activationResponse, + context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = + new HttpResponseImpl( + lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = + this + .getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(s); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MicrosoftIntegrationSpacesImpl.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/OperationImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/OperationImpl.java new file mode 100644 index 000000000000..94ee36c34477 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/OperationImpl.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.OperationInner; +import com.azure.resourcemanager.azureintegrationspaces.models.ActionType; +import com.azure.resourcemanager.azureintegrationspaces.models.Operation; +import com.azure.resourcemanager.azureintegrationspaces.models.OperationDisplay; +import com.azure.resourcemanager.azureintegrationspaces.models.Origin; + +public final class OperationImpl implements Operation { + private OperationInner innerObject; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + OperationImpl( + OperationInner innerObject, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public OperationDisplay display() { + return this.innerModel().display(); + } + + public Origin origin() { + return this.innerModel().origin(); + } + + public ActionType actionType() { + return this.innerModel().actionType(); + } + + public OperationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/OperationsClientImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/OperationsClientImpl.java new file mode 100644 index 000000000000..f5695b4e655f --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/OperationsClientImpl.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azureintegrationspaces.fluent.OperationsClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.OperationInner; +import com.azure.resourcemanager.azureintegrationspaces.models.OperationListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in OperationsClient. */ +public final class OperationsClientImpl implements OperationsClient { + /** The proxy service used to perform REST calls. */ + private final OperationsService service; + + /** The service client containing this operation class. */ + private final MicrosoftIntegrationSpacesImpl client; + + /** + * Initializes an instance of OperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsClientImpl(MicrosoftIntegrationSpacesImpl client) { + this.service = + RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftIntegrationSpacesOperations to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftIntegration") + public interface OperationsService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.IntegrationSpaces/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/OperationsImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/OperationsImpl.java new file mode 100644 index 000000000000..3f9b3327081b --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/OperationsImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.OperationsClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.OperationInner; +import com.azure.resourcemanager.azureintegrationspaces.models.Operation; +import com.azure.resourcemanager.azureintegrationspaces.models.Operations; + +public final class OperationsImpl implements Operations { + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + public OperationsImpl( + OperationsClient innerClient, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + private OperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SaveOrGetBusinessProcessDevelopmentArtifactResponseImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SaveOrGetBusinessProcessDevelopmentArtifactResponseImpl.java new file mode 100644 index 000000000000..1d55d584f81b --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SaveOrGetBusinessProcessDevelopmentArtifactResponseImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SaveOrGetBusinessProcessDevelopmentArtifactResponseInner; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessDevelopmentArtifactProperties; +import com.azure.resourcemanager.azureintegrationspaces.models.SaveOrGetBusinessProcessDevelopmentArtifactResponse; + +public final class SaveOrGetBusinessProcessDevelopmentArtifactResponseImpl + implements SaveOrGetBusinessProcessDevelopmentArtifactResponse { + private SaveOrGetBusinessProcessDevelopmentArtifactResponseInner innerObject; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + SaveOrGetBusinessProcessDevelopmentArtifactResponseImpl( + SaveOrGetBusinessProcessDevelopmentArtifactResponseInner innerObject, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public BusinessProcessDevelopmentArtifactProperties properties() { + return this.innerModel().properties(); + } + + public SaveOrGetBusinessProcessDevelopmentArtifactResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SpaceImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SpaceImpl.java new file mode 100644 index 000000000000..02609893da0f --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SpaceImpl.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SpaceInner; +import com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState; +import com.azure.resourcemanager.azureintegrationspaces.models.Space; +import com.azure.resourcemanager.azureintegrationspaces.models.SpaceUpdate; +import java.util.Collections; +import java.util.Map; + +public final class SpaceImpl implements Space, Space.Definition, Space.Update { + private SpaceInner innerObject; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String description() { + return this.innerModel().description(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SpaceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String spaceName; + + private SpaceUpdate updateProperties; + + public SpaceImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Space create() { + this.innerObject = + serviceManager + .serviceClient() + .getSpaces() + .createOrUpdateWithResponse(resourceGroupName, spaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public Space create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getSpaces() + .createOrUpdateWithResponse(resourceGroupName, spaceName, this.innerModel(), context) + .getValue(); + return this; + } + + SpaceImpl( + String name, com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = new SpaceInner(); + this.serviceManager = serviceManager; + this.spaceName = name; + } + + public SpaceImpl update() { + this.updateProperties = new SpaceUpdate(); + return this; + } + + public Space apply() { + this.innerObject = + serviceManager + .serviceClient() + .getSpaces() + .patchWithResponse(resourceGroupName, spaceName, updateProperties, Context.NONE) + .getValue(); + return this; + } + + public Space apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getSpaces() + .patchWithResponse(resourceGroupName, spaceName, updateProperties, context) + .getValue(); + return this; + } + + SpaceImpl( + SpaceInner innerObject, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.spaceName = Utils.getValueFromIdByName(innerObject.id(), "spaces"); + } + + public Space refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getSpaces() + .getByResourceGroupWithResponse(resourceGroupName, spaceName, Context.NONE) + .getValue(); + return this; + } + + public Space refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getSpaces() + .getByResourceGroupWithResponse(resourceGroupName, spaceName, context) + .getValue(); + return this; + } + + public SpaceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public SpaceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public SpaceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public SpaceImpl withDescription(String description) { + if (isInCreateMode()) { + this.innerModel().withDescription(description); + return this; + } else { + this.updateProperties.withDescription(description); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SpacesClientImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SpacesClientImpl.java new file mode 100644 index 000000000000..f044c0a5554f --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SpacesClientImpl.java @@ -0,0 +1,1386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azureintegrationspaces.fluent.SpacesClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SpaceInner; +import com.azure.resourcemanager.azureintegrationspaces.models.SpaceListResult; +import com.azure.resourcemanager.azureintegrationspaces.models.SpaceUpdate; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in SpacesClient. */ +public final class SpacesClientImpl implements SpacesClient { + /** The proxy service used to perform REST calls. */ + private final SpacesService service; + + /** The service client containing this operation class. */ + private final MicrosoftIntegrationSpacesImpl client; + + /** + * Initializes an instance of SpacesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SpacesClientImpl(MicrosoftIntegrationSpacesImpl client) { + this.service = RestProxy.create(SpacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftIntegrationSpacesSpaces to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftIntegration") + public interface SpacesService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.IntegrationSpaces/spaces") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("top") Integer top, + @QueryParam("skip") Integer skip, + @QueryParam("maxpagesize") Integer maxPageSize, + @QueryParam("filter") String filter, + @QueryParam(value = "select", multipleQueryParams = true) List select, + @QueryParam(value = "expand", multipleQueryParams = true) List expand, + @QueryParam(value = "orderby", multipleQueryParams = true) List orderBy, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @BodyParam("application/json") SpaceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> patch( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @BodyParam("application/json") SpaceUpdate properties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("spaceName") String spaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List Space resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Space resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Space resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List Space resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List Space resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List Space resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List Space resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + List selectConverted = + (select == null) + ? new ArrayList<>() + : select.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List expandConverted = + (expand == null) + ? new ArrayList<>() + : expand.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = + (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + skip, + maxPageSize, + filter, + selectConverted, + expandConverted, + orderByConverted, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Space resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + List selectConverted = + (select == null) + ? new ArrayList<>() + : select.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List expandConverted = + (expand == null) + ? new ArrayList<>() + : expand.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = + (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + skip, + maxPageSize, + filter, + selectConverted, + expandConverted, + orderByConverted, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Space resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy) { + return new PagedFlux<>( + () -> + listByResourceGroupSinglePageAsync( + resourceGroupName, top, skip, maxPageSize, filter, select, expand, orderBy), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List Space resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final Integer skip = null; + final Integer maxPageSize = null; + final String filter = null; + final List select = null; + final List expand = null; + final List orderBy = null; + return new PagedFlux<>( + () -> + listByResourceGroupSinglePageAsync( + resourceGroupName, top, skip, maxPageSize, filter, select, expand, orderBy), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List Space resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + return new PagedFlux<>( + () -> + listByResourceGroupSinglePageAsync( + resourceGroupName, top, skip, maxPageSize, filter, select, expand, orderBy, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List Space resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final Integer skip = null; + final Integer maxPageSize = null; + final String filter = null; + final List select = null; + final List expand = null; + final List orderBy = null; + return new PagedIterable<>( + listByResourceGroupAsync(resourceGroupName, top, skip, maxPageSize, filter, select, expand, orderBy)); + } + + /** + * List Space resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup( + String resourceGroupName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + return new PagedIterable<>( + listByResourceGroupAsync( + resourceGroupName, top, skip, maxPageSize, filter, select, expand, orderBy, context)); + } + + /** + * Get a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Space along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String spaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Space along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String spaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + accept, + context); + } + + /** + * Get a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Space on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String spaceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, spaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String spaceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, spaceName, context).block(); + } + + /** + * Get a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SpaceInner getByResourceGroup(String resourceGroupName, String spaceName) { + return getByResourceGroupWithResponse(resourceGroupName, spaceName, Context.NONE).getValue(); + } + + /** + * Create a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String spaceName, SpaceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String spaceName, SpaceInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + resource, + accept, + context); + } + + /** + * Create a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String spaceName, SpaceInner resource) { + return createOrUpdateWithResponseAsync(resourceGroupName, spaceName, resource) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, String spaceName, SpaceInner resource, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, spaceName, resource, context).block(); + } + + /** + * Create a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SpaceInner createOrUpdate(String resourceGroupName, String spaceName, SpaceInner resource) { + return createOrUpdateWithResponse(resourceGroupName, spaceName, resource, Context.NONE).getValue(); + } + + /** + * Update a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> patchWithResponseAsync( + String resourceGroupName, String spaceName, SpaceUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .patch( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + properties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> patchWithResponseAsync( + String resourceGroupName, String spaceName, SpaceUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .patch( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + properties, + accept, + context); + } + + /** + * Update a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono patchAsync(String resourceGroupName, String spaceName, SpaceUpdate properties) { + return patchWithResponseAsync(resourceGroupName, spaceName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response patchWithResponse( + String resourceGroupName, String spaceName, SpaceUpdate properties, Context context) { + return patchWithResponseAsync(resourceGroupName, spaceName, properties, context).block(); + } + + /** + * Update a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an integration space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SpaceInner patch(String resourceGroupName, String spaceName, SpaceUpdate properties) { + return patchWithResponse(resourceGroupName, spaceName, properties, Context.NONE).getValue(); + } + + /** + * Delete a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String spaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String spaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (spaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter spaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + spaceName, + accept, + context); + } + + /** + * Delete a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String spaceName) { + return deleteWithResponseAsync(resourceGroupName, spaceName).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String spaceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, spaceName, context).block(); + } + + /** + * Delete a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String spaceName) { + deleteWithResponse(resourceGroupName, spaceName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SpacesImpl.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SpacesImpl.java new file mode 100644 index 000000000000..9d3519c39e4f --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/SpacesImpl.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.SpacesClient; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SpaceInner; +import com.azure.resourcemanager.azureintegrationspaces.models.Space; +import com.azure.resourcemanager.azureintegrationspaces.models.Spaces; +import java.util.List; + +public final class SpacesImpl implements Spaces { + private static final ClientLogger LOGGER = new ClientLogger(SpacesImpl.class); + + private final SpacesClient innerClient; + + private final com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager; + + public SpacesImpl( + SpacesClient innerClient, + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new SpaceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new SpaceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new SpaceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup( + String resourceGroupName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context) { + PagedIterable inner = + this + .serviceClient() + .listByResourceGroup( + resourceGroupName, top, skip, maxPageSize, filter, select, expand, orderBy, context); + return Utils.mapPage(inner, inner1 -> new SpaceImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String spaceName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, spaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SpaceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Space getByResourceGroup(String resourceGroupName, String spaceName) { + SpaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, spaceName); + if (inner != null) { + return new SpaceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String spaceName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, spaceName, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String spaceName) { + this.serviceClient().delete(resourceGroupName, spaceName); + } + + public Space getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, spaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, spaceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + this.deleteByResourceGroupWithResponse(resourceGroupName, spaceName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String spaceName = Utils.getValueFromIdByName(id, "spaces"); + if (spaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'spaces'.", id))); + } + return this.deleteByResourceGroupWithResponse(resourceGroupName, spaceName, context); + } + + private SpacesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager() { + return this.serviceManager; + } + + public SpaceImpl define(String name) { + return new SpaceImpl(name, this.manager()); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/Utils.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/Utils.java new file mode 100644 index 000000000000..fe6d74f611dd --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/Utils.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class Utils { + private Utils() { + } + + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (!segments.isEmpty() && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl<>(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super( + PagedFlux + .create( + () -> + (continuationToken, pageSize) -> + Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> + new PagedResponseBase( + page.getRequest(), + page.getStatusCode(), + page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), + page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/package-info.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/package-info.java new file mode 100644 index 000000000000..7c961ddd9f03 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for MicrosoftIntegrationSpaces. The azure integration spaces resource + * provider. + */ +package com.azure.resourcemanager.azureintegrationspaces.implementation; diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ActionType.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ActionType.java new file mode 100644 index 000000000000..30bb44d5b4c4 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ActionType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +public final class ActionType extends ExpandableStringEnum { + /** Static value Internal for ActionType. */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Application.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Application.java new file mode 100644 index 000000000000..6f1f53cc75a8 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Application.java @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationInner; +import java.util.Map; + +/** An immutable client-side representation of Application. */ +public interface Application { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the description property: The description of the resource. + * + * @return the description value. + */ + String description(); + + /** + * Gets the trackingDataStores property: The tracking data stores. + * + * @return the trackingDataStores value. + */ + Map trackingDataStores(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationInner object. + * + * @return the inner object. + */ + ApplicationInner innerModel(); + + /** The entirety of the Application definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithCreate { + } + + /** The Application definition stages. */ + interface DefinitionStages { + /** The first stage of the Application definition. */ + interface Blank extends WithLocation { + } + + /** The stage of the Application definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** The stage of the Application definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, spaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @return the next definition stage. + */ + WithCreate withExistingSpace(String resourceGroupName, String spaceName); + } + + /** + * The stage of the Application definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithDescription, + DefinitionStages.WithTrackingDataStores { + /** + * Executes the create request. + * + * @return the created resource. + */ + Application create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Application create(Context context); + } + + /** The stage of the Application definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** The stage of the Application definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: The description of the resource.. + * + * @param description The description of the resource. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + + /** The stage of the Application definition allowing to specify trackingDataStores. */ + interface WithTrackingDataStores { + /** + * Specifies the trackingDataStores property: The tracking data stores.. + * + * @param trackingDataStores The tracking data stores. + * @return the next definition stage. + */ + WithCreate withTrackingDataStores(Map trackingDataStores); + } + } + + /** + * Begins update for the Application resource. + * + * @return the stage of resource update. + */ + Application.Update update(); + + /** The template for Application update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription, UpdateStages.WithTrackingDataStores { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Application apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Application apply(Context context); + } + + /** The Application update stages. */ + interface UpdateStages { + /** The stage of the Application update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** The stage of the Application update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: The description of the resource.. + * + * @param description The description of the resource. + * @return the next definition stage. + */ + Update withDescription(String description); + } + + /** The stage of the Application update allowing to specify trackingDataStores. */ + interface WithTrackingDataStores { + /** + * Specifies the trackingDataStores property: The tracking data stores.. + * + * @param trackingDataStores The tracking data stores. + * @return the next definition stage. + */ + Update withTrackingDataStores(Map trackingDataStores); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Application refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Application refresh(Context context); + + /** + * The delete business process development artifact action. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteBusinessProcessDevelopmentArtifactWithResponse( + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, Context context); + + /** + * The delete business process development artifact action. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteBusinessProcessDevelopmentArtifact(GetOrDeleteBusinessProcessDevelopmentArtifactRequest body); + + /** + * The get business process development artifact action. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response along with {@link Response}. + */ + Response getBusinessProcessDevelopmentArtifactWithResponse( + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, Context context); + + /** + * The get business process development artifact action. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response. + */ + SaveOrGetBusinessProcessDevelopmentArtifactResponse getBusinessProcessDevelopmentArtifact( + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body); + + /** + * The list business process development artifacts action. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact get collection response along with {@link Response}. + */ + Response listBusinessProcessDevelopmentArtifactsWithResponse( + Context context); + + /** + * The list business process development artifacts action. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact get collection response. + */ + ListBusinessProcessDevelopmentArtifactsResponse listBusinessProcessDevelopmentArtifacts(); + + /** + * The save business process development artifact action. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response along with {@link Response}. + */ + Response saveBusinessProcessDevelopmentArtifactWithResponse( + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, Context context); + + /** + * The save business process development artifact action. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response. + */ + SaveOrGetBusinessProcessDevelopmentArtifactResponse saveBusinessProcessDevelopmentArtifact( + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body); + + /** + * The validate business process development artifact action. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response validateBusinessProcessDevelopmentArtifactWithResponse( + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, Context context); + + /** + * The validate business process development artifact action. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void validateBusinessProcessDevelopmentArtifact(SaveOrValidateBusinessProcessDevelopmentArtifactRequest body); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationListResult.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationListResult.java new file mode 100644 index 000000000000..abd1270d45fe --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationListResult.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a Application list operation. */ +@Fluent +public final class ApplicationListResult { + /* + * The Application items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of ApplicationListResult class. */ + public ApplicationListResult() { + } + + /** + * Get the value property: The Application items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The Application items on this page. + * + * @param value the value value to set. + * @return the ApplicationListResult object itself. + */ + public ApplicationListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the ApplicationListResult object itself. + */ + public ApplicationListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ApplicationListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationListResult.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResource.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResource.java new file mode 100644 index 000000000000..81b245bc1a42 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResource.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationResourceInner; + +/** An immutable client-side representation of ApplicationResource. */ +public interface ApplicationResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the resourceType property: The type of the application resource. + * + * @return the resourceType value. + */ + String resourceType(); + + /** + * Gets the resourceId property: The Arm id of the application resource. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the resourceKind property: The kind of the application resource. + * + * @return the resourceKind value. + */ + String resourceKind(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationResourceInner object. + * + * @return the inner object. + */ + ApplicationResourceInner innerModel(); + + /** The entirety of the ApplicationResource definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** The ApplicationResource definition stages. */ + interface DefinitionStages { + /** The first stage of the ApplicationResource definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the ApplicationResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, spaceName, applicationName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @return the next definition stage. + */ + WithCreate withExistingApplication(String resourceGroupName, String spaceName, String applicationName); + } + + /** + * The stage of the ApplicationResource definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithResourceType, + DefinitionStages.WithResourceId, + DefinitionStages.WithResourceKind { + /** + * Executes the create request. + * + * @return the created resource. + */ + ApplicationResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ApplicationResource create(Context context); + } + + /** The stage of the ApplicationResource definition allowing to specify resourceType. */ + interface WithResourceType { + /** + * Specifies the resourceType property: The type of the application resource.. + * + * @param resourceType The type of the application resource. + * @return the next definition stage. + */ + WithCreate withResourceType(String resourceType); + } + + /** The stage of the ApplicationResource definition allowing to specify resourceId. */ + interface WithResourceId { + /** + * Specifies the resourceId property: The Arm id of the application resource.. + * + * @param resourceId The Arm id of the application resource. + * @return the next definition stage. + */ + WithCreate withResourceId(String resourceId); + } + + /** The stage of the ApplicationResource definition allowing to specify resourceKind. */ + interface WithResourceKind { + /** + * Specifies the resourceKind property: The kind of the application resource.. + * + * @param resourceKind The kind of the application resource. + * @return the next definition stage. + */ + WithCreate withResourceKind(String resourceKind); + } + } + + /** + * Begins update for the ApplicationResource resource. + * + * @return the stage of resource update. + */ + ApplicationResource.Update update(); + + /** The template for ApplicationResource update. */ + interface Update extends UpdateStages.WithResourceType, UpdateStages.WithResourceId, UpdateStages.WithResourceKind { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ApplicationResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ApplicationResource apply(Context context); + } + + /** The ApplicationResource update stages. */ + interface UpdateStages { + /** The stage of the ApplicationResource update allowing to specify resourceType. */ + interface WithResourceType { + /** + * Specifies the resourceType property: The type of the application resource.. + * + * @param resourceType The type of the application resource. + * @return the next definition stage. + */ + Update withResourceType(String resourceType); + } + + /** The stage of the ApplicationResource update allowing to specify resourceId. */ + interface WithResourceId { + /** + * Specifies the resourceId property: The Arm id of the application resource.. + * + * @param resourceId The Arm id of the application resource. + * @return the next definition stage. + */ + Update withResourceId(String resourceId); + } + + /** The stage of the ApplicationResource update allowing to specify resourceKind. */ + interface WithResourceKind { + /** + * Specifies the resourceKind property: The kind of the application resource.. + * + * @param resourceKind The kind of the application resource. + * @return the next definition stage. + */ + Update withResourceKind(String resourceKind); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ApplicationResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ApplicationResource refresh(Context context); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResourceListResult.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResourceListResult.java new file mode 100644 index 000000000000..f1a3c276fa62 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a ApplicationResource list operation. */ +@Fluent +public final class ApplicationResourceListResult { + /* + * The ApplicationResource items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of ApplicationResourceListResult class. */ + public ApplicationResourceListResult() { + } + + /** + * Get the value property: The ApplicationResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The ApplicationResource items on this page. + * + * @param value the value value to set. + * @return the ApplicationResourceListResult object itself. + */ + public ApplicationResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the ApplicationResourceListResult object itself. + */ + public ApplicationResourceListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model ApplicationResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationResourceListResult.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResourceUpdate.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResourceUpdate.java new file mode 100644 index 000000000000..562430277254 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResourceUpdate.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationResourceUpdateProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The type used for update operations of the ApplicationResource. */ +@Fluent +public final class ApplicationResourceUpdate { + /* + * The updatable properties of the ApplicationResource. + */ + @JsonProperty(value = "properties") + private ApplicationResourceUpdateProperties innerProperties; + + /** Creates an instance of ApplicationResourceUpdate class. */ + public ApplicationResourceUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of the ApplicationResource. + * + * @return the innerProperties value. + */ + private ApplicationResourceUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the resourceType property: The type of the application resource. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.innerProperties() == null ? null : this.innerProperties().resourceType(); + } + + /** + * Set the resourceType property: The type of the application resource. + * + * @param resourceType the resourceType value to set. + * @return the ApplicationResourceUpdate object itself. + */ + public ApplicationResourceUpdate withResourceType(String resourceType) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationResourceUpdateProperties(); + } + this.innerProperties().withResourceType(resourceType); + return this; + } + + /** + * Get the resourceId property: The Arm id of the application resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.innerProperties() == null ? null : this.innerProperties().resourceId(); + } + + /** + * Set the resourceId property: The Arm id of the application resource. + * + * @param resourceId the resourceId value to set. + * @return the ApplicationResourceUpdate object itself. + */ + public ApplicationResourceUpdate withResourceId(String resourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationResourceUpdateProperties(); + } + this.innerProperties().withResourceId(resourceId); + return this; + } + + /** + * Get the resourceKind property: The kind of the application resource. + * + * @return the resourceKind value. + */ + public String resourceKind() { + return this.innerProperties() == null ? null : this.innerProperties().resourceKind(); + } + + /** + * Set the resourceKind property: The kind of the application resource. + * + * @param resourceKind the resourceKind value to set. + * @return the ApplicationResourceUpdate object itself. + */ + public ApplicationResourceUpdate withResourceKind(String resourceKind) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationResourceUpdateProperties(); + } + this.innerProperties().withResourceKind(resourceKind); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResources.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResources.java new file mode 100644 index 000000000000..34372c7f3a69 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationResources.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.List; + +/** Resource collection API of ApplicationResources. */ +public interface ApplicationResources { + /** + * List ApplicationResource resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByApplication( + String resourceGroupName, String spaceName, String applicationName); + + /** + * List ApplicationResource resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ApplicationResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByApplication( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context); + + /** + * Get a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ApplicationResource along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String spaceName, String applicationName, String resourceName, Context context); + + /** + * Get a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ApplicationResource. + */ + ApplicationResource get(String resourceGroupName, String spaceName, String applicationName, String resourceName); + + /** + * Delete a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String spaceName, String applicationName, String resourceName, Context context); + + /** + * Delete a ApplicationResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param resourceName The name of the application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String spaceName, String applicationName, String resourceName); + + /** + * Get a ApplicationResource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ApplicationResource along with {@link Response}. + */ + ApplicationResource getById(String id); + + /** + * Get a ApplicationResource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ApplicationResource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a ApplicationResource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a ApplicationResource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ApplicationResource resource. + * + * @param name resource name. + * @return the first stage of the new ApplicationResource definition. + */ + ApplicationResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationUpdate.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationUpdate.java new file mode 100644 index 000000000000..5ac283075b84 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ApplicationUpdate.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationUpdateProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The type used for update operations of the Application. */ +@Fluent +public final class ApplicationUpdate { + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The updatable properties of the Application. + */ + @JsonProperty(value = "properties") + private ApplicationUpdateProperties innerProperties; + + /** Creates an instance of ApplicationUpdate class. */ + public ApplicationUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ApplicationUpdate object itself. + */ + public ApplicationUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerProperties property: The updatable properties of the Application. + * + * @return the innerProperties value. + */ + private ApplicationUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the description property: The description of the resource. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the resource. + * + * @param description the description value to set. + * @return the ApplicationUpdate object itself. + */ + public ApplicationUpdate withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationUpdateProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the trackingDataStores property: The tracking data stores. + * + * @return the trackingDataStores value. + */ + public Map trackingDataStores() { + return this.innerProperties() == null ? null : this.innerProperties().trackingDataStores(); + } + + /** + * Set the trackingDataStores property: The tracking data stores. + * + * @param trackingDataStores the trackingDataStores value to set. + * @return the ApplicationUpdate object itself. + */ + public ApplicationUpdate withTrackingDataStores(Map trackingDataStores) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationUpdateProperties(); + } + this.innerProperties().withTrackingDataStores(trackingDataStores); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Applications.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Applications.java new file mode 100644 index 000000000000..5e2bb548cf66 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Applications.java @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.List; + +/** Resource collection API of Applications. */ +public interface Applications { + /** + * List Application resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listBySpace(String resourceGroupName, String spaceName); + + /** + * List Application resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Application list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listBySpace( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context); + + /** + * Get a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Application along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String spaceName, String applicationName, Context context); + + /** + * Get a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Application. + */ + Application get(String resourceGroupName, String spaceName, String applicationName); + + /** + * Delete a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String spaceName, String applicationName, Context context); + + /** + * Delete a Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String spaceName, String applicationName); + + /** + * The delete business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, + Context context); + + /** + * The delete business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body); + + /** + * The get business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response along with {@link Response}. + */ + Response getBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body, + Context context); + + /** + * The get business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response. + */ + SaveOrGetBusinessProcessDevelopmentArtifactResponse getBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest body); + + /** + * The list business process development artifacts action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact get collection response along with {@link Response}. + */ + Response listBusinessProcessDevelopmentArtifactsWithResponse( + String resourceGroupName, String spaceName, String applicationName, Context context); + + /** + * The list business process development artifacts action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact get collection response. + */ + ListBusinessProcessDevelopmentArtifactsResponse listBusinessProcessDevelopmentArtifacts( + String resourceGroupName, String spaceName, String applicationName); + + /** + * The save business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response along with {@link Response}. + */ + Response saveBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, + Context context); + + /** + * The save business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the business process development artifact save or get response. + */ + SaveOrGetBusinessProcessDevelopmentArtifactResponse saveBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body); + + /** + * The validate business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response validateBusinessProcessDevelopmentArtifactWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body, + Context context); + + /** + * The validate business process development artifact action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void validateBusinessProcessDevelopmentArtifact( + String resourceGroupName, + String spaceName, + String applicationName, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest body); + + /** + * Get a Application. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Application along with {@link Response}. + */ + Application getById(String id); + + /** + * Get a Application. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Application along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a Application. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a Application. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Application resource. + * + * @param name resource name. + * @return the first stage of the new Application definition. + */ + Application.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcess.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcess.java new file mode 100644 index 000000000000..27ce110e7c81 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcess.java @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessInner; +import java.util.Map; + +/** An immutable client-side representation of BusinessProcess. */ +public interface BusinessProcess { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the version property: The version of the business process. + * + * @return the version value. + */ + String version(); + + /** + * Gets the description property: The description of the business process. + * + * @return the description value. + */ + String description(); + + /** + * Gets the tableName property: The table name of the business process. + * + * @return the tableName value. + */ + String tableName(); + + /** + * Gets the trackingDataStoreReferenceName property: The tracking data store reference name. + * + * @return the trackingDataStoreReferenceName value. + */ + String trackingDataStoreReferenceName(); + + /** + * Gets the identifier property: The business process identifier. + * + * @return the identifier value. + */ + BusinessProcessIdentifier identifier(); + + /** + * Gets the businessProcessStages property: The business process stages. + * + * @return the businessProcessStages value. + */ + Map businessProcessStages(); + + /** + * Gets the businessProcessMapping property: The business process mapping. + * + * @return the businessProcessMapping value. + */ + Map businessProcessMapping(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessInner object. + * + * @return the inner object. + */ + BusinessProcessInner innerModel(); + + /** The entirety of the BusinessProcess definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** The BusinessProcess definition stages. */ + interface DefinitionStages { + /** The first stage of the BusinessProcess definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the BusinessProcess definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, spaceName, applicationName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @return the next definition stage. + */ + WithCreate withExistingApplication(String resourceGroupName, String spaceName, String applicationName); + } + + /** + * The stage of the BusinessProcess definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithDescription, + DefinitionStages.WithTableName, + DefinitionStages.WithTrackingDataStoreReferenceName, + DefinitionStages.WithIdentifier, + DefinitionStages.WithBusinessProcessStages, + DefinitionStages.WithBusinessProcessMapping { + /** + * Executes the create request. + * + * @return the created resource. + */ + BusinessProcess create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + BusinessProcess create(Context context); + } + + /** The stage of the BusinessProcess definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: The description of the business process.. + * + * @param description The description of the business process. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + + /** The stage of the BusinessProcess definition allowing to specify tableName. */ + interface WithTableName { + /** + * Specifies the tableName property: The table name of the business process.. + * + * @param tableName The table name of the business process. + * @return the next definition stage. + */ + WithCreate withTableName(String tableName); + } + + /** The stage of the BusinessProcess definition allowing to specify trackingDataStoreReferenceName. */ + interface WithTrackingDataStoreReferenceName { + /** + * Specifies the trackingDataStoreReferenceName property: The tracking data store reference name.. + * + * @param trackingDataStoreReferenceName The tracking data store reference name. + * @return the next definition stage. + */ + WithCreate withTrackingDataStoreReferenceName(String trackingDataStoreReferenceName); + } + + /** The stage of the BusinessProcess definition allowing to specify identifier. */ + interface WithIdentifier { + /** + * Specifies the identifier property: The business process identifier.. + * + * @param identifier The business process identifier. + * @return the next definition stage. + */ + WithCreate withIdentifier(BusinessProcessIdentifier identifier); + } + + /** The stage of the BusinessProcess definition allowing to specify businessProcessStages. */ + interface WithBusinessProcessStages { + /** + * Specifies the businessProcessStages property: The business process stages.. + * + * @param businessProcessStages The business process stages. + * @return the next definition stage. + */ + WithCreate withBusinessProcessStages(Map businessProcessStages); + } + + /** The stage of the BusinessProcess definition allowing to specify businessProcessMapping. */ + interface WithBusinessProcessMapping { + /** + * Specifies the businessProcessMapping property: The business process mapping.. + * + * @param businessProcessMapping The business process mapping. + * @return the next definition stage. + */ + WithCreate withBusinessProcessMapping(Map businessProcessMapping); + } + } + + /** + * Begins update for the BusinessProcess resource. + * + * @return the stage of resource update. + */ + BusinessProcess.Update update(); + + /** The template for BusinessProcess update. */ + interface Update + extends UpdateStages.WithDescription, + UpdateStages.WithTableName, + UpdateStages.WithTrackingDataStoreReferenceName, + UpdateStages.WithIdentifier, + UpdateStages.WithBusinessProcessStages, + UpdateStages.WithBusinessProcessMapping { + /** + * Executes the update request. + * + * @return the updated resource. + */ + BusinessProcess apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + BusinessProcess apply(Context context); + } + + /** The BusinessProcess update stages. */ + interface UpdateStages { + /** The stage of the BusinessProcess update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: The description of the business process.. + * + * @param description The description of the business process. + * @return the next definition stage. + */ + Update withDescription(String description); + } + + /** The stage of the BusinessProcess update allowing to specify tableName. */ + interface WithTableName { + /** + * Specifies the tableName property: The table name of the business process.. + * + * @param tableName The table name of the business process. + * @return the next definition stage. + */ + Update withTableName(String tableName); + } + + /** The stage of the BusinessProcess update allowing to specify trackingDataStoreReferenceName. */ + interface WithTrackingDataStoreReferenceName { + /** + * Specifies the trackingDataStoreReferenceName property: The tracking data store reference name.. + * + * @param trackingDataStoreReferenceName The tracking data store reference name. + * @return the next definition stage. + */ + Update withTrackingDataStoreReferenceName(String trackingDataStoreReferenceName); + } + + /** The stage of the BusinessProcess update allowing to specify identifier. */ + interface WithIdentifier { + /** + * Specifies the identifier property: The business process identifier.. + * + * @param identifier The business process identifier. + * @return the next definition stage. + */ + Update withIdentifier(BusinessProcessIdentifier identifier); + } + + /** The stage of the BusinessProcess update allowing to specify businessProcessStages. */ + interface WithBusinessProcessStages { + /** + * Specifies the businessProcessStages property: The business process stages.. + * + * @param businessProcessStages The business process stages. + * @return the next definition stage. + */ + Update withBusinessProcessStages(Map businessProcessStages); + } + + /** The stage of the BusinessProcess update allowing to specify businessProcessMapping. */ + interface WithBusinessProcessMapping { + /** + * Specifies the businessProcessMapping property: The business process mapping.. + * + * @param businessProcessMapping The business process mapping. + * @return the next definition stage. + */ + Update withBusinessProcessMapping(Map businessProcessMapping); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + BusinessProcess refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + BusinessProcess refresh(Context context); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessDevelopmentArtifactProperties.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessDevelopmentArtifactProperties.java new file mode 100644 index 000000000000..6042902362df --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessDevelopmentArtifactProperties.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The properties of business process development artifact. */ +@Fluent +public final class BusinessProcessDevelopmentArtifactProperties { + /* + * The description of the business process. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The business process identifier. + */ + @JsonProperty(value = "identifier") + private BusinessProcessIdentifier identifier; + + /* + * The business process stages. + */ + @JsonProperty(value = "businessProcessStages") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map businessProcessStages; + + /* + * The business process mapping. + */ + @JsonProperty(value = "businessProcessMapping") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map businessProcessMapping; + + /* + * The tracking profile for the business process. + */ + @JsonProperty(value = "trackingProfiles") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map trackingProfiles; + + /** Creates an instance of BusinessProcessDevelopmentArtifactProperties class. */ + public BusinessProcessDevelopmentArtifactProperties() { + } + + /** + * Get the description property: The description of the business process. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the business process. + * + * @param description the description value to set. + * @return the BusinessProcessDevelopmentArtifactProperties object itself. + */ + public BusinessProcessDevelopmentArtifactProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the identifier property: The business process identifier. + * + * @return the identifier value. + */ + public BusinessProcessIdentifier identifier() { + return this.identifier; + } + + /** + * Set the identifier property: The business process identifier. + * + * @param identifier the identifier value to set. + * @return the BusinessProcessDevelopmentArtifactProperties object itself. + */ + public BusinessProcessDevelopmentArtifactProperties withIdentifier(BusinessProcessIdentifier identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get the businessProcessStages property: The business process stages. + * + * @return the businessProcessStages value. + */ + public Map businessProcessStages() { + return this.businessProcessStages; + } + + /** + * Set the businessProcessStages property: The business process stages. + * + * @param businessProcessStages the businessProcessStages value to set. + * @return the BusinessProcessDevelopmentArtifactProperties object itself. + */ + public BusinessProcessDevelopmentArtifactProperties withBusinessProcessStages( + Map businessProcessStages) { + this.businessProcessStages = businessProcessStages; + return this; + } + + /** + * Get the businessProcessMapping property: The business process mapping. + * + * @return the businessProcessMapping value. + */ + public Map businessProcessMapping() { + return this.businessProcessMapping; + } + + /** + * Set the businessProcessMapping property: The business process mapping. + * + * @param businessProcessMapping the businessProcessMapping value to set. + * @return the BusinessProcessDevelopmentArtifactProperties object itself. + */ + public BusinessProcessDevelopmentArtifactProperties withBusinessProcessMapping( + Map businessProcessMapping) { + this.businessProcessMapping = businessProcessMapping; + return this; + } + + /** + * Get the trackingProfiles property: The tracking profile for the business process. + * + * @return the trackingProfiles value. + */ + public Map trackingProfiles() { + return this.trackingProfiles; + } + + /** + * Set the trackingProfiles property: The tracking profile for the business process. + * + * @param trackingProfiles the trackingProfiles value to set. + * @return the BusinessProcessDevelopmentArtifactProperties object itself. + */ + public BusinessProcessDevelopmentArtifactProperties withTrackingProfiles( + Map trackingProfiles) { + this.trackingProfiles = trackingProfiles; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identifier() != null) { + identifier().validate(); + } + if (businessProcessStages() != null) { + businessProcessStages() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (businessProcessMapping() != null) { + businessProcessMapping() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (trackingProfiles() != null) { + trackingProfiles() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessIdentifier.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessIdentifier.java new file mode 100644 index 000000000000..9d8744ee00d7 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessIdentifier.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of business process identifier. */ +@Fluent +public final class BusinessProcessIdentifier { + /* + * The property name of the business process identifier. + */ + @JsonProperty(value = "propertyName") + private String propertyName; + + /* + * The property type of the business process identifier. + */ + @JsonProperty(value = "propertyType") + private String propertyType; + + /** Creates an instance of BusinessProcessIdentifier class. */ + public BusinessProcessIdentifier() { + } + + /** + * Get the propertyName property: The property name of the business process identifier. + * + * @return the propertyName value. + */ + public String propertyName() { + return this.propertyName; + } + + /** + * Set the propertyName property: The property name of the business process identifier. + * + * @param propertyName the propertyName value to set. + * @return the BusinessProcessIdentifier object itself. + */ + public BusinessProcessIdentifier withPropertyName(String propertyName) { + this.propertyName = propertyName; + return this; + } + + /** + * Get the propertyType property: The property type of the business process identifier. + * + * @return the propertyType value. + */ + public String propertyType() { + return this.propertyType; + } + + /** + * Set the propertyType property: The property type of the business process identifier. + * + * @param propertyType the propertyType value to set. + * @return the BusinessProcessIdentifier object itself. + */ + public BusinessProcessIdentifier withPropertyType(String propertyType) { + this.propertyType = propertyType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessListResult.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessListResult.java new file mode 100644 index 000000000000..8c2e6c6d72a7 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessListResult.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a BusinessProcess list operation. */ +@Fluent +public final class BusinessProcessListResult { + /* + * The BusinessProcess items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of BusinessProcessListResult class. */ + public BusinessProcessListResult() { + } + + /** + * Get the value property: The BusinessProcess items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The BusinessProcess items on this page. + * + * @param value the value value to set. + * @return the BusinessProcessListResult object itself. + */ + public BusinessProcessListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the BusinessProcessListResult object itself. + */ + public BusinessProcessListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model BusinessProcessListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BusinessProcessListResult.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessMappingItem.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessMappingItem.java new file mode 100644 index 000000000000..8586349ce224 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessMappingItem.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of business process mapping. */ +@Fluent +public final class BusinessProcessMappingItem { + /* + * The logic app resource id. + */ + @JsonProperty(value = "logicAppResourceId") + private String logicAppResourceId; + + /* + * The workflow name within the logic app. + */ + @JsonProperty(value = "workflowName") + private String workflowName; + + /* + * The operation name. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /* + * The mapping item operation type of the business process. + */ + @JsonProperty(value = "operationType") + private String operationType; + + /** Creates an instance of BusinessProcessMappingItem class. */ + public BusinessProcessMappingItem() { + } + + /** + * Get the logicAppResourceId property: The logic app resource id. + * + * @return the logicAppResourceId value. + */ + public String logicAppResourceId() { + return this.logicAppResourceId; + } + + /** + * Set the logicAppResourceId property: The logic app resource id. + * + * @param logicAppResourceId the logicAppResourceId value to set. + * @return the BusinessProcessMappingItem object itself. + */ + public BusinessProcessMappingItem withLogicAppResourceId(String logicAppResourceId) { + this.logicAppResourceId = logicAppResourceId; + return this; + } + + /** + * Get the workflowName property: The workflow name within the logic app. + * + * @return the workflowName value. + */ + public String workflowName() { + return this.workflowName; + } + + /** + * Set the workflowName property: The workflow name within the logic app. + * + * @param workflowName the workflowName value to set. + * @return the BusinessProcessMappingItem object itself. + */ + public BusinessProcessMappingItem withWorkflowName(String workflowName) { + this.workflowName = workflowName; + return this; + } + + /** + * Get the operationName property: The operation name. + * + * @return the operationName value. + */ + public String operationName() { + return this.operationName; + } + + /** + * Set the operationName property: The operation name. + * + * @param operationName the operationName value to set. + * @return the BusinessProcessMappingItem object itself. + */ + public BusinessProcessMappingItem withOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the operationType property: The mapping item operation type of the business process. + * + * @return the operationType value. + */ + public String operationType() { + return this.operationType; + } + + /** + * Set the operationType property: The mapping item operation type of the business process. + * + * @param operationType the operationType value to set. + * @return the BusinessProcessMappingItem object itself. + */ + public BusinessProcessMappingItem withOperationType(String operationType) { + this.operationType = operationType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessReference.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessReference.java new file mode 100644 index 000000000000..c0e903b0392c --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessReference.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The business process reference. */ +@Fluent +public final class BusinessProcessReference { + /* + * The business process name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The business process version. + */ + @JsonProperty(value = "version") + private String version; + + /** Creates an instance of BusinessProcessReference class. */ + public BusinessProcessReference() { + } + + /** + * Get the name property: The business process name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The business process name. + * + * @param name the name value to set. + * @return the BusinessProcessReference object itself. + */ + public BusinessProcessReference withName(String name) { + this.name = name; + return this; + } + + /** + * Get the version property: The business process version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: The business process version. + * + * @param version the version value to set. + * @return the BusinessProcessReference object itself. + */ + public BusinessProcessReference withVersion(String version) { + this.version = version; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessStage.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessStage.java new file mode 100644 index 000000000000..9c95551dbf6e --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessStage.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The properties of business process stage. */ +@Fluent +public final class BusinessProcessStage { + /* + * The description of the business stage. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The properties within the properties of the business process stage. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * The property to keep track of stages before current in the business process stage. + */ + @JsonProperty(value = "stagesBefore") + private List stagesBefore; + + /** Creates an instance of BusinessProcessStage class. */ + public BusinessProcessStage() { + } + + /** + * Get the description property: The description of the business stage. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the business stage. + * + * @param description the description value to set. + * @return the BusinessProcessStage object itself. + */ + public BusinessProcessStage withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the properties property: The properties within the properties of the business process stage. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The properties within the properties of the business process stage. + * + * @param properties the properties value to set. + * @return the BusinessProcessStage object itself. + */ + public BusinessProcessStage withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Get the stagesBefore property: The property to keep track of stages before current in the business process stage. + * + * @return the stagesBefore value. + */ + public List stagesBefore() { + return this.stagesBefore; + } + + /** + * Set the stagesBefore property: The property to keep track of stages before current in the business process stage. + * + * @param stagesBefore the stagesBefore value to set. + * @return the BusinessProcessStage object itself. + */ + public BusinessProcessStage withStagesBefore(List stagesBefore) { + this.stagesBefore = stagesBefore; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessUpdate.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessUpdate.java new file mode 100644 index 000000000000..6f68c6ac950e --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessUpdate.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessUpdateProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The type used for update operations of the BusinessProcess. */ +@Fluent +public final class BusinessProcessUpdate { + /* + * The updatable properties of the BusinessProcess. + */ + @JsonProperty(value = "properties") + private BusinessProcessUpdateProperties innerProperties; + + /** Creates an instance of BusinessProcessUpdate class. */ + public BusinessProcessUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of the BusinessProcess. + * + * @return the innerProperties value. + */ + private BusinessProcessUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the description property: The description of the business process. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the business process. + * + * @param description the description value to set. + * @return the BusinessProcessUpdate object itself. + */ + public BusinessProcessUpdate withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessUpdateProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the tableName property: The table name of the business process. + * + * @return the tableName value. + */ + public String tableName() { + return this.innerProperties() == null ? null : this.innerProperties().tableName(); + } + + /** + * Set the tableName property: The table name of the business process. + * + * @param tableName the tableName value to set. + * @return the BusinessProcessUpdate object itself. + */ + public BusinessProcessUpdate withTableName(String tableName) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessUpdateProperties(); + } + this.innerProperties().withTableName(tableName); + return this; + } + + /** + * Get the trackingDataStoreReferenceName property: The tracking data store reference name. + * + * @return the trackingDataStoreReferenceName value. + */ + public String trackingDataStoreReferenceName() { + return this.innerProperties() == null ? null : this.innerProperties().trackingDataStoreReferenceName(); + } + + /** + * Set the trackingDataStoreReferenceName property: The tracking data store reference name. + * + * @param trackingDataStoreReferenceName the trackingDataStoreReferenceName value to set. + * @return the BusinessProcessUpdate object itself. + */ + public BusinessProcessUpdate withTrackingDataStoreReferenceName(String trackingDataStoreReferenceName) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessUpdateProperties(); + } + this.innerProperties().withTrackingDataStoreReferenceName(trackingDataStoreReferenceName); + return this; + } + + /** + * Get the identifier property: The business process identifier. + * + * @return the identifier value. + */ + public BusinessProcessIdentifier identifier() { + return this.innerProperties() == null ? null : this.innerProperties().identifier(); + } + + /** + * Set the identifier property: The business process identifier. + * + * @param identifier the identifier value to set. + * @return the BusinessProcessUpdate object itself. + */ + public BusinessProcessUpdate withIdentifier(BusinessProcessIdentifier identifier) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessUpdateProperties(); + } + this.innerProperties().withIdentifier(identifier); + return this; + } + + /** + * Get the businessProcessStages property: The business process stages. + * + * @return the businessProcessStages value. + */ + public Map businessProcessStages() { + return this.innerProperties() == null ? null : this.innerProperties().businessProcessStages(); + } + + /** + * Set the businessProcessStages property: The business process stages. + * + * @param businessProcessStages the businessProcessStages value to set. + * @return the BusinessProcessUpdate object itself. + */ + public BusinessProcessUpdate withBusinessProcessStages(Map businessProcessStages) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessUpdateProperties(); + } + this.innerProperties().withBusinessProcessStages(businessProcessStages); + return this; + } + + /** + * Get the businessProcessMapping property: The business process mapping. + * + * @return the businessProcessMapping value. + */ + public Map businessProcessMapping() { + return this.innerProperties() == null ? null : this.innerProperties().businessProcessMapping(); + } + + /** + * Set the businessProcessMapping property: The business process mapping. + * + * @param businessProcessMapping the businessProcessMapping value to set. + * @return the BusinessProcessUpdate object itself. + */ + public BusinessProcessUpdate withBusinessProcessMapping( + Map businessProcessMapping) { + if (this.innerProperties() == null) { + this.innerProperties = new BusinessProcessUpdateProperties(); + } + this.innerProperties().withBusinessProcessMapping(businessProcessMapping); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessVersion.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessVersion.java new file mode 100644 index 000000000000..9b651151a4eb --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessVersion.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessVersionInner; +import java.util.Map; + +/** An immutable client-side representation of BusinessProcessVersion. */ +public interface BusinessProcessVersion { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the version property: The version of the business process. + * + * @return the version value. + */ + String version(); + + /** + * Gets the description property: The description of the business process. + * + * @return the description value. + */ + String description(); + + /** + * Gets the tableName property: The table name of the business process. + * + * @return the tableName value. + */ + String tableName(); + + /** + * Gets the trackingDataStoreReferenceName property: The tracking data store reference name. + * + * @return the trackingDataStoreReferenceName value. + */ + String trackingDataStoreReferenceName(); + + /** + * Gets the identifier property: The business process identifier. + * + * @return the identifier value. + */ + BusinessProcessIdentifier identifier(); + + /** + * Gets the businessProcessStages property: The business process stages. + * + * @return the businessProcessStages value. + */ + Map businessProcessStages(); + + /** + * Gets the businessProcessMapping property: The business process mapping. + * + * @return the businessProcessMapping value. + */ + Map businessProcessMapping(); + + /** + * Gets the inner com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessVersionInner object. + * + * @return the inner object. + */ + BusinessProcessVersionInner innerModel(); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessVersionListResult.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessVersionListResult.java new file mode 100644 index 000000000000..a2f60bfbdb5e --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessVersionListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessVersionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a BusinessProcessVersion list operation. */ +@Fluent +public final class BusinessProcessVersionListResult { + /* + * The BusinessProcessVersion items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of BusinessProcessVersionListResult class. */ + public BusinessProcessVersionListResult() { + } + + /** + * Get the value property: The BusinessProcessVersion items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The BusinessProcessVersion items on this page. + * + * @param value the value value to set. + * @return the BusinessProcessVersionListResult object itself. + */ + public BusinessProcessVersionListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the BusinessProcessVersionListResult object itself. + */ + public BusinessProcessVersionListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model BusinessProcessVersionListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BusinessProcessVersionListResult.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessVersions.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessVersions.java new file mode 100644 index 000000000000..4453b626567c --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcessVersions.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.List; + +/** Resource collection API of BusinessProcessVersions. */ +public interface BusinessProcessVersions { + /** + * List BusinessProcessVersion resources by BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByBusinessProcess( + String resourceGroupName, String spaceName, String applicationName, String businessProcessName); + + /** + * List BusinessProcessVersion resources by BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcessVersion list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByBusinessProcess( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context); + + /** + * Get a BusinessProcessVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param businessProcessVersion The version of the business process. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcessVersion along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + String businessProcessVersion, + Context context); + + /** + * Get a BusinessProcessVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param businessProcessVersion The version of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcessVersion. + */ + BusinessProcessVersion get( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + String businessProcessVersion); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcesses.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcesses.java new file mode 100644 index 000000000000..c8d619829dd3 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/BusinessProcesses.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.List; + +/** Resource collection API of BusinessProcesses. */ +public interface BusinessProcesses { + /** + * List BusinessProcess resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByApplication( + String resourceGroupName, String spaceName, String applicationName); + + /** + * List BusinessProcess resources by Application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BusinessProcess list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByApplication( + String resourceGroupName, + String spaceName, + String applicationName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context); + + /** + * Get a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcess along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Context context); + + /** + * Get a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcess. + */ + BusinessProcess get(String resourceGroupName, String spaceName, String applicationName, String businessProcessName); + + /** + * Delete a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, + String spaceName, + String applicationName, + String businessProcessName, + Context context); + + /** + * Delete a BusinessProcess. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param applicationName The name of the Application. + * @param businessProcessName The name of the business process. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String spaceName, String applicationName, String businessProcessName); + + /** + * Get a BusinessProcess. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcess along with {@link Response}. + */ + BusinessProcess getById(String id); + + /** + * Get a BusinessProcess. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BusinessProcess along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a BusinessProcess. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a BusinessProcess. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new BusinessProcess resource. + * + * @param name resource name. + * @return the first stage of the new BusinessProcess definition. + */ + BusinessProcess.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/FlowTrackingDefinition.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/FlowTrackingDefinition.java new file mode 100644 index 000000000000..a714543378bc --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/FlowTrackingDefinition.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The workflow tracking definition. */ +@Fluent +public final class FlowTrackingDefinition { + /* + * The tracking correlation context. + */ + @JsonProperty(value = "correlationContext") + private TrackingCorrelationContext correlationContext; + + /* + * The tracking events. + */ + @JsonProperty(value = "events") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map events; + + /** Creates an instance of FlowTrackingDefinition class. */ + public FlowTrackingDefinition() { + } + + /** + * Get the correlationContext property: The tracking correlation context. + * + * @return the correlationContext value. + */ + public TrackingCorrelationContext correlationContext() { + return this.correlationContext; + } + + /** + * Set the correlationContext property: The tracking correlation context. + * + * @param correlationContext the correlationContext value to set. + * @return the FlowTrackingDefinition object itself. + */ + public FlowTrackingDefinition withCorrelationContext(TrackingCorrelationContext correlationContext) { + this.correlationContext = correlationContext; + return this; + } + + /** + * Get the events property: The tracking events. + * + * @return the events value. + */ + public Map events() { + return this.events; + } + + /** + * Set the events property: The tracking events. + * + * @param events the events value to set. + * @return the FlowTrackingDefinition object itself. + */ + public FlowTrackingDefinition withEvents(Map events) { + this.events = events; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (correlationContext() != null) { + correlationContext().validate(); + } + if (events() != null) { + events() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/GetOrDeleteBusinessProcessDevelopmentArtifactRequest.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/GetOrDeleteBusinessProcessDevelopmentArtifactRequest.java new file mode 100644 index 000000000000..b793ba1b998d --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/GetOrDeleteBusinessProcessDevelopmentArtifactRequest.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The business process development artifact get or delete request. */ +@Fluent +public final class GetOrDeleteBusinessProcessDevelopmentArtifactRequest { + /* + * The name of the business process development artifact. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** Creates an instance of GetOrDeleteBusinessProcessDevelopmentArtifactRequest class. */ + public GetOrDeleteBusinessProcessDevelopmentArtifactRequest() { + } + + /** + * Get the name property: The name of the business process development artifact. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the business process development artifact. + * + * @param name the name value to set. + * @return the GetOrDeleteBusinessProcessDevelopmentArtifactRequest object itself. + */ + public GetOrDeleteBusinessProcessDevelopmentArtifactRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model" + + " GetOrDeleteBusinessProcessDevelopmentArtifactRequest")); + } + } + + private static final ClientLogger LOGGER = + new ClientLogger(GetOrDeleteBusinessProcessDevelopmentArtifactRequest.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResource.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResource.java new file mode 100644 index 000000000000..7592e48ff6cf --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResource.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.InfrastructureResourceInner; + +/** An immutable client-side representation of InfrastructureResource. */ +public interface InfrastructureResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the resourceType property: The type of the infrastructure resource. + * + * @return the resourceType value. + */ + String resourceType(); + + /** + * Gets the resourceId property: The id of the infrastructure resource. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azureintegrationspaces.fluent.models.InfrastructureResourceInner object. + * + * @return the inner object. + */ + InfrastructureResourceInner innerModel(); + + /** The entirety of the InfrastructureResource definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** The InfrastructureResource definition stages. */ + interface DefinitionStages { + /** The first stage of the InfrastructureResource definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the InfrastructureResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, spaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @return the next definition stage. + */ + WithCreate withExistingSpace(String resourceGroupName, String spaceName); + } + + /** + * The stage of the InfrastructureResource definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithResourceType, DefinitionStages.WithResourceId { + /** + * Executes the create request. + * + * @return the created resource. + */ + InfrastructureResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + InfrastructureResource create(Context context); + } + + /** The stage of the InfrastructureResource definition allowing to specify resourceType. */ + interface WithResourceType { + /** + * Specifies the resourceType property: The type of the infrastructure resource.. + * + * @param resourceType The type of the infrastructure resource. + * @return the next definition stage. + */ + WithCreate withResourceType(String resourceType); + } + + /** The stage of the InfrastructureResource definition allowing to specify resourceId. */ + interface WithResourceId { + /** + * Specifies the resourceId property: The id of the infrastructure resource.. + * + * @param resourceId The id of the infrastructure resource. + * @return the next definition stage. + */ + WithCreate withResourceId(String resourceId); + } + } + + /** + * Begins update for the InfrastructureResource resource. + * + * @return the stage of resource update. + */ + InfrastructureResource.Update update(); + + /** The template for InfrastructureResource update. */ + interface Update extends UpdateStages.WithResourceType, UpdateStages.WithResourceId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + InfrastructureResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + InfrastructureResource apply(Context context); + } + + /** The InfrastructureResource update stages. */ + interface UpdateStages { + /** The stage of the InfrastructureResource update allowing to specify resourceType. */ + interface WithResourceType { + /** + * Specifies the resourceType property: The type of the infrastructure resource.. + * + * @param resourceType The type of the infrastructure resource. + * @return the next definition stage. + */ + Update withResourceType(String resourceType); + } + + /** The stage of the InfrastructureResource update allowing to specify resourceId. */ + interface WithResourceId { + /** + * Specifies the resourceId property: The id of the infrastructure resource.. + * + * @param resourceId The id of the infrastructure resource. + * @return the next definition stage. + */ + Update withResourceId(String resourceId); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + InfrastructureResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + InfrastructureResource refresh(Context context); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResourceListResult.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResourceListResult.java new file mode 100644 index 000000000000..8b53608a007d --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.InfrastructureResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a InfrastructureResource list operation. */ +@Fluent +public final class InfrastructureResourceListResult { + /* + * The InfrastructureResource items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of InfrastructureResourceListResult class. */ + public InfrastructureResourceListResult() { + } + + /** + * Get the value property: The InfrastructureResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The InfrastructureResource items on this page. + * + * @param value the value value to set. + * @return the InfrastructureResourceListResult object itself. + */ + public InfrastructureResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the InfrastructureResourceListResult object itself. + */ + public InfrastructureResourceListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model InfrastructureResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(InfrastructureResourceListResult.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResourceUpdate.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResourceUpdate.java new file mode 100644 index 000000000000..793394999e28 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResourceUpdate.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.InfrastructureResourceUpdateProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The type used for update operations of the InfrastructureResource. */ +@Fluent +public final class InfrastructureResourceUpdate { + /* + * The updatable properties of the InfrastructureResource. + */ + @JsonProperty(value = "properties") + private InfrastructureResourceUpdateProperties innerProperties; + + /** Creates an instance of InfrastructureResourceUpdate class. */ + public InfrastructureResourceUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of the InfrastructureResource. + * + * @return the innerProperties value. + */ + private InfrastructureResourceUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the resourceType property: The type of the infrastructure resource. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.innerProperties() == null ? null : this.innerProperties().resourceType(); + } + + /** + * Set the resourceType property: The type of the infrastructure resource. + * + * @param resourceType the resourceType value to set. + * @return the InfrastructureResourceUpdate object itself. + */ + public InfrastructureResourceUpdate withResourceType(String resourceType) { + if (this.innerProperties() == null) { + this.innerProperties = new InfrastructureResourceUpdateProperties(); + } + this.innerProperties().withResourceType(resourceType); + return this; + } + + /** + * Get the resourceId property: The id of the infrastructure resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.innerProperties() == null ? null : this.innerProperties().resourceId(); + } + + /** + * Set the resourceId property: The id of the infrastructure resource. + * + * @param resourceId the resourceId value to set. + * @return the InfrastructureResourceUpdate object itself. + */ + public InfrastructureResourceUpdate withResourceId(String resourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new InfrastructureResourceUpdateProperties(); + } + this.innerProperties().withResourceId(resourceId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResources.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResources.java new file mode 100644 index 000000000000..b298968784b9 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/InfrastructureResources.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.List; + +/** Resource collection API of InfrastructureResources. */ +public interface InfrastructureResources { + /** + * List InfrastructureResource resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listBySpace(String resourceGroupName, String spaceName); + + /** + * List InfrastructureResource resources by Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InfrastructureResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listBySpace( + String resourceGroupName, + String spaceName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context); + + /** + * Get a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a InfrastructureResource along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String spaceName, String infrastructureResourceName, Context context); + + /** + * Get a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a InfrastructureResource. + */ + InfrastructureResource get(String resourceGroupName, String spaceName, String infrastructureResourceName); + + /** + * Delete a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String spaceName, String infrastructureResourceName, Context context); + + /** + * Delete a InfrastructureResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param infrastructureResourceName The name of the infrastructure resource in the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String spaceName, String infrastructureResourceName); + + /** + * Get a InfrastructureResource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a InfrastructureResource along with {@link Response}. + */ + InfrastructureResource getById(String id); + + /** + * Get a InfrastructureResource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a InfrastructureResource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a InfrastructureResource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a InfrastructureResource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new InfrastructureResource resource. + * + * @param name resource name. + * @return the first stage of the new InfrastructureResource definition. + */ + InfrastructureResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ListBusinessProcessDevelopmentArtifactsResponse.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ListBusinessProcessDevelopmentArtifactsResponse.java new file mode 100644 index 000000000000..a7f20caeee4b --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ListBusinessProcessDevelopmentArtifactsResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.ListBusinessProcessDevelopmentArtifactsResponseInner; +import java.util.List; + +/** An immutable client-side representation of ListBusinessProcessDevelopmentArtifactsResponse. */ +public interface ListBusinessProcessDevelopmentArtifactsResponse { + /** + * Gets the value property: The list of the business process development artifact. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner + * com.azure.resourcemanager.azureintegrationspaces.fluent.models.ListBusinessProcessDevelopmentArtifactsResponseInner + * object. + * + * @return the inner object. + */ + ListBusinessProcessDevelopmentArtifactsResponseInner innerModel(); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Operation.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Operation.java new file mode 100644 index 000000000000..0b8b875d3e6a --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Operation.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.OperationInner; + +/** An immutable client-side representation of Operation. */ +public interface Operation { + /** + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + String name(); + + /** + * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + OperationDisplay display(); + + /** + * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + Origin origin(); + + /** + * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + ActionType actionType(); + + /** + * Gets the inner com.azure.resourcemanager.azureintegrationspaces.fluent.models.OperationInner object. + * + * @return the inner object. + */ + OperationInner innerModel(); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/OperationDisplay.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/OperationDisplay.java new file mode 100644 index 000000000000..5c805dd33130 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/OperationDisplay.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Localized display information for this particular operation. */ +@Immutable +public final class OperationDisplay { + /* + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + * Compute". + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /* + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + * Schedule Collections". + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /* + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + * Machine", "Restart Virtual Machine". + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /* + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + + /** + * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. + * "Virtual Machines" or "Job Schedule Collections". + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Get the description property: The short, localized friendly description of the operation; suitable for tool tips + * and detailed views. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/OperationListResult.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/OperationListResult.java new file mode 100644 index 000000000000..a36ad8b1fedf --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/OperationListResult.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.OperationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. + */ +@Immutable +public final class OperationListResult { + /* + * List of operations supported by the resource provider + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of operation list results (if there are any). + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of OperationListResult class. */ + public OperationListResult() { + } + + /** + * Get the value property: List of operations supported by the resource provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Operations.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Operations.java new file mode 100644 index 000000000000..82518107794e --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Operations.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of Operations. */ +public interface Operations { + /** + * List the operations for the provider. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(Context context); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Origin.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Origin.java new file mode 100644 index 000000000000..fe79895e9d07 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Origin.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ +public final class Origin extends ExpandableStringEnum { + /** Static value user for Origin. */ + public static final Origin USER = fromString("user"); + + /** Static value system for Origin. */ + public static final Origin SYSTEM = fromString("system"); + + /** Static value user,system for Origin. */ + public static final Origin USER_SYSTEM = fromString("user,system"); + + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + + /** + * Creates or finds a Origin from its string representation. + * + * @param name a name to look for. + * @return the corresponding Origin. + */ + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** + * Gets known Origin values. + * + * @return known Origin values. + */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ProvisioningState.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ProvisioningState.java new file mode 100644 index 000000000000..e5e0c755bce5 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/ProvisioningState.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The status of the current operation. */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for ProvisioningState. */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Provisioning for ProvisioningState. */ + public static final ProvisioningState PROVISIONING = fromString("Provisioning"); + + /** Static value Updating for ProvisioningState. */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for ProvisioningState. */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** Static value Accepted for ProvisioningState. */ + public static final ProvisioningState ACCEPTED = fromString("Accepted"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SaveOrGetBusinessProcessDevelopmentArtifactResponse.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SaveOrGetBusinessProcessDevelopmentArtifactResponse.java new file mode 100644 index 000000000000..5507b381430b --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SaveOrGetBusinessProcessDevelopmentArtifactResponse.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SaveOrGetBusinessProcessDevelopmentArtifactResponseInner; + +/** An immutable client-side representation of SaveOrGetBusinessProcessDevelopmentArtifactResponse. */ +public interface SaveOrGetBusinessProcessDevelopmentArtifactResponse { + /** + * Gets the name property: The name of the business process development artifact. + * + * @return the name value. + */ + String name(); + + /** + * Gets the systemData property: The system data of the business process development artifact. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the properties property: The properties of the business process development artifact. + * + * @return the properties value. + */ + BusinessProcessDevelopmentArtifactProperties properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.azureintegrationspaces.fluent.models.SaveOrGetBusinessProcessDevelopmentArtifactResponseInner + * object. + * + * @return the inner object. + */ + SaveOrGetBusinessProcessDevelopmentArtifactResponseInner innerModel(); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SaveOrValidateBusinessProcessDevelopmentArtifactRequest.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SaveOrValidateBusinessProcessDevelopmentArtifactRequest.java new file mode 100644 index 000000000000..05311b0d4e24 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SaveOrValidateBusinessProcessDevelopmentArtifactRequest.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The business process development artifact save or validate request. */ +@Fluent +public final class SaveOrValidateBusinessProcessDevelopmentArtifactRequest { + /* + * The name of the business process development artifact. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The properties of the business process development artifact. + */ + @JsonProperty(value = "properties") + private BusinessProcessDevelopmentArtifactProperties properties; + + /** Creates an instance of SaveOrValidateBusinessProcessDevelopmentArtifactRequest class. */ + public SaveOrValidateBusinessProcessDevelopmentArtifactRequest() { + } + + /** + * Get the name property: The name of the business process development artifact. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the business process development artifact. + * + * @param name the name value to set. + * @return the SaveOrValidateBusinessProcessDevelopmentArtifactRequest object itself. + */ + public SaveOrValidateBusinessProcessDevelopmentArtifactRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties property: The properties of the business process development artifact. + * + * @return the properties value. + */ + public BusinessProcessDevelopmentArtifactProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of the business process development artifact. + * + * @param properties the properties value to set. + * @return the SaveOrValidateBusinessProcessDevelopmentArtifactRequest object itself. + */ + public SaveOrValidateBusinessProcessDevelopmentArtifactRequest withProperties( + BusinessProcessDevelopmentArtifactProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model" + + " SaveOrValidateBusinessProcessDevelopmentArtifactRequest")); + } + if (properties() != null) { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = + new ClientLogger(SaveOrValidateBusinessProcessDevelopmentArtifactRequest.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Space.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Space.java new file mode 100644 index 000000000000..ec000ce33640 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Space.java @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SpaceInner; +import java.util.Map; + +/** An immutable client-side representation of Space. */ +public interface Space { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the description property: The description of the resource. + * + * @return the description value. + */ + String description(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azureintegrationspaces.fluent.models.SpaceInner object. + * + * @return the inner object. + */ + SpaceInner innerModel(); + + /** The entirety of the Space definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + + /** The Space definition stages. */ + interface DefinitionStages { + /** The first stage of the Space definition. */ + interface Blank extends WithLocation { + } + + /** The stage of the Space definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** The stage of the Space definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the Space definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithDescription { + /** + * Executes the create request. + * + * @return the created resource. + */ + Space create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Space create(Context context); + } + + /** The stage of the Space definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** The stage of the Space definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: The description of the resource.. + * + * @param description The description of the resource. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + } + + /** + * Begins update for the Space resource. + * + * @return the stage of resource update. + */ + Space.Update update(); + + /** The template for Space update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Space apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Space apply(Context context); + } + + /** The Space update stages. */ + interface UpdateStages { + /** The stage of the Space update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** The stage of the Space update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: The description of the resource.. + * + * @param description The description of the resource. + * @return the next definition stage. + */ + Update withDescription(String description); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Space refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Space refresh(Context context); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SpaceListResult.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SpaceListResult.java new file mode 100644 index 000000000000..76200a0a41d4 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SpaceListResult.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SpaceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a Space list operation. */ +@Fluent +public final class SpaceListResult { + /* + * The Space items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of SpaceListResult class. */ + public SpaceListResult() { + } + + /** + * Get the value property: The Space items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The Space items on this page. + * + * @param value the value value to set. + * @return the SpaceListResult object itself. + */ + public SpaceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the SpaceListResult object itself. + */ + public SpaceListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model SpaceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SpaceListResult.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SpaceUpdate.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SpaceUpdate.java new file mode 100644 index 000000000000..813493842401 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/SpaceUpdate.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azureintegrationspaces.fluent.models.SpaceUpdateProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The type used for update operations of the Space. */ +@Fluent +public final class SpaceUpdate { + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The updatable properties of the Space. + */ + @JsonProperty(value = "properties") + private SpaceUpdateProperties innerProperties; + + /** Creates an instance of SpaceUpdate class. */ + public SpaceUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the SpaceUpdate object itself. + */ + public SpaceUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerProperties property: The updatable properties of the Space. + * + * @return the innerProperties value. + */ + private SpaceUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the description property: The description of the resource. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the resource. + * + * @param description the description value to set. + * @return the SpaceUpdate object itself. + */ + public SpaceUpdate withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new SpaceUpdateProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Spaces.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Spaces.java new file mode 100644 index 000000000000..c76e1ab8bfb1 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/Spaces.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.List; + +/** Resource collection API of Spaces. */ +public interface Spaces { + /** + * List Space resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List Space resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List Space resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Space resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The number of result items to return. + * @param skip The number of result items to skip. + * @param maxPageSize The maximum number of result items per page. + * @param filter Filter the result list using the given expression. + * @param select Select the specified fields to be included in the response. + * @param expand Expand the indicated resources into the response. + * @param orderBy Expressions that specify the order of returned results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Space list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup( + String resourceGroupName, + Integer top, + Integer skip, + Integer maxPageSize, + String filter, + List select, + List expand, + List orderBy, + Context context); + + /** + * Get a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Space along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String spaceName, Context context); + + /** + * Get a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Space. + */ + Space getByResourceGroup(String resourceGroupName, String spaceName); + + /** + * Delete a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByResourceGroupWithResponse(String resourceGroupName, String spaceName, Context context); + + /** + * Delete a Space. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param spaceName The name of the space. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String spaceName); + + /** + * Get a Space. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Space along with {@link Response}. + */ + Space getById(String id); + + /** + * Get a Space. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Space along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a Space. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a Space. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Space resource. + * + * @param name resource name. + * @return the first stage of the new Space definition. + */ + Space.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingCorrelationContext.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingCorrelationContext.java new file mode 100644 index 000000000000..55891ec7376b --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingCorrelationContext.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The tracking correlation context. */ +@Fluent +public final class TrackingCorrelationContext { + /* + * The operation type for correlation context. + */ + @JsonProperty(value = "operationType") + private String operationType; + + /* + * The operation name for correlation context. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /* + * The name of the correlation property. + */ + @JsonProperty(value = "propertyName") + private String propertyName; + + /* + * The template expression for correlation context property value. + */ + @JsonProperty(value = "value") + private String value; + + /** Creates an instance of TrackingCorrelationContext class. */ + public TrackingCorrelationContext() { + } + + /** + * Get the operationType property: The operation type for correlation context. + * + * @return the operationType value. + */ + public String operationType() { + return this.operationType; + } + + /** + * Set the operationType property: The operation type for correlation context. + * + * @param operationType the operationType value to set. + * @return the TrackingCorrelationContext object itself. + */ + public TrackingCorrelationContext withOperationType(String operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get the operationName property: The operation name for correlation context. + * + * @return the operationName value. + */ + public String operationName() { + return this.operationName; + } + + /** + * Set the operationName property: The operation name for correlation context. + * + * @param operationName the operationName value to set. + * @return the TrackingCorrelationContext object itself. + */ + public TrackingCorrelationContext withOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the propertyName property: The name of the correlation property. + * + * @return the propertyName value. + */ + public String propertyName() { + return this.propertyName; + } + + /** + * Set the propertyName property: The name of the correlation property. + * + * @param propertyName the propertyName value to set. + * @return the TrackingCorrelationContext object itself. + */ + public TrackingCorrelationContext withPropertyName(String propertyName) { + this.propertyName = propertyName; + return this; + } + + /** + * Get the value property: The template expression for correlation context property value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The template expression for correlation context property value. + * + * @param value the value value to set. + * @return the TrackingCorrelationContext object itself. + */ + public TrackingCorrelationContext withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingDataStore.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingDataStore.java new file mode 100644 index 000000000000..bd7c766cd12e --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingDataStore.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of tracking data store. */ +@Fluent +public final class TrackingDataStore { + /* + * The database name. + */ + @JsonProperty(value = "databaseName", required = true) + private String databaseName; + + /* + * The data store resource id. + */ + @JsonProperty(value = "dataStoreResourceId", required = true) + private String dataStoreResourceId; + + /* + * The data store URI. + */ + @JsonProperty(value = "dataStoreUri", required = true) + private String dataStoreUri; + + /* + * The data store ingestion URI. + */ + @JsonProperty(value = "dataStoreIngestionUri", required = true) + private String dataStoreIngestionUri; + + /** Creates an instance of TrackingDataStore class. */ + public TrackingDataStore() { + } + + /** + * Get the databaseName property: The database name. + * + * @return the databaseName value. + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the databaseName property: The database name. + * + * @param databaseName the databaseName value to set. + * @return the TrackingDataStore object itself. + */ + public TrackingDataStore withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the dataStoreResourceId property: The data store resource id. + * + * @return the dataStoreResourceId value. + */ + public String dataStoreResourceId() { + return this.dataStoreResourceId; + } + + /** + * Set the dataStoreResourceId property: The data store resource id. + * + * @param dataStoreResourceId the dataStoreResourceId value to set. + * @return the TrackingDataStore object itself. + */ + public TrackingDataStore withDataStoreResourceId(String dataStoreResourceId) { + this.dataStoreResourceId = dataStoreResourceId; + return this; + } + + /** + * Get the dataStoreUri property: The data store URI. + * + * @return the dataStoreUri value. + */ + public String dataStoreUri() { + return this.dataStoreUri; + } + + /** + * Set the dataStoreUri property: The data store URI. + * + * @param dataStoreUri the dataStoreUri value to set. + * @return the TrackingDataStore object itself. + */ + public TrackingDataStore withDataStoreUri(String dataStoreUri) { + this.dataStoreUri = dataStoreUri; + return this; + } + + /** + * Get the dataStoreIngestionUri property: The data store ingestion URI. + * + * @return the dataStoreIngestionUri value. + */ + public String dataStoreIngestionUri() { + return this.dataStoreIngestionUri; + } + + /** + * Set the dataStoreIngestionUri property: The data store ingestion URI. + * + * @param dataStoreIngestionUri the dataStoreIngestionUri value to set. + * @return the TrackingDataStore object itself. + */ + public TrackingDataStore withDataStoreIngestionUri(String dataStoreIngestionUri) { + this.dataStoreIngestionUri = dataStoreIngestionUri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (databaseName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property databaseName in model TrackingDataStore")); + } + if (dataStoreResourceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataStoreResourceId in model TrackingDataStore")); + } + if (dataStoreUri() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property dataStoreUri in model TrackingDataStore")); + } + if (dataStoreIngestionUri() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataStoreIngestionUri in model TrackingDataStore")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TrackingDataStore.class); +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingEventDefinition.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingEventDefinition.java new file mode 100644 index 000000000000..fbca1306eed3 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingEventDefinition.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The tracking event definition. */ +@Fluent +public final class TrackingEventDefinition { + /* + * The operation type. + */ + @JsonProperty(value = "operationType") + private String operationType; + + /* + * The operation name. + */ + @JsonProperty(value = "operationName") + private String operationName; + + /* + * The properties to be collected for event. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /** Creates an instance of TrackingEventDefinition class. */ + public TrackingEventDefinition() { + } + + /** + * Get the operationType property: The operation type. + * + * @return the operationType value. + */ + public String operationType() { + return this.operationType; + } + + /** + * Set the operationType property: The operation type. + * + * @param operationType the operationType value to set. + * @return the TrackingEventDefinition object itself. + */ + public TrackingEventDefinition withOperationType(String operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get the operationName property: The operation name. + * + * @return the operationName value. + */ + public String operationName() { + return this.operationName; + } + + /** + * Set the operationName property: The operation name. + * + * @param operationName the operationName value to set. + * @return the TrackingEventDefinition object itself. + */ + public TrackingEventDefinition withOperationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * Get the properties property: The properties to be collected for event. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The properties to be collected for event. + * + * @param properties the properties value to set. + * @return the TrackingEventDefinition object itself. + */ + public TrackingEventDefinition withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingProfileDefinition.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingProfileDefinition.java new file mode 100644 index 000000000000..8cb6233a2da2 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/TrackingProfileDefinition.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The tracking profile for the business process. */ +@Fluent +public final class TrackingProfileDefinition { + /* + * The tracking definition schema uri. + */ + @JsonProperty(value = "$schema") + private String schema; + + /* + * The business process reference. + */ + @JsonProperty(value = "businessProcess") + private BusinessProcessReference businessProcess; + + /* + * The tracking definitions. + */ + @JsonProperty(value = "trackingDefinitions") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map trackingDefinitions; + + /** Creates an instance of TrackingProfileDefinition class. */ + public TrackingProfileDefinition() { + } + + /** + * Get the schema property: The tracking definition schema uri. + * + * @return the schema value. + */ + public String schema() { + return this.schema; + } + + /** + * Set the schema property: The tracking definition schema uri. + * + * @param schema the schema value to set. + * @return the TrackingProfileDefinition object itself. + */ + public TrackingProfileDefinition withSchema(String schema) { + this.schema = schema; + return this; + } + + /** + * Get the businessProcess property: The business process reference. + * + * @return the businessProcess value. + */ + public BusinessProcessReference businessProcess() { + return this.businessProcess; + } + + /** + * Set the businessProcess property: The business process reference. + * + * @param businessProcess the businessProcess value to set. + * @return the TrackingProfileDefinition object itself. + */ + public TrackingProfileDefinition withBusinessProcess(BusinessProcessReference businessProcess) { + this.businessProcess = businessProcess; + return this; + } + + /** + * Get the trackingDefinitions property: The tracking definitions. + * + * @return the trackingDefinitions value. + */ + public Map trackingDefinitions() { + return this.trackingDefinitions; + } + + /** + * Set the trackingDefinitions property: The tracking definitions. + * + * @param trackingDefinitions the trackingDefinitions value to set. + * @return the TrackingProfileDefinition object itself. + */ + public TrackingProfileDefinition withTrackingDefinitions(Map trackingDefinitions) { + this.trackingDefinitions = trackingDefinitions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (businessProcess() != null) { + businessProcess().validate(); + } + if (trackingDefinitions() != null) { + trackingDefinitions() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/package-info.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/package-info.java new file mode 100644 index 000000000000..4c7a5ea44f70 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/models/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for MicrosoftIntegrationSpaces. The azure integration spaces resource provider. + */ +package com.azure.resourcemanager.azureintegrationspaces.models; diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/package-info.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/package-info.java new file mode 100644 index 000000000000..55fdb50dd822 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/com/azure/resourcemanager/azureintegrationspaces/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the classes for MicrosoftIntegrationSpaces. The azure integration spaces resource provider. */ +package com.azure.resourcemanager.azureintegrationspaces; diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/module-info.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/module-info.java new file mode 100644 index 000000000000..044d555b9927 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/java/module-info.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.resourcemanager.azureintegrationspaces { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.azureintegrationspaces; + exports com.azure.resourcemanager.azureintegrationspaces.fluent; + exports com.azure.resourcemanager.azureintegrationspaces.fluent.models; + exports com.azure.resourcemanager.azureintegrationspaces.models; + + opens com.azure.resourcemanager.azureintegrationspaces.fluent.models to + com.azure.core, + com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.azureintegrationspaces.models to + com.azure.core, + com.fasterxml.jackson.databind; +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azureintegrationspaces/proxy-config.json b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azureintegrationspaces/proxy-config.json new file mode 100644 index 000000000000..15b7d8e4bafd --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azureintegrationspaces/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.azureintegrationspaces.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.azureintegrationspaces.implementation.SpacesClientImpl$SpacesService" ], [ "com.azure.resourcemanager.azureintegrationspaces.implementation.ApplicationsClientImpl$ApplicationsService" ], [ "com.azure.resourcemanager.azureintegrationspaces.implementation.BusinessProcessesClientImpl$BusinessProcessesService" ], [ "com.azure.resourcemanager.azureintegrationspaces.implementation.BusinessProcessVersionsClientImpl$BusinessProcessVersionsService" ], [ "com.azure.resourcemanager.azureintegrationspaces.implementation.ApplicationResourcesClientImpl$ApplicationResourcesService" ], [ "com.azure.resourcemanager.azureintegrationspaces.implementation.InfrastructureResourcesClientImpl$InfrastructureResourcesService" ] ] \ No newline at end of file diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azureintegrationspaces/reflect-config.json b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azureintegrationspaces/reflect-config.json new file mode 100644 index 000000000000..eebf66930476 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azureintegrationspaces/reflect-config.json @@ -0,0 +1,236 @@ +[ { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.SpaceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.SpaceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.SpaceResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.SpaceUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.SpaceUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.ApplicationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.TrackingDataStore", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.ApplicationUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessVersionListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.BusinessProcessVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.GetOrDeleteBusinessProcessDevelopmentArtifactRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.SaveOrGetBusinessProcessDevelopmentArtifactResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessDevelopmentArtifactProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.TrackingProfileDefinition", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessReference", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.FlowTrackingDefinition", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.TrackingCorrelationContext", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.TrackingEventDefinition", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.ListBusinessProcessDevelopmentArtifactsResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.ApplicationResourceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.ApplicationResourceUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.ApplicationResourceUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.SaveOrValidateBusinessProcessDevelopmentArtifactRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.InfrastructureResourceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.InfrastructureResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.InfrastructureResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.InfrastructureResourceUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.fluent.models.InfrastructureResourceUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.Origin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.ActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azureintegrationspaces.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesCreateOrUpdateSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e481cc0ae518 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesCreateOrUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for ApplicationResources CreateOrUpdate. */ +public final class ApplicationResourcesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/ApplicationResources_CreateOrUpdate.json + */ + /** + * Sample code: CreateOrUpdateApplicationResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void createOrUpdateApplicationResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applicationResources() + .define("Resource1") + .withExistingApplication("testrg", "Space1", "Application1") + .withResourceType("Microsoft.Web/sites") + .withResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Web/sites/LogicApp1") + .withResourceKind("LogicApp") + .create(); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesDeleteSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesDeleteSamples.java new file mode 100644 index 000000000000..ba6dac22ebe2 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for ApplicationResources Delete. */ +public final class ApplicationResourcesDeleteSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/ApplicationResources_Delete.json + */ + /** + * Sample code: DeleteApplicationResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void deleteApplicationResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applicationResources() + .deleteWithResponse("testrg", "Space1", "Application1", "Resource1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesGetSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesGetSamples.java new file mode 100644 index 000000000000..ba209307fa2e --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for ApplicationResources Get. */ +public final class ApplicationResourcesGetSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/ApplicationResources_Get.json + */ + /** + * Sample code: GetApplicationResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getApplicationResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applicationResources() + .getWithResponse("testrg", "Space1", "Application1", "Resource1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesListByApplicationSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesListByApplicationSamples.java new file mode 100644 index 000000000000..d90d010a96f3 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesListByApplicationSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for ApplicationResources ListByApplication. */ +public final class ApplicationResourcesListByApplicationSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/ApplicationResources_ListByApplication.json + */ + /** + * Sample code: ListApplicationResourceByApplication. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listApplicationResourceByApplication( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applicationResources() + .listByApplication( + "testrg", + "Space1", + "Application1", + null, + null, + null, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesPatchSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesPatchSamples.java new file mode 100644 index 000000000000..633656a4360a --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationResourcesPatchSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +import com.azure.resourcemanager.azureintegrationspaces.models.ApplicationResource; + +/** Samples for ApplicationResources Patch. */ +public final class ApplicationResourcesPatchSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/ApplicationResources_Patch.json + */ + /** + * Sample code: PatchApplicationResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void patchApplicationResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + ApplicationResource resource = + manager + .applicationResources() + .getWithResponse("testrg", "Space1", "Application1", "Resource1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withResourceType("Microsoft.Web/sites") + .withResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Web/sites/LogicApp1") + .withResourceKind("LogicApp") + .apply(); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsCreateOrUpdateSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..4e3f71d03125 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsCreateOrUpdateSamples.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingDataStore; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Applications CreateOrUpdate. */ +public final class ApplicationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_CreateOrUpdate.json + */ + /** + * Sample code: CreateOrUpdateApplication. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void createOrUpdateApplication( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .define("Application1") + .withRegion("CentralUS") + .withExistingSpace("testrg", "Space1") + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withDescription("This is the user provided description of the application.") + .withTrackingDataStores( + mapOf( + "dataStoreName1", + new TrackingDataStore() + .withDatabaseName("testDatabase1") + .withDataStoreResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1") + .withDataStoreUri("https://someClusterName.someRegionName.kusto.windows.net") + .withDataStoreIngestionUri("https://ingest-someClusterName.someRegionName.kusto.windows.net"), + "dataStoreName2", + new TrackingDataStore() + .withDatabaseName("testDatabase1") + .withDataStoreResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1") + .withDataStoreUri("https://someClusterName.someRegionName.kusto.windows.net") + .withDataStoreIngestionUri("https://ingest-someClusterName.someRegionName.kusto.windows.net"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsDeleteBusinessProcessDevelopmentArtifactSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsDeleteBusinessProcessDevelopmentArtifactSamples.java new file mode 100644 index 000000000000..871246eb3d65 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsDeleteBusinessProcessDevelopmentArtifactSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +import com.azure.resourcemanager.azureintegrationspaces.models.GetOrDeleteBusinessProcessDevelopmentArtifactRequest; + +/** Samples for Applications DeleteBusinessProcessDevelopmentArtifact. */ +public final class ApplicationsDeleteBusinessProcessDevelopmentArtifactSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_DeleteBusinessProcessDevelopmentArtifact.json + */ + /** + * Sample code: DeleteBusinessProcessDevelopmentArtifact. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void deleteBusinessProcessDevelopmentArtifact( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .deleteBusinessProcessDevelopmentArtifactWithResponse( + "testrg", + "Space1", + "Application1", + new GetOrDeleteBusinessProcessDevelopmentArtifactRequest().withName("BusinessProcess1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsDeleteSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsDeleteSamples.java new file mode 100644 index 000000000000..f0fc6df67e74 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsDeleteSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for Applications Delete. */ +public final class ApplicationsDeleteSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_Delete.json + */ + /** + * Sample code: DeleteApplication. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void deleteApplication( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager.applications().deleteWithResponse("testrg", "Space1", "Application1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsGetBusinessProcessDevelopmentArtifactSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsGetBusinessProcessDevelopmentArtifactSamples.java new file mode 100644 index 000000000000..ab832847121a --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsGetBusinessProcessDevelopmentArtifactSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +import com.azure.resourcemanager.azureintegrationspaces.models.GetOrDeleteBusinessProcessDevelopmentArtifactRequest; + +/** Samples for Applications GetBusinessProcessDevelopmentArtifact. */ +public final class ApplicationsGetBusinessProcessDevelopmentArtifactSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_GetBusinessProcessDevelopmentArtifact.json + */ + /** + * Sample code: GetBusinessProcessDevelopmentArtifact. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getBusinessProcessDevelopmentArtifact( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .getBusinessProcessDevelopmentArtifactWithResponse( + "testrg", + "Space1", + "Application1", + new GetOrDeleteBusinessProcessDevelopmentArtifactRequest().withName("BusinessProcess1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsGetSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsGetSamples.java new file mode 100644 index 000000000000..eb5d8ce3d980 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsGetSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for Applications Get. */ +public final class ApplicationsGetSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_Get.json + */ + /** + * Sample code: GetApplication. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getApplication( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager.applications().getWithResponse("testrg", "Space1", "Application1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsListBusinessProcessDevelopmentArtifactsSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsListBusinessProcessDevelopmentArtifactsSamples.java new file mode 100644 index 000000000000..2d53441b7176 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsListBusinessProcessDevelopmentArtifactsSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for Applications ListBusinessProcessDevelopmentArtifacts. */ +public final class ApplicationsListBusinessProcessDevelopmentArtifactsSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_ListBusinessProcessDevelopmentArtifacts.json + */ + /** + * Sample code: ListBusinessProcessDevelopmentArtifacts. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listBusinessProcessDevelopmentArtifacts( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .listBusinessProcessDevelopmentArtifactsWithResponse( + "testrg", "Space1", "Application1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsListBySpaceSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsListBySpaceSamples.java new file mode 100644 index 000000000000..33f51e450be5 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsListBySpaceSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for Applications ListBySpace. */ +public final class ApplicationsListBySpaceSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_ListBySpace.json + */ + /** + * Sample code: ListApplicationsBySpace. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listApplicationsBySpace( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .listBySpace( + "testrg", "Space1", null, null, null, null, null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsPatchSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsPatchSamples.java new file mode 100644 index 000000000000..3368739e3de6 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsPatchSamples.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +import com.azure.resourcemanager.azureintegrationspaces.models.Application; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Applications Patch. */ +public final class ApplicationsPatchSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_Patch.json + */ + /** + * Sample code: PatchApplication. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void patchApplication( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + Application resource = + manager + .applications() + .getWithResponse("testrg", "Space1", "Application1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withDescription("This is the user provided PATCHED description of the application.") + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsSaveBusinessProcessDevelopmentArtifactSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsSaveBusinessProcessDevelopmentArtifactSamples.java new file mode 100644 index 000000000000..dade9d8f040a --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsSaveBusinessProcessDevelopmentArtifactSamples.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessDevelopmentArtifactProperties; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessReference; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage; +import com.azure.resourcemanager.azureintegrationspaces.models.FlowTrackingDefinition; +import com.azure.resourcemanager.azureintegrationspaces.models.SaveOrValidateBusinessProcessDevelopmentArtifactRequest; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingCorrelationContext; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingEventDefinition; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingProfileDefinition; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Applications SaveBusinessProcessDevelopmentArtifact. */ +public final class ApplicationsSaveBusinessProcessDevelopmentArtifactSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_SaveBusinessProcessDevelopmentArtifact.json + */ + /** + * Sample code: SaveBusinessProcessDevelopmentArtifact. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void saveBusinessProcessDevelopmentArtifact( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .saveBusinessProcessDevelopmentArtifactWithResponse( + "testrg", + "Space1", + "Application1", + new SaveOrValidateBusinessProcessDevelopmentArtifactRequest() + .withName("BusinessProcess1") + .withProperties( + new BusinessProcessDevelopmentArtifactProperties() + .withDescription("First Business Process") + .withIdentifier( + new BusinessProcessIdentifier() + .withPropertyName("businessIdentifier-1") + .withPropertyType("String")) + .withBusinessProcessStages( + mapOf( + "Completed", + new BusinessProcessStage() + .withDescription("Completed") + .withStagesBefore(Arrays.asList("Shipped")), + "Denied", + new BusinessProcessStage() + .withDescription("Denied") + .withStagesBefore(Arrays.asList("Processing")), + "Processing", + new BusinessProcessStage() + .withDescription("Processing") + .withProperties( + mapOf( + "ApprovalState", + "String", + "ApproverName", + "String", + "POAmount", + "Integer")) + .withStagesBefore(Arrays.asList("Received")), + "Received", + new BusinessProcessStage() + .withDescription("received") + .withProperties( + mapOf( + "City", + "String", + "Product", + "String", + "Quantity", + "Integer", + "State", + "String")), + "Shipped", + new BusinessProcessStage() + .withDescription("Shipped") + .withProperties(mapOf("ShipPriority", "Integer", "TrackingID", "Integer")) + .withStagesBefore(Arrays.asList("Denied")))) + .withBusinessProcessMapping( + mapOf( + "Completed", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("CompletedPO") + .withOperationType("Action"), + "Denied", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("DeniedPO") + .withOperationType("Action"), + "Processing", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("PurchaseOrder") + .withOperationName("ApprovedPO") + .withOperationType("Action"), + "Received", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("PurchaseOrder") + .withOperationName("manual") + .withOperationType("Trigger"), + "Shipped", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("ShippedPO") + .withOperationType("Action"))) + .withTrackingProfiles( + mapOf( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + new TrackingProfileDefinition() + .withSchema( + "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#") + .withBusinessProcess( + new BusinessProcessReference() + .withName("businessProcess1") + .withVersion("d52c9c91-6e10-4a90-9c1f-08ee5d01c656")) + .withTrackingDefinitions( + mapOf( + "Fulfillment", + new FlowTrackingDefinition() + .withCorrelationContext( + new TrackingCorrelationContext() + .withOperationType("Trigger") + .withOperationName("manual") + .withPropertyName("OrderNumber") + .withValue("@trigger().outputs.body.OrderNumber")) + .withEvents( + mapOf( + "Completed", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("CompletedPO") + .withProperties(mapOf()), + "Denied", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("DeniedPO") + .withProperties(mapOf()), + "Shipped", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("ShippedPO") + .withProperties( + mapOf( + "ShipPriority", + "@action().inputs.shipPriority", + "TrackingID", + "@action().inputs.trackingID")))), + "PurchaseOrder", + new FlowTrackingDefinition() + .withCorrelationContext( + new TrackingCorrelationContext() + .withOperationType("Trigger") + .withOperationName("manual") + .withPropertyName("OrderNumber") + .withValue("@trigger().outputs.body.OrderNumber")) + .withEvents( + mapOf( + "Processing", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("ApprovedPO") + .withProperties( + mapOf( + "ApprovalStatus", + "@action().inputs.ApprovalStatus", + "ApproverName", + "@action().inputs.ApproverName", + "POAmount", + "@action().inputs.POamount")), + "Received", + new TrackingEventDefinition() + .withOperationType("Trigger") + .withOperationName("manual") + .withProperties( + mapOf( + "City", + "@trigger().outputs.body.Address.City", + "Product", + "@trigger().outputs.body.Product", + "Quantity", + "@trigger().outputs.body.Quantity", + "State", + "@trigger().outputs.body.Address.State"))))))))), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsValidateBusinessProcessDevelopmentArtifactSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsValidateBusinessProcessDevelopmentArtifactSamples.java new file mode 100644 index 000000000000..5bd427533376 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/ApplicationsValidateBusinessProcessDevelopmentArtifactSamples.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessDevelopmentArtifactProperties; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessReference; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage; +import com.azure.resourcemanager.azureintegrationspaces.models.FlowTrackingDefinition; +import com.azure.resourcemanager.azureintegrationspaces.models.SaveOrValidateBusinessProcessDevelopmentArtifactRequest; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingCorrelationContext; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingEventDefinition; +import com.azure.resourcemanager.azureintegrationspaces.models.TrackingProfileDefinition; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Applications ValidateBusinessProcessDevelopmentArtifact. */ +public final class ApplicationsValidateBusinessProcessDevelopmentArtifactSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Applications_ValidateBusinessProcessDevelopmentArtifact.json + */ + /** + * Sample code: ValidateBusinessProcessDevelopmentArtifact. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void validateBusinessProcessDevelopmentArtifact( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .applications() + .validateBusinessProcessDevelopmentArtifactWithResponse( + "testrg", + "Space1", + "Application1", + new SaveOrValidateBusinessProcessDevelopmentArtifactRequest() + .withName("BusinessProcess1") + .withProperties( + new BusinessProcessDevelopmentArtifactProperties() + .withDescription("First Business Process") + .withIdentifier( + new BusinessProcessIdentifier() + .withPropertyName("businessIdentifier-1") + .withPropertyType("String")) + .withBusinessProcessStages( + mapOf( + "Completed", + new BusinessProcessStage() + .withDescription("Completed") + .withStagesBefore(Arrays.asList("Shipped")), + "Denied", + new BusinessProcessStage() + .withDescription("Denied") + .withStagesBefore(Arrays.asList("Processing")), + "Processing", + new BusinessProcessStage() + .withDescription("Processing") + .withProperties( + mapOf( + "ApprovalState", + "String", + "ApproverName", + "String", + "POAmount", + "Integer")) + .withStagesBefore(Arrays.asList("Received")), + "Received@", + new BusinessProcessStage() + .withDescription("received") + .withProperties( + mapOf( + "City", + "String", + "Product", + "String", + "Quantity", + "Integer", + "State", + "String")), + "Shipped", + new BusinessProcessStage() + .withDescription("Shipped") + .withProperties(mapOf("ShipPriority", "Integer", "TrackingID", "Integer")) + .withStagesBefore(Arrays.asList("Denied")))) + .withBusinessProcessMapping( + mapOf( + "Completed", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("CompletedPO") + .withOperationType("Action"), + "Denied", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("DeniedPO") + .withOperationType("Action"), + "Processing", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("PurchaseOrder") + .withOperationName("ApprovedPO") + .withOperationType("Action"), + "Received", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("PurchaseOrder") + .withOperationName("manual") + .withOperationType("Trigger"), + "Shipped", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("ShippedPO") + .withOperationType("Action"))) + .withTrackingProfiles( + mapOf( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + new TrackingProfileDefinition() + .withSchema( + "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#") + .withBusinessProcess( + new BusinessProcessReference() + .withName("businessProcess1") + .withVersion("d52c9c91-6e10-4a90-9c1f-08ee5d01c656")) + .withTrackingDefinitions( + mapOf( + "Fulfillment", + new FlowTrackingDefinition() + .withCorrelationContext( + new TrackingCorrelationContext() + .withOperationType("Trigger") + .withOperationName("manual") + .withPropertyName("OrderNumber") + .withValue("@trigger().outputs.body.OrderNumber")) + .withEvents( + mapOf( + "Completed", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("CompletedPO") + .withProperties(mapOf()), + "Denied", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("DeniedPO") + .withProperties(mapOf()), + "Shipped", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("ShippedPO") + .withProperties( + mapOf( + "ShipPriority", + "@action().inputs.shipPriority", + "TrackingID", + "@action().inputs.trackingID")))), + "PurchaseOrder", + new FlowTrackingDefinition() + .withCorrelationContext( + new TrackingCorrelationContext() + .withOperationType("Trigger") + .withOperationName("manual") + .withPropertyName("OrderNumber") + .withValue("@trigger().outputs.body.OrderNumber")) + .withEvents( + mapOf( + "Processing", + new TrackingEventDefinition() + .withOperationType("Action") + .withOperationName("ApprovedPO") + .withProperties( + mapOf( + "ApprovalStatus", + "@action().inputs.ApprovalStatus", + "ApproverName", + "@action().inputs.ApproverName", + "POAmount", + "@action().inputs.POamount")), + "Received", + new TrackingEventDefinition() + .withOperationType("Trigger") + .withOperationName("manual") + .withProperties( + mapOf( + "City", + "@trigger().outputs.body.Address.City", + "Product", + "@trigger().outputs.body.Product", + "Quantity", + "@trigger().outputs.body.Quantity", + "State", + "@trigger().outputs.body.Address.State"))))))))), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessVersionsGetSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessVersionsGetSamples.java new file mode 100644 index 000000000000..e3fcf7fc9e68 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessVersionsGetSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for BusinessProcessVersions Get. */ +public final class BusinessProcessVersionsGetSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcessVersions_Get.json + */ + /** + * Sample code: GetBusinessProcessVersion. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getBusinessProcessVersion( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .businessProcessVersions() + .getWithResponse( + "testrg", + "Space1", + "Application1", + "BusinessProcess1", + "08585074782265427079", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessVersionsListByBusinessProcessSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessVersionsListByBusinessProcessSamples.java new file mode 100644 index 000000000000..12aaeb8b80cf --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessVersionsListByBusinessProcessSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for BusinessProcessVersions ListByBusinessProcess. */ +public final class BusinessProcessVersionsListByBusinessProcessSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcessVersions_ListByBusinessProcess.json + */ + /** + * Sample code: ListBusinessProcessVersionsByBusinessProcess. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listBusinessProcessVersionsByBusinessProcess( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .businessProcessVersions() + .listByBusinessProcess( + "testrg", + "Space1", + "Application1", + "BusinessProcess1", + null, + null, + null, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesCreateOrUpdateSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..ab5c38f45202 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesCreateOrUpdateSamples.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessIdentifier; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessMappingItem; +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcessStage; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for BusinessProcesses CreateOrUpdate. */ +public final class BusinessProcessesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcesses_CreateOrUpdate.json + */ + /** + * Sample code: CreateOrUpdateBusinessProcess. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void createOrUpdateBusinessProcess( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .businessProcesses() + .define("BusinessProcess1") + .withExistingApplication("testrg", "Space1", "Application1") + .withDescription("First Business Process") + .withTableName("table1") + .withTrackingDataStoreReferenceName("trackingDataStoreReferenceName1") + .withIdentifier( + new BusinessProcessIdentifier().withPropertyName("businessIdentifier-1").withPropertyType("String")) + .withBusinessProcessStages( + mapOf( + "Completed", + new BusinessProcessStage().withDescription("Completed").withStagesBefore(Arrays.asList("Shipped")), + "Denied", + new BusinessProcessStage().withDescription("Denied").withStagesBefore(Arrays.asList("Processing")), + "Processing", + new BusinessProcessStage() + .withDescription("Processing") + .withProperties( + mapOf("ApprovalState", "String", "ApproverName", "String", "POAmount", "Integer")) + .withStagesBefore(Arrays.asList("Received")), + "Received", + new BusinessProcessStage() + .withDescription("received") + .withProperties( + mapOf("City", "String", "Product", "String", "Quantity", "Integer", "State", "String")), + "Shipped", + new BusinessProcessStage() + .withDescription("Shipped") + .withProperties(mapOf("ShipPriority", "Integer", "TrackingID", "Integer")) + .withStagesBefore(Arrays.asList("Denied")))) + .withBusinessProcessMapping( + mapOf( + "Completed", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("CompletedPO") + .withOperationType("Action"), + "Denied", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("DeniedPO") + .withOperationType("Action"), + "Processing", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("PurchaseOrder") + .withOperationName("ApprovedPO") + .withOperationType("Action"), + "Received", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("PurchaseOrder") + .withOperationName("manual") + .withOperationType("Trigger"), + "Shipped", + new BusinessProcessMappingItem() + .withLogicAppResourceId( + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1") + .withWorkflowName("Fulfillment") + .withOperationName("ShippedPO") + .withOperationType("Action"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesDeleteSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesDeleteSamples.java new file mode 100644 index 000000000000..d5dffe851682 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for BusinessProcesses Delete. */ +public final class BusinessProcessesDeleteSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcesses_Delete.json + */ + /** + * Sample code: DeleteBusinessProcess. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void deleteBusinessProcess( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .businessProcesses() + .deleteWithResponse( + "testrg", "Space1", "Application1", "BusinessProcess1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesGetSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesGetSamples.java new file mode 100644 index 000000000000..5408a99d3ea0 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for BusinessProcesses Get. */ +public final class BusinessProcessesGetSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcesses_Get.json + */ + /** + * Sample code: GetBusinessProcess. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getBusinessProcess( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .businessProcesses() + .getWithResponse("testrg", "Space1", "Application1", "BusinessProcess1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesListByApplicationSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesListByApplicationSamples.java new file mode 100644 index 000000000000..bf7054506c66 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesListByApplicationSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for BusinessProcesses ListByApplication. */ +public final class BusinessProcessesListByApplicationSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcesses_ListByApplication.json + */ + /** + * Sample code: ListBusinessProcessesByApplication. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listBusinessProcessesByApplication( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .businessProcesses() + .listByApplication( + "testrg", + "Space1", + "Application1", + null, + null, + null, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesPatchSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesPatchSamples.java new file mode 100644 index 000000000000..d683082590fb --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/BusinessProcessesPatchSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +import com.azure.resourcemanager.azureintegrationspaces.models.BusinessProcess; + +/** Samples for BusinessProcesses Patch. */ +public final class BusinessProcessesPatchSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/BusinessProcesses_Patch.json + */ + /** + * Sample code: PatchBusinessProcess. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void patchBusinessProcess( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + BusinessProcess resource = + manager + .businessProcesses() + .getWithResponse( + "testrg", "Space1", "Application1", "BusinessProcess1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withDescription("First updated business process.").apply(); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesCreateOrUpdateSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..faa6a22fb94f --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesCreateOrUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for InfrastructureResources CreateOrUpdate. */ +public final class InfrastructureResourcesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/InfrastructureResources_CreateOrUpdate.json + */ + /** + * Sample code: CreateOrUpdateInfrastructureResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void createOrUpdateInfrastructureResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .infrastructureResources() + .define("InfrastructureResource1") + .withExistingSpace("testrg", "Space1") + .withResourceType("Microsoft.ApiManagement/service") + .withResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1") + .create(); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesDeleteSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesDeleteSamples.java new file mode 100644 index 000000000000..9c45b37b004c --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for InfrastructureResources Delete. */ +public final class InfrastructureResourcesDeleteSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/InfrastructureResources_Delete.json + */ + /** + * Sample code: DeleteInfrastructureResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void deleteInfrastructureResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .infrastructureResources() + .deleteWithResponse("testrg", "Space1", "InfrastructureResource1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesGetSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesGetSamples.java new file mode 100644 index 000000000000..f8f7e8596617 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for InfrastructureResources Get. */ +public final class InfrastructureResourcesGetSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/InfrastructureResources_Get.json + */ + /** + * Sample code: GetInfrastructureResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getInfrastructureResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .infrastructureResources() + .getWithResponse("testrg", "Space1", "InfrastructureResource1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesListBySpaceSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesListBySpaceSamples.java new file mode 100644 index 000000000000..a736f5dc687e --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesListBySpaceSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for InfrastructureResources ListBySpace. */ +public final class InfrastructureResourcesListBySpaceSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/InfrastructureResources_ListBySpace.json + */ + /** + * Sample code: ListInfrastructureResourcesBySpace. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listInfrastructureResourcesBySpace( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .infrastructureResources() + .listBySpace( + "testrg", "Space1", null, null, null, null, null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesPatchSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesPatchSamples.java new file mode 100644 index 000000000000..4b986aba163f --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/InfrastructureResourcesPatchSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +import com.azure.resourcemanager.azureintegrationspaces.models.InfrastructureResource; + +/** Samples for InfrastructureResources Patch. */ +public final class InfrastructureResourcesPatchSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/InfrastructureResources_Patch.json + */ + /** + * Sample code: PatchInfrastructureResource. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void patchInfrastructureResource( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + InfrastructureResource resource = + manager + .infrastructureResources() + .getWithResponse("testrg", "Space1", "InfrastructureResource1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withResourceType("Microsoft.ApiManagement/service") + .withResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1") + .apply(); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/OperationsListSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/OperationsListSamples.java new file mode 100644 index 000000000000..13378f27d964 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/OperationsListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Operations_List.json + */ + /** + * Sample code: Operations_List. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void operationsList( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesCreateOrUpdateSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..406531a96542 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesCreateOrUpdateSamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +import java.util.HashMap; +import java.util.Map; + +/** Samples for Spaces CreateOrUpdate. */ +public final class SpacesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Spaces_CreateOrUpdate.json + */ + /** + * Sample code: CreateOrUpdateSpace. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void createOrUpdateSpace( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .spaces() + .define("Space1") + .withRegion("CentralUS") + .withExistingResourceGroup("testrg") + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withDescription("This is the user provided description of the space resource.") + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesDeleteSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesDeleteSamples.java new file mode 100644 index 000000000000..f675e56cd793 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesDeleteSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for Spaces Delete. */ +public final class SpacesDeleteSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Spaces_Delete.json + */ + /** + * Sample code: DeleteSpace. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void deleteSpace( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager.spaces().deleteByResourceGroupWithResponse("testrg", "Space1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesGetByResourceGroupSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..ca1e66b52cd5 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesGetByResourceGroupSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for Spaces GetByResourceGroup. */ +public final class SpacesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Spaces_Get.json + */ + /** + * Sample code: GetSpace. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void getSpace( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager.spaces().getByResourceGroupWithResponse("testrg", "Space1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesListByResourceGroupSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesListByResourceGroupSamples.java new file mode 100644 index 000000000000..fb084432d7a1 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for Spaces ListByResourceGroup. */ +public final class SpacesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Spaces_ListByResourceGroup.json + */ + /** + * Sample code: ListSpacesByResourceGroup. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listSpacesByResourceGroup( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager + .spaces() + .listByResourceGroup("testrg", null, null, null, null, null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesListSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesListSamples.java new file mode 100644 index 000000000000..839e3adb71a2 --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +/** Samples for Spaces List. */ +public final class SpacesListSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Spaces_ListBySubscription.json + */ + /** + * Sample code: ListSpacesBySubscription. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void listSpacesBySubscription( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + manager.spaces().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesPatchSamples.java b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesPatchSamples.java new file mode 100644 index 000000000000..1f8f3965674a --- /dev/null +++ b/sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/src/samples/java/com/azure/resourcemanager/azureintegrationspaces/generated/SpacesPatchSamples.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azureintegrationspaces.generated; + +import com.azure.resourcemanager.azureintegrationspaces.models.Space; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Spaces Patch. */ +public final class SpacesPatchSamples { + /* + * x-ms-original-file: specification/azureintegrationspaces/resource-manager/Microsoft.IntegrationSpaces/preview/2023-11-14-preview/examples/Spaces_Patch.json + */ + /** + * Sample code: PatchSpace. + * + * @param manager Entry point to AzureintegrationspacesManager. + */ + public static void patchSpace( + com.azure.resourcemanager.azureintegrationspaces.AzureintegrationspacesManager manager) { + Space resource = + manager + .spaces() + .getByResourceGroupWithResponse("testrg", "Space1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withDescription("This is the user provided description of the space resource.") + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/azureintegrationspaces/ci.yml b/sdk/azureintegrationspaces/ci.yml new file mode 100644 index 000000000000..5c7ac0b217b6 --- /dev/null +++ b/sdk/azureintegrationspaces/ci.yml @@ -0,0 +1,47 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/azureintegrationspaces/ci.yml + - sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/ + exclude: + - sdk/azureintegrationspaces/pom.xml + - sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/azureintegrationspaces/ci.yml + - sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/ + exclude: + - sdk/azureintegrationspaces/pom.xml + - sdk/azureintegrationspaces/azure-resourcemanager-azureintegrationspaces/pom.xml + +parameters: + - name: release_azureresourcemanagerazureintegrationspaces + displayName: azure-resourcemanager-azureintegrationspaces + type: boolean + default: false + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: azureintegrationspaces + EnableBatchRelease: true + Artifacts: + - name: azure-resourcemanager-azureintegrationspaces + groupId: com.azure.resourcemanager + safeName: azureresourcemanagerazureintegrationspaces + releaseInBatch: ${{ parameters.release_azureresourcemanagerazureintegrationspaces }} diff --git a/sdk/azureintegrationspaces/pom.xml b/sdk/azureintegrationspaces/pom.xml new file mode 100644 index 000000000000..df27982fda29 --- /dev/null +++ b/sdk/azureintegrationspaces/pom.xml @@ -0,0 +1,15 @@ + + + 4.0.0 + com.azure + azure-azureintegrationspaces-service + pom + 1.0.0 + + + azure-resourcemanager-azureintegrationspaces + +