From 3f5ad698e7e062648308adee1deb4b3428aae8b5 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:08:33 -0500 Subject: [PATCH] Regenerate some libraries using latest Autorest (#42846) Regenerate some libraries using latest Autorest --- .../AzureAppConfigurationImpl.java | 4695 +++++++++-- .../models/CreateSnapshotHeaders.java | 4 +- .../implementation/models/KeyValue.java | 5 +- .../models/ConfigurationSnapshot.java | 27 +- .../swagger/README.md | 2 +- .../implementation/AttestationsImpl.java | 39 +- .../MetadataConfigurationsImpl.java | 7 +- .../implementation/PoliciesImpl.java | 43 +- .../PolicyCertificatesImpl.java | 32 +- .../SigningCertificatesImpl.java | 7 +- .../models/AttestOpenEnclaveRequest.java | 15 +- .../models/AttestSgxEnclaveRequest.java | 16 +- .../AttestationCertificateManagementBody.java | 3 + .../models/AttestationResponse.java | 3 + .../models/AttestationResult.java | 3 + .../implementation/models/CloudError.java | 3 + .../implementation/models/CloudErrorBody.java | 3 + .../implementation/models/InitTimeData.java | 6 +- .../implementation/models/JsonWebKey.java | 3 + .../implementation/models/JsonWebKeySet.java | 3 + .../PolicyCertificatesModificationResult.java | 3 + .../PolicyCertificatesModifyResponse.java | 3 + .../models/PolicyCertificatesResponse.java | 7 +- .../models/PolicyCertificatesResult.java | 3 + .../implementation/models/PolicyResponse.java | 3 + .../implementation/models/PolicyResult.java | 3 + .../implementation/models/RuntimeData.java | 3 + .../models/StoredAttestationPolicy.java | 3 + .../models/TpmAttestationRequest.java | 3 + .../models/TpmAttestationResponse.java | 3 + .../swagger/autorest.md | 30 +- .../swagger/generate.ps1 | 3 - .../implementation/AuthenticationsImpl.java | 60 +- .../AzureContainerRegistryImpl.java | 55 +- .../ContainerRegistriesImpl.java | 914 ++- .../ContainerRegistryBlobsImpl.java | 1069 ++- .../implementation/models/AcrAccessToken.java | 19 +- .../implementation/models/AcrErrorInfo.java | 29 +- .../implementation/models/AcrErrors.java | 19 +- .../models/AcrErrorsException.java | 12 +- .../implementation/models/AcrManifests.java | 31 +- .../models/AcrRefreshToken.java | 19 +- .../ArtifactManifestPropertiesInternal.java | 93 +- .../models/ArtifactTagPropertiesInternal.java | 72 +- ...tainerRegistriesCreateManifestHeaders.java | 18 +- ...ontainerRegistriesGetManifestsHeaders.java | 10 +- ...inerRegistriesGetManifestsNextHeaders.java | 10 +- ...ainerRegistriesGetRepositoriesHeaders.java | 10 +- ...rRegistriesGetRepositoriesNextHeaders.java | 10 +- .../ContainerRegistriesGetTagsHeaders.java | 10 +- ...ContainerRegistriesGetTagsNextHeaders.java | 10 +- ...erRegistryBlobsCheckBlobExistsHeaders.java | 18 +- ...rRegistryBlobsCheckChunkExistsHeaders.java | 14 +- ...nerRegistryBlobsCompleteUploadHeaders.java | 18 +- ...ntainerRegistryBlobsDeleteBlobHeaders.java | 10 +- .../ContainerRegistryBlobsGetBlobHeaders.java | 18 +- ...ContainerRegistryBlobsGetChunkHeaders.java | 14 +- ...erRegistryBlobsGetUploadStatusHeaders.java | 14 +- ...ontainerRegistryBlobsMountBlobHeaders.java | 18 +- ...tainerRegistryBlobsStartUploadHeaders.java | 18 +- ...tainerRegistryBlobsUploadChunkHeaders.java | 18 +- .../models/DeleteRepositoryResult.java | 22 +- .../implementation/models/FsLayer.java | 19 +- .../implementation/models/History.java | 19 +- .../implementation/models/ImageSignature.java | 27 +- .../implementation/models/JWK.java | 23 +- .../implementation/models/JWKHeader.java | 35 +- .../implementation/models/Manifest.java | 19 +- .../models/ManifestAttributesBase.java | 84 +- .../models/ManifestAttributesManifest.java | 19 +- .../implementation/models/ManifestList.java | 27 +- .../models/ManifestListAttributes.java | 35 +- .../models/ManifestWrapper.java | 63 +- .../models/ManifestWriteableProperties.java | 31 +- .../implementation/models/OCIIndex.java | 27 +- ...ntApplicationXWwwFormUrlencodedSchema.java | 36 +- ...ntApplicationXWwwFormUrlencodedSchema.java | 36 +- .../implementation/models/Platform.java | 39 +- .../models/PostContentSchemaGrantType.java | 22 +- .../implementation/models/Repositories.java | 23 +- .../implementation/models/RepositoryTags.java | 23 +- .../models/RepositoryWriteableProperties.java | 31 +- .../models/TagAttributesBase.java | 64 +- .../models/TagAttributesTag.java | 19 +- .../implementation/models/TagList.java | 31 +- .../models/TagWriteableProperties.java | 31 +- .../implementation/models/TokenGrantType.java | 22 +- .../implementation/models/V1Manifest.java | 43 +- .../implementation/models/V2Manifest.java | 31 +- .../implementation/models/package-info.java | 4 +- .../implementation/package-info.java | 4 +- .../models/ArtifactArchitecture.java | 62 +- .../models/ArtifactManifestOrder.java | 22 +- .../models/ArtifactManifestPlatform.java | 25 +- .../models/ArtifactOperatingSystem.java | 66 +- .../models/ArtifactTagOrder.java | 22 +- .../models/ContainerRepositoryProperties.java | 61 +- .../models/OciAnnotations.java | 81 +- .../models/OciDescriptor.java | 35 +- .../models/OciImageManifest.java | 31 +- .../models/package-info.java | 4 +- .../swagger/autorest.md | 44 +- .../azure-iot-deviceupdate/swagger/README.md | 22 +- .../DeviceManagementAsyncClient.java | 1763 ++++ .../deviceupdate/DeviceManagementClient.java | 1757 ++++ .../DeviceManagementClientBuilder.java | 352 + .../deviceupdate/DeviceUpdateAsyncClient.java | 606 ++ .../iot/deviceupdate/DeviceUpdateClient.java | 603 ++ .../DeviceUpdateClientBuilder.java | 352 + .../DeviceUpdateServiceVersion.java | 40 + .../implementation/DeviceManagementsImpl.java | 7189 +++++++++++++++++ .../DeviceUpdateClientImpl.java | 161 + .../implementation/DeviceUpdatesImpl.java | 2925 +++++++ .../implementation/package-info.java | 13 + .../azure/iot/deviceupdate/package-info.java | 13 + .../swagger/src/main/java/module-info.java | 9 + .../azure-iot-deviceupdate.properties | 2 + ...viceManagementCancelOrRetryDeployment.java | 27 + ...iceManagementCreateOrUpdateDeployment.java | 29 + .../DeviceManagementDeleteDeployment.java | 26 + ...eleteDeploymentForDeviceClassSubgroup.java | 26 + .../DeviceManagementDeleteDeviceClass.java | 25 + ...ceManagementDeleteDeviceClassSubgroup.java | 26 + .../DeviceManagementDeleteGroup.java | 25 + .../DeviceManagementGetDeployment.java | 27 + ...ntGetDeploymentForDeviceClassSubgroup.java | 27 + .../DeviceManagementGetDeploymentStatus.java | 27 + .../generated/DeviceManagementGetDevice.java | 26 + .../DeviceManagementGetDeviceClass.java | 27 + ...etDeviceClassSubgroupDeploymentStatus.java | 27 + ...etDeviceClassSubgroupUpdateCompliance.java | 27 + .../generated/DeviceManagementGetGroup.java | 26 + ...iceManagementGetGroupUpdateCompliance.java | 27 + .../DeviceManagementGetLogCollection.java | 27 + ...agementGetLogCollectionDetailedStatus.java | 27 + .../DeviceManagementGetOperationStatus.java | 27 + .../DeviceManagementGetUpdateCompliance.java | 26 + ...ManagementGetUpdateComplianceForGroup.java | 27 + .../DeviceManagementImportDevices.java | 28 + ...ListBestUpdatesForDeviceClassSubgroup.java | 27 + ...viceManagementListBestUpdatesForGroup.java | 26 + ...ListDeploymentsForDeviceClassSubgroup.java | 27 + ...viceManagementListDeploymentsForGroup.java | 27 + ...ementListDeviceClassSubgroupsForGroup.java | 27 + .../DeviceManagementListDeviceClasses.java | 26 + ...tatesForDeviceClassSubgroupDeployment.java | 27 + .../DeviceManagementListDevices.java | 26 + .../generated/DeviceManagementListGroups.java | 26 + .../DeviceManagementListHealthOfDevices.java | 27 + ...tListInstallableUpdatesForDeviceClass.java | 27 + .../DeviceManagementListLogCollections.java | 26 + ...DeviceManagementListOperationStatuses.java | 26 + .../DeviceManagementStartLogCollection.java | 29 + .../DeviceManagementUpdateDeviceClass.java | 28 + .../generated/DeviceUpdateDeleteUpdate.java | 27 + .../generated/DeviceUpdateGetFile.java | 27 + .../DeviceUpdateGetOperationStatus.java | 27 + .../generated/DeviceUpdateGetUpdate.java | 27 + .../generated/DeviceUpdateImportUpdate.java | 29 + .../generated/DeviceUpdateListFiles.java | 27 + .../generated/DeviceUpdateListNames.java | 26 + .../DeviceUpdateListOperationStatuses.java | 26 + .../generated/DeviceUpdateListProviders.java | 26 + .../generated/DeviceUpdateListUpdates.java | 26 + .../generated/DeviceUpdateListVersions.java | 26 + ...anagementCancelOrRetryDeploymentTests.java | 26 + ...nagementCreateOrUpdateDeploymentTests.java | 28 + ...DeploymentForDeviceClassSubgroupTests.java | 22 + ...DeviceManagementDeleteDeploymentTests.java | 22 + ...agementDeleteDeviceClassSubgroupTests.java | 22 + ...eviceManagementDeleteDeviceClassTests.java | 21 + .../DeviceManagementDeleteGroupTests.java | 21 + ...DeploymentForDeviceClassSubgroupTests.java | 26 + ...iceManagementGetDeploymentStatusTests.java | 26 + .../DeviceManagementGetDeploymentTests.java | 26 + ...iceClassSubgroupDeploymentStatusTests.java | 26 + ...iceClassSubgroupUpdateComplianceTests.java | 26 + .../DeviceManagementGetDeviceClassTests.java | 26 + .../DeviceManagementGetDeviceTests.java | 25 + .../DeviceManagementGetGroupTests.java | 25 + ...nagementGetGroupUpdateComplianceTests.java | 26 + ...ntGetLogCollectionDetailedStatusTests.java | 26 + ...DeviceManagementGetLogCollectionTests.java | 26 + ...viceManagementGetOperationStatusTests.java | 26 + ...ementGetUpdateComplianceForGroupTests.java | 26 + ...iceManagementGetUpdateComplianceTests.java | 25 + .../DeviceManagementImportDevicesTests.java | 26 + ...estUpdatesForDeviceClassSubgroupTests.java | 26 + ...anagementListBestUpdatesForGroupTests.java | 25 + ...eploymentsForDeviceClassSubgroupTests.java | 26 + ...anagementListDeploymentsForGroupTests.java | 26 + ...ListDeviceClassSubgroupsForGroupTests.java | 26 + ...eviceManagementListDeviceClassesTests.java | 25 + ...ForDeviceClassSubgroupDeploymentTests.java | 27 + .../DeviceManagementListDevicesTests.java | 25 + .../DeviceManagementListGroupsTests.java | 25 + ...iceManagementListHealthOfDevicesTests.java | 26 + ...InstallableUpdatesForDeviceClassTests.java | 26 + ...viceManagementListLogCollectionsTests.java | 25 + ...eManagementListOperationStatusesTests.java | 25 + ...viceManagementStartLogCollectionTests.java | 28 + ...eviceManagementUpdateDeviceClassTests.java | 27 + .../generated/DeviceUpdateClientTestBase.java | 61 + .../DeviceUpdateDeleteUpdateTests.java | 25 + .../generated/DeviceUpdateGetFileTests.java | 26 + .../DeviceUpdateGetOperationStatusTests.java | 26 + .../generated/DeviceUpdateGetUpdateTests.java | 26 + .../DeviceUpdateImportUpdateTests.java | 27 + .../generated/DeviceUpdateListFilesTests.java | 25 + .../generated/DeviceUpdateListNamesTests.java | 24 + ...eviceUpdateListOperationStatusesTests.java | 25 + .../DeviceUpdateListProvidersTests.java | 24 + .../DeviceUpdateListUpdatesTests.java | 25 + .../DeviceUpdateListVersionsTests.java | 24 + .../AzureDigitalTwinsAPIImplBuilder.java | 16 +- .../implementation/DigitalTwinModelsImpl.java | 74 +- .../core/implementation/DigitalTwinsImpl.java | 417 +- .../core/implementation/EventRoutesImpl.java | 46 +- .../core/implementation/QueriesImpl.java | 40 +- .../models/DigitalTwinModelsListOptions.java | 3 +- .../models/DigitalTwinsModelData.java | 7 +- .../models/EventRoutesListOptions.java | 3 +- .../models/IncomingRelationship.java | 3 +- .../models/QueryTwinsOptions.java | 3 +- .../swagger/autorest.md | 2 +- .../swagger/generate.ps1 | 2 - .../EventGridPublisherClientImpl.java | 11 +- .../EventGridPublisherClientImplBuilder.java | 16 +- .../models/AcsMessageChannelEventError.java | 3 + .../models/AcsRouterCommunicationError.java | 3 + .../implementation/models/CloudEvent.java | 15 +- .../implementation/models/EventGridEvent.java | 8 +- .../AcsChatEventBaseProperties.java | 3 + .../AcsChatEventInThreadBaseProperties.java | 3 + .../AcsChatMessageDeletedEventData.java | 12 +- ...csChatMessageDeletedInThreadEventData.java | 12 +- .../AcsChatMessageEditedEventData.java | 12 +- ...AcsChatMessageEditedInThreadEventData.java | 12 +- .../AcsChatMessageEventBaseProperties.java | 8 +- ...hatMessageEventInThreadBaseProperties.java | 8 +- .../AcsChatMessageReceivedEventData.java | 8 +- ...sChatMessageReceivedInThreadEventData.java | 8 +- ...ChatParticipantAddedToThreadEventData.java | 8 +- ...icipantAddedToThreadWithUserEventData.java | 12 +- ...ParticipantRemovedFromThreadEventData.java | 14 +- ...antRemovedFromThreadWithUserEventData.java | 18 +- .../AcsChatThreadCreatedEventData.java | 8 +- ...AcsChatThreadCreatedWithUserEventData.java | 8 +- .../AcsChatThreadDeletedEventData.java | 12 +- .../AcsChatThreadEventBaseProperties.java | 8 +- ...ChatThreadEventInThreadBaseProperties.java | 8 +- .../AcsChatThreadParticipantProperties.java | 3 + ...sChatThreadPropertiesUpdatedEventData.java | 20 +- ...readPropertiesUpdatedPerUserEventData.java | 20 +- ...AcsChatThreadWithUserDeletedEventData.java | 12 +- ...sEmailDeliveryReportReceivedEventData.java | 8 +- .../AcsEmailDeliveryReportStatusDetails.java | 3 + ...gementTrackingReportReceivedEventData.java | 8 +- .../AcsIncomingCallCustomContext.java | 3 + .../AcsIncomingCallEventData.java | 3 + .../systemevents/AcsMessageButtonContent.java | 3 + .../systemevents/AcsMessageContext.java | 3 + ...MessageDeliveryStatusUpdatedEventData.java | 8 +- .../systemevents/AcsMessageEventData.java | 8 +- ...sMessageInteractiveButtonReplyContent.java | 3 + .../AcsMessageInteractiveContent.java | 3 + ...AcsMessageInteractiveListReplyContent.java | 3 + .../systemevents/AcsMessageMediaContent.java | 3 + .../AcsMessageReceivedEventData.java | 8 +- .../AcsMicrosoftTeamsAppIdentifier.java | 3 + .../AcsRecordingChunkInfoProperties.java | 3 + ...csRecordingFileStatusUpdatedEventData.java | 8 +- .../AcsRecordingStorageInfoProperties.java | 3 + .../AcsRouterChannelConfiguration.java | 3 + .../systemevents/AcsRouterEventData.java | 3 + .../AcsRouterJobCancelledEventData.java | 3 + ...outerJobClassificationFailedEventData.java | 3 + .../AcsRouterJobClassifiedEventData.java | 3 + .../AcsRouterJobClosedEventData.java | 3 + .../AcsRouterJobCompletedEventData.java | 3 + .../AcsRouterJobDeletedEventData.java | 3 + .../systemevents/AcsRouterJobEventData.java | 3 + ...sRouterJobExceptionTriggeredEventData.java | 3 + .../AcsRouterJobQueuedEventData.java | 3 + .../AcsRouterJobReceivedEventData.java | 8 +- ...AcsRouterJobSchedulingFailedEventData.java | 14 +- .../AcsRouterJobUnassignedEventData.java | 3 + ...outerJobWaitingForActivationEventData.java | 8 +- ...terJobWorkerSelectorsExpiredEventData.java | 12 +- .../systemevents/AcsRouterQueueDetails.java | 3 + .../AcsRouterWorkerDeletedEventData.java | 3 + .../AcsRouterWorkerDeregisteredEventData.java | 3 + .../AcsRouterWorkerEventData.java | 3 + ...AcsRouterWorkerOfferAcceptedEventData.java | 3 + ...AcsRouterWorkerOfferDeclinedEventData.java | 3 + .../AcsRouterWorkerOfferExpiredEventData.java | 3 + .../AcsRouterWorkerOfferIssuedEventData.java | 12 +- .../AcsRouterWorkerOfferRevokedEventData.java | 3 + .../AcsRouterWorkerRegisteredEventData.java | 3 + .../systemevents/AcsRouterWorkerSelector.java | 8 +- .../AcsRouterWorkerUpdatedEventData.java | 3 + .../AcsSmsDeliveryAttemptProperties.java | 8 +- ...AcsSmsDeliveryReportReceivedEventData.java | 8 +- .../AcsSmsEventBaseProperties.java | 3 + .../systemevents/AcsSmsReceivedEventData.java | 8 +- .../AcsUserDisconnectedEventData.java | 3 + .../ApiCenterApiDefinitionAddedEventData.java | 3 + ...piCenterApiDefinitionUpdatedEventData.java | 3 + .../ApiCenterApiSpecification.java | 3 + .../ApiManagementApiCreatedEventData.java | 3 + .../ApiManagementApiDeletedEventData.java | 3 + ...iManagementApiReleaseCreatedEventData.java | 3 + ...iManagementApiReleaseDeletedEventData.java | 3 + ...iManagementApiReleaseUpdatedEventData.java | 3 + .../ApiManagementApiUpdatedEventData.java | 3 + ...ApiManagementGatewayApiAddedEventData.java | 3 + ...iManagementGatewayApiRemovedEventData.java | 3 + ...yCertificateAuthorityCreatedEventData.java | 3 + ...yCertificateAuthorityDeletedEventData.java | 3 + ...yCertificateAuthorityUpdatedEventData.java | 3 + .../ApiManagementGatewayCreatedEventData.java | 3 + .../ApiManagementGatewayDeletedEventData.java | 3 + ...HostnameConfigurationCreatedEventData.java | 3 + ...HostnameConfigurationDeletedEventData.java | 3 + ...HostnameConfigurationUpdatedEventData.java | 3 + .../ApiManagementGatewayUpdatedEventData.java | 3 + .../ApiManagementProductCreatedEventData.java | 3 + .../ApiManagementProductDeletedEventData.java | 3 + .../ApiManagementProductUpdatedEventData.java | 3 + ...anagementSubscriptionCreatedEventData.java | 3 + ...anagementSubscriptionDeletedEventData.java | 3 + ...anagementSubscriptionUpdatedEventData.java | 3 + .../ApiManagementUserCreatedEventData.java | 3 + .../ApiManagementUserDeletedEventData.java | 3 + .../ApiManagementUserUpdatedEventData.java | 3 + ...ConfigurationKeyValueDeletedEventData.java | 3 + ...onfigurationKeyValueModifiedEventData.java | 3 + ...ConfigurationSnapshotCreatedEventData.java | 3 + .../AppConfigurationSnapshotEventData.java | 3 + ...onfigurationSnapshotModifiedEventData.java | 3 + .../systemevents/AppEventTypeDetail.java | 3 + .../AppServicePlanEventTypeDetail.java | 3 + .../AvsClusterCreatedEventData.java | 3 + .../AvsClusterDeletedEventData.java | 3 + .../systemevents/AvsClusterEventData.java | 3 + .../AvsClusterFailedEventData.java | 3 + .../AvsClusterUpdatedEventData.java | 3 + .../AvsClusterUpdatingEventData.java | 3 + .../AvsPrivateCloudEventData.java | 3 + .../AvsPrivateCloudFailedEventData.java | 3 + .../AvsPrivateCloudUpdatedEventData.java | 3 + .../AvsPrivateCloudUpdatingEventData.java | 3 + .../AvsScriptExecutionCancelledEventData.java | 3 + .../AvsScriptExecutionEventData.java | 3 + .../AvsScriptExecutionFailedEventData.java | 3 + .../AvsScriptExecutionFinishedEventData.java | 3 + .../AvsScriptExecutionStartedEventData.java | 3 + .../CommunicationIdentifierModel.java | 3 + .../CommunicationUserIdentifierModel.java | 3 + .../ContainerRegistryArtifactEventData.java | 8 +- .../ContainerRegistryArtifactEventTarget.java | 3 + ...ontainerRegistryChartDeletedEventData.java | 8 +- ...ContainerRegistryChartPushedEventData.java | 8 +- .../ContainerRegistryEventActor.java | 6 +- ...ntainerRegistryEventConnectedRegistry.java | 3 + .../ContainerRegistryEventData.java | 8 +- .../ContainerRegistryEventRequest.java | 11 +- .../ContainerRegistryEventSource.java | 3 + .../ContainerRegistryEventTarget.java | 3 + ...ontainerRegistryImageDeletedEventData.java | 8 +- ...ContainerRegistryImagePushedEventData.java | 8 +- ...erServiceClusterSupportEndedEventData.java | 3 + ...rServiceClusterSupportEndingEventData.java | 3 + ...ntainerServiceClusterSupportEventData.java | 3 + ...ewKubernetesVersionAvailableEventData.java | 3 + ...tainerServiceNodePoolRollingEventData.java | 3 + ...ServiceNodePoolRollingFailedEventData.java | 3 + ...erviceNodePoolRollingStartedEventData.java | 3 + ...viceNodePoolRollingSucceededEventData.java | 3 + .../DataBoxCopyCompletedEventData.java | 20 +- .../DataBoxCopyStartedEventData.java | 20 +- .../DataBoxOrderCompletedEventData.java | 20 +- .../DeviceConnectionStateEventInfo.java | 15 +- .../DeviceConnectionStateEventProperties.java | 11 +- .../DeviceLifeCycleEventProperties.java | 15 +- .../DeviceTelemetryEventProperties.java | 3 + .../systemevents/DeviceTwinInfo.java | 11 +- .../DeviceTwinInfoProperties.java | 3 + .../DeviceTwinInfoX509Thumbprint.java | 7 +- .../systemevents/DeviceTwinMetadata.java | 3 + .../systemevents/DeviceTwinProperties.java | 3 + ...idMqttClientCreatedOrUpdatedEventData.java | 12 +- .../EventGridMqttClientDeletedEventData.java | 3 + .../EventGridMqttClientEventData.java | 3 + ...idMqttClientSessionConnectedEventData.java | 7 +- ...qttClientSessionDisconnectedEventData.java | 7 +- .../EventHubCaptureFileCreatedEventData.java | 12 +- .../HealthcareDicomImageCreatedEventData.java | 7 +- .../HealthcareDicomImageDeletedEventData.java | 7 +- .../HealthcareDicomImageUpdatedEventData.java | 3 + ...ealthcareFhirResourceCreatedEventData.java | 3 + ...ealthcareFhirResourceDeletedEventData.java | 3 + ...ealthcareFhirResourceUpdatedEventData.java | 3 + .../IotHubDeviceConnectedEventData.java | 3 + .../IotHubDeviceCreatedEventData.java | 3 + .../IotHubDeviceDeletedEventData.java | 3 + .../IotHubDeviceDisconnectedEventData.java | 3 + .../IotHubDeviceTelemetryEventData.java | 3 + .../KeyVaultAccessPolicyChangedEventData.java | 3 + .../KeyVaultCertificateExpiredEventData.java | 3 + ...eyVaultCertificateNearExpiryEventData.java | 3 + ...CertificateNewVersionCreatedEventData.java | 3 + .../KeyVaultKeyExpiredEventData.java | 3 + .../KeyVaultKeyNearExpiryEventData.java | 3 + ...KeyVaultKeyNewVersionCreatedEventData.java | 3 + .../KeyVaultSecretExpiredEventData.java | 3 + .../KeyVaultSecretNearExpiryEventData.java | 3 + ...VaultSecretNewVersionCreatedEventData.java | 3 + ...ServicesDatasetDriftDetectedEventData.java | 12 +- ...earningServicesModelDeployedEventData.java | 3 + ...rningServicesModelRegisteredEventData.java | 3 + ...LearningServicesRunCompletedEventData.java | 3 + ...ningServicesRunStatusChangedEventData.java | 3 + .../MapsGeofenceEnteredEventData.java | 3 + .../MapsGeofenceEventProperties.java | 23 +- .../MapsGeofenceExitedEventData.java | 3 + .../systemevents/MapsGeofenceGeometry.java | 26 +- .../MapsGeofenceResultEventData.java | 3 + .../MediaJobCanceledEventData.java | 38 +- .../MediaJobCancelingEventData.java | 38 +- .../eventgrid/systemevents/MediaJobError.java | 3 + .../systemevents/MediaJobErrorDetail.java | 3 + .../MediaJobErroredEventData.java | 37 +- .../MediaJobFinishedEventData.java | 38 +- .../systemevents/MediaJobOutput.java | 55 +- .../systemevents/MediaJobOutputAsset.java | 34 +- .../MediaJobOutputCanceledEventData.java | 22 +- .../MediaJobOutputCancelingEventData.java | 22 +- .../MediaJobOutputErroredEventData.java | 22 +- .../MediaJobOutputFinishedEventData.java | 22 +- .../MediaJobOutputProcessingEventData.java | 22 +- .../MediaJobOutputProgressEventData.java | 3 + .../MediaJobOutputScheduledEventData.java | 22 +- .../MediaJobOutputStateChangeEventData.java | 3 + .../MediaJobProcessingEventData.java | 39 +- .../MediaJobScheduledEventData.java | 38 +- .../MediaJobStateChangeEventData.java | 3 + ...EventChannelArchiveHeartbeatEventData.java | 3 + ...aLiveEventConnectionRejectedEventData.java | 3 + ...diaLiveEventEncoderConnectedEventData.java | 3 + ...LiveEventEncoderDisconnectedEventData.java | 3 + ...ventIncomingDataChunkDroppedEventData.java | 3 + ...eEventIncomingStreamReceivedEventData.java | 3 + ...ventIncomingStreamsOutOfSyncEventData.java | 3 + ...ncomingVideoStreamsOutOfSyncEventData.java | 3 + ...ediaLiveEventIngestHeartbeatEventData.java | 3 + ...ntTrackDiscontinuityDetectedEventData.java | 3 + .../MicrosoftTeamsUserIdentifierModel.java | 3 + .../PhoneNumberIdentifierModel.java | 3 + ...cyInsightsPolicyStateChangedEventData.java | 8 +- ...cyInsightsPolicyStateCreatedEventData.java | 8 +- ...cyInsightsPolicyStateDeletedEventData.java | 8 +- .../RedisExportRdbCompletedEventData.java | 8 +- .../RedisImportRdbCompletedEventData.java | 8 +- .../RedisPatchingCompletedEventData.java | 8 +- .../RedisScalingCompletedEventData.java | 8 +- .../ResourceActionCancelEventData.java | 37 +- .../ResourceActionFailureEventData.java | 33 +- .../ResourceActionSuccessEventData.java | 33 +- .../systemevents/ResourceAuthorization.java | 3 + .../ResourceDeleteCancelEventData.java | 37 +- .../ResourceDeleteFailureEventData.java | 33 +- .../ResourceDeleteSuccessEventData.java | 33 +- .../systemevents/ResourceHttpRequest.java | 3 + ...ionsHealthResourcesAnnotatedEventData.java | 3 + ...cesAvailabilityStatusChangedEventData.java | 3 + ...sourceNotificationsOperationalDetails.java | 8 +- ...ceNotificationsResourceDeletedDetails.java | 3 + ...NotificationsResourceDeletedEventData.java | 3 + ...ceManagementCreatedOrUpdatedEventData.java | 3 + ...onsResourceManagementDeletedEventData.java | 3 + ...ceNotificationsResourceUpdatedDetails.java | 3 + ...NotificationsResourceUpdatedEventData.java | 3 + .../ResourceWriteCancelEventData.java | 33 +- .../ResourceWriteFailureEventData.java | 37 +- .../ResourceWriteSuccessEventData.java | 37 +- ...ailablePeriodicNotificationsEventData.java | 7 +- ...agesAvailableWithNoListenersEventData.java | 7 +- ...ailablePeriodicNotificationsEventData.java | 7 +- ...agesAvailableWithNoListenersEventData.java | 7 +- ...iceClientConnectionConnectedEventData.java | 8 +- ...ClientConnectionDisconnectedEventData.java | 8 +- ...orageAsyncOperationInitiatedEventData.java | 27 +- .../StorageBlobCreatedEventData.java | 27 +- .../StorageBlobDeletedEventData.java | 27 +- ...BlobInventoryPolicyCompletedEventData.java | 8 +- .../StorageBlobRenamedEventData.java | 27 +- .../StorageBlobTierChangedEventData.java | 27 +- .../StorageDirectoryCreatedEventData.java | 27 +- .../StorageDirectoryDeletedEventData.java | 27 +- .../StorageDirectoryRenamedEventData.java | 27 +- ...ageLifecyclePolicyActionSummaryDetail.java | 3 + ...rageLifecyclePolicyCompletedEventData.java | 3 + ...orageTaskAssignmentCompletedEventData.java | 8 +- .../StorageTaskAssignmentQueuedEventData.java | 8 +- .../StorageTaskCompletedEventData.java | 8 +- .../StorageTaskQueuedEventData.java | 8 +- .../SubscriptionDeletedEventData.java | 3 + .../SubscriptionValidationEventData.java | 7 +- .../SubscriptionValidationResponse.java | 3 + .../WebAppServicePlanUpdatedEventData.java | 11 +- .../WebAppServicePlanUpdatedEventDataSku.java | 3 + .../systemevents/WebAppUpdatedEventData.java | 11 +- .../WebBackupOperationCompletedEventData.java | 11 +- .../WebBackupOperationFailedEventData.java | 11 +- .../WebBackupOperationStartedEventData.java | 11 +- ...WebRestoreOperationCompletedEventData.java | 11 +- .../WebRestoreOperationFailedEventData.java | 11 +- .../WebRestoreOperationStartedEventData.java | 11 +- .../WebSlotSwapCompletedEventData.java | 11 +- .../WebSlotSwapFailedEventData.java | 11 +- .../WebSlotSwapStartedEventData.java | 11 +- ...SlotSwapWithPreviewCancelledEventData.java | 11 +- ...ebSlotSwapWithPreviewStartedEventData.java | 11 +- .../swagger/README.md | 41 +- .../azure-ai-formrecognizer/swagger/README.md | 33 +- .../LoadTestAdministrationAsyncClient.java | 204 +- .../LoadTestAdministrationClient.java | 202 +- .../LoadTestAdministrationClientBuilder.java | 17 +- .../loadtesting/LoadTestRunAsyncClient.java | 259 +- .../loadtesting/LoadTestRunClient.java | 260 +- .../loadtesting/LoadTestRunClientBuilder.java | 17 +- .../LoadTestAdministrationsImpl.java | 670 +- .../implementation/LoadTestRunsImpl.java | 1130 +-- .../swagger/autorest.md | 2 +- .../metricsadvisor/MetricsAdvisorClient.java | 5 +- .../MetricsAdvisorAdministrationClient.java | 98 +- .../implementation/MetricsAdvisorImpl.java | 744 +- .../MetricsAdvisorImplBuilder.java | 15 +- .../models/AlertResultList.java | 5 +- .../models/AlertingResultQuery.java | 12 +- .../models/AnomalyAlertingConfiguration.java | 3 + .../AnomalyAlertingConfigurationList.java | 5 +- .../AnomalyAlertingConfigurationPatch.java | 3 + .../models/AnomalyDetectionConfiguration.java | 3 + .../AnomalyDetectionConfigurationList.java | 5 +- .../AnomalyDetectionConfigurationPatch.java | 3 + .../models/AnomalyDimensionList.java | 5 +- .../models/AnomalyDimensionQuery.java | 12 +- .../models/AnomalyFeedback.java | 99 +- .../models/AnomalyFeedbackValue.java | 3 + .../models/AnomalyProperty.java | 3 + .../implementation/models/AnomalyResult.java | 16 +- .../models/AnomalyResultList.java | 5 +- .../AzureApplicationInsightsDataFeed.java | 133 +- ...AzureApplicationInsightsDataFeedPatch.java | 42 +- .../AzureApplicationInsightsParameter.java | 3 + ...zureApplicationInsightsParameterPatch.java | 3 + .../models/AzureBlobDataFeed.java | 130 +- .../models/AzureBlobDataFeedPatch.java | 39 +- .../models/AzureBlobParameter.java | 3 + .../models/AzureBlobParameterPatch.java | 3 + .../models/AzureCosmosDBDataFeed.java | 130 +- .../models/AzureCosmosDBDataFeedPatch.java | 40 +- .../models/AzureCosmosDBParameter.java | 3 + .../models/AzureCosmosDBParameterPatch.java | 3 + .../models/AzureDataExplorerDataFeed.java | 131 +- .../AzureDataExplorerDataFeedPatch.java | 40 +- .../AzureDataLakeStorageGen2DataFeed.java | 133 +- ...AzureDataLakeStorageGen2DataFeedPatch.java | 42 +- .../AzureDataLakeStorageGen2Parameter.java | 3 + ...zureDataLakeStorageGen2ParameterPatch.java | 3 + .../models/AzureEventHubsDataFeed.java | 130 +- .../models/AzureEventHubsDataFeedPatch.java | 40 +- .../models/AzureEventHubsParameter.java | 3 + .../models/AzureEventHubsParameterPatch.java | 3 + .../models/AzureLogAnalyticsDataFeed.java | 131 +- .../AzureLogAnalyticsDataFeedPatch.java | 40 +- .../models/AzureLogAnalyticsParameter.java | 3 + .../AzureLogAnalyticsParameterPatch.java | 3 + .../AzureSQLConnectionStringCredential.java | 58 +- ...ureSQLConnectionStringCredentialPatch.java | 37 +- .../models/AzureSQLConnectionStringParam.java | 3 + .../AzureSQLConnectionStringParamPatch.java | 3 + .../models/AzureTableDataFeed.java | 130 +- .../models/AzureTableDataFeedPatch.java | 39 +- .../models/AzureTableParameter.java | 3 + .../models/AzureTableParameterPatch.java | 3 + .../models/ChangePointFeedback.java | 99 +- .../models/ChangePointFeedbackValue.java | 3 + .../models/ChangeThresholdCondition.java | 3 + .../models/ChangeThresholdConditionPatch.java | 3 + .../models/CommentFeedback.java | 99 +- .../models/CommentFeedbackValue.java | 3 + ...eAnomalyAlertingConfigurationResponse.java | 29 - ...AnomalyDetectionConfigurationResponse.java | 29 - .../models/CreateCredentialResponse.java | 28 - .../models/CreateDataFeedResponse.java | 28 - .../models/CreateHookResponse.java | 28 - .../models/CreateMetricFeedbackResponse.java | 28 - .../implementation/models/DataFeedDetail.java | 117 +- .../models/DataFeedDetailPatch.java | 113 +- .../models/DataFeedDimension.java | 3 + .../models/DataFeedIngestionProgress.java | 12 +- .../models/DataFeedIngestionStatus.java | 8 +- .../implementation/models/DataFeedList.java | 5 +- .../implementation/models/DataFeedMetric.java | 3 + .../DataLakeGen2SharedKeyCredential.java | 58 +- .../DataLakeGen2SharedKeyCredentialPatch.java | 37 +- .../models/DataLakeGen2SharedKeyParam.java | 3 + .../DataLakeGen2SharedKeyParamPatch.java | 3 + .../models/DataSourceCredential.java | 70 +- .../models/DataSourceCredentialList.java | 5 +- .../models/DataSourceCredentialPatch.java | 70 +- .../DetectionAnomalyFilterCondition.java | 3 + .../models/DetectionAnomalyResultQuery.java | 12 +- .../DetectionIncidentFilterCondition.java | 3 + .../models/DetectionIncidentResultQuery.java | 12 +- .../models/DetectionSeriesQuery.java | 12 +- .../models/DimensionGroupConfiguration.java | 3 + .../models/DimensionGroupIdentity.java | 3 + .../implementation/models/EmailHookInfo.java | 53 +- .../models/EmailHookInfoPatch.java | 32 +- .../models/EmailHookParameter.java | 3 + .../models/EmailHookParameterPatch.java | 3 + .../models/EnrichmentStatusList.java | 5 +- .../models/EnrichmentStatusQueryOption.java | 12 +- .../implementation/models/ErrorCode.java | 3 + .../models/FeedbackDimensionFilter.java | 3 + .../models/HardThresholdCondition.java | 3 + .../models/HardThresholdConditionPatch.java | 3 + .../implementation/models/HookInfo.java | 59 +- .../implementation/models/HookInfoPatch.java | 59 +- .../implementation/models/HookList.java | 5 +- .../models/IncidentProperty.java | 3 + .../implementation/models/IncidentResult.java | 12 +- .../models/IncidentResultList.java | 5 +- .../models/InfluxDBDataFeed.java | 130 +- .../models/InfluxDBDataFeedPatch.java | 39 +- .../models/InfluxDBParameter.java | 3 + .../models/InfluxDBParameterPatch.java | 3 + .../models/IngestionProgressResetOptions.java | 12 +- .../models/IngestionStatusList.java | 5 +- .../models/IngestionStatusQueryOptions.java | 12 +- .../models/MetricAlertingConfiguration.java | 3 + .../MetricAnomalyAlertSnoozeCondition.java | 3 + .../implementation/models/MetricDataList.java | 3 + .../models/MetricDataQueryOptions.java | 12 +- .../models/MetricDimensionList.java | 5 +- .../models/MetricDimensionQueryOptions.java | 3 + .../implementation/models/MetricFeedback.java | 73 +- .../models/MetricFeedbackFilter.java | 12 +- .../models/MetricFeedbackList.java | 5 +- .../models/MetricSeriesData.java | 6 +- .../models/MetricSeriesItem.java | 3 + .../models/MetricSeriesList.java | 5 +- .../models/MetricSeriesQueryOptions.java | 8 +- .../models/MongoDBDataFeed.java | 130 +- .../models/MongoDBDataFeedPatch.java | 39 +- .../models/MongoDBParameter.java | 3 + .../models/MongoDBParameterPatch.java | 3 + .../implementation/models/MySqlDataFeed.java | 130 +- .../models/MySqlDataFeedPatch.java | 39 +- .../implementation/models/PeriodFeedback.java | 91 +- .../models/PeriodFeedbackValue.java | 3 + .../models/PostgreSqlDataFeed.java | 130 +- .../models/PostgreSqlDataFeedPatch.java | 39 +- .../implementation/models/RootCause.java | 3 + .../implementation/models/RootCauseList.java | 3 + .../models/SQLServerDataFeed.java | 130 +- .../models/SQLServerDataFeedPatch.java | 39 +- .../models/SQLSourceParameterPatch.java | 3 + .../models/SeriesConfiguration.java | 3 + .../implementation/models/SeriesIdentity.java | 3 + .../implementation/models/SeriesResult.java | 6 +- .../models/SeriesResultList.java | 3 + .../models/ServicePrincipalCredential.java | 58 +- .../ServicePrincipalCredentialPatch.java | 37 +- .../ServicePrincipalInKVCredential.java | 58 +- .../ServicePrincipalInKVCredentialPatch.java | 37 +- .../models/ServicePrincipalInKVParam.java | 3 + .../ServicePrincipalInKVParamPatch.java | 3 + .../models/ServicePrincipalParam.java | 3 + .../models/ServicePrincipalParamPatch.java | 3 + .../models/SeverityCondition.java | 3 + .../models/SeverityFilterCondition.java | 3 + .../models/SmartDetectionCondition.java | 3 + .../models/SmartDetectionConditionPatch.java | 3 + .../models/SqlSourceParameter.java | 3 + .../models/SuppressCondition.java | 3 + .../models/SuppressConditionPatch.java | 3 + .../implementation/models/TopNGroupScope.java | 3 + .../implementation/models/UsageStats.java | 8 +- .../implementation/models/ValueCondition.java | 3 + .../models/WebhookHookInfo.java | 53 +- .../models/WebhookHookInfoPatch.java | 32 +- .../models/WebhookHookParameter.java | 9 +- .../models/WebhookHookParameterPatch.java | 9 +- .../models/WholeMetricConfiguration.java | 3 + .../models/WholeMetricConfigurationPatch.java | 3 + .../metricsadvisor/models/AnomalyAlert.java | 16 +- .../models/EnrichmentStatus.java | 8 +- .../azure-ai-metricsadvisor/swagger/README.md | 24 +- .../MixedRealityStsRestClientImpl.java | 131 +- .../MixedRealityStsRestClientImplBuilder.java | 62 +- .../models/GetTokenHeaders.java | 10 +- .../models/StsTokenResponseMessage.java | 19 +- .../models/TokenRequestOptions.java | 56 +- .../implementation/models/package-info.java | 4 +- .../implementation/package-info.java | 4 +- .../swagger/autorest.md | 2 +- ...onUsingDataCollectionRulesAsyncClient.java | 36 +- ...gestionUsingDataCollectionRulesClient.java | 36 +- ...UsingDataCollectionRulesClientBuilder.java | 10 +- ...ionUsingDataCollectionRulesClientImpl.java | 94 +- .../azure-monitor-ingestion/swagger/README.md | 36 +- .../ApplicationInsightsClientImpl.java | 34 +- .../ApplicationInsightsClientImplBuilder.java | 16 +- .../models/AvailabilityData.java | 44 +- .../implementation/models/ContextTagKeys.java | 6 +- .../implementation/models/DataPointType.java | 6 +- .../implementation/models/ExportResult.java | 14 +- .../models/ExportResultException.java | 4 +- .../implementation/models/MessageData.java | 28 +- .../models/MetricDataPoint.java | 34 +- .../implementation/models/MetricsData.java | 23 +- .../implementation/models/MonitorBase.java | 10 +- .../implementation/models/MonitorDomain.java | 10 +- .../implementation/models/PageViewData.java | 42 +- .../models/PageViewPerfData.java | 59 +- .../models/RemoteDependencyData.java | 61 +- .../implementation/models/RequestData.java | 52 +- .../implementation/models/SeverityLevel.java | 6 +- .../implementation/models/StackFrame.java | 22 +- .../models/TelemetryErrorDetails.java | 14 +- .../models/TelemetryEventData.java | 24 +- .../models/TelemetryExceptionData.java | 42 +- .../models/TelemetryExceptionDetails.java | 36 +- .../implementation/models/TelemetryItem.java | 26 +- .../swagger/README.md | 48 +- .../swagger/autorest_code.md | 19 - .../logs/AzureLogAnalyticsImplBuilder.java | 24 +- .../implementation/logs/MetadatasImpl.java | 10 +- .../implementation/logs/QueriesImpl.java | 27 +- .../logs/models/BatchQueryRequest.java | 7 +- .../logs/models/BatchQueryResponse.java | 13 +- .../logs/models/BatchQueryResults.java | 3 + .../logs/models/BatchRequest.java | 3 + .../logs/models/BatchResponse.java | 3 + .../implementation/logs/models/Column.java | 3 + .../logs/models/ErrorDetail.java | 3 + .../implementation/logs/models/ErrorInfo.java | 13 +- .../logs/models/ErrorResponse.java | 9 +- .../logs/models/MetadataApplication.java | 3 + .../models/MetadataApplicationRelated.java | 3 + .../logs/models/MetadataCategory.java | 3 + .../logs/models/MetadataCategoryRelated.java | 3 + .../logs/models/MetadataFunction.java | 3 + .../logs/models/MetadataFunctionRelated.java | 3 + .../logs/models/MetadataPermissions.java | 3 + .../MetadataPermissionsApplicationsItem.java | 3 + .../MetadataPermissionsResourcesItem.java | 3 + .../MetadataPermissionsWorkspacesItem.java | 3 + .../logs/models/MetadataQuery.java | 3 + .../logs/models/MetadataQueryRelated.java | 3 + .../logs/models/MetadataResourceType.java | 3 + .../models/MetadataResourceTypeRelated.java | 3 + .../logs/models/MetadataResults.java | 11 +- .../logs/models/MetadataSolution.java | 3 + .../logs/models/MetadataSolutionRelated.java | 3 + .../logs/models/MetadataTable.java | 3 + .../logs/models/MetadataTableColumnsItem.java | 7 +- .../logs/models/MetadataTableRelated.java | 3 + .../logs/models/MetadataWorkspace.java | 3 + .../logs/models/MetadataWorkspaceRelated.java | 3 + .../implementation/logs/models/QueryBody.java | 11 +- .../logs/models/QueryResults.java | 3 + .../implementation/logs/models/Table.java | 3 + .../implementation/metrics/MetricsImpl.java | 23 +- .../MonitorManagementClientImplBuilder.java | 19 +- .../metrics/models/ErrorAdditionalInfo.java | 3 + .../metrics/models/ErrorContract.java | 13 +- .../metrics/models/ErrorResponse.java | 3 + .../metrics/models/LocalizableString.java | 3 + .../metrics/models/MetadataValue.java | 3 + .../implementation/metrics/models/Metric.java | 3 + .../metrics/models/MetricValue.java | 7 +- .../metrics/models/MetricsResponse.java | 23 +- ...tionScopeMetricsRequestBodyParameters.java | 33 +- .../metrics/models/TimeSeriesElement.java | 11 +- .../AzureMonitorMetricBatchBuilder.java | 8 + .../metricsbatch/MetricsBatches.java | 13 +- .../models/ErrorAdditionalInfo.java | 3 + .../metricsbatch/models/ErrorDetail.java | 3 + .../metricsbatch/models/ErrorResponse.java | 3 + .../models/LocalizableString.java | 3 + .../metricsbatch/models/MetadataValue.java | 3 + .../metricsbatch/models/Metric.java | 3 + .../models/MetricResultsResponse.java | 3 + .../MetricResultsResponseValuesItem.java | 19 +- .../metricsbatch/models/MetricValue.java | 7 +- .../metricsbatch/models/ResourceIdList.java | 3 + .../models/TimeSeriesElement.java | 11 +- .../MetricsDefinitionsClientImplBuilder.java | 19 +- .../models/ErrorAdditionalInfo.java | 3 + .../models/ErrorContract.java | 13 +- .../models/ErrorResponse.java | 3 + .../models/LocalizableString.java | 3 + .../models/MetricAvailability.java | 9 +- .../models/MetricDefinition.java | 3 + .../models/MetricDefinitionCollection.java | 3 + .../SubscriptionScopeMetricDefinition.java | 3 + ...iptionScopeMetricDefinitionCollection.java | 3 + .../MetricsNamespacesClientImplBuilder.java | 14 +- .../models/ErrorResponse.java | 3 + .../models/MetricNamespace.java | 3 + .../models/MetricNamespaceCollection.java | 3 + .../models/MetricNamespaceName.java | 3 + .../azure-monitor-query/swagger/README.md | 83 +- .../src/main/java/LogsCustomization.java | 48 +- 820 files changed, 33191 insertions(+), 7230 deletions(-) delete mode 100644 sdk/attestation/azure-security-attestation/swagger/generate.ps1 create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceManagementAsyncClient.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClient.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClientBuilder.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateAsyncClient.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClient.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClientBuilder.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateServiceVersion.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceManagementsImpl.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceUpdateClientImpl.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceUpdatesImpl.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/package-info.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/package-info.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/module-info.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/resources/azure-iot-deviceupdate.properties create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementCancelOrRetryDeployment.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementCreateOrUpdateDeployment.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeployment.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeploymentForDeviceClassSubgroup.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClass.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClassSubgroup.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteGroup.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeployment.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentForDeviceClassSubgroup.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentStatus.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDevice.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClass.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupDeploymentStatus.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupUpdateCompliance.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroup.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroupUpdateCompliance.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollection.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollectionDetailedStatus.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetOperationStatus.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateCompliance.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateComplianceForGroup.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementImportDevices.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForDeviceClassSubgroup.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForGroup.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForDeviceClassSubgroup.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForGroup.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClassSubgroupsForGroup.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClasses.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDevices.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListGroups.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListHealthOfDevices.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListInstallableUpdatesForDeviceClass.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListLogCollections.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListOperationStatuses.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementStartLogCollection.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementUpdateDeviceClass.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateDeleteUpdate.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetFile.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetOperationStatus.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetUpdate.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateImportUpdate.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListFiles.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListNames.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListOperationStatuses.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListProviders.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListUpdates.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListVersions.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementCancelOrRetryDeploymentTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementCreateOrUpdateDeploymentTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeploymentForDeviceClassSubgroupTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeploymentTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClassSubgroupTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClassTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteGroupTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentForDeviceClassSubgroupTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentStatusTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupDeploymentStatusTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupUpdateComplianceTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroupTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroupUpdateComplianceTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollectionDetailedStatusTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollectionTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetOperationStatusTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateComplianceForGroupTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateComplianceTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementImportDevicesTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForDeviceClassSubgroupTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForGroupTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForDeviceClassSubgroupTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForGroupTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClassSubgroupsForGroupTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClassesTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDevicesTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListGroupsTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListHealthOfDevicesTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListInstallableUpdatesForDeviceClassTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListLogCollectionsTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListOperationStatusesTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementStartLogCollectionTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementUpdateDeviceClassTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateClientTestBase.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateDeleteUpdateTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetFileTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetOperationStatusTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetUpdateTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateImportUpdateTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListFilesTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListNamesTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListOperationStatusesTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListProvidersTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListUpdatesTests.java create mode 100644 sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListVersionsTests.java delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/generate.ps1 delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyAlertingConfigurationResponse.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyDetectionConfigurationResponse.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateCredentialResponse.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateDataFeedResponse.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateHookResponse.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateMetricFeedbackResponse.java delete mode 100644 sdk/monitor/azure-monitor-opentelemetry-exporter/swagger/autorest_code.md diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/AzureAppConfigurationImpl.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/AzureAppConfigurationImpl.java index 3a3564a5b0f39..75a8af7e53d58 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/AzureAppConfigurationImpl.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/AzureAppConfigurationImpl.java @@ -36,9 +36,9 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.data.appconfiguration.implementation.models.CheckKeysHeaders; import com.azure.data.appconfiguration.implementation.models.CheckKeyValueHeaders; import com.azure.data.appconfiguration.implementation.models.CheckKeyValuesHeaders; +import com.azure.data.appconfiguration.implementation.models.CheckKeysHeaders; import com.azure.data.appconfiguration.implementation.models.CheckLabelsHeaders; import com.azure.data.appconfiguration.implementation.models.CheckRevisionsHeaders; import com.azure.data.appconfiguration.implementation.models.CheckSnapshotHeaders; @@ -46,11 +46,11 @@ import com.azure.data.appconfiguration.implementation.models.CreateSnapshotHeaders; import com.azure.data.appconfiguration.implementation.models.DeleteKeyValueHeaders; import com.azure.data.appconfiguration.implementation.models.DeleteLockHeaders; -import com.azure.data.appconfiguration.implementation.models.GetKeysHeaders; -import com.azure.data.appconfiguration.implementation.models.GetKeysNextHeaders; import com.azure.data.appconfiguration.implementation.models.GetKeyValueHeaders; import com.azure.data.appconfiguration.implementation.models.GetKeyValuesHeaders; import com.azure.data.appconfiguration.implementation.models.GetKeyValuesNextHeaders; +import com.azure.data.appconfiguration.implementation.models.GetKeysHeaders; +import com.azure.data.appconfiguration.implementation.models.GetKeysNextHeaders; import com.azure.data.appconfiguration.implementation.models.GetLabelsHeaders; import com.azure.data.appconfiguration.implementation.models.GetLabelsNextHeaders; import com.azure.data.appconfiguration.implementation.models.GetRevisionsHeaders; @@ -220,6 +220,15 @@ Mono> getKeys(@HostParam("endpoint") @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("Accept") String accept, Context context); + @Get("/keys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getKeysNoCustomHeaders(@HostParam("endpoint") String endpoint, + @QueryParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, + @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("Accept") String accept, + Context context); + @Get("/keys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -229,6 +238,15 @@ ResponseBase getKeysSync(@HostParam("endpoint") S @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("Accept") String accept, Context context); + @Get("/keys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getKeysNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @QueryParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, + @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("Accept") String accept, + Context context); + @Head("/keys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -237,6 +255,14 @@ Mono> checkKeys(@HostParam("endpoint") Stri @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, @HeaderParam("Accept-Datetime") String acceptDatetime, Context context); + @Head("/keys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> checkKeysNoCustomHeaders(@HostParam("endpoint") String endpoint, + @QueryParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, + @HeaderParam("Accept-Datetime") String acceptDatetime, Context context); + @Head("/keys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -245,6 +271,14 @@ ResponseBase checkKeysSync(@HostParam("endpoint") String @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, @HeaderParam("Accept-Datetime") String acceptDatetime, Context context); + @Head("/keys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response checkKeysNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @QueryParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, + @HeaderParam("Accept-Datetime") String acceptDatetime, Context context); + @Get("/kv") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -257,6 +291,18 @@ Mono> getKeyValues(@HostPa @QueryParam(value = "tags", multipleQueryParams = true) List tags, @HeaderParam("Accept") String accept, Context context); + @Get("/kv") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getKeyValuesNoCustomHeaders(@HostParam("endpoint") String endpoint, + @QueryParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @QueryParam("After") String after, @HeaderParam("Accept-Datetime") String acceptDatetime, + @QueryParam("$Select") String select, @QueryParam("snapshot") String snapshot, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @QueryParam(value = "tags", multipleQueryParams = true) List tags, + @HeaderParam("Accept") String accept, Context context); + @Get("/kv") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -269,6 +315,18 @@ ResponseBase getKeyValuesSync(@HostPara @QueryParam(value = "tags", multipleQueryParams = true) List tags, @HeaderParam("Accept") String accept, Context context); + @Get("/kv") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getKeyValuesNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @QueryParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @QueryParam("After") String after, @HeaderParam("Accept-Datetime") String acceptDatetime, + @QueryParam("$Select") String select, @QueryParam("snapshot") String snapshot, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @QueryParam(value = "tags", multipleQueryParams = true) List tags, + @HeaderParam("Accept") String accept, Context context); + @Head("/kv") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -280,6 +338,17 @@ Mono> checkKeyValues(@HostParam("endpo @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam(value = "tags", multipleQueryParams = true) List tags, Context context); + @Head("/kv") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> checkKeyValuesNoCustomHeaders(@HostParam("endpoint") String endpoint, + @QueryParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @QueryParam("After") String after, @HeaderParam("Accept-Datetime") String acceptDatetime, + @QueryParam("$Select") String select, @QueryParam("snapshot") String snapshot, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @QueryParam(value = "tags", multipleQueryParams = true) List tags, Context context); + @Head("/kv") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -291,6 +360,17 @@ ResponseBase checkKeyValuesSync(@HostParam("endpoin @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam(value = "tags", multipleQueryParams = true) List tags, Context context); + @Head("/kv") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response checkKeyValuesNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @QueryParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @QueryParam("After") String after, @HeaderParam("Accept-Datetime") String acceptDatetime, + @QueryParam("$Select") String select, @QueryParam("snapshot") String snapshot, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @QueryParam(value = "tags", multipleQueryParams = true) List tags, Context context); + @Get("/kv/{key}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -301,6 +381,16 @@ Mono> getKeyValue(@HostParam("endpoin @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("$Select") String select, @HeaderParam("Accept") String accept, Context context); + @Get("/kv/{key}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getKeyValueNoCustomHeaders(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("$Select") String select, + @HeaderParam("Accept") String accept, Context context); + @Get("/kv/{key}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -311,6 +401,16 @@ ResponseBase getKeyValueSync(@HostParam("endpoint" @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("$Select") String select, @HeaderParam("Accept") String accept, Context context); + @Get("/kv/{key}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getKeyValueNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("$Select") String select, + @HeaderParam("Accept") String accept, Context context); + @Put("/kv/{key}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -320,6 +420,15 @@ Mono> putKeyValue(@HostParam("endpoin @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @BodyParam("application/json") KeyValue entity, @HeaderParam("Accept") String accept, Context context); + @Put("/kv/{key}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> putKeyValueNoCustomHeaders(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @BodyParam("application/json") KeyValue entity, @HeaderParam("Accept") String accept, Context context); + @Put("/kv/{key}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -329,6 +438,15 @@ ResponseBase putKeyValueSync(@HostParam("endpoint" @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @BodyParam("application/json") KeyValue entity, @HeaderParam("Accept") String accept, Context context); + @Put("/kv/{key}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response putKeyValueNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @BodyParam("application/json") KeyValue entity, @HeaderParam("Accept") String accept, Context context); + @Delete("/kv/{key}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -337,6 +455,14 @@ Mono> deleteKeyValue(@HostParam("e @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, @HeaderParam("Accept") String accept, Context context); + @Delete("/kv/{key}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteKeyValueNoCustomHeaders(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("Accept") String accept, Context context); + @Delete("/kv/{key}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -345,6 +471,14 @@ ResponseBase deleteKeyValueSync(@HostParam("end @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, @HeaderParam("Accept") String accept, Context context); + @Delete("/kv/{key}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteKeyValueNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("Accept") String accept, Context context); + @Head("/kv/{key}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -354,6 +488,15 @@ Mono> checkKeyValue(@HostParam("endpoin @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("$Select") String select, Context context); + @Head("/kv/{key}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> checkKeyValueNoCustomHeaders(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("$Select") String select, Context context); + @Head("/kv/{key}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -363,6 +506,15 @@ ResponseBase checkKeyValueSync(@HostParam("endpoint" @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("$Select") String select, Context context); + @Head("/kv/{key}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response checkKeyValueNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("$Select") String select, Context context); + @Get("/snapshots") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -372,6 +524,15 @@ Mono> getSnapshots(@HostPa @QueryParam("$Select") String select, @QueryParam("status") String status, @HeaderParam("Accept") String accept, Context context); + @Get("/snapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSnapshotsNoCustomHeaders(@HostParam("endpoint") String endpoint, + @QueryParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, + @QueryParam("$Select") String select, @QueryParam("status") String status, + @HeaderParam("Accept") String accept, Context context); + @Get("/snapshots") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -381,6 +542,15 @@ ResponseBase getSnapshotsSync(@HostPara @QueryParam("$Select") String select, @QueryParam("status") String status, @HeaderParam("Accept") String accept, Context context); + @Get("/snapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSnapshotsNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @QueryParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, + @QueryParam("$Select") String select, @QueryParam("status") String status, + @HeaderParam("Accept") String accept, Context context); + @Head("/snapshots") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -388,6 +558,13 @@ Mono> checkSnapshots(@HostParam("endpo @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, Context context); + @Head("/snapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> checkSnapshotsNoCustomHeaders(@HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @QueryParam("After") String after, Context context); + @Head("/snapshots") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -395,6 +572,13 @@ ResponseBase checkSnapshotsSync(@HostParam("endpoin @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, Context context); + @Head("/snapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response checkSnapshotsNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @QueryParam("After") String after, Context context); + @Get("/snapshots/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -404,6 +588,15 @@ Mono> getSnapshot( @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("$Select") String select, @HeaderParam("Accept") String accept, Context context); + @Get("/snapshots/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSnapshotNoCustomHeaders(@HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @PathParam("name") String name, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("$Select") String select, + @HeaderParam("Accept") String accept, Context context); + @Get("/snapshots/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -413,6 +606,15 @@ ResponseBase getSnapshotSync(@HostPar @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("$Select") String select, @HeaderParam("Accept") String accept, Context context); + @Get("/snapshots/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSnapshotNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @PathParam("name") String name, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("$Select") String select, + @HeaderParam("Accept") String accept, Context context); + @Put("/snapshots/{name}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -422,6 +624,14 @@ Mono> createSnapshot( @BodyParam("application/json") ConfigurationSnapshot entity, @HeaderParam("Accept") String accept, Context context); + @Put("/snapshots/{name}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createSnapshotNoCustomHeaders(@HostParam("endpoint") String endpoint, + @PathParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ConfigurationSnapshot entity, + @HeaderParam("Accept") String accept, Context context); + @Put("/snapshots/{name}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -431,6 +641,14 @@ ResponseBase createSnapshotSync( @BodyParam("application/json") ConfigurationSnapshot entity, @HeaderParam("Accept") String accept, Context context); + @Put("/snapshots/{name}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createSnapshotNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @PathParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ConfigurationSnapshot entity, + @HeaderParam("Accept") String accept, Context context); + @Patch("/snapshots/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -441,6 +659,16 @@ Mono> updateSnapshot( @BodyParam("application/json") SnapshotUpdateParameters entity, @HeaderParam("Accept") String accept, Context context); + @Patch("/snapshots/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> updateSnapshotNoCustomHeaders(@HostParam("endpoint") String endpoint, + @PathParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, + @BodyParam("application/json") SnapshotUpdateParameters entity, @HeaderParam("Accept") String accept, + Context context); + @Patch("/snapshots/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -451,6 +679,16 @@ ResponseBase updateSnapshotSync( @BodyParam("application/json") SnapshotUpdateParameters entity, @HeaderParam("Accept") String accept, Context context); + @Patch("/snapshots/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response updateSnapshotNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @PathParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, + @BodyParam("application/json") SnapshotUpdateParameters entity, @HeaderParam("Accept") String accept, + Context context); + @Head("/snapshots/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -459,6 +697,14 @@ Mono> checkSnapshot(@HostParam("endpoin @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + @Head("/snapshots/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> checkSnapshotNoCustomHeaders(@HostParam("endpoint") String endpoint, + @PathParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + @Head("/snapshots/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -467,6 +713,14 @@ ResponseBase checkSnapshotSync(@HostParam("endpoint" @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + @Head("/snapshots/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response checkSnapshotNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @PathParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + @Get("/labels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -476,6 +730,15 @@ Mono> getLabels(@HostParam("endp @HeaderParam("Accept-Datetime") String acceptDatetime, @QueryParam("$Select") String select, @HeaderParam("Accept") String accept, Context context); + @Get("/labels") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getLabelsNoCustomHeaders(@HostParam("endpoint") String endpoint, + @QueryParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, + @HeaderParam("Accept-Datetime") String acceptDatetime, @QueryParam("$Select") String select, + @HeaderParam("Accept") String accept, Context context); + @Get("/labels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -485,6 +748,15 @@ ResponseBase getLabelsSync(@HostParam("endpoi @HeaderParam("Accept-Datetime") String acceptDatetime, @QueryParam("$Select") String select, @HeaderParam("Accept") String accept, Context context); + @Get("/labels") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getLabelsNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @QueryParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, + @HeaderParam("Accept-Datetime") String acceptDatetime, @QueryParam("$Select") String select, + @HeaderParam("Accept") String accept, Context context); + @Head("/labels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -494,6 +766,15 @@ Mono> checkLabels(@HostParam("endpoint") @HeaderParam("Accept-Datetime") String acceptDatetime, @QueryParam("$Select") String select, Context context); + @Head("/labels") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> checkLabelsNoCustomHeaders(@HostParam("endpoint") String endpoint, + @QueryParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, + @HeaderParam("Accept-Datetime") String acceptDatetime, @QueryParam("$Select") String select, + Context context); + @Head("/labels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -503,11 +784,29 @@ ResponseBase checkLabelsSync(@HostParam("endpoint") St @HeaderParam("Accept-Datetime") String acceptDatetime, @QueryParam("$Select") String select, Context context); - @Put("/locks/{key}") + @Head("/labels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> putLock(@HostParam("endpoint") String endpoint, - @PathParam("key") String key, @QueryParam("label") String label, + Response checkLabelsNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @QueryParam("name") String name, @HeaderParam("Sync-Token") String syncToken, + @QueryParam("api-version") String apiVersion, @QueryParam("After") String after, + @HeaderParam("Accept-Datetime") String acceptDatetime, @QueryParam("$Select") String select, + Context context); + + @Put("/locks/{key}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> putLock(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Accept") String accept, Context context); + + @Put("/locks/{key}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> putLockNoCustomHeaders(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); @@ -521,6 +820,15 @@ ResponseBase putLockSync(@HostParam("endpoint") String @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @Put("/locks/{key}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response putLockNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Accept") String accept, Context context); + @Delete("/locks/{key}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -530,6 +838,15 @@ Mono> deleteLock(@HostParam("endpoint" @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @Delete("/locks/{key}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteLockNoCustomHeaders(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Accept") String accept, Context context); + @Delete("/locks/{key}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -539,6 +856,15 @@ ResponseBase deleteLockSync(@HostParam("endpoint") @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @Delete("/locks/{key}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteLockNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @PathParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Accept") String accept, Context context); + @Get("/revisions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -550,6 +876,17 @@ Mono> getRevisions(@HostPa @QueryParam(value = "tags", multipleQueryParams = true) List tags, @HeaderParam("Accept") String accept, Context context); + @Get("/revisions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getRevisionsNoCustomHeaders(@HostParam("endpoint") String endpoint, + @QueryParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @QueryParam("After") String after, @HeaderParam("Accept-Datetime") String acceptDatetime, + @QueryParam("$Select") String select, + @QueryParam(value = "tags", multipleQueryParams = true) List tags, + @HeaderParam("Accept") String accept, Context context); + @Get("/revisions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -561,6 +898,17 @@ ResponseBase getRevisionsSync(@HostPara @QueryParam(value = "tags", multipleQueryParams = true) List tags, @HeaderParam("Accept") String accept, Context context); + @Get("/revisions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getRevisionsNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @QueryParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @QueryParam("After") String after, @HeaderParam("Accept-Datetime") String acceptDatetime, + @QueryParam("$Select") String select, + @QueryParam(value = "tags", multipleQueryParams = true) List tags, + @HeaderParam("Accept") String accept, Context context); + @Head("/revisions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -571,6 +919,16 @@ Mono> checkRevisions(@HostParam("endpo @QueryParam("$Select") String select, @QueryParam(value = "tags", multipleQueryParams = true) List tags, Context context); + @Head("/revisions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> checkRevisionsNoCustomHeaders(@HostParam("endpoint") String endpoint, + @QueryParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @QueryParam("After") String after, @HeaderParam("Accept-Datetime") String acceptDatetime, + @QueryParam("$Select") String select, + @QueryParam(value = "tags", multipleQueryParams = true) List tags, Context context); + @Head("/revisions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -581,6 +939,16 @@ ResponseBase checkRevisionsSync(@HostParam("endpoin @QueryParam("$Select") String select, @QueryParam(value = "tags", multipleQueryParams = true) List tags, Context context); + @Head("/revisions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response checkRevisionsNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @QueryParam("key") String key, @QueryParam("label") String label, + @HeaderParam("Sync-Token") String syncToken, @QueryParam("api-version") String apiVersion, + @QueryParam("After") String after, @HeaderParam("Accept-Datetime") String acceptDatetime, + @QueryParam("$Select") String select, + @QueryParam(value = "tags", multipleQueryParams = true) List tags, Context context); + @Get("/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -603,6 +971,14 @@ Mono> getKeysNext( @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getKeysNextNoCustomHeaders( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, + @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -611,6 +987,14 @@ ResponseBase getKeysNextSync( @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getKeysNextNoCustomHeadersSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, + @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -620,6 +1004,15 @@ Mono> getKeyValuesNext @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getKeyValuesNextNoCustomHeaders( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -629,6 +1022,15 @@ ResponseBase getKeyValuesNextSync( @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getKeyValuesNextNoCustomHeadersSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -636,6 +1038,13 @@ Mono> getSnapshotsNext @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSnapshotsNextNoCustomHeaders( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -643,6 +1052,13 @@ ResponseBase getSnapshotsNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSnapshotsNextNoCustomHeadersSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -651,6 +1067,14 @@ Mono> getLabelsNext( @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getLabelsNextNoCustomHeaders( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, + @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -659,6 +1083,14 @@ ResponseBase getLabelsNextSync( @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getLabelsNextNoCustomHeadersSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, + @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -667,6 +1099,14 @@ Mono> getRevisionsNext @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getRevisionsNextNoCustomHeaders( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, + @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -674,6 +1114,14 @@ ResponseBase getRevisionsNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, @HeaderParam("Accept") String accept, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getRevisionsNextNoCustomHeadersSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Sync-Token") String syncToken, @HeaderParam("Accept-Datetime") String acceptDatetime, + @HeaderParam("Accept") String accept, Context context); } /** @@ -769,15 +1217,17 @@ public PagedFlux getKeysAsync(String name, String after, String acceptDatet * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 keys along with {@link PagedResponse}. + * @return a list of keys along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse getKeysSinglePage(String name, String after, String acceptDatetime) { + public Mono> getKeysNoCustomHeadersSinglePageAsync(String name, String after, + String acceptDatetime) { final String accept = "application/vnd.microsoft.appconfig.keyset+json, application/problem+json"; - ResponseBase res = service.getKeysSync(this.getEndpoint(), name, - this.getSyncToken(), this.getApiVersion(), after, acceptDatetime, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + return FluxUtil + .withContext(context -> service.getKeysNoCustomHeaders(this.getEndpoint(), name, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); } /** @@ -791,15 +1241,17 @@ public PagedResponse getKeysSinglePage(String name, String after, String ac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 keys along with {@link PagedResponse}. + * @return a list of keys along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse getKeysSinglePage(String name, String after, String acceptDatetime, Context context) { + public Mono> getKeysNoCustomHeadersSinglePageAsync(String name, String after, + String acceptDatetime, Context context) { final String accept = "application/vnd.microsoft.appconfig.keyset+json, application/problem+json"; - ResponseBase res = service.getKeysSync(this.getEndpoint(), name, - this.getSyncToken(), this.getApiVersion(), after, acceptDatetime, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + return service + .getKeysNoCustomHeaders(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), after, + acceptDatetime, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); } /** @@ -812,12 +1264,12 @@ public PagedResponse getKeysSinglePage(String name, String after, String ac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 keys as paginated response with {@link PagedIterable}. + * @return a list of keys as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getKeys(String name, String after, String acceptDatetime) { - return new PagedIterable<>(() -> getKeysSinglePage(name, after, acceptDatetime, Context.NONE), - nextLink -> getKeysNextSinglePage(nextLink, acceptDatetime)); + public PagedFlux getKeysNoCustomHeadersAsync(String name, String after, String acceptDatetime) { + return new PagedFlux<>(() -> getKeysNoCustomHeadersSinglePageAsync(name, after, acceptDatetime), + nextLink -> getKeysNextSinglePageAsync(nextLink, acceptDatetime)); } /** @@ -831,16 +1283,17 @@ public PagedIterable getKeys(String name, String after, String acceptDateti * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 keys as paginated response with {@link PagedIterable}. + * @return a list of keys as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getKeys(String name, String after, String acceptDatetime, Context context) { - return new PagedIterable<>(() -> getKeysSinglePage(name, after, acceptDatetime, context), - nextLink -> getKeysNextSinglePage(nextLink, acceptDatetime, context)); + public PagedFlux getKeysNoCustomHeadersAsync(String name, String after, String acceptDatetime, + Context context) { + return new PagedFlux<>(() -> getKeysNoCustomHeadersSinglePageAsync(name, after, acceptDatetime, context), + nextLink -> getKeysNextSinglePageAsync(nextLink, acceptDatetime, context)); } /** - * Requests the headers and status of the given resource. + * Gets a list of keys. * * @param name A filter for the name of the returned keys. * @param after Instructs the server to return elements that appear after the element referred to by the specified @@ -849,17 +1302,19 @@ public PagedIterable getKeys(String name, String after, String acceptDateti * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 ResponseBase} on successful completion of {@link Mono}. + * @return a list of keys along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkKeysWithResponseAsync(String name, String after, - String acceptDatetime) { - return FluxUtil.withContext(context -> service.checkKeys(this.getEndpoint(), name, this.getSyncToken(), - this.getApiVersion(), after, acceptDatetime, context)); + public PagedResponse getKeysSinglePage(String name, String after, String acceptDatetime) { + final String accept = "application/vnd.microsoft.appconfig.keyset+json, application/problem+json"; + ResponseBase res = service.getKeysSync(this.getEndpoint(), name, + this.getSyncToken(), this.getApiVersion(), after, acceptDatetime, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); } /** - * Requests the headers and status of the given resource. + * Gets a list of keys. * * @param name A filter for the name of the returned keys. * @param after Instructs the server to return elements that appear after the element referred to by the specified @@ -869,17 +1324,19 @@ public Mono> checkKeysWithResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 ResponseBase} on successful completion of {@link Mono}. + * @return a list of keys along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkKeysWithResponseAsync(String name, String after, - String acceptDatetime, Context context) { - return service.checkKeys(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), after, - acceptDatetime, context); + public PagedResponse getKeysSinglePage(String name, String after, String acceptDatetime, Context context) { + final String accept = "application/vnd.microsoft.appconfig.keyset+json, application/problem+json"; + ResponseBase res = service.getKeysSync(this.getEndpoint(), name, + this.getSyncToken(), this.getApiVersion(), after, acceptDatetime, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); } /** - * Requests the headers and status of the given resource. + * Gets a list of keys. * * @param name A filter for the name of the returned keys. * @param after Instructs the server to return elements that appear after the element referred to by the specified @@ -888,15 +1345,16 @@ public Mono> checkKeysWithResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return a list of keys as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkKeysAsync(String name, String after, String acceptDatetime) { - return checkKeysWithResponseAsync(name, after, acceptDatetime).flatMap(ignored -> Mono.empty()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeys(String name, String after, String acceptDatetime) { + return new PagedIterable<>(() -> getKeysSinglePage(name, after, acceptDatetime, Context.NONE), + nextLink -> getKeysNextSinglePage(nextLink, acceptDatetime)); } /** - * Requests the headers and status of the given resource. + * Gets a list of keys. * * @param name A filter for the name of the returned keys. * @param after Instructs the server to return elements that appear after the element referred to by the specified @@ -906,54 +1364,269 @@ public Mono checkKeysAsync(String name, String after, String acceptDatetim * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return a list of keys as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkKeysAsync(String name, String after, String acceptDatetime, Context context) { - return checkKeysWithResponseAsync(name, after, acceptDatetime, context).flatMap(ignored -> Mono.empty()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeys(String name, String after, String acceptDatetime, Context context) { + return new PagedIterable<>(() -> getKeysSinglePage(name, after, acceptDatetime, context), + nextLink -> getKeysNextSinglePage(nextLink, acceptDatetime, context)); } /** - * Requests the headers and status of the given resource. + * Gets a list of keys. * * @param name A filter for the name of the returned keys. * @param after Instructs the server to return elements that appear after the element referred to by the specified * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 ResponseBase}. + * @return a list of keys along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase checkKeysWithResponse(String name, String after, String acceptDatetime, - Context context) { - return service.checkKeysSync(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), after, - acceptDatetime, context); + public PagedResponse getKeysNoCustomHeadersSinglePage(String name, String after, String acceptDatetime) { + final String accept = "application/vnd.microsoft.appconfig.keyset+json, application/problem+json"; + Response res = service.getKeysNoCustomHeadersSync(this.getEndpoint(), name, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); } /** - * Requests the headers and status of the given resource. + * Gets a list of keys. * * @param name A filter for the name of the returned keys. * @param after Instructs the server to return elements that appear after the element referred to by the specified * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 keys along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void checkKeys(String name, String after, String acceptDatetime) { - checkKeysWithResponse(name, after, acceptDatetime, Context.NONE); + public PagedResponse getKeysNoCustomHeadersSinglePage(String name, String after, String acceptDatetime, + Context context) { + final String accept = "application/vnd.microsoft.appconfig.keyset+json, application/problem+json"; + Response res = service.getKeysNoCustomHeadersSync(this.getEndpoint(), name, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); } /** - * Gets a list of key-values. + * Gets a list of keys. * - * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. - * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeysNoCustomHeaders(String name, String after, String acceptDatetime) { + return new PagedIterable<>(() -> getKeysNoCustomHeadersSinglePage(name, after, acceptDatetime, Context.NONE), + nextLink -> getKeysNextSinglePage(nextLink, acceptDatetime)); + } + + /** + * Gets a list of keys. + * + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeysNoCustomHeaders(String name, String after, String acceptDatetime, + Context context) { + return new PagedIterable<>(() -> getKeysNoCustomHeadersSinglePage(name, after, acceptDatetime, context), + nextLink -> getKeysNextSinglePage(nextLink, acceptDatetime, context)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkKeysWithResponseAsync(String name, String after, + String acceptDatetime) { + return FluxUtil.withContext(context -> checkKeysWithResponseAsync(name, after, acceptDatetime, context)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkKeysWithResponseAsync(String name, String after, + String acceptDatetime, Context context) { + return service.checkKeys(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), after, + acceptDatetime, context); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono checkKeysAsync(String name, String after, String acceptDatetime) { + return checkKeysWithResponseAsync(name, after, acceptDatetime).flatMap(ignored -> Mono.empty()); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono checkKeysAsync(String name, String after, String acceptDatetime, Context context) { + return checkKeysWithResponseAsync(name, after, acceptDatetime, context).flatMap(ignored -> Mono.empty()); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> checkKeysNoCustomHeadersWithResponseAsync(String name, String after, + String acceptDatetime) { + return FluxUtil + .withContext(context -> checkKeysNoCustomHeadersWithResponseAsync(name, after, acceptDatetime, context)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> checkKeysNoCustomHeadersWithResponseAsync(String name, String after, + String acceptDatetime, Context context) { + return service.checkKeysNoCustomHeaders(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), + after, acceptDatetime, context); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase checkKeysWithResponse(String name, String after, String acceptDatetime, + Context context) { + return service.checkKeysSync(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), after, + acceptDatetime, context); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 checkKeys(String name, String after, String acceptDatetime) { + checkKeysWithResponse(name, after, acceptDatetime, Context.NONE); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 checkKeysNoCustomHeadersWithResponse(String name, String after, String acceptDatetime, + Context context) { + return service.checkKeysNoCustomHeadersSync(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), + after, acceptDatetime, context); + } + + /** + * Gets a list of key-values. + * + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @param after Instructs the server to return elements that appear after the element referred to by the specified * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. @@ -1108,11 +1781,12 @@ public PagedFlux getKeyValuesAsync(String key, String label, String af * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-values along with {@link PagedResponse}. + * @return a list of key-values along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse getKeyValuesSinglePage(String key, String label, String after, String acceptDatetime, - List select, String snapshot, String ifMatch, String ifNoneMatch, List tags) { + public Mono> getKeyValuesNoCustomHeadersSinglePageAsync(String key, String label, + String after, String acceptDatetime, List select, String snapshot, String ifMatch, + String ifNoneMatch, List tags) { final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; String selectConverted = (select == null) ? null @@ -1122,11 +1796,12 @@ public PagedResponse getKeyValuesSinglePage(String key, String label, List tagsConverted = (tags == null) ? new ArrayList<>() : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - ResponseBase res - = service.getKeyValuesSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), after, - acceptDatetime, selectConverted, snapshot, ifMatch, ifNoneMatch, tagsConverted, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + return FluxUtil + .withContext(context -> service.getKeyValuesNoCustomHeaders(this.getEndpoint(), key, label, + this.getSyncToken(), this.getApiVersion(), after, acceptDatetime, selectConverted, snapshot, ifMatch, + ifNoneMatch, tagsConverted, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); } /** @@ -1148,12 +1823,12 @@ public PagedResponse getKeyValuesSinglePage(String key, String label, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-values along with {@link PagedResponse}. + * @return a list of key-values along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse getKeyValuesSinglePage(String key, String label, String after, String acceptDatetime, - List select, String snapshot, String ifMatch, String ifNoneMatch, List tags, - Context context) { + public Mono> getKeyValuesNoCustomHeadersSinglePageAsync(String key, String label, + String after, String acceptDatetime, List select, String snapshot, String ifMatch, + String ifNoneMatch, List tags, Context context) { final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; String selectConverted = (select == null) ? null @@ -1163,11 +1838,11 @@ public PagedResponse getKeyValuesSinglePage(String key, String label, List tagsConverted = (tags == null) ? new ArrayList<>() : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - ResponseBase res - = service.getKeyValuesSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), after, - acceptDatetime, selectConverted, snapshot, ifMatch, ifNoneMatch, tagsConverted, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + return service + .getKeyValuesNoCustomHeaders(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), + after, acceptDatetime, selectConverted, snapshot, ifMatch, ifNoneMatch, tagsConverted, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); } /** @@ -1188,15 +1863,16 @@ public PagedResponse getKeyValuesSinglePage(String key, String label, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-values as paginated response with {@link PagedIterable}. + * @return a list of key-values as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getKeyValues(String key, String label, String after, String acceptDatetime, - List select, String snapshot, String ifMatch, String ifNoneMatch, List tags) { - return new PagedIterable<>( - () -> getKeyValuesSinglePage(key, label, after, acceptDatetime, select, snapshot, ifMatch, ifNoneMatch, - tags, Context.NONE), - nextLink -> getKeyValuesNextSinglePage(nextLink, acceptDatetime, ifMatch, ifNoneMatch)); + public PagedFlux getKeyValuesNoCustomHeadersAsync(String key, String label, String after, + String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, + List tags) { + return new PagedFlux<>( + () -> getKeyValuesNoCustomHeadersSinglePageAsync(key, label, after, acceptDatetime, select, snapshot, + ifMatch, ifNoneMatch, tags), + nextLink -> getKeyValuesNextSinglePageAsync(nextLink, acceptDatetime, ifMatch, ifNoneMatch)); } /** @@ -1218,20 +1894,20 @@ public PagedIterable getKeyValues(String key, String label, String aft * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-values as paginated response with {@link PagedIterable}. + * @return a list of key-values as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getKeyValues(String key, String label, String after, String acceptDatetime, - List select, String snapshot, String ifMatch, String ifNoneMatch, List tags, - Context context) { - return new PagedIterable<>( - () -> getKeyValuesSinglePage(key, label, after, acceptDatetime, select, snapshot, ifMatch, ifNoneMatch, - tags, context), - nextLink -> getKeyValuesNextSinglePage(nextLink, acceptDatetime, ifMatch, ifNoneMatch, context)); + public PagedFlux getKeyValuesNoCustomHeadersAsync(String key, String label, String after, + String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, + List tags, Context context) { + return new PagedFlux<>( + () -> getKeyValuesNoCustomHeadersSinglePageAsync(key, label, after, acceptDatetime, select, snapshot, + ifMatch, ifNoneMatch, tags, context), + nextLink -> getKeyValuesNextSinglePageAsync(nextLink, acceptDatetime, ifMatch, ifNoneMatch, context)); } /** - * Requests the headers and status of the given resource. + * Gets a list of key-values. * * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. @@ -1239,7 +1915,8 @@ public PagedIterable getKeyValues(String key, String label, String aft * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param select Used to select what fields are present in the returned resource(s). - * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. + * @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not + * valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. @@ -1247,12 +1924,12 @@ public PagedIterable getKeyValues(String key, String label, String aft * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 ResponseBase} on successful completion of {@link Mono}. + * @return a list of key-values along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkKeyValuesWithResponseAsync(String key, String label, - String after, String acceptDatetime, List select, String snapshot, String ifMatch, - String ifNoneMatch, List tags) { + public PagedResponse getKeyValuesSinglePage(String key, String label, String after, String acceptDatetime, + List select, String snapshot, String ifMatch, String ifNoneMatch, List tags) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; String selectConverted = (select == null) ? null : select.stream() @@ -1261,13 +1938,15 @@ public Mono> checkKeyValuesWithRespons List tagsConverted = (tags == null) ? new ArrayList<>() : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - return FluxUtil.withContext( - context -> service.checkKeyValues(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), - after, acceptDatetime, selectConverted, snapshot, ifMatch, ifNoneMatch, tagsConverted, context)); + ResponseBase res + = service.getKeyValuesSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), after, + acceptDatetime, selectConverted, snapshot, ifMatch, ifNoneMatch, tagsConverted, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); } /** - * Requests the headers and status of the given resource. + * Gets a list of key-values. * * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. @@ -1275,7 +1954,8 @@ public Mono> checkKeyValuesWithRespons * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param select Used to select what fields are present in the returned resource(s). - * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. + * @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not + * valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. @@ -1284,12 +1964,13 @@ public Mono> checkKeyValuesWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 ResponseBase} on successful completion of {@link Mono}. + * @return a list of key-values along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkKeyValuesWithResponseAsync(String key, String label, - String after, String acceptDatetime, List select, String snapshot, String ifMatch, - String ifNoneMatch, List tags, Context context) { + public PagedResponse getKeyValuesSinglePage(String key, String label, String after, String acceptDatetime, + List select, String snapshot, String ifMatch, String ifNoneMatch, List tags, + Context context) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; String selectConverted = (select == null) ? null : select.stream() @@ -1298,12 +1979,15 @@ public Mono> checkKeyValuesWithRespons List tagsConverted = (tags == null) ? new ArrayList<>() : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - return service.checkKeyValues(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), after, - acceptDatetime, selectConverted, snapshot, ifMatch, ifNoneMatch, tagsConverted, context); + ResponseBase res + = service.getKeyValuesSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), after, + acceptDatetime, selectConverted, snapshot, ifMatch, ifNoneMatch, tagsConverted, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); } /** - * Requests the headers and status of the given resource. + * Gets a list of key-values. * * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. @@ -1311,7 +1995,8 @@ public Mono> checkKeyValuesWithRespons * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param select Used to select what fields are present in the returned resource(s). - * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. + * @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not + * valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. @@ -1319,17 +2004,19 @@ public Mono> checkKeyValuesWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return a list of key-values as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkKeyValuesAsync(String key, String label, String after, String acceptDatetime, + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeyValues(String key, String label, String after, String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, List tags) { - return checkKeyValuesWithResponseAsync(key, label, after, acceptDatetime, select, snapshot, ifMatch, - ifNoneMatch, tags).flatMap(ignored -> Mono.empty()); + return new PagedIterable<>( + () -> getKeyValuesSinglePage(key, label, after, acceptDatetime, select, snapshot, ifMatch, ifNoneMatch, + tags, Context.NONE), + nextLink -> getKeyValuesNextSinglePage(nextLink, acceptDatetime, ifMatch, ifNoneMatch)); } /** - * Requests the headers and status of the given resource. + * Gets a list of key-values. * * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. @@ -1337,7 +2024,8 @@ public Mono checkKeyValuesAsync(String key, String label, String after, St * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param select Used to select what fields are present in the returned resource(s). - * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. + * @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not + * valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. @@ -1346,18 +2034,20 @@ public Mono checkKeyValuesAsync(String key, String label, String after, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return a list of key-values as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkKeyValuesAsync(String key, String label, String after, String acceptDatetime, + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeyValues(String key, String label, String after, String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, List tags, Context context) { - return checkKeyValuesWithResponseAsync(key, label, after, acceptDatetime, select, snapshot, ifMatch, - ifNoneMatch, tags, context).flatMap(ignored -> Mono.empty()); + return new PagedIterable<>( + () -> getKeyValuesSinglePage(key, label, after, acceptDatetime, select, snapshot, ifMatch, ifNoneMatch, + tags, context), + nextLink -> getKeyValuesNextSinglePage(nextLink, acceptDatetime, ifMatch, ifNoneMatch, context)); } /** - * Requests the headers and status of the given resource. + * Gets a list of key-values. * * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. @@ -1365,21 +2055,22 @@ public Mono checkKeyValuesAsync(String key, String label, String after, St * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param select Used to select what fields are present in the returned resource(s). - * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. + * @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not + * valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 ResponseBase}. + * @return a list of key-values along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase checkKeyValuesWithResponse(String key, String label, String after, + public PagedResponse getKeyValuesNoCustomHeadersSinglePage(String key, String label, String after, String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, - List tags, Context context) { + List tags) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; String selectConverted = (select == null) ? null : select.stream() @@ -1388,12 +2079,15 @@ public ResponseBase checkKeyValuesWithResponse(Stri List tagsConverted = (tags == null) ? new ArrayList<>() : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - return service.checkKeyValuesSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), - after, acceptDatetime, selectConverted, snapshot, ifMatch, ifNoneMatch, tagsConverted, context); + Response res = service.getKeyValuesNoCustomHeadersSync(this.getEndpoint(), key, label, + this.getSyncToken(), this.getApiVersion(), after, acceptDatetime, selectConverted, snapshot, ifMatch, + ifNoneMatch, tagsConverted, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); } /** - * Requests the headers and status of the given resource. + * Gets a list of key-values. * * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. @@ -1401,416 +2095,527 @@ public ResponseBase checkKeyValuesWithResponse(Stri * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param select Used to select what fields are present in the returned resource(s). - * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. + * @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not + * valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-values along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void checkKeyValues(String key, String label, String after, String acceptDatetime, - List select, String snapshot, String ifMatch, String ifNoneMatch, List tags) { - checkKeyValuesWithResponse(key, label, after, acceptDatetime, select, snapshot, ifMatch, ifNoneMatch, tags, - Context.NONE); - } - - /** - * Gets a single key-value. - * - * @param key The key of the key-value to retrieve. - * @param label The label of the key-value to retrieve. - * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. - * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. - * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value - * provided. - * @param select Used to select what fields are present in the returned resource(s). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single key-value along with {@link ResponseBase} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getKeyValueWithResponseAsync(String key, String label, - String acceptDatetime, String ifMatch, String ifNoneMatch, List select) { - final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + public PagedResponse getKeyValuesNoCustomHeadersSinglePage(String key, String label, String after, + String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, + List tags, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; String selectConverted = (select == null) ? null : select.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return FluxUtil.withContext(context -> service.getKeyValue(this.getEndpoint(), key, label, this.getSyncToken(), - this.getApiVersion(), acceptDatetime, ifMatch, ifNoneMatch, selectConverted, accept, context)); + List tagsConverted = (tags == null) + ? new ArrayList<>() + : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + Response res = service.getKeyValuesNoCustomHeadersSync(this.getEndpoint(), key, label, + this.getSyncToken(), this.getApiVersion(), after, acceptDatetime, selectConverted, snapshot, ifMatch, + ifNoneMatch, tagsConverted, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); } /** - * Gets a single key-value. + * Gets a list of key-values. * - * @param key The key of the key-value to retrieve. - * @param label The label of the key-value to retrieve. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not + * valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param select Used to select what fields are present in the returned resource(s). - * @param context The context to associate with this operation. + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single key-value along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return a list of key-values as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getKeyValueWithResponseAsync(String key, String label, - String acceptDatetime, String ifMatch, String ifNoneMatch, List select, Context context) { - final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; - String selectConverted = (select == null) - ? null - : select.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service.getKeyValue(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), - acceptDatetime, ifMatch, ifNoneMatch, selectConverted, accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeyValuesNoCustomHeaders(String key, String label, String after, + String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, + List tags) { + return new PagedIterable<>( + () -> getKeyValuesNoCustomHeadersSinglePage(key, label, after, acceptDatetime, select, snapshot, ifMatch, + ifNoneMatch, tags, Context.NONE), + nextLink -> getKeyValuesNextSinglePage(nextLink, acceptDatetime, ifMatch, ifNoneMatch)); } /** - * Gets a single key-value. + * Gets a list of key-values. * - * @param key The key of the key-value to retrieve. - * @param label The label of the key-value to retrieve. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not + * valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single key-value on successful completion of {@link Mono}. + * @return a list of key-values as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getKeyValueAsync(String key, String label, String acceptDatetime, String ifMatch, - String ifNoneMatch, List select) { - return getKeyValueWithResponseAsync(key, label, acceptDatetime, ifMatch, ifNoneMatch, select) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeyValuesNoCustomHeaders(String key, String label, String after, + String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, + List tags, Context context) { + return new PagedIterable<>( + () -> getKeyValuesNoCustomHeadersSinglePage(key, label, after, acceptDatetime, select, snapshot, ifMatch, + ifNoneMatch, tags, context), + nextLink -> getKeyValuesNextSinglePage(nextLink, acceptDatetime, ifMatch, ifNoneMatch, context)); } /** - * Gets a single key-value. + * Requests the headers and status of the given resource. * - * @param key The key of the key-value to retrieve. - * @param label The label of the key-value to retrieve. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param select Used to select what fields are present in the returned resource(s). - * @param context The context to associate with this operation. + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single key-value on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getKeyValueAsync(String key, String label, String acceptDatetime, String ifMatch, - String ifNoneMatch, List select, Context context) { - return getKeyValueWithResponseAsync(key, label, acceptDatetime, ifMatch, ifNoneMatch, select, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono> checkKeyValuesWithResponseAsync(String key, String label, + String after, String acceptDatetime, List select, String snapshot, String ifMatch, + String ifNoneMatch, List tags) { + return FluxUtil.withContext(context -> checkKeyValuesWithResponseAsync(key, label, after, acceptDatetime, + select, snapshot, ifMatch, ifNoneMatch, tags, context)); } /** - * Gets a single key-value. + * Requests the headers and status of the given resource. * - * @param key The key of the key-value to retrieve. - * @param label The label of the key-value to retrieve. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single key-value along with {@link ResponseBase}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getKeyValueWithResponse(String key, String label, - String acceptDatetime, String ifMatch, String ifNoneMatch, List select, Context context) { - final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + public Mono> checkKeyValuesWithResponseAsync(String key, String label, + String after, String acceptDatetime, List select, String snapshot, String ifMatch, + String ifNoneMatch, List tags, Context context) { String selectConverted = (select == null) ? null : select.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.getKeyValueSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), - acceptDatetime, ifMatch, ifNoneMatch, selectConverted, accept, context); + List tagsConverted = (tags == null) + ? new ArrayList<>() + : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return service.checkKeyValues(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), after, + acceptDatetime, selectConverted, snapshot, ifMatch, ifNoneMatch, tagsConverted, context); } /** - * Gets a single key-value. + * Requests the headers and status of the given resource. * - * @param key The key of the key-value to retrieve. - * @param label The label of the key-value to retrieve. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single key-value. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public KeyValue getKeyValue(String key, String label, String acceptDatetime, String ifMatch, String ifNoneMatch, - List select) { - return getKeyValueWithResponse(key, label, acceptDatetime, ifMatch, ifNoneMatch, select, Context.NONE) - .getValue(); + public Mono checkKeyValuesAsync(String key, String label, String after, String acceptDatetime, + List select, String snapshot, String ifMatch, String ifNoneMatch, List tags) { + return checkKeyValuesWithResponseAsync(key, label, after, acceptDatetime, select, snapshot, ifMatch, + ifNoneMatch, tags).flatMap(ignored -> Mono.empty()); } /** - * Creates a key-value. + * Requests the headers and status of the given resource. * - * @param key The key of the key-value to create. - * @param label The label of the key-value to create. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param entity The key-value to create. + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> putKeyValueWithResponseAsync(String key, String label, - String ifMatch, String ifNoneMatch, KeyValue entity) { - final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; - return FluxUtil.withContext(context -> service.putKeyValue(this.getEndpoint(), key, label, this.getSyncToken(), - this.getApiVersion(), ifMatch, ifNoneMatch, entity, accept, context)); + public Mono checkKeyValuesAsync(String key, String label, String after, String acceptDatetime, + List select, String snapshot, String ifMatch, String ifNoneMatch, List tags, + Context context) { + return checkKeyValuesWithResponseAsync(key, label, after, acceptDatetime, select, snapshot, ifMatch, + ifNoneMatch, tags, context).flatMap(ignored -> Mono.empty()); } /** - * Creates a key-value. + * Requests the headers and status of the given resource. * - * @param key The key of the key-value to create. - * @param label The label of the key-value to create. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param entity The key-value to create. - * @param context The context to associate with this operation. + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> putKeyValueWithResponseAsync(String key, String label, - String ifMatch, String ifNoneMatch, KeyValue entity, Context context) { - final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; - return service.putKeyValue(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), ifMatch, - ifNoneMatch, entity, accept, context); + public Mono> checkKeyValuesNoCustomHeadersWithResponseAsync(String key, String label, String after, + String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, + List tags) { + return FluxUtil.withContext(context -> checkKeyValuesNoCustomHeadersWithResponseAsync(key, label, after, + acceptDatetime, select, snapshot, ifMatch, ifNoneMatch, tags, context)); } /** - * Creates a key-value. + * Requests the headers and status of the given resource. * - * @param key The key of the key-value to create. - * @param label The label of the key-value to create. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param entity The key-value to create. + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono putKeyValueAsync(String key, String label, String ifMatch, String ifNoneMatch, - KeyValue entity) { - return putKeyValueWithResponseAsync(key, label, ifMatch, ifNoneMatch, entity) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono> checkKeyValuesNoCustomHeadersWithResponseAsync(String key, String label, String after, + String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, + List tags, Context context) { + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + List tagsConverted = (tags == null) + ? new ArrayList<>() + : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return service.checkKeyValuesNoCustomHeaders(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, selectConverted, snapshot, ifMatch, ifNoneMatch, tagsConverted, + context); } /** - * Creates a key-value. + * Requests the headers and status of the given resource. * - * @param key The key of the key-value to create. - * @param label The label of the key-value to create. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param entity The key-value to create. + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono putKeyValueAsync(String key, String label, String ifMatch, String ifNoneMatch, - KeyValue entity, Context context) { - return putKeyValueWithResponseAsync(key, label, ifMatch, ifNoneMatch, entity, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public ResponseBase checkKeyValuesWithResponse(String key, String label, String after, + String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, + List tags, Context context) { + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + List tagsConverted = (tags == null) + ? new ArrayList<>() + : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return service.checkKeyValuesSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), + after, acceptDatetime, selectConverted, snapshot, ifMatch, ifNoneMatch, tagsConverted, context); } /** - * Creates a key-value. + * Requests the headers and status of the given resource. * - * @param key The key of the key-value to create. - * @param label The label of the key-value to create. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param entity The key-value to create. - * @param context The context to associate with this operation. + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase putKeyValueWithResponse(String key, String label, String ifMatch, - String ifNoneMatch, KeyValue entity, Context context) { - final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; - return service.putKeyValueSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), - ifMatch, ifNoneMatch, entity, accept, context); + public void checkKeyValues(String key, String label, String after, String acceptDatetime, + List select, String snapshot, String ifMatch, String ifNoneMatch, List tags) { + checkKeyValuesWithResponse(key, label, after, acceptDatetime, select, snapshot, ifMatch, ifNoneMatch, tags, + Context.NONE); } /** - * Creates a key-value. + * Requests the headers and status of the given resource. * - * @param key The key of the key-value to create. - * @param label The label of the key-value to create. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param entity The key-value to create. + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public KeyValue putKeyValue(String key, String label, String ifMatch, String ifNoneMatch, KeyValue entity) { - return putKeyValueWithResponse(key, label, ifMatch, ifNoneMatch, entity, Context.NONE).getValue(); + public Response checkKeyValuesNoCustomHeadersWithResponse(String key, String label, String after, + String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, + List tags, Context context) { + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + List tagsConverted = (tags == null) + ? new ArrayList<>() + : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return service.checkKeyValuesNoCustomHeadersSync(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, selectConverted, snapshot, ifMatch, ifNoneMatch, tagsConverted, + context); } /** - * Deletes a key-value. + * Gets a single key-value. * - * @param key The key of the key-value to delete. - * @param label The label of the key-value to delete. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return a single key-value along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteKeyValueWithResponseAsync(String key, String label, - String ifMatch) { - final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; - return FluxUtil.withContext(context -> service.deleteKeyValue(this.getEndpoint(), key, label, - this.getSyncToken(), this.getApiVersion(), ifMatch, accept, context)); + public Mono> getKeyValueWithResponseAsync(String key, String label, + String acceptDatetime, String ifMatch, String ifNoneMatch, List select) { + return FluxUtil.withContext( + context -> getKeyValueWithResponseAsync(key, label, acceptDatetime, ifMatch, ifNoneMatch, select, context)); } /** - * Deletes a key-value. + * Gets a single key-value. * - * @param key The key of the key-value to delete. - * @param label The label of the key-value to delete. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return a single key-value along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteKeyValueWithResponseAsync(String key, String label, - String ifMatch, Context context) { + public Mono> getKeyValueWithResponseAsync(String key, String label, + String acceptDatetime, String ifMatch, String ifNoneMatch, List select, Context context) { final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; - return service.deleteKeyValue(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), - ifMatch, accept, context); + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.getKeyValue(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), + acceptDatetime, ifMatch, ifNoneMatch, selectConverted, accept, context); } /** - * Deletes a key-value. + * Gets a single key-value. * - * @param key The key of the key-value to delete. - * @param label The label of the key-value to delete. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body on successful completion of {@link Mono}. + * @return a single key-value on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteKeyValueAsync(String key, String label, String ifMatch) { - return deleteKeyValueWithResponseAsync(key, label, ifMatch).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getKeyValueAsync(String key, String label, String acceptDatetime, String ifMatch, + String ifNoneMatch, List select) { + return getKeyValueWithResponseAsync(key, label, acceptDatetime, ifMatch, ifNoneMatch, select) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes a key-value. + * Gets a single key-value. * - * @param key The key of the key-value to delete. - * @param label The label of the key-value to delete. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body on successful completion of {@link Mono}. + * @return a single key-value on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteKeyValueAsync(String key, String label, String ifMatch, Context context) { - return deleteKeyValueWithResponseAsync(key, label, ifMatch, context) + public Mono getKeyValueAsync(String key, String label, String acceptDatetime, String ifMatch, + String ifNoneMatch, List select, Context context) { + return getKeyValueWithResponseAsync(key, label, acceptDatetime, ifMatch, ifNoneMatch, select, context) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes a key-value. + * Gets a single key-value. * - * @param key The key of the key-value to delete. - * @param label The label of the key-value to delete. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. - * @param context The context to associate with this operation. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase}. + * @return a single key-value along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase deleteKeyValueWithResponse(String key, String label, - String ifMatch, Context context) { - final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; - return service.deleteKeyValueSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), - ifMatch, accept, context); + public Mono> getKeyValueNoCustomHeadersWithResponseAsync(String key, String label, + String acceptDatetime, String ifMatch, String ifNoneMatch, List select) { + return FluxUtil.withContext(context -> getKeyValueNoCustomHeadersWithResponseAsync(key, label, acceptDatetime, + ifMatch, ifNoneMatch, select, context)); } /** - * Deletes a key-value. + * Gets a single key-value. * - * @param key The key of the key-value to delete. - * @param label The label of the key-value to delete. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return a single key-value along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public KeyValue deleteKeyValue(String key, String label, String ifMatch) { - return deleteKeyValueWithResponse(key, label, ifMatch, Context.NONE).getValue(); + public Mono> getKeyValueNoCustomHeadersWithResponseAsync(String key, String label, + String acceptDatetime, String ifMatch, String ifNoneMatch, List select, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.getKeyValueNoCustomHeaders(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), acceptDatetime, ifMatch, ifNoneMatch, selectConverted, accept, context); } /** - * Requests the headers and status of the given resource. + * Gets a single key-value. * * @param key The key of the key-value to retrieve. * @param label The label of the key-value to retrieve. @@ -1819,25 +2624,27 @@ public KeyValue deleteKeyValue(String key, String label, String ifMatch) { * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 ResponseBase} on successful completion of {@link Mono}. + * @return a single key-value along with {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkKeyValueWithResponseAsync(String key, String label, - String acceptDatetime, String ifMatch, String ifNoneMatch, List select) { + public ResponseBase getKeyValueWithResponse(String key, String label, + String acceptDatetime, String ifMatch, String ifNoneMatch, List select, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; String selectConverted = (select == null) ? null : select.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return FluxUtil.withContext(context -> service.checkKeyValue(this.getEndpoint(), key, label, - this.getSyncToken(), this.getApiVersion(), acceptDatetime, ifMatch, ifNoneMatch, selectConverted, context)); + return service.getKeyValueSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), + acceptDatetime, ifMatch, ifNoneMatch, selectConverted, accept, context); } /** - * Requests the headers and status of the given resource. + * Gets a single key-value. * * @param key The key of the key-value to retrieve. * @param label The label of the key-value to retrieve. @@ -1846,26 +2653,20 @@ public Mono> checkKeyValueWithResponseA * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. * @param select Used to select what fields are present in the returned resource(s). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 ResponseBase} on successful completion of {@link Mono}. + * @return a single key-value. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkKeyValueWithResponseAsync(String key, String label, - String acceptDatetime, String ifMatch, String ifNoneMatch, List select, Context context) { - String selectConverted = (select == null) - ? null - : select.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service.checkKeyValue(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), - acceptDatetime, ifMatch, ifNoneMatch, selectConverted, context); + public KeyValue getKeyValue(String key, String label, String acceptDatetime, String ifMatch, String ifNoneMatch, + List select) { + return getKeyValueWithResponse(key, label, acceptDatetime, ifMatch, ifNoneMatch, select, Context.NONE) + .getValue(); } /** - * Requests the headers and status of the given resource. + * Gets a single key-value. * * @param key The key of the key-value to retrieve. * @param label The label of the key-value to retrieve. @@ -1874,406 +2675,392 @@ public Mono> checkKeyValueWithResponseA * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return a single key-value along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkKeyValueAsync(String key, String label, String acceptDatetime, String ifMatch, - String ifNoneMatch, List select) { - return checkKeyValueWithResponseAsync(key, label, acceptDatetime, ifMatch, ifNoneMatch, select) - .flatMap(ignored -> Mono.empty()); + public Response getKeyValueNoCustomHeadersWithResponse(String key, String label, String acceptDatetime, + String ifMatch, String ifNoneMatch, List select, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.getKeyValueNoCustomHeadersSync(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), acceptDatetime, ifMatch, ifNoneMatch, selectConverted, accept, context); } /** - * Requests the headers and status of the given resource. + * Creates a key-value. * - * @param key The key of the key-value to retrieve. - * @param label The label of the key-value to retrieve. - * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param key The key of the key-value to create. + * @param label The label of the key-value to create. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param select Used to select what fields are present in the returned resource(s). - * @param context The context to associate with this operation. + * @param entity The key-value to create. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkKeyValueAsync(String key, String label, String acceptDatetime, String ifMatch, - String ifNoneMatch, List select, Context context) { - return checkKeyValueWithResponseAsync(key, label, acceptDatetime, ifMatch, ifNoneMatch, select, context) - .flatMap(ignored -> Mono.empty()); + public Mono> putKeyValueWithResponseAsync(String key, String label, + String ifMatch, String ifNoneMatch, KeyValue entity) { + return FluxUtil + .withContext(context -> putKeyValueWithResponseAsync(key, label, ifMatch, ifNoneMatch, entity, context)); } /** - * Requests the headers and status of the given resource. + * Creates a key-value. * - * @param key The key of the key-value to retrieve. - * @param label The label of the key-value to retrieve. - * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param key The key of the key-value to create. + * @param label The label of the key-value to create. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param select Used to select what fields are present in the returned resource(s). + * @param entity The key-value to create. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 ResponseBase}. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase checkKeyValueWithResponse(String key, String label, - String acceptDatetime, String ifMatch, String ifNoneMatch, List select, Context context) { - String selectConverted = (select == null) - ? null - : select.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service.checkKeyValueSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), - acceptDatetime, ifMatch, ifNoneMatch, selectConverted, context); + public Mono> putKeyValueWithResponseAsync(String key, String label, + String ifMatch, String ifNoneMatch, KeyValue entity, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + return service.putKeyValue(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), ifMatch, + ifNoneMatch, entity, accept, context); } /** - * Requests the headers and status of the given resource. + * Creates a key-value. * - * @param key The key of the key-value to retrieve. - * @param label The label of the key-value to retrieve. - * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param key The key of the key-value to create. + * @param label The label of the key-value to create. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. - * @param select Used to select what fields are present in the returned resource(s). + * @param entity The key-value to create. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void checkKeyValue(String key, String label, String acceptDatetime, String ifMatch, String ifNoneMatch, - List select) { - checkKeyValueWithResponse(key, label, acceptDatetime, ifMatch, ifNoneMatch, select, Context.NONE); + public Mono putKeyValueAsync(String key, String label, String ifMatch, String ifNoneMatch, + KeyValue entity) { + return putKeyValueWithResponseAsync(key, label, ifMatch, ifNoneMatch, entity) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of key-value snapshots. + * Creates a key-value. * - * @param name A filter for the name of the returned snapshots. - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. - * @param select Used to select what fields are present in the returned resource(s). - * @param status Used to filter returned snapshots by their status property. + * @param key The key of the key-value to create. + * @param label The label of the key-value to create. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param entity The key-value to create. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-value snapshots along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSnapshotsSinglePageAsync(String name, String after, - List select, List status) { - final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; - String selectConverted = (select == null) - ? null - : select.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - String statusConverted = (status == null) - ? null - : status.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return FluxUtil - .withContext(context -> service.getSnapshots(this.getEndpoint(), name, this.getSyncToken(), - this.getApiVersion(), after, selectConverted, statusConverted, accept, context)) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders())); + public Mono putKeyValueAsync(String key, String label, String ifMatch, String ifNoneMatch, + KeyValue entity, Context context) { + return putKeyValueWithResponseAsync(key, label, ifMatch, ifNoneMatch, entity, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of key-value snapshots. + * Creates a key-value. * - * @param name A filter for the name of the returned snapshots. - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. - * @param select Used to select what fields are present in the returned resource(s). - * @param status Used to filter returned snapshots by their status property. - * @param context The context to associate with this operation. + * @param key The key of the key-value to create. + * @param label The label of the key-value to create. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param entity The key-value to create. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-value snapshots along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSnapshotsSinglePageAsync(String name, String after, - List select, List status, Context context) { - final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; - String selectConverted = (select == null) - ? null - : select.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - String statusConverted = (status == null) - ? null - : status.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service - .getSnapshots(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), after, selectConverted, - statusConverted, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders())); + public Mono> putKeyValueNoCustomHeadersWithResponseAsync(String key, String label, + String ifMatch, String ifNoneMatch, KeyValue entity) { + return FluxUtil.withContext( + context -> putKeyValueNoCustomHeadersWithResponseAsync(key, label, ifMatch, ifNoneMatch, entity, context)); } /** - * Gets a list of key-value snapshots. + * Creates a key-value. * - * @param name A filter for the name of the returned snapshots. - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. - * @param select Used to select what fields are present in the returned resource(s). - * @param status Used to filter returned snapshots by their status property. + * @param key The key of the key-value to create. + * @param label The label of the key-value to create. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param entity The key-value to create. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-value snapshots as paginated response with {@link PagedFlux}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getSnapshotsAsync(String name, String after, List select, - List status) { - return new PagedFlux<>(() -> getSnapshotsSinglePageAsync(name, after, select, status), - nextLink -> getSnapshotsNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> putKeyValueNoCustomHeadersWithResponseAsync(String key, String label, + String ifMatch, String ifNoneMatch, KeyValue entity, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + return service.putKeyValueNoCustomHeaders(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), ifMatch, ifNoneMatch, entity, accept, context); } /** - * Gets a list of key-value snapshots. + * Creates a key-value. * - * @param name A filter for the name of the returned snapshots. - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. - * @param select Used to select what fields are present in the returned resource(s). - * @param status Used to filter returned snapshots by their status property. + * @param key The key of the key-value to create. + * @param label The label of the key-value to create. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param entity The key-value to create. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-value snapshots as paginated response with {@link PagedFlux}. + * @return the response body along with {@link ResponseBase}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getSnapshotsAsync(String name, String after, List select, - List status, Context context) { - return new PagedFlux<>(() -> getSnapshotsSinglePageAsync(name, after, select, status, context), - nextLink -> getSnapshotsNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase putKeyValueWithResponse(String key, String label, String ifMatch, + String ifNoneMatch, KeyValue entity, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + return service.putKeyValueSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), + ifMatch, ifNoneMatch, entity, accept, context); } /** - * Gets a list of key-value snapshots. + * Creates a key-value. * - * @param name A filter for the name of the returned snapshots. - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. - * @param select Used to select what fields are present in the returned resource(s). - * @param status Used to filter returned snapshots by their status property. + * @param key The key of the key-value to create. + * @param label The label of the key-value to create. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param entity The key-value to create. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-value snapshots along with {@link PagedResponse}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse getSnapshotsSinglePage(String name, String after, - List select, List status) { - final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; - String selectConverted = (select == null) - ? null - : select.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - String statusConverted = (status == null) - ? null - : status.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - ResponseBase res = service.getSnapshotsSync(this.getEndpoint(), name, - this.getSyncToken(), this.getApiVersion(), after, selectConverted, statusConverted, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + public KeyValue putKeyValue(String key, String label, String ifMatch, String ifNoneMatch, KeyValue entity) { + return putKeyValueWithResponse(key, label, ifMatch, ifNoneMatch, entity, Context.NONE).getValue(); } /** - * Gets a list of key-value snapshots. + * Creates a key-value. * - * @param name A filter for the name of the returned snapshots. - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. - * @param select Used to select what fields are present in the returned resource(s). - * @param status Used to filter returned snapshots by their status property. + * @param key The key of the key-value to create. + * @param label The label of the key-value to create. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param entity The key-value to create. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-value snapshots along with {@link PagedResponse}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse getSnapshotsSinglePage(String name, String after, - List select, List status, Context context) { - final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; - String selectConverted = (select == null) - ? null - : select.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - String statusConverted = (status == null) - ? null - : status.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - ResponseBase res = service.getSnapshotsSync(this.getEndpoint(), name, - this.getSyncToken(), this.getApiVersion(), after, selectConverted, statusConverted, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + public Response putKeyValueNoCustomHeadersWithResponse(String key, String label, String ifMatch, + String ifNoneMatch, KeyValue entity, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + return service.putKeyValueNoCustomHeadersSync(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), ifMatch, ifNoneMatch, entity, accept, context); } /** - * Gets a list of key-value snapshots. + * Deletes a key-value. * - * @param name A filter for the name of the returned snapshots. - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. - * @param select Used to select what fields are present in the returned resource(s). - * @param status Used to filter returned snapshots by their status property. + * @param key The key of the key-value to delete. + * @param label The label of the key-value to delete. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-value snapshots as paginated response with {@link PagedIterable}. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getSnapshots(String name, String after, List select, - List status) { - return new PagedIterable<>(() -> getSnapshotsSinglePage(name, after, select, status, Context.NONE), - nextLink -> getSnapshotsNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteKeyValueWithResponseAsync(String key, String label, + String ifMatch) { + return FluxUtil.withContext(context -> deleteKeyValueWithResponseAsync(key, label, ifMatch, context)); } /** - * Gets a list of key-value snapshots. + * Deletes a key-value. * - * @param name A filter for the name of the returned snapshots. - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. - * @param select Used to select what fields are present in the returned resource(s). - * @param status Used to filter returned snapshots by their status property. + * @param key The key of the key-value to delete. + * @param label The label of the key-value to delete. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-value snapshots as paginated response with {@link PagedIterable}. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getSnapshots(String name, String after, List select, - List status, Context context) { - return new PagedIterable<>(() -> getSnapshotsSinglePage(name, after, select, status, context), - nextLink -> getSnapshotsNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteKeyValueWithResponseAsync(String key, String label, + String ifMatch, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + return service.deleteKeyValue(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), + ifMatch, accept, context); } /** - * Requests the headers and status of the given resource. + * Deletes a key-value. * - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. + * @param key The key of the key-value to delete. + * @param label The label of the key-value to delete. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 ResponseBase} on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkSnapshotsWithResponseAsync(String after) { - return FluxUtil.withContext(context -> service.checkSnapshots(this.getEndpoint(), this.getSyncToken(), - this.getApiVersion(), after, context)); + public Mono deleteKeyValueAsync(String key, String label, String ifMatch) { + return deleteKeyValueWithResponseAsync(key, label, ifMatch).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Requests the headers and status of the given resource. + * Deletes a key-value. * - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. + * @param key The key of the key-value to delete. + * @param label The label of the key-value to delete. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 ResponseBase} on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkSnapshotsWithResponseAsync(String after, - Context context) { - return service.checkSnapshots(this.getEndpoint(), this.getSyncToken(), this.getApiVersion(), after, context); + public Mono deleteKeyValueAsync(String key, String label, String ifMatch, Context context) { + return deleteKeyValueWithResponseAsync(key, label, ifMatch, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Requests the headers and status of the given resource. + * Deletes a key-value. * - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. + * @param key The key of the key-value to delete. + * @param label The label of the key-value to delete. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkSnapshotsAsync(String after) { - return checkSnapshotsWithResponseAsync(after).flatMap(ignored -> Mono.empty()); + public Mono> deleteKeyValueNoCustomHeadersWithResponseAsync(String key, String label, + String ifMatch) { + return FluxUtil + .withContext(context -> deleteKeyValueNoCustomHeadersWithResponseAsync(key, label, ifMatch, context)); } /** - * Requests the headers and status of the given resource. + * Deletes a key-value. * - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. + * @param key The key of the key-value to delete. + * @param label The label of the key-value to delete. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkSnapshotsAsync(String after, Context context) { - return checkSnapshotsWithResponseAsync(after, context).flatMap(ignored -> Mono.empty()); + public Mono> deleteKeyValueNoCustomHeadersWithResponseAsync(String key, String label, + String ifMatch, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + return service.deleteKeyValueNoCustomHeaders(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), ifMatch, accept, context); } /** - * Requests the headers and status of the given resource. + * Deletes a key-value. * - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. + * @param key The key of the key-value to delete. + * @param label The label of the key-value to delete. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 ResponseBase}. + * @return the response body along with {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase checkSnapshotsWithResponse(String after, Context context) { - return service.checkSnapshotsSync(this.getEndpoint(), this.getSyncToken(), this.getApiVersion(), after, - context); + public ResponseBase deleteKeyValueWithResponse(String key, String label, + String ifMatch, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + return service.deleteKeyValueSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), + ifMatch, accept, context); } /** - * Requests the headers and status of the given resource. + * Deletes a key-value. * - * @param after Instructs the server to return elements that appear after the element referred to by the specified - * token. + * @param key The key of the key-value to delete. + * @param label The label of the key-value to delete. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void checkSnapshots(String after) { - checkSnapshotsWithResponse(after, Context.NONE); + public KeyValue deleteKeyValue(String key, String label, String ifMatch) { + return deleteKeyValueWithResponse(key, label, ifMatch, Context.NONE).getValue(); } /** - * Gets a single key-value snapshot. + * Deletes a key-value. * - * @param name The name of the key-value snapshot to retrieve. + * @param key The key of the key-value to delete. + * @param label The label of the key-value to delete. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteKeyValueNoCustomHeadersWithResponse(String key, String label, String ifMatch, + Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + return service.deleteKeyValueNoCustomHeadersSync(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), ifMatch, accept, context); + } + + /** + * Requests the headers and status of the given resource. + * + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. @@ -2281,25 +3068,21 @@ public void checkSnapshots(String after) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single key-value snapshot along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSnapshotWithResponseAsync(String name, - String ifMatch, String ifNoneMatch, List select) { - final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; - String selectConverted = (select == null) - ? null - : select.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return FluxUtil.withContext(context -> service.getSnapshot(this.getEndpoint(), this.getSyncToken(), - this.getApiVersion(), name, ifMatch, ifNoneMatch, selectConverted, accept, context)); + public Mono> checkKeyValueWithResponseAsync(String key, String label, + String acceptDatetime, String ifMatch, String ifNoneMatch, List select) { + return FluxUtil.withContext(context -> checkKeyValueWithResponseAsync(key, label, acceptDatetime, ifMatch, + ifNoneMatch, select, context)); } /** - * Gets a single key-value snapshot. + * Requests the headers and status of the given resource. * - * @param name The name of the key-value snapshot to retrieve. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. @@ -2308,25 +3091,26 @@ public Mono> getSnapshot * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single key-value snapshot along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSnapshotWithResponseAsync(String name, - String ifMatch, String ifNoneMatch, List select, Context context) { - final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + public Mono> checkKeyValueWithResponseAsync(String key, String label, + String acceptDatetime, String ifMatch, String ifNoneMatch, List select, Context context) { String selectConverted = (select == null) ? null : select.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.getSnapshot(this.getEndpoint(), this.getSyncToken(), this.getApiVersion(), name, ifMatch, - ifNoneMatch, selectConverted, accept, context); + return service.checkKeyValue(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), + acceptDatetime, ifMatch, ifNoneMatch, selectConverted, context); } /** - * Gets a single key-value snapshot. + * Requests the headers and status of the given resource. * - * @param name The name of the key-value snapshot to retrieve. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. @@ -2334,19 +3118,21 @@ public Mono> getSnapshot * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single key-value snapshot on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getSnapshotAsync(String name, String ifMatch, String ifNoneMatch, - List select) { - return getSnapshotWithResponseAsync(name, ifMatch, ifNoneMatch, select) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono checkKeyValueAsync(String key, String label, String acceptDatetime, String ifMatch, + String ifNoneMatch, List select) { + return checkKeyValueWithResponseAsync(key, label, acceptDatetime, ifMatch, ifNoneMatch, select) + .flatMap(ignored -> Mono.empty()); } /** - * Gets a single key-value snapshot. + * Requests the headers and status of the given resource. * - * @param name The name of the key-value snapshot to retrieve. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. @@ -2355,19 +3141,43 @@ public Mono getSnapshotAsync(String name, String ifMatch, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single key-value snapshot on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getSnapshotAsync(String name, String ifMatch, String ifNoneMatch, - List select, Context context) { - return getSnapshotWithResponseAsync(name, ifMatch, ifNoneMatch, select, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono checkKeyValueAsync(String key, String label, String acceptDatetime, String ifMatch, + String ifNoneMatch, List select, Context context) { + return checkKeyValueWithResponseAsync(key, label, acceptDatetime, ifMatch, ifNoneMatch, select, context) + .flatMap(ignored -> Mono.empty()); } /** - * Gets a single key-value snapshot. + * Requests the headers and status of the given resource. * - * @param name The name of the key-value snapshot to retrieve. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> checkKeyValueNoCustomHeadersWithResponseAsync(String key, String label, + String acceptDatetime, String ifMatch, String ifNoneMatch, List select) { + return FluxUtil.withContext(context -> checkKeyValueNoCustomHeadersWithResponseAsync(key, label, acceptDatetime, + ifMatch, ifNoneMatch, select, context)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. @@ -2376,195 +3186,1090 @@ public Mono getSnapshotAsync(String name, String ifMatch, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single key-value snapshot along with {@link ResponseBase}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getSnapshotWithResponse(String name, String ifMatch, - String ifNoneMatch, List select, Context context) { - final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + public Mono> checkKeyValueNoCustomHeadersWithResponseAsync(String key, String label, + String acceptDatetime, String ifMatch, String ifNoneMatch, List select, Context context) { String selectConverted = (select == null) ? null : select.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.getSnapshotSync(this.getEndpoint(), this.getSyncToken(), this.getApiVersion(), name, ifMatch, - ifNoneMatch, selectConverted, accept, context); + return service.checkKeyValueNoCustomHeaders(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), acceptDatetime, ifMatch, ifNoneMatch, selectConverted, context); } /** - * Gets a single key-value snapshot. + * Requests the headers and status of the given resource. * - * @param name The name of the key-value snapshot to retrieve. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single key-value snapshot. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSnapshot getSnapshot(String name, String ifMatch, String ifNoneMatch, - List select) { - return getSnapshotWithResponse(name, ifMatch, ifNoneMatch, select, Context.NONE).getValue(); + public ResponseBase checkKeyValueWithResponse(String key, String label, + String acceptDatetime, String ifMatch, String ifNoneMatch, List select, Context context) { + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.checkKeyValueSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), + acceptDatetime, ifMatch, ifNoneMatch, selectConverted, context); } /** - * Creates a key-value snapshot. + * Requests the headers and status of the given resource. * - * @param name The name of the key-value snapshot to create. - * @param entity The key-value snapshot to create. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createSnapshotWithResponseAsync(String name, - ConfigurationSnapshot entity) { - final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; - return FluxUtil.withContext(context -> service.createSnapshot(this.getEndpoint(), name, this.getSyncToken(), - this.getApiVersion(), entity, accept, context)); + public void checkKeyValue(String key, String label, String acceptDatetime, String ifMatch, String ifNoneMatch, + List select) { + checkKeyValueWithResponse(key, label, acceptDatetime, ifMatch, ifNoneMatch, select, Context.NONE); } /** - * Creates a key-value snapshot. + * Requests the headers and status of the given resource. * - * @param name The name of the key-value snapshot to create. - * @param entity The key-value snapshot to create. + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createSnapshotWithResponseAsync(String name, - ConfigurationSnapshot entity, Context context) { - final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; - return service.createSnapshot(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), entity, - accept, context); + public Response checkKeyValueNoCustomHeadersWithResponse(String key, String label, String acceptDatetime, + String ifMatch, String ifNoneMatch, List select, Context context) { + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.checkKeyValueNoCustomHeadersSync(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), acceptDatetime, ifMatch, ifNoneMatch, selectConverted, context); } /** - * Creates a key-value snapshot. + * Gets a list of key-value snapshots. * - * @param name The name of the key-value snapshot to create. - * @param entity The key-value snapshot to create. + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body on successful completion of {@link Mono}. + * @return a list of key-value snapshots along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createSnapshotAsync(String name, ConfigurationSnapshot entity) { - return createSnapshotWithResponseAsync(name, entity).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono> getSnapshotsSinglePageAsync(String name, String after, + List select, List status) { + final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + String statusConverted = (status == null) + ? null + : status.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil + .withContext(context -> service.getSnapshots(this.getEndpoint(), name, this.getSyncToken(), + this.getApiVersion(), after, selectConverted, statusConverted, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders())); } /** - * Creates a key-value snapshot. + * Gets a list of key-value snapshots. * - * @param name The name of the key-value snapshot to create. - * @param entity The key-value snapshot to create. + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body on successful completion of {@link Mono}. + * @return a list of key-value snapshots along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createSnapshotAsync(String name, ConfigurationSnapshot entity, Context context) { - return createSnapshotWithResponseAsync(name, entity, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono> getSnapshotsSinglePageAsync(String name, String after, + List select, List status, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + String statusConverted = (status == null) + ? null + : status.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service + .getSnapshots(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), after, selectConverted, + statusConverted, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders())); } /** - * Creates a key-value snapshot. + * Gets a list of key-value snapshots. * - * @param name The name of the key-value snapshot to create. - * @param entity The key-value snapshot to create. - * @param context The context to associate with this operation. + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase}. + * @return a list of key-value snapshots as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase createSnapshotWithResponse(String name, - ConfigurationSnapshot entity, Context context) { - final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; - return service.createSnapshotSync(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), entity, - accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getSnapshotsAsync(String name, String after, List select, + List status) { + return new PagedFlux<>(() -> getSnapshotsSinglePageAsync(name, after, select, status), + nextLink -> getSnapshotsNextSinglePageAsync(nextLink)); } /** - * Creates a key-value snapshot. + * Gets a list of key-value snapshots. * - * @param name The name of the key-value snapshot to create. - * @param entity The key-value snapshot to create. + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return a list of key-value snapshots as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationSnapshot createSnapshot(String name, ConfigurationSnapshot entity) { - return createSnapshotWithResponse(name, entity, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getSnapshotsAsync(String name, String after, List select, + List status, Context context) { + return new PagedFlux<>(() -> getSnapshotsSinglePageAsync(name, after, select, status, context), + nextLink -> getSnapshotsNextSinglePageAsync(nextLink, context)); } /** - * Updates the state of a key-value snapshot. + * Gets a list of key-value snapshots. * - * @param name The name of the key-value snapshot to update. - * @param entity The parameters used to update the snapshot. - * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. - * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value - * provided. + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return a list of key-value snapshots along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateSnapshotWithResponseAsync(String name, - SnapshotUpdateParameters entity, String ifMatch, String ifNoneMatch) { - final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; - return FluxUtil.withContext(context -> service.updateSnapshot(this.getEndpoint(), name, this.getSyncToken(), - this.getApiVersion(), ifMatch, ifNoneMatch, entity, accept, context)); + public Mono> getSnapshotsNoCustomHeadersSinglePageAsync(String name, + String after, List select, List status) { + final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + String statusConverted = (status == null) + ? null + : status.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil + .withContext(context -> service.getSnapshotsNoCustomHeaders(this.getEndpoint(), name, this.getSyncToken(), + this.getApiVersion(), after, selectConverted, statusConverted, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); } /** - * Updates the state of a key-value snapshot. + * Gets a list of key-value snapshots. * - * @param name The name of the key-value snapshot to update. - * @param entity The parameters used to update the snapshot. - * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. - * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value - * provided. + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return a list of key-value snapshots along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateSnapshotWithResponseAsync(String name, - SnapshotUpdateParameters entity, String ifMatch, String ifNoneMatch, Context context) { - final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; - return service.updateSnapshot(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), ifMatch, - ifNoneMatch, entity, accept, context); - } - - /** - * Updates the state of a key-value snapshot. - * - * @param name The name of the key-value snapshot to update. - * @param entity The parameters used to update the snapshot. - * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. - * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value - * provided. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. + public Mono> getSnapshotsNoCustomHeadersSinglePageAsync(String name, + String after, List select, List status, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + String statusConverted = (status == null) + ? null + : status.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service + .getSnapshotsNoCustomHeaders(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), after, + selectConverted, statusConverted, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Gets a list of key-value snapshots. + * + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value snapshots as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getSnapshotsNoCustomHeadersAsync(String name, String after, + List select, List status) { + return new PagedFlux<>(() -> getSnapshotsNoCustomHeadersSinglePageAsync(name, after, select, status), + nextLink -> getSnapshotsNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of key-value snapshots. + * + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value snapshots as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getSnapshotsNoCustomHeadersAsync(String name, String after, + List select, List status, Context context) { + return new PagedFlux<>(() -> getSnapshotsNoCustomHeadersSinglePageAsync(name, after, select, status, context), + nextLink -> getSnapshotsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of key-value snapshots. + * + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value snapshots along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getSnapshotsSinglePage(String name, String after, + List select, List status) { + final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + String statusConverted = (status == null) + ? null + : status.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + ResponseBase res = service.getSnapshotsSync(this.getEndpoint(), name, + this.getSyncToken(), this.getApiVersion(), after, selectConverted, statusConverted, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + } + + /** + * Gets a list of key-value snapshots. + * + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value snapshots along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getSnapshotsSinglePage(String name, String after, + List select, List status, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + String statusConverted = (status == null) + ? null + : status.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + ResponseBase res = service.getSnapshotsSync(this.getEndpoint(), name, + this.getSyncToken(), this.getApiVersion(), after, selectConverted, statusConverted, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + } + + /** + * Gets a list of key-value snapshots. + * + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value snapshots as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getSnapshots(String name, String after, List select, + List status) { + return new PagedIterable<>(() -> getSnapshotsSinglePage(name, after, select, status, Context.NONE), + nextLink -> getSnapshotsNextSinglePage(nextLink)); + } + + /** + * Gets a list of key-value snapshots. + * + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value snapshots as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getSnapshots(String name, String after, List select, + List status, Context context) { + return new PagedIterable<>(() -> getSnapshotsSinglePage(name, after, select, status, context), + nextLink -> getSnapshotsNextSinglePage(nextLink, context)); + } + + /** + * Gets a list of key-value snapshots. + * + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value snapshots along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getSnapshotsNoCustomHeadersSinglePage(String name, String after, + List select, List status) { + final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + String statusConverted = (status == null) + ? null + : status.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + Response res = service.getSnapshotsNoCustomHeadersSync(this.getEndpoint(), name, + this.getSyncToken(), this.getApiVersion(), after, selectConverted, statusConverted, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); + } + + /** + * Gets a list of key-value snapshots. + * + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value snapshots along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getSnapshotsNoCustomHeadersSinglePage(String name, String after, + List select, List status, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + String statusConverted = (status == null) + ? null + : status.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + Response res = service.getSnapshotsNoCustomHeadersSync(this.getEndpoint(), name, + this.getSyncToken(), this.getApiVersion(), after, selectConverted, statusConverted, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); + } + + /** + * Gets a list of key-value snapshots. + * + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value snapshots as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getSnapshotsNoCustomHeaders(String name, String after, + List select, List status) { + return new PagedIterable<>( + () -> getSnapshotsNoCustomHeadersSinglePage(name, after, select, status, Context.NONE), + nextLink -> getSnapshotsNextSinglePage(nextLink)); + } + + /** + * Gets a list of key-value snapshots. + * + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value snapshots as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getSnapshotsNoCustomHeaders(String name, String after, + List select, List status, Context context) { + return new PagedIterable<>(() -> getSnapshotsNoCustomHeadersSinglePage(name, after, select, status, context), + nextLink -> getSnapshotsNextSinglePage(nextLink, context)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkSnapshotsWithResponseAsync(String after) { + return FluxUtil.withContext(context -> checkSnapshotsWithResponseAsync(after, context)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkSnapshotsWithResponseAsync(String after, + Context context) { + return service.checkSnapshots(this.getEndpoint(), this.getSyncToken(), this.getApiVersion(), after, context); + } + + /** + * Requests the headers and status of the given resource. + * + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono checkSnapshotsAsync(String after) { + return checkSnapshotsWithResponseAsync(after).flatMap(ignored -> Mono.empty()); + } + + /** + * Requests the headers and status of the given resource. + * + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono checkSnapshotsAsync(String after, Context context) { + return checkSnapshotsWithResponseAsync(after, context).flatMap(ignored -> Mono.empty()); + } + + /** + * Requests the headers and status of the given resource. + * + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> checkSnapshotsNoCustomHeadersWithResponseAsync(String after) { + return FluxUtil.withContext(context -> checkSnapshotsNoCustomHeadersWithResponseAsync(after, context)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> checkSnapshotsNoCustomHeadersWithResponseAsync(String after, Context context) { + return service.checkSnapshotsNoCustomHeaders(this.getEndpoint(), this.getSyncToken(), this.getApiVersion(), + after, context); + } + + /** + * Requests the headers and status of the given resource. + * + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase checkSnapshotsWithResponse(String after, Context context) { + return service.checkSnapshotsSync(this.getEndpoint(), this.getSyncToken(), this.getApiVersion(), after, + context); + } + + /** + * Requests the headers and status of the given resource. + * + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 checkSnapshots(String after) { + checkSnapshotsWithResponse(after, Context.NONE); + } + + /** + * Requests the headers and status of the given resource. + * + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 checkSnapshotsNoCustomHeadersWithResponse(String after, Context context) { + return service.checkSnapshotsNoCustomHeadersSync(this.getEndpoint(), this.getSyncToken(), this.getApiVersion(), + after, context); + } + + /** + * Gets a single key-value snapshot. + * + * @param name The name of the key-value snapshot to retrieve. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value snapshot along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSnapshotWithResponseAsync(String name, + String ifMatch, String ifNoneMatch, List select) { + return FluxUtil + .withContext(context -> getSnapshotWithResponseAsync(name, ifMatch, ifNoneMatch, select, context)); + } + + /** + * Gets a single key-value snapshot. + * + * @param name The name of the key-value snapshot to retrieve. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value snapshot along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSnapshotWithResponseAsync(String name, + String ifMatch, String ifNoneMatch, List select, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.getSnapshot(this.getEndpoint(), this.getSyncToken(), this.getApiVersion(), name, ifMatch, + ifNoneMatch, selectConverted, accept, context); + } + + /** + * Gets a single key-value snapshot. + * + * @param name The name of the key-value snapshot to retrieve. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSnapshotAsync(String name, String ifMatch, String ifNoneMatch, + List select) { + return getSnapshotWithResponseAsync(name, ifMatch, ifNoneMatch, select) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a single key-value snapshot. + * + * @param name The name of the key-value snapshot to retrieve. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSnapshotAsync(String name, String ifMatch, String ifNoneMatch, + List select, Context context) { + return getSnapshotWithResponseAsync(name, ifMatch, ifNoneMatch, select, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a single key-value snapshot. + * + * @param name The name of the key-value snapshot to retrieve. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSnapshotNoCustomHeadersWithResponseAsync(String name, + String ifMatch, String ifNoneMatch, List select) { + return FluxUtil.withContext( + context -> getSnapshotNoCustomHeadersWithResponseAsync(name, ifMatch, ifNoneMatch, select, context)); + } + + /** + * Gets a single key-value snapshot. + * + * @param name The name of the key-value snapshot to retrieve. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSnapshotNoCustomHeadersWithResponseAsync(String name, + String ifMatch, String ifNoneMatch, List select, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.getSnapshotNoCustomHeaders(this.getEndpoint(), this.getSyncToken(), this.getApiVersion(), name, + ifMatch, ifNoneMatch, selectConverted, accept, context); + } + + /** + * Gets a single key-value snapshot. + * + * @param name The name of the key-value snapshot to retrieve. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value snapshot along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getSnapshotWithResponse(String name, String ifMatch, + String ifNoneMatch, List select, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.getSnapshotSync(this.getEndpoint(), this.getSyncToken(), this.getApiVersion(), name, ifMatch, + ifNoneMatch, selectConverted, accept, context); + } + + /** + * Gets a single key-value snapshot. + * + * @param name The name of the key-value snapshot to retrieve. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConfigurationSnapshot getSnapshot(String name, String ifMatch, String ifNoneMatch, + List select) { + return getSnapshotWithResponse(name, ifMatch, ifNoneMatch, select, Context.NONE).getValue(); + } + + /** + * Gets a single key-value snapshot. + * + * @param name The name of the key-value snapshot to retrieve. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSnapshotNoCustomHeadersWithResponse(String name, String ifMatch, + String ifNoneMatch, List select, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.getSnapshotNoCustomHeadersSync(this.getEndpoint(), this.getSyncToken(), this.getApiVersion(), + name, ifMatch, ifNoneMatch, selectConverted, accept, context); + } + + /** + * Creates a key-value snapshot. + * + * @param name The name of the key-value snapshot to create. + * @param entity The key-value snapshot to create. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSnapshotWithResponseAsync(String name, + ConfigurationSnapshot entity) { + return FluxUtil.withContext(context -> createSnapshotWithResponseAsync(name, entity, context)); + } + + /** + * Creates a key-value snapshot. + * + * @param name The name of the key-value snapshot to create. + * @param entity The key-value snapshot to create. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSnapshotWithResponseAsync(String name, + ConfigurationSnapshot entity, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + return service.createSnapshot(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), entity, + accept, context); + } + + /** + * Creates a key-value snapshot. + * + * @param name The name of the key-value snapshot to create. + * @param entity The key-value snapshot to create. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSnapshotAsync(String name, ConfigurationSnapshot entity) { + return createSnapshotWithResponseAsync(name, entity).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates a key-value snapshot. + * + * @param name The name of the key-value snapshot to create. + * @param entity The key-value snapshot to create. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSnapshotAsync(String name, ConfigurationSnapshot entity, Context context) { + return createSnapshotWithResponseAsync(name, entity, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates a key-value snapshot. + * + * @param name The name of the key-value snapshot to create. + * @param entity The key-value snapshot to create. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSnapshotNoCustomHeadersWithResponseAsync(String name, + ConfigurationSnapshot entity) { + return FluxUtil.withContext(context -> createSnapshotNoCustomHeadersWithResponseAsync(name, entity, context)); + } + + /** + * Creates a key-value snapshot. + * + * @param name The name of the key-value snapshot to create. + * @param entity The key-value snapshot to create. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSnapshotNoCustomHeadersWithResponseAsync(String name, + ConfigurationSnapshot entity, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + return service.createSnapshotNoCustomHeaders(this.getEndpoint(), name, this.getSyncToken(), + this.getApiVersion(), entity, accept, context); + } + + /** + * Creates a key-value snapshot. + * + * @param name The name of the key-value snapshot to create. + * @param entity The key-value snapshot to create. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase createSnapshotWithResponse(String name, + ConfigurationSnapshot entity, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + return service.createSnapshotSync(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), entity, + accept, context); + } + + /** + * Creates a key-value snapshot. + * + * @param name The name of the key-value snapshot to create. + * @param entity The key-value snapshot to create. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConfigurationSnapshot createSnapshot(String name, ConfigurationSnapshot entity) { + return createSnapshotWithResponse(name, entity, Context.NONE).getValue(); + } + + /** + * Creates a key-value snapshot. + * + * @param name The name of the key-value snapshot to create. + * @param entity The key-value snapshot to create. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createSnapshotNoCustomHeadersWithResponse(String name, + ConfigurationSnapshot entity, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + return service.createSnapshotNoCustomHeadersSync(this.getEndpoint(), name, this.getSyncToken(), + this.getApiVersion(), entity, accept, context); + } + + /** + * Updates the state of a key-value snapshot. + * + * @param name The name of the key-value snapshot to update. + * @param entity The parameters used to update the snapshot. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateSnapshotWithResponseAsync(String name, + SnapshotUpdateParameters entity, String ifMatch, String ifNoneMatch) { + return FluxUtil + .withContext(context -> updateSnapshotWithResponseAsync(name, entity, ifMatch, ifNoneMatch, context)); + } + + /** + * Updates the state of a key-value snapshot. + * + * @param name The name of the key-value snapshot to update. + * @param entity The parameters used to update the snapshot. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateSnapshotWithResponseAsync(String name, + SnapshotUpdateParameters entity, String ifMatch, String ifNoneMatch, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + return service.updateSnapshot(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), ifMatch, + ifNoneMatch, entity, accept, context); + } + + /** + * Updates the state of a key-value snapshot. + * + * @param name The name of the key-value snapshot to update. + * @param entity The parameters used to update the snapshot. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body on successful completion of {@link Mono}. */ @@ -2590,10 +4295,52 @@ public Mono updateSnapshotAsync(String name, SnapshotUpda * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateSnapshotAsync(String name, SnapshotUpdateParameters entity, String ifMatch, - String ifNoneMatch, Context context) { - return updateSnapshotWithResponseAsync(name, entity, ifMatch, ifNoneMatch, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono updateSnapshotAsync(String name, SnapshotUpdateParameters entity, String ifMatch, + String ifNoneMatch, Context context) { + return updateSnapshotWithResponseAsync(name, entity, ifMatch, ifNoneMatch, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates the state of a key-value snapshot. + * + * @param name The name of the key-value snapshot to update. + * @param entity The parameters used to update the snapshot. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateSnapshotNoCustomHeadersWithResponseAsync(String name, + SnapshotUpdateParameters entity, String ifMatch, String ifNoneMatch) { + return FluxUtil.withContext( + context -> updateSnapshotNoCustomHeadersWithResponseAsync(name, entity, ifMatch, ifNoneMatch, context)); + } + + /** + * Updates the state of a key-value snapshot. + * + * @param name The name of the key-value snapshot to update. + * @param entity The parameters used to update the snapshot. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateSnapshotNoCustomHeadersWithResponseAsync(String name, + SnapshotUpdateParameters entity, String ifMatch, String ifNoneMatch, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + return service.updateSnapshotNoCustomHeaders(this.getEndpoint(), name, this.getSyncToken(), + this.getApiVersion(), ifMatch, ifNoneMatch, entity, accept, context); } /** @@ -2637,6 +4384,28 @@ public ConfigurationSnapshot updateSnapshot(String name, SnapshotUpdateParameter return updateSnapshotWithResponse(name, entity, ifMatch, ifNoneMatch, Context.NONE).getValue(); } + /** + * Updates the state of a key-value snapshot. + * + * @param name The name of the key-value snapshot to update. + * @param entity The parameters used to update the snapshot. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSnapshotNoCustomHeadersWithResponse(String name, + SnapshotUpdateParameters entity, String ifMatch, String ifNoneMatch, Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshot+json, application/problem+json"; + return service.updateSnapshotNoCustomHeadersSync(this.getEndpoint(), name, this.getSyncToken(), + this.getApiVersion(), ifMatch, ifNoneMatch, entity, accept, context); + } + /** * Requests the headers and status of the given resource. * @@ -2652,8 +4421,7 @@ public ConfigurationSnapshot updateSnapshot(String name, SnapshotUpdateParameter @ServiceMethod(returns = ReturnType.SINGLE) public Mono> checkSnapshotWithResponseAsync(String name, String ifMatch, String ifNoneMatch) { - return FluxUtil.withContext(context -> service.checkSnapshot(this.getEndpoint(), name, this.getSyncToken(), - this.getApiVersion(), ifMatch, ifNoneMatch, context)); + return FluxUtil.withContext(context -> checkSnapshotWithResponseAsync(name, ifMatch, ifNoneMatch, context)); } /** @@ -2711,6 +4479,45 @@ public Mono checkSnapshotAsync(String name, String ifMatch, String ifNoneM return checkSnapshotWithResponseAsync(name, ifMatch, ifNoneMatch, context).flatMap(ignored -> Mono.empty()); } + /** + * Requests the headers and status of the given resource. + * + * @param name The name of the key-value snapshot to check. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> checkSnapshotNoCustomHeadersWithResponseAsync(String name, String ifMatch, + String ifNoneMatch) { + return FluxUtil + .withContext(context -> checkSnapshotNoCustomHeadersWithResponseAsync(name, ifMatch, ifNoneMatch, context)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name The name of the key-value snapshot to check. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> checkSnapshotNoCustomHeadersWithResponseAsync(String name, String ifMatch, + String ifNoneMatch, Context context) { + return service.checkSnapshotNoCustomHeaders(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), + ifMatch, ifNoneMatch, context); + } + /** * Requests the headers and status of the given resource. * @@ -2747,6 +4554,26 @@ public void checkSnapshot(String name, String ifMatch, String ifNoneMatch) { checkSnapshotWithResponse(name, ifMatch, ifNoneMatch, Context.NONE); } + /** + * Requests the headers and status of the given resource. + * + * @param name The name of the key-value snapshot to check. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 checkSnapshotNoCustomHeadersWithResponse(String name, String ifMatch, String ifNoneMatch, + Context context) { + return service.checkSnapshotNoCustomHeadersSync(this.getEndpoint(), name, this.getSyncToken(), + this.getApiVersion(), ifMatch, ifNoneMatch, context); + } + /** * Gets a list of labels. * @@ -2817,13 +4644,212 @@ public Mono> getLabelsSinglePageAsync(String name, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 labels as paginated response with {@link PagedFlux}. + * @return a list of labels as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getLabelsAsync(String name, String after, String acceptDatetime, + List select) { + return new PagedFlux<>(() -> getLabelsSinglePageAsync(name, after, acceptDatetime, select), + nextLink -> getLabelsNextSinglePageAsync(nextLink, acceptDatetime)); + } + + /** + * Gets a list of labels. + * + * @param name A filter for the name of the returned labels. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 labels as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getLabelsAsync(String name, String after, String acceptDatetime, + List select, Context context) { + return new PagedFlux<>(() -> getLabelsSinglePageAsync(name, after, acceptDatetime, select, context), + nextLink -> getLabelsNextSinglePageAsync(nextLink, acceptDatetime, context)); + } + + /** + * Gets a list of labels. + * + * @param name A filter for the name of the returned labels. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 labels along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLabelsNoCustomHeadersSinglePageAsync(String name, String after, + String acceptDatetime, List select) { + final String accept = "application/vnd.microsoft.appconfig.labelset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil + .withContext(context -> service.getLabelsNoCustomHeaders(this.getEndpoint(), name, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, selectConverted, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Gets a list of labels. + * + * @param name A filter for the name of the returned labels. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 labels along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLabelsNoCustomHeadersSinglePageAsync(String name, String after, + String acceptDatetime, List select, Context context) { + final String accept = "application/vnd.microsoft.appconfig.labelset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service + .getLabelsNoCustomHeaders(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), after, + acceptDatetime, selectConverted, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Gets a list of labels. + * + * @param name A filter for the name of the returned labels. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 labels as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getLabelsNoCustomHeadersAsync(String name, String after, String acceptDatetime, + List select) { + return new PagedFlux<>(() -> getLabelsNoCustomHeadersSinglePageAsync(name, after, acceptDatetime, select), + nextLink -> getLabelsNextSinglePageAsync(nextLink, acceptDatetime)); + } + + /** + * Gets a list of labels. + * + * @param name A filter for the name of the returned labels. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 labels as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getLabelsNoCustomHeadersAsync(String name, String after, String acceptDatetime, + List select, Context context) { + return new PagedFlux<>( + () -> getLabelsNoCustomHeadersSinglePageAsync(name, after, acceptDatetime, select, context), + nextLink -> getLabelsNextSinglePageAsync(nextLink, acceptDatetime, context)); + } + + /** + * Gets a list of labels. + * + * @param name A filter for the name of the returned labels. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 labels along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getLabelsSinglePage(String name, String after, String acceptDatetime, + List select) { + final String accept = "application/vnd.microsoft.appconfig.labelset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + ResponseBase res = service.getLabelsSync(this.getEndpoint(), name, + this.getSyncToken(), this.getApiVersion(), after, acceptDatetime, selectConverted, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + } + + /** + * Gets a list of labels. + * + * @param name A filter for the name of the returned labels. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 labels along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getLabelsSinglePage(String name, String after, String acceptDatetime, + List select, Context context) { + final String accept = "application/vnd.microsoft.appconfig.labelset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + ResponseBase res = service.getLabelsSync(this.getEndpoint(), name, + this.getSyncToken(), this.getApiVersion(), after, acceptDatetime, selectConverted, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + } + + /** + * Gets a list of labels. + * + * @param name A filter for the name of the returned labels. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 labels as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getLabelsAsync(String name, String after, String acceptDatetime, + public PagedIterable getLabels(String name, String after, String acceptDatetime, List select) { - return new PagedFlux<>(() -> getLabelsSinglePageAsync(name, after, acceptDatetime, select), - nextLink -> getLabelsNextSinglePageAsync(nextLink, acceptDatetime)); + return new PagedIterable<>(() -> getLabelsSinglePage(name, after, acceptDatetime, select, Context.NONE), + nextLink -> getLabelsNextSinglePage(nextLink, acceptDatetime)); } /** @@ -2838,13 +4864,13 @@ public PagedFlux getLabelsAsync(String name, String after, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 labels as paginated response with {@link PagedFlux}. + * @return a list of labels as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getLabelsAsync(String name, String after, String acceptDatetime, + public PagedIterable getLabels(String name, String after, String acceptDatetime, List select, Context context) { - return new PagedFlux<>(() -> getLabelsSinglePageAsync(name, after, acceptDatetime, select, context), - nextLink -> getLabelsNextSinglePageAsync(nextLink, acceptDatetime, context)); + return new PagedIterable<>(() -> getLabelsSinglePage(name, after, acceptDatetime, select, context), + nextLink -> getLabelsNextSinglePage(nextLink, acceptDatetime, context)); } /** @@ -2861,18 +4887,18 @@ public PagedFlux getLabelsAsync(String name, String after, String * @return a list of labels along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse getLabelsSinglePage(String name, String after, String acceptDatetime, - List select) { + public PagedResponse getLabelsNoCustomHeadersSinglePage(String name, String after, + String acceptDatetime, List select) { final String accept = "application/vnd.microsoft.appconfig.labelset+json, application/problem+json"; String selectConverted = (select == null) ? null : select.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - ResponseBase res = service.getLabelsSync(this.getEndpoint(), name, + Response res = service.getLabelsNoCustomHeadersSync(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), after, acceptDatetime, selectConverted, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + res.getValue().getItems(), res.getValue().getNextLink(), null); } /** @@ -2890,18 +4916,18 @@ public PagedResponse getLabelsSinglePage(String name, String after * @return a list of labels along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse getLabelsSinglePage(String name, String after, String acceptDatetime, - List select, Context context) { + public PagedResponse getLabelsNoCustomHeadersSinglePage(String name, String after, + String acceptDatetime, List select, Context context) { final String accept = "application/vnd.microsoft.appconfig.labelset+json, application/problem+json"; String selectConverted = (select == null) ? null : select.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - ResponseBase res = service.getLabelsSync(this.getEndpoint(), name, + Response res = service.getLabelsNoCustomHeadersSync(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), after, acceptDatetime, selectConverted, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + res.getValue().getItems(), res.getValue().getNextLink(), null); } /** @@ -2918,9 +4944,10 @@ public PagedResponse getLabelsSinglePage(String name, String after * @return a list of labels as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getLabels(String name, String after, String acceptDatetime, + public PagedIterable getLabelsNoCustomHeaders(String name, String after, String acceptDatetime, List select) { - return new PagedIterable<>(() -> getLabelsSinglePage(name, after, acceptDatetime, select, Context.NONE), + return new PagedIterable<>( + () -> getLabelsNoCustomHeadersSinglePage(name, after, acceptDatetime, select, Context.NONE), nextLink -> getLabelsNextSinglePage(nextLink, acceptDatetime)); } @@ -2939,9 +4966,10 @@ public PagedIterable getLabels(String name, String after, String a * @return a list of labels as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getLabels(String name, String after, String acceptDatetime, + public PagedIterable getLabelsNoCustomHeaders(String name, String after, String acceptDatetime, List select, Context context) { - return new PagedIterable<>(() -> getLabelsSinglePage(name, after, acceptDatetime, select, context), + return new PagedIterable<>( + () -> getLabelsNoCustomHeadersSinglePage(name, after, acceptDatetime, select, context), nextLink -> getLabelsNextSinglePage(nextLink, acceptDatetime, context)); } @@ -2961,13 +4989,8 @@ public PagedIterable getLabels(String name, String after, String a @ServiceMethod(returns = ReturnType.SINGLE) public Mono> checkLabelsWithResponseAsync(String name, String after, String acceptDatetime, List select) { - String selectConverted = (select == null) - ? null - : select.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return FluxUtil.withContext(context -> service.checkLabels(this.getEndpoint(), name, this.getSyncToken(), - this.getApiVersion(), after, acceptDatetime, selectConverted, context)); + return FluxUtil + .withContext(context -> checkLabelsWithResponseAsync(name, after, acceptDatetime, select, context)); } /** @@ -3036,6 +5059,52 @@ public Mono checkLabelsAsync(String name, String after, String acceptDatet .flatMap(ignored -> Mono.empty()); } + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned labels. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> checkLabelsNoCustomHeadersWithResponseAsync(String name, String after, + String acceptDatetime, List select) { + return FluxUtil.withContext( + context -> checkLabelsNoCustomHeadersWithResponseAsync(name, after, acceptDatetime, select, context)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned labels. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> checkLabelsNoCustomHeadersWithResponseAsync(String name, String after, + String acceptDatetime, List select, Context context) { + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.checkLabelsNoCustomHeaders(this.getEndpoint(), name, this.getSyncToken(), this.getApiVersion(), + after, acceptDatetime, selectConverted, context); + } + /** * Requests the headers and status of the given resource. * @@ -3079,6 +5148,32 @@ public void checkLabels(String name, String after, String acceptDatetime, List checkLabelsNoCustomHeadersWithResponse(String name, String after, String acceptDatetime, + List select, Context context) { + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.checkLabelsNoCustomHeadersSync(this.getEndpoint(), name, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, selectConverted, context); + } + /** * Locks a key-value. * @@ -3095,9 +5190,7 @@ public void checkLabels(String name, String after, String acceptDatetime, List> putLockWithResponseAsync(String key, String label, String ifMatch, String ifNoneMatch) { - final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; - return FluxUtil.withContext(context -> service.putLock(this.getEndpoint(), key, label, this.getSyncToken(), - this.getApiVersion(), ifMatch, ifNoneMatch, accept, context)); + return FluxUtil.withContext(context -> putLockWithResponseAsync(key, label, ifMatch, ifNoneMatch, context)); } /** @@ -3161,6 +5254,48 @@ public Mono putLockAsync(String key, String label, String ifMatch, Str .flatMap(res -> Mono.justOrEmpty(res.getValue())); } + /** + * Locks a key-value. + * + * @param key The key of the key-value to lock. + * @param label The label, if any, of the key-value to lock. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> putLockNoCustomHeadersWithResponseAsync(String key, String label, String ifMatch, + String ifNoneMatch) { + return FluxUtil + .withContext(context -> putLockNoCustomHeadersWithResponseAsync(key, label, ifMatch, ifNoneMatch, context)); + } + + /** + * Locks a key-value. + * + * @param key The key of the key-value to lock. + * @param label The label, if any, of the key-value to lock. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> putLockNoCustomHeadersWithResponseAsync(String key, String label, String ifMatch, + String ifNoneMatch, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + return service.putLockNoCustomHeaders(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), + ifMatch, ifNoneMatch, accept, context); + } + /** * Locks a key-value. * @@ -3194,11 +5329,134 @@ public ResponseBase putLockWithResponse(String key, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyValue putLock(String key, String label, String ifMatch, String ifNoneMatch) { + return putLockWithResponse(key, label, ifMatch, ifNoneMatch, Context.NONE).getValue(); + } + + /** + * Locks a key-value. + * + * @param key The key of the key-value to lock. + * @param label The label, if any, of the key-value to lock. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response putLockNoCustomHeadersWithResponse(String key, String label, String ifMatch, + String ifNoneMatch, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + return service.putLockNoCustomHeadersSync(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), ifMatch, ifNoneMatch, accept, context); + } + + /** + * Unlocks a key-value. + * + * @param key The key of the key-value to unlock. + * @param label The label, if any, of the key-value to unlock. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteLockWithResponseAsync(String key, String label, + String ifMatch, String ifNoneMatch) { + return FluxUtil.withContext(context -> deleteLockWithResponseAsync(key, label, ifMatch, ifNoneMatch, context)); + } + + /** + * Unlocks a key-value. + * + * @param key The key of the key-value to unlock. + * @param label The label, if any, of the key-value to unlock. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteLockWithResponseAsync(String key, String label, + String ifMatch, String ifNoneMatch, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + return service.deleteLock(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), ifMatch, + ifNoneMatch, accept, context); + } + + /** + * Unlocks a key-value. + * + * @param key The key of the key-value to unlock. + * @param label The label, if any, of the key-value to unlock. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteLockAsync(String key, String label, String ifMatch, String ifNoneMatch) { + return deleteLockWithResponseAsync(key, label, ifMatch, ifNoneMatch) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Unlocks a key-value. + * + * @param key The key of the key-value to unlock. + * @param label The label, if any, of the key-value to unlock. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteLockAsync(String key, String label, String ifMatch, String ifNoneMatch, + Context context) { + return deleteLockWithResponseAsync(key, label, ifMatch, ifNoneMatch, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Unlocks a key-value. + * + * @param key The key of the key-value to unlock. + * @param label The label, if any, of the key-value to unlock. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public KeyValue putLock(String key, String label, String ifMatch, String ifNoneMatch) { - return putLockWithResponse(key, label, ifMatch, ifNoneMatch, Context.NONE).getValue(); + public Mono> deleteLockNoCustomHeadersWithResponseAsync(String key, String label, String ifMatch, + String ifNoneMatch) { + return FluxUtil.withContext( + context -> deleteLockNoCustomHeadersWithResponseAsync(key, label, ifMatch, ifNoneMatch, context)); } /** @@ -3209,17 +5467,18 @@ public KeyValue putLock(String key, String label, String ifMatch, String ifNoneM * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value * provided. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteLockWithResponseAsync(String key, String label, - String ifMatch, String ifNoneMatch) { + public Mono> deleteLockNoCustomHeadersWithResponseAsync(String key, String label, String ifMatch, + String ifNoneMatch, Context context) { final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; - return FluxUtil.withContext(context -> service.deleteLock(this.getEndpoint(), key, label, this.getSyncToken(), - this.getApiVersion(), ifMatch, ifNoneMatch, accept, context)); + return service.deleteLockNoCustomHeaders(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), ifMatch, ifNoneMatch, accept, context); } /** @@ -3234,14 +5493,14 @@ public Mono> deleteLockWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return the response body along with {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteLockWithResponseAsync(String key, String label, - String ifMatch, String ifNoneMatch, Context context) { + public ResponseBase deleteLockWithResponse(String key, String label, String ifMatch, + String ifNoneMatch, Context context) { final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; - return service.deleteLock(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), ifMatch, - ifNoneMatch, accept, context); + return service.deleteLockSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), + ifMatch, ifNoneMatch, accept, context); } /** @@ -3255,12 +5514,11 @@ public Mono> deleteLockWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteLockAsync(String key, String label, String ifMatch, String ifNoneMatch) { - return deleteLockWithResponseAsync(key, label, ifMatch, ifNoneMatch) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public KeyValue deleteLock(String key, String label, String ifMatch, String ifNoneMatch) { + return deleteLockWithResponse(key, label, ifMatch, ifNoneMatch, Context.NONE).getValue(); } /** @@ -3275,53 +5533,246 @@ public Mono deleteLockAsync(String key, String label, String ifMatch, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteLockAsync(String key, String label, String ifMatch, String ifNoneMatch, - Context context) { - return deleteLockWithResponseAsync(key, label, ifMatch, ifNoneMatch, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response deleteLockNoCustomHeadersWithResponse(String key, String label, String ifMatch, + String ifNoneMatch, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; + return service.deleteLockNoCustomHeadersSync(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), ifMatch, ifNoneMatch, accept, context); } /** - * Unlocks a key-value. + * Gets a list of key-value revisions. * - * @param key The key of the key-value to unlock. - * @param label The label, if any, of the key-value to unlock. - * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. - * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value - * provided. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value revisions along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRevisionsSinglePageAsync(String key, String label, String after, + String acceptDatetime, List select, List tags) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + List tagsConverted = (tags == null) + ? new ArrayList<>() + : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return FluxUtil + .withContext(context -> service.getRevisions(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, selectConverted, tagsConverted, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders())); + } + + /** + * Gets a list of key-value revisions. + * + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 body along with {@link ResponseBase}. + * @return a list of key-value revisions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase deleteLockWithResponse(String key, String label, String ifMatch, - String ifNoneMatch, Context context) { - final String accept = "application/vnd.microsoft.appconfig.kv+json, application/problem+json"; - return service.deleteLockSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), - ifMatch, ifNoneMatch, accept, context); + public Mono> getRevisionsSinglePageAsync(String key, String label, String after, + String acceptDatetime, List select, List tags, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + List tagsConverted = (tags == null) + ? new ArrayList<>() + : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return service + .getRevisions(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), after, + acceptDatetime, selectConverted, tagsConverted, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders())); } /** - * Unlocks a key-value. + * Gets a list of key-value revisions. * - * @param key The key of the key-value to unlock. - * @param label The label, if any, of the key-value to unlock. - * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. - * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value - * provided. + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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. + * @return a list of key-value revisions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getRevisionsAsync(String key, String label, String after, String acceptDatetime, + List select, List tags) { + return new PagedFlux<>(() -> getRevisionsSinglePageAsync(key, label, after, acceptDatetime, select, tags), + nextLink -> getRevisionsNextSinglePageAsync(nextLink, acceptDatetime)); + } + + /** + * Gets a list of key-value revisions. + * + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value revisions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getRevisionsAsync(String key, String label, String after, String acceptDatetime, + List select, List tags, Context context) { + return new PagedFlux<>( + () -> getRevisionsSinglePageAsync(key, label, after, acceptDatetime, select, tags, context), + nextLink -> getRevisionsNextSinglePageAsync(nextLink, acceptDatetime, context)); + } + + /** + * Gets a list of key-value revisions. + * + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value revisions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public KeyValue deleteLock(String key, String label, String ifMatch, String ifNoneMatch) { - return deleteLockWithResponse(key, label, ifMatch, ifNoneMatch, Context.NONE).getValue(); + public Mono> getRevisionsNoCustomHeadersSinglePageAsync(String key, String label, + String after, String acceptDatetime, List select, List tags) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + List tagsConverted = (tags == null) + ? new ArrayList<>() + : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return FluxUtil + .withContext( + context -> service.getRevisionsNoCustomHeaders(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, selectConverted, tagsConverted, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Gets a list of key-value revisions. + * + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value revisions along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRevisionsNoCustomHeadersSinglePageAsync(String key, String label, + String after, String acceptDatetime, List select, List tags, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + List tagsConverted = (tags == null) + ? new ArrayList<>() + : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return service + .getRevisionsNoCustomHeaders(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), + after, acceptDatetime, selectConverted, tagsConverted, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Gets a list of key-value revisions. + * + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value revisions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getRevisionsNoCustomHeadersAsync(String key, String label, String after, + String acceptDatetime, List select, List tags) { + return new PagedFlux<>( + () -> getRevisionsNoCustomHeadersSinglePageAsync(key, label, after, acceptDatetime, select, tags), + nextLink -> getRevisionsNextSinglePageAsync(nextLink, acceptDatetime)); + } + + /** + * Gets a list of key-value revisions. + * + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 key-value revisions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getRevisionsNoCustomHeadersAsync(String key, String label, String after, + String acceptDatetime, List select, List tags, Context context) { + return new PagedFlux<>( + () -> getRevisionsNoCustomHeadersSinglePageAsync(key, label, after, acceptDatetime, select, tags, context), + nextLink -> getRevisionsNextSinglePageAsync(nextLink, acceptDatetime, context)); } /** @@ -3337,11 +5788,11 @@ public KeyValue deleteLock(String key, String label, String ifMatch, String ifNo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-value revisions along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of key-value revisions along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getRevisionsSinglePageAsync(String key, String label, String after, - String acceptDatetime, List select, List tags) { + public PagedResponse getRevisionsSinglePage(String key, String label, String after, String acceptDatetime, + List select, List tags) { final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; String selectConverted = (select == null) ? null @@ -3351,11 +5802,11 @@ public Mono> getRevisionsSinglePageAsync(String key, Str List tagsConverted = (tags == null) ? new ArrayList<>() : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - return FluxUtil - .withContext(context -> service.getRevisions(this.getEndpoint(), key, label, this.getSyncToken(), - this.getApiVersion(), after, acceptDatetime, selectConverted, tagsConverted, accept, context)) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders())); + ResponseBase res + = service.getRevisionsSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), after, + acceptDatetime, selectConverted, tagsConverted, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); } /** @@ -3372,11 +5823,11 @@ public Mono> getRevisionsSinglePageAsync(String key, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-value revisions along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of key-value revisions along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getRevisionsSinglePageAsync(String key, String label, String after, - String acceptDatetime, List select, List tags, Context context) { + public PagedResponse getRevisionsSinglePage(String key, String label, String after, String acceptDatetime, + List select, List tags, Context context) { final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; String selectConverted = (select == null) ? null @@ -3386,11 +5837,11 @@ public Mono> getRevisionsSinglePageAsync(String key, Str List tagsConverted = (tags == null) ? new ArrayList<>() : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - return service - .getRevisions(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), after, - acceptDatetime, selectConverted, tagsConverted, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders())); + ResponseBase res + = service.getRevisionsSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), after, + acceptDatetime, selectConverted, tagsConverted, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); } /** @@ -3406,13 +5857,14 @@ public Mono> getRevisionsSinglePageAsync(String key, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-value revisions as paginated response with {@link PagedFlux}. + * @return a list of key-value revisions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getRevisionsAsync(String key, String label, String after, String acceptDatetime, + public PagedIterable getRevisions(String key, String label, String after, String acceptDatetime, List select, List tags) { - return new PagedFlux<>(() -> getRevisionsSinglePageAsync(key, label, after, acceptDatetime, select, tags), - nextLink -> getRevisionsNextSinglePageAsync(nextLink, acceptDatetime)); + return new PagedIterable<>( + () -> getRevisionsSinglePage(key, label, after, acceptDatetime, select, tags, Context.NONE), + nextLink -> getRevisionsNextSinglePage(nextLink, acceptDatetime)); } /** @@ -3429,14 +5881,14 @@ public PagedFlux getRevisionsAsync(String key, String label, String af * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException 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 key-value revisions as paginated response with {@link PagedFlux}. + * @return a list of key-value revisions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getRevisionsAsync(String key, String label, String after, String acceptDatetime, + public PagedIterable getRevisions(String key, String label, String after, String acceptDatetime, List select, List tags, Context context) { - return new PagedFlux<>( - () -> getRevisionsSinglePageAsync(key, label, after, acceptDatetime, select, tags, context), - nextLink -> getRevisionsNextSinglePageAsync(nextLink, acceptDatetime, context)); + return new PagedIterable<>( + () -> getRevisionsSinglePage(key, label, after, acceptDatetime, select, tags, context), + nextLink -> getRevisionsNextSinglePage(nextLink, acceptDatetime, context)); } /** @@ -3455,8 +5907,8 @@ public PagedFlux getRevisionsAsync(String key, String label, String af * @return a list of key-value revisions along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse getRevisionsSinglePage(String key, String label, String after, String acceptDatetime, - List select, List tags) { + public PagedResponse getRevisionsNoCustomHeadersSinglePage(String key, String label, String after, + String acceptDatetime, List select, List tags) { final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; String selectConverted = (select == null) ? null @@ -3466,11 +5918,11 @@ public PagedResponse getRevisionsSinglePage(String key, String label, List tagsConverted = (tags == null) ? new ArrayList<>() : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - ResponseBase res - = service.getRevisionsSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), after, - acceptDatetime, selectConverted, tagsConverted, accept, Context.NONE); + Response res + = service.getRevisionsNoCustomHeadersSync(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, selectConverted, tagsConverted, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + res.getValue().getItems(), res.getValue().getNextLink(), null); } /** @@ -3490,8 +5942,8 @@ public PagedResponse getRevisionsSinglePage(String key, String label, * @return a list of key-value revisions along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse getRevisionsSinglePage(String key, String label, String after, String acceptDatetime, - List select, List tags, Context context) { + public PagedResponse getRevisionsNoCustomHeadersSinglePage(String key, String label, String after, + String acceptDatetime, List select, List tags, Context context) { final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; String selectConverted = (select == null) ? null @@ -3501,11 +5953,11 @@ public PagedResponse getRevisionsSinglePage(String key, String label, List tagsConverted = (tags == null) ? new ArrayList<>() : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - ResponseBase res - = service.getRevisionsSync(this.getEndpoint(), key, label, this.getSyncToken(), this.getApiVersion(), after, - acceptDatetime, selectConverted, tagsConverted, accept, context); + Response res + = service.getRevisionsNoCustomHeadersSync(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, selectConverted, tagsConverted, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); + res.getValue().getItems(), res.getValue().getNextLink(), null); } /** @@ -3524,10 +5976,10 @@ public PagedResponse getRevisionsSinglePage(String key, String label, * @return a list of key-value revisions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getRevisions(String key, String label, String after, String acceptDatetime, - List select, List tags) { + public PagedIterable getRevisionsNoCustomHeaders(String key, String label, String after, + String acceptDatetime, List select, List tags) { return new PagedIterable<>( - () -> getRevisionsSinglePage(key, label, after, acceptDatetime, select, tags, Context.NONE), + () -> getRevisionsNoCustomHeadersSinglePage(key, label, after, acceptDatetime, select, tags, Context.NONE), nextLink -> getRevisionsNextSinglePage(nextLink, acceptDatetime)); } @@ -3548,10 +6000,10 @@ public PagedIterable getRevisions(String key, String label, String aft * @return a list of key-value revisions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getRevisions(String key, String label, String after, String acceptDatetime, - List select, List tags, Context context) { + public PagedIterable getRevisionsNoCustomHeaders(String key, String label, String after, + String acceptDatetime, List select, List tags, Context context) { return new PagedIterable<>( - () -> getRevisionsSinglePage(key, label, after, acceptDatetime, select, tags, context), + () -> getRevisionsNoCustomHeadersSinglePage(key, label, after, acceptDatetime, select, tags, context), nextLink -> getRevisionsNextSinglePage(nextLink, acceptDatetime, context)); } @@ -3573,16 +6025,8 @@ public PagedIterable getRevisions(String key, String label, String aft @ServiceMethod(returns = ReturnType.SINGLE) public Mono> checkRevisionsWithResponseAsync(String key, String label, String after, String acceptDatetime, List select, List tags) { - String selectConverted = (select == null) - ? null - : select.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - List tagsConverted = (tags == null) - ? new ArrayList<>() - : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - return FluxUtil.withContext(context -> service.checkRevisions(this.getEndpoint(), key, label, - this.getSyncToken(), this.getApiVersion(), after, acceptDatetime, selectConverted, tagsConverted, context)); + return FluxUtil.withContext( + context -> checkRevisionsWithResponseAsync(key, label, after, acceptDatetime, select, tags, context)); } /** @@ -3661,6 +6105,59 @@ public Mono checkRevisionsAsync(String key, String label, String after, St .flatMap(ignored -> Mono.empty()); } + /** + * Requests the headers and status of the given resource. + * + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> checkRevisionsNoCustomHeadersWithResponseAsync(String key, String label, String after, + String acceptDatetime, List select, List tags) { + return FluxUtil.withContext(context -> checkRevisionsNoCustomHeadersWithResponseAsync(key, label, after, + acceptDatetime, select, tags, context)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> checkRevisionsNoCustomHeadersWithResponseAsync(String key, String label, String after, + String acceptDatetime, List select, List tags, Context context) { + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + List tagsConverted = (tags == null) + ? new ArrayList<>() + : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return service.checkRevisionsNoCustomHeaders(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, selectConverted, tagsConverted, context); + } + /** * Requests the headers and status of the given resource. * @@ -3712,6 +6209,37 @@ public void checkRevisions(String key, String label, String after, String accept checkRevisionsWithResponse(key, label, after, acceptDatetime, select, tags, Context.NONE); } + /** + * Requests the headers and status of the given resource. + * + * @param key A filter used to match keys. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param label A filter used to match labels. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param after Instructs the server to return elements that appear after the element referred to by the specified + * token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/restapirevisions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 checkRevisionsNoCustomHeadersWithResponse(String key, String label, String after, + String acceptDatetime, List select, List tags, Context context) { + String selectConverted = (select == null) + ? null + : select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + List tagsConverted = (tags == null) + ? new ArrayList<>() + : tags.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + return service.checkRevisionsNoCustomHeadersSync(this.getEndpoint(), key, label, this.getSyncToken(), + this.getApiVersion(), after, acceptDatetime, selectConverted, tagsConverted, context); + } + /** * Gets the state of a long running operation. * @@ -3724,9 +6252,7 @@ public void checkRevisions(String key, String label, String after, String accept */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getOperationDetailsWithResponseAsync(String snapshot) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getOperationDetails(this.getEndpoint(), this.getApiVersion(), - snapshot, accept, context)); + return FluxUtil.withContext(context -> getOperationDetailsWithResponseAsync(snapshot, context)); } /** @@ -3808,9 +6334,7 @@ public OperationDetails getOperationDetails(String snapshot) { /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -3830,9 +6354,7 @@ public Mono> getKeysNextSinglePageAsync(String nextLink, Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3852,9 +6374,49 @@ public Mono> getKeysNextSinglePageAsync(String nextLink, Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getKeysNextNoCustomHeadersSinglePageAsync(String nextLink, String acceptDatetime) { + final String accept = "application/vnd.microsoft.appconfig.keyset+json, application/problem+json"; + return FluxUtil + .withContext(context -> service.getKeysNextNoCustomHeaders(nextLink, this.getEndpoint(), + this.getSyncToken(), acceptDatetime, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getKeysNextNoCustomHeadersSinglePageAsync(String nextLink, String acceptDatetime, + Context context) { + final String accept = "application/vnd.microsoft.appconfig.keyset+json, application/problem+json"; + return service + .getKeysNextNoCustomHeaders(nextLink, this.getEndpoint(), this.getSyncToken(), acceptDatetime, accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Get the next page of items. * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -3873,9 +6435,7 @@ public PagedResponse getKeysNextSinglePage(String nextLink, String acceptDa /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3895,9 +6455,96 @@ public PagedResponse getKeysNextSinglePage(String nextLink, String acceptDa /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getKeysNextNoCustomHeadersSinglePage(String nextLink, String acceptDatetime) { + final String accept = "application/vnd.microsoft.appconfig.keyset+json, application/problem+json"; + Response res = service.getKeysNextNoCustomHeadersSync(nextLink, this.getEndpoint(), + this.getSyncToken(), acceptDatetime, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getKeysNextNoCustomHeadersSinglePage(String nextLink, String acceptDatetime, + Context context) { + final String accept = "application/vnd.microsoft.appconfig.keyset+json, application/problem+json"; + Response res = service.getKeysNextNoCustomHeadersSync(nextLink, this.getEndpoint(), + this.getSyncToken(), acceptDatetime, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getKeyValuesNextSinglePageAsync(String nextLink, String acceptDatetime, + String ifMatch, String ifNoneMatch) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; + return FluxUtil + .withContext(context -> service.getKeyValuesNext(nextLink, this.getEndpoint(), this.getSyncToken(), + acceptDatetime, ifMatch, ifNoneMatch, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getKeyValuesNextSinglePageAsync(String nextLink, String acceptDatetime, + String ifMatch, String ifNoneMatch, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; + return service + .getKeyValuesNext(nextLink, this.getEndpoint(), this.getSyncToken(), acceptDatetime, ifMatch, ifNoneMatch, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value @@ -3908,22 +6555,20 @@ public PagedResponse getKeysNextSinglePage(String nextLink, String acceptDa * @return the result of a list request along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getKeyValuesNextSinglePageAsync(String nextLink, String acceptDatetime, - String ifMatch, String ifNoneMatch) { + public Mono> getKeyValuesNextNoCustomHeadersSinglePageAsync(String nextLink, + String acceptDatetime, String ifMatch, String ifNoneMatch) { final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; return FluxUtil - .withContext(context -> service.getKeyValuesNext(nextLink, this.getEndpoint(), this.getSyncToken(), - acceptDatetime, ifMatch, ifNoneMatch, accept, context)) + .withContext(context -> service.getKeyValuesNextNoCustomHeaders(nextLink, this.getEndpoint(), + this.getSyncToken(), acceptDatetime, ifMatch, ifNoneMatch, accept, context)) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders())); + res.getValue().getItems(), res.getValue().getNextLink(), null)); } /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value @@ -3935,22 +6580,20 @@ public Mono> getKeyValuesNextSinglePageAsync(String next * @return the result of a list request along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getKeyValuesNextSinglePageAsync(String nextLink, String acceptDatetime, - String ifMatch, String ifNoneMatch, Context context) { + public Mono> getKeyValuesNextNoCustomHeadersSinglePageAsync(String nextLink, + String acceptDatetime, String ifMatch, String ifNoneMatch, Context context) { final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; return service - .getKeyValuesNext(nextLink, this.getEndpoint(), this.getSyncToken(), acceptDatetime, ifMatch, ifNoneMatch, - accept, context) + .getKeyValuesNextNoCustomHeaders(nextLink, this.getEndpoint(), this.getSyncToken(), acceptDatetime, ifMatch, + ifNoneMatch, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders())); + res.getValue().getItems(), res.getValue().getNextLink(), null)); } /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value @@ -3973,9 +6616,7 @@ public PagedResponse getKeyValuesNextSinglePage(String nextLink, Strin /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value @@ -3999,9 +6640,54 @@ public PagedResponse getKeyValuesNextSinglePage(String nextLink, Strin /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getKeyValuesNextNoCustomHeadersSinglePage(String nextLink, String acceptDatetime, + String ifMatch, String ifNoneMatch) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; + Response res = service.getKeyValuesNextNoCustomHeadersSync(nextLink, this.getEndpoint(), + this.getSyncToken(), acceptDatetime, ifMatch, ifNoneMatch, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value + * provided. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getKeyValuesNextNoCustomHeadersSinglePage(String nextLink, String acceptDatetime, + String ifMatch, String ifNoneMatch, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; + Response res = service.getKeyValuesNextNoCustomHeadersSync(nextLink, this.getEndpoint(), + this.getSyncToken(), acceptDatetime, ifMatch, ifNoneMatch, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); + } + + /** + * Get the next page of items. * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -4021,9 +6707,7 @@ public Mono> getSnapshotsNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -4043,9 +6727,48 @@ public Mono> getSnapshotsNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a snapshot list request along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSnapshotsNextNoCustomHeadersSinglePageAsync(String nextLink) { + final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; + return FluxUtil + .withContext(context -> service.getSnapshotsNextNoCustomHeaders(nextLink, this.getEndpoint(), + this.getSyncToken(), accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a snapshot list request along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSnapshotsNextNoCustomHeadersSinglePageAsync(String nextLink, + Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; + return service + .getSnapshotsNextNoCustomHeaders(nextLink, this.getEndpoint(), this.getSyncToken(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Get the next page of items. * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -4063,9 +6786,7 @@ public PagedResponse getSnapshotsNextSinglePage(String ne /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -4084,9 +6805,45 @@ public PagedResponse getSnapshotsNextSinglePage(String ne /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a snapshot list request along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getSnapshotsNextNoCustomHeadersSinglePage(String nextLink) { + final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; + Response res = service.getSnapshotsNextNoCustomHeadersSync(nextLink, this.getEndpoint(), + this.getSyncToken(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a snapshot list request along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getSnapshotsNextNoCustomHeadersSinglePage(String nextLink, + Context context) { + final String accept = "application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json"; + Response res = service.getSnapshotsNextNoCustomHeadersSync(nextLink, this.getEndpoint(), + this.getSyncToken(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); + } + + /** + * Get the next page of items. * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -4106,9 +6863,7 @@ public Mono> getLabelsNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4128,9 +6883,50 @@ public Mono> getLabelsNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLabelsNextNoCustomHeadersSinglePageAsync(String nextLink, + String acceptDatetime) { + final String accept = "application/vnd.microsoft.appconfig.labelset+json, application/problem+json"; + return FluxUtil + .withContext(context -> service.getLabelsNextNoCustomHeaders(nextLink, this.getEndpoint(), + this.getSyncToken(), acceptDatetime, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLabelsNextNoCustomHeadersSinglePageAsync(String nextLink, + String acceptDatetime, Context context) { + final String accept = "application/vnd.microsoft.appconfig.labelset+json, application/problem+json"; + return service + .getLabelsNextNoCustomHeaders(nextLink, this.getEndpoint(), this.getSyncToken(), acceptDatetime, accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Get the next page of items. * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -4149,9 +6945,7 @@ public PagedResponse getLabelsNextSinglePage(String nextLink, Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4172,9 +6966,47 @@ public PagedResponse getLabelsNextSinglePage(String nextLink, Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getLabelsNextNoCustomHeadersSinglePage(String nextLink, String acceptDatetime) { + final String accept = "application/vnd.microsoft.appconfig.labelset+json, application/problem+json"; + Response res = service.getLabelsNextNoCustomHeadersSync(nextLink, this.getEndpoint(), + this.getSyncToken(), acceptDatetime, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getLabelsNextNoCustomHeadersSinglePage(String nextLink, String acceptDatetime, + Context context) { + final String accept = "application/vnd.microsoft.appconfig.labelset+json, application/problem+json"; + Response res = service.getLabelsNextNoCustomHeadersSync(nextLink, this.getEndpoint(), + this.getSyncToken(), acceptDatetime, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); + } + + /** + * Get the next page of items. * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -4194,9 +7026,7 @@ public Mono> getRevisionsNextSinglePageAsync(String next /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4217,9 +7047,50 @@ public Mono> getRevisionsNextSinglePageAsync(String next /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRevisionsNextNoCustomHeadersSinglePageAsync(String nextLink, + String acceptDatetime) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; + return FluxUtil + .withContext(context -> service.getRevisionsNextNoCustomHeaders(nextLink, this.getEndpoint(), + this.getSyncToken(), acceptDatetime, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRevisionsNextNoCustomHeadersSinglePageAsync(String nextLink, + String acceptDatetime, Context context) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; + return service + .getRevisionsNextNoCustomHeaders(nextLink, this.getEndpoint(), this.getSyncToken(), acceptDatetime, accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null)); + } + + /** + * Get the next page of items. * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -4238,9 +7109,7 @@ public PagedResponse getRevisionsNextSinglePage(String nextLink, Strin /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4256,4 +7125,44 @@ public PagedResponse getRevisionsNextSinglePage(String nextLink, Strin return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().getItems(), res.getValue().getNextLink(), res.getDeserializedHeaders()); } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getRevisionsNextNoCustomHeadersSinglePage(String nextLink, String acceptDatetime) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; + Response res = service.getRevisionsNextNoCustomHeadersSync(nextLink, this.getEndpoint(), + this.getSyncToken(), acceptDatetime, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified time. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a list request along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getRevisionsNextNoCustomHeadersSinglePage(String nextLink, String acceptDatetime, + Context context) { + final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json"; + Response res = service.getRevisionsNextNoCustomHeadersSync(nextLink, this.getEndpoint(), + this.getSyncToken(), acceptDatetime, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getItems(), res.getValue().getNextLink(), null); + } } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/CreateSnapshotHeaders.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/CreateSnapshotHeaders.java index 55e2bff48193d..e4b3ec37745cb 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/CreateSnapshotHeaders.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/CreateSnapshotHeaders.java @@ -35,8 +35,6 @@ public final class CreateSnapshotHeaders { private static final HttpHeaderName SYNC_TOKEN = HttpHeaderName.fromString("Sync-Token"); - private static final HttpHeaderName OPERATION_LOCATION = HttpHeaderName.fromString("Operation-Location"); - // HttpHeaders containing the raw property values. /** * Creates an instance of CreateSnapshotHeaders class. @@ -46,7 +44,7 @@ public final class CreateSnapshotHeaders { public CreateSnapshotHeaders(HttpHeaders rawHeaders) { this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); this.syncToken = rawHeaders.getValue(SYNC_TOKEN); - this.operationLocation = rawHeaders.getValue(OPERATION_LOCATION); + this.operationLocation = rawHeaders.getValue(HttpHeaderName.OPERATION_LOCATION); this.link = rawHeaders.getValue(HttpHeaderName.LINK); } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValue.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValue.java index afac2a68c83e3..ebb993eac878c 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValue.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValue.java @@ -5,6 +5,7 @@ package com.azure.data.appconfiguration.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -267,8 +268,8 @@ public static KeyValue fromJson(JsonReader jsonReader) throws IOException { } else if ("value".equals(fieldName)) { deserializedKeyValue.value = reader.getString(); } else if ("last_modified".equals(fieldName)) { - deserializedKeyValue.lastModified - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedKeyValue.lastModified = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedKeyValue.tags = tags; diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/ConfigurationSnapshot.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/ConfigurationSnapshot.java index 67b1fd1a18907..a064db22fdf42 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/ConfigurationSnapshot.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/ConfigurationSnapshot.java @@ -4,18 +4,17 @@ package com.azure.data.appconfiguration.models; -import java.time.Duration; - -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; /** * The ConfigurationSnapshot model. @@ -38,7 +37,9 @@ public final class ConfigurationSnapshot implements JsonSerializable filters; /* - * The composition type describes how the key-values within the snapshot are composed. The 'key' composition type ensures there are no two key-values containing the same key. The 'key_label' composition type ensures there are no two key-values containing the same key and label. + * The composition type describes how the key-values within the snapshot are composed. The 'key' composition type + * ensures there are no two key-values containing the same key. The 'key_label' composition type ensures there are + * no two key-values containing the same key and label. */ private SnapshotComposition snapshotComposition; @@ -53,7 +54,9 @@ public final class ConfigurationSnapshot implements JsonSerializable OffsetDateTime.parse(nonNullReader.getString())); + createdAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("expires".equals(fieldName)) { - expiresAt = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + expiresAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("retention_period".equals(fieldName)) { retentionPeriod = reader.getNullable(JsonReader::getLong); } else if ("size".equals(fieldName)) { diff --git a/sdk/appconfiguration/azure-data-appconfiguration/swagger/README.md b/sdk/appconfiguration/azure-data-appconfiguration/swagger/README.md index 52b3abf9f5813..308443c3303fd 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/swagger/README.md +++ b/sdk/appconfiguration/azure-data-appconfiguration/swagger/README.md @@ -41,7 +41,7 @@ customization-class: src/main/java/AppConfigCustomization.java ```yaml output-folder: ..\ java: true -use: '@autorest/java@4.1.29' +use: '@autorest/java@4.1.39' enable-sync-stack: true generate-client-interfaces: false generate-client-as-impl: true diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/AttestationsImpl.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/AttestationsImpl.java index 1dd83d21a606e..fb29637a0ce2b 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/AttestationsImpl.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/AttestationsImpl.java @@ -98,18 +98,7 @@ Mono> attestTpm(@HostParam("instanceUrl") Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> attestOpenEnclaveWithResponseAsync(AttestOpenEnclaveRequest request) { - if (this.client.getInstanceUrl() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getInstanceUrl() is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.attestOpenEnclave(this.client.getInstanceUrl(), - this.client.getApiVersion(), request, accept, context)); + return FluxUtil.withContext(context -> attestOpenEnclaveWithResponseAsync(request, context)); } /** @@ -193,18 +182,7 @@ public Mono attestOpenEnclaveAsync(AttestOpenEnclaveRequest */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> attestSgxEnclaveWithResponseAsync(AttestSgxEnclaveRequest request) { - if (this.client.getInstanceUrl() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getInstanceUrl() is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.attestSgxEnclave(this.client.getInstanceUrl(), - this.client.getApiVersion(), request, accept, context)); + return FluxUtil.withContext(context -> attestSgxEnclaveWithResponseAsync(request, context)); } /** @@ -288,18 +266,7 @@ public Mono attestSgxEnclaveAsync(AttestSgxEnclaveRequest r */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> attestTpmWithResponseAsync(TpmAttestationRequest request) { - if (this.client.getInstanceUrl() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getInstanceUrl() is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.attestTpm(this.client.getInstanceUrl(), - this.client.getApiVersion(), request, accept, context)); + return FluxUtil.withContext(context -> attestTpmWithResponseAsync(request, context)); } /** diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/MetadataConfigurationsImpl.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/MetadataConfigurationsImpl.java index 2d35f548a9a49..53879d14617ef 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/MetadataConfigurationsImpl.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/MetadataConfigurationsImpl.java @@ -70,12 +70,7 @@ Mono> get(@HostParam("instanceUrl") String instanceUrl, @Header */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync() { - if (this.client.getInstanceUrl() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getInstanceUrl() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getInstanceUrl(), accept, context)); + return FluxUtil.withContext(context -> getWithResponseAsync(context)); } /** diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/PoliciesImpl.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/PoliciesImpl.java index e2f44fe87d3d0..7f1cc30224116 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/PoliciesImpl.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/PoliciesImpl.java @@ -93,17 +93,7 @@ Mono> reset(@HostParam("instanceUrl") String instanceUr */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(AttestationType attestationType) { - if (this.client.getInstanceUrl() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getInstanceUrl() is required and cannot be null.")); - } - if (attestationType == null) { - return Mono - .error(new IllegalArgumentException("Parameter attestationType is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getInstanceUrl(), this.client.getApiVersion(), - attestationType, accept, context)); + return FluxUtil.withContext(context -> getWithResponseAsync(attestationType, context)); } /** @@ -174,21 +164,7 @@ public Mono getAsync(AttestationType attestationType, Context co @ServiceMethod(returns = ReturnType.SINGLE) public Mono> setWithResponseAsync(AttestationType attestationType, String newAttestationPolicy) { - if (this.client.getInstanceUrl() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getInstanceUrl() is required and cannot be null.")); - } - if (attestationType == null) { - return Mono - .error(new IllegalArgumentException("Parameter attestationType is required and cannot be null.")); - } - if (newAttestationPolicy == null) { - return Mono - .error(new IllegalArgumentException("Parameter newAttestationPolicy is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.set(this.client.getInstanceUrl(), this.client.getApiVersion(), - attestationType, newAttestationPolicy, accept, context)); + return FluxUtil.withContext(context -> setWithResponseAsync(attestationType, newAttestationPolicy, context)); } /** @@ -270,20 +246,7 @@ public Mono setAsync(AttestationType attestationType, String new */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> resetWithResponseAsync(AttestationType attestationType, String policyJws) { - if (this.client.getInstanceUrl() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getInstanceUrl() is required and cannot be null.")); - } - if (attestationType == null) { - return Mono - .error(new IllegalArgumentException("Parameter attestationType is required and cannot be null.")); - } - if (policyJws == null) { - return Mono.error(new IllegalArgumentException("Parameter policyJws is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.reset(this.client.getInstanceUrl(), this.client.getApiVersion(), - attestationType, policyJws, accept, context)); + return FluxUtil.withContext(context -> resetWithResponseAsync(attestationType, policyJws, context)); } /** diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/PolicyCertificatesImpl.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/PolicyCertificatesImpl.java index e5133da2be1a0..b3d314c9f532e 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/PolicyCertificatesImpl.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/PolicyCertificatesImpl.java @@ -89,13 +89,7 @@ Mono> remove(@HostParam("instanceUrl" */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync() { - if (this.client.getInstanceUrl() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getInstanceUrl() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.get(this.client.getInstanceUrl(), this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> getWithResponseAsync(context)); } /** @@ -157,17 +151,7 @@ public Mono getAsync(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> addWithResponseAsync(String policyCertificateToAdd) { - if (this.client.getInstanceUrl() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getInstanceUrl() is required and cannot be null.")); - } - if (policyCertificateToAdd == null) { - return Mono.error( - new IllegalArgumentException("Parameter policyCertificateToAdd is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.add(this.client.getInstanceUrl(), this.client.getApiVersion(), - policyCertificateToAdd, accept, context)); + return FluxUtil.withContext(context -> addWithResponseAsync(policyCertificateToAdd, context)); } /** @@ -243,17 +227,7 @@ public Mono addAsync(String policyCertificateT */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> removeWithResponseAsync(String policyCertificateToRemove) { - if (this.client.getInstanceUrl() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getInstanceUrl() is required and cannot be null.")); - } - if (policyCertificateToRemove == null) { - return Mono.error( - new IllegalArgumentException("Parameter policyCertificateToRemove is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.remove(this.client.getInstanceUrl(), this.client.getApiVersion(), - policyCertificateToRemove, accept, context)); + return FluxUtil.withContext(context -> removeWithResponseAsync(policyCertificateToRemove, context)); } /** diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/SigningCertificatesImpl.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/SigningCertificatesImpl.java index 2dc0bffc65af5..019cd11ca5ac1 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/SigningCertificatesImpl.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/SigningCertificatesImpl.java @@ -71,12 +71,7 @@ Mono> get(@HostParam("instanceUrl") String instanceUrl, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync() { - if (this.client.getInstanceUrl() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getInstanceUrl() is required and cannot be null.")); - } - final String accept = "application/jwk+json, application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getInstanceUrl(), accept, context)); + return FluxUtil.withContext(context -> getWithResponseAsync(context)); } /** diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/AttestOpenEnclaveRequest.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/AttestOpenEnclaveRequest.java index 6b430d17d076c..6218fce89f1c4 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/AttestOpenEnclaveRequest.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/AttestOpenEnclaveRequest.java @@ -81,9 +81,9 @@ public AttestOpenEnclaveRequest setReport(byte[] report) { } /** - * Get the runtimeData property: Runtime data provided by the enclave at the time of report generation. The MAA - * will verify that the first 32 bytes of the report_data field of the quote contains the SHA256 hash of the - * decoded "data" field of the runtime data. + * Get the runtimeData property: Runtime data provided by the enclave at the time of report generation. The MAA will + * verify that the first 32 bytes of the report_data field of the quote contains the SHA256 hash of the decoded + * "data" field of the runtime data. * * @return the runtimeData value. */ @@ -92,9 +92,9 @@ public RuntimeData getRuntimeData() { } /** - * Set the runtimeData property: Runtime data provided by the enclave at the time of report generation. The MAA - * will verify that the first 32 bytes of the report_data field of the quote contains the SHA256 hash of the - * decoded "data" field of the runtime data. + * Set the runtimeData property: Runtime data provided by the enclave at the time of report generation. The MAA will + * verify that the first 32 bytes of the report_data field of the quote contains the SHA256 hash of the decoded + * "data" field of the runtime data. * * @param runtimeData the runtimeData value to set. * @return the AttestOpenEnclaveRequest object itself. @@ -182,6 +182,9 @@ public void validate() { } } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/AttestSgxEnclaveRequest.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/AttestSgxEnclaveRequest.java index f29c32f54b043..5bd1c2a287dc1 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/AttestSgxEnclaveRequest.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/AttestSgxEnclaveRequest.java @@ -25,9 +25,8 @@ public final class AttestSgxEnclaveRequest implements JsonSerializable { /* * Initialization time data are passed into the Trusted Execution Environment (TEE) when it is created. For an * Icelake SGX quote, the SHA256 hash of the InitTimeData must match the lower 32 bytes of the quote's "config id" - * attribute. For a SEV-SNP quote, the SHA256 hash of the InitTimeData must match the quote's "host data" - * attribute. + * attribute. For a SEV-SNP quote, the SHA256 hash of the InitTimeData must match the quote's "host data" attribute. */ private Base64Url data; @@ -101,6 +100,9 @@ public InitTimeData setDataType(DataType dataType) { public void validate() { } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/JsonWebKey.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/JsonWebKey.java index b62a0ec21aabc..a17165a4d46c8 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/JsonWebKey.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/JsonWebKey.java @@ -522,6 +522,9 @@ public void validate() { } } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/JsonWebKeySet.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/JsonWebKeySet.java index 91fb92e43d665..ed06f3035a338 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/JsonWebKeySet.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/JsonWebKeySet.java @@ -71,6 +71,9 @@ public void validate() { } } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesModificationResult.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesModificationResult.java index c4fb7717d3153..5e67e01bc64b1 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesModificationResult.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesModificationResult.java @@ -85,6 +85,9 @@ public CertificateModification getCertificateResolution() { public void validate() { } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesModifyResponse.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesModifyResponse.java index 7cbc61a833974..248d85147ade8 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesModifyResponse.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesModifyResponse.java @@ -57,6 +57,9 @@ public PolicyCertificatesModifyResponse setToken(String token) { public void validate() { } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesResponse.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesResponse.java index dbee3cf6e4181..f96b975c0e03c 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesResponse.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesResponse.java @@ -17,8 +17,8 @@ @Fluent public final class PolicyCertificatesResponse implements JsonSerializable { /* - * An RFC7519 JSON Web Token structure containing a PolicyCertificatesResults object which contains the - * certificates used to validate policy changes + * An RFC7519 JSON Web Token structure containing a PolicyCertificatesResults object which contains the certificates + * used to validate policy changes */ private String token; @@ -58,6 +58,9 @@ public PolicyCertificatesResponse setToken(String token) { public void validate() { } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesResult.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesResult.java index 464179d616496..76cb1b78011bf 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesResult.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyCertificatesResult.java @@ -60,6 +60,9 @@ public void validate() { } } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyResponse.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyResponse.java index 879801045eb19..5633f4ea88eed 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyResponse.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyResponse.java @@ -55,6 +55,9 @@ public PolicyResponse setToken(String token) { public void validate() { } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyResult.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyResult.java index 840917b01dbb2..febd92c1a7791 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyResult.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/PolicyResult.java @@ -146,6 +146,9 @@ public void validate() { } } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/RuntimeData.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/RuntimeData.java index 81aada819d6e8..2a2be2ddd3c98 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/RuntimeData.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/RuntimeData.java @@ -99,6 +99,9 @@ public RuntimeData setDataType(DataType dataType) { public void validate() { } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/StoredAttestationPolicy.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/StoredAttestationPolicy.java index 275e96be623d1..cb6b20671f440 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/StoredAttestationPolicy.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/StoredAttestationPolicy.java @@ -65,6 +65,9 @@ public StoredAttestationPolicy setAttestationPolicy(byte[] attestationPolicy) { public void validate() { } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/TpmAttestationRequest.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/TpmAttestationRequest.java index fe9d8311ccc76..904bf11e87584 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/TpmAttestationRequest.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/TpmAttestationRequest.java @@ -65,6 +65,9 @@ public TpmAttestationRequest setData(byte[] data) { public void validate() { } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/TpmAttestationResponse.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/TpmAttestationResponse.java index d18f54ff15c0a..08004e128f2bc 100644 --- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/TpmAttestationResponse.java +++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/TpmAttestationResponse.java @@ -65,6 +65,9 @@ public TpmAttestationResponse setData(byte[] data) { public void validate() { } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/attestation/azure-security-attestation/swagger/autorest.md b/sdk/attestation/azure-security-attestation/swagger/autorest.md index 0113fefa83518..6cac1bde6c9e8 100644 --- a/sdk/attestation/azure-security-attestation/swagger/autorest.md +++ b/sdk/attestation/azure-security-attestation/swagger/autorest.md @@ -1,20 +1,30 @@ -# Microsoft.Azure.Attestation +# Azure Attestation for Java -## Local copy of the swagger document +> see https://aka.ms/autorest -A local copy of the official swagger documents are stored in this directory for convenience and testing purposes. Please make sure that you do not use these swagger documents for official code generation purposes. +This is the AutoRest configuration file for Attestation. -## Official swagger document +--- +## Getting Started +To build the SDK for Attestation, simply [Install AutoRest](https://aka.ms/autorest) and +in this folder, run: -The official swagger specification for Microsoft Azure Attestation can be found [here](https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/attestation/data-plane/Microsoft.Attestation/stable/2020-10-01/attestation.json). +> `autorest` -## Code generation +To see additional help and options, run: -Run `generate.ps1` in this directory to generate the code. +> `autorest --help` -## AutoRest Configuration +### Setup +```ps +npm install -g autorest +``` -> see +### Generation +```ps +cd +autorest +``` ### Code generation settings @@ -23,7 +33,7 @@ tag: package-2020-10-01 require: - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/attestation/data-plane/readme.md java: true -use: '@autorest/java@4.1.27' +use: '@autorest/java@4.1.39' output-folder: ..\ license-header: MICROSOFT_MIT_SMALL namespace: com.azure.security.attestation diff --git a/sdk/attestation/azure-security-attestation/swagger/generate.ps1 b/sdk/attestation/azure-security-attestation/swagger/generate.ps1 deleted file mode 100644 index c23654539a7e1..0000000000000 --- a/sdk/attestation/azure-security-attestation/swagger/generate.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -npm i -g autorest -autorest autorest.md --use:@autorest/java@4.0.43 - diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AuthenticationsImpl.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AuthenticationsImpl.java index 8a4b08fd4242f..08f2f9871119a 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AuthenticationsImpl.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AuthenticationsImpl.java @@ -26,17 +26,23 @@ import com.azure.core.util.FluxUtil; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in Authentications. */ +/** + * An instance of this class provides access to all the operations defined in Authentications. + */ public final class AuthenticationsImpl { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AuthenticationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureContainerRegistryImpl client; /** * Initializes an instance of AuthenticationsImpl. - * + * * @param client the instance of the service client containing this operation class. */ AuthenticationsImpl(AzureContainerRegistryImpl client) { @@ -93,7 +99,7 @@ Response exchangeAcrRefreshTokenForAcrAccessTokenSync(@HostParam /** * Exchange AAD tokens for an ACR refresh Token. - * + * * @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token. * @param serviceParam Indicates the name of your Azure container registry. * @param tenant AAD tenant associated to the AAD credentials. @@ -108,14 +114,13 @@ Response exchangeAcrRefreshTokenForAcrAccessTokenSync(@HostParam public Mono> exchangeAadAccessTokenForAcrRefreshTokenWithResponseAsync( PostContentSchemaGrantType grantType, String serviceParam, String tenant, String refreshToken, String accessToken) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.exchangeAadAccessTokenForAcrRefreshToken(this.client.getUrl(), - this.client.getApiVersion(), grantType, serviceParam, tenant, refreshToken, accessToken, accept, context)); + return FluxUtil.withContext(context -> exchangeAadAccessTokenForAcrRefreshTokenWithResponseAsync(grantType, + serviceParam, tenant, refreshToken, accessToken, context)); } /** * Exchange AAD tokens for an ACR refresh Token. - * + * * @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token. * @param serviceParam Indicates the name of your Azure container registry. * @param tenant AAD tenant associated to the AAD credentials. @@ -138,7 +143,7 @@ public Mono> exchangeAadAccessTokenForAcrRefreshTokenW /** * Exchange AAD tokens for an ACR refresh Token. - * + * * @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token. * @param serviceParam Indicates the name of your Azure container registry. * @param tenant AAD tenant associated to the AAD credentials. @@ -158,7 +163,7 @@ public Mono exchangeAadAccessTokenForAcrRefreshTokenAsync(PostC /** * Exchange AAD tokens for an ACR refresh Token. - * + * * @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token. * @param serviceParam Indicates the name of your Azure container registry. * @param tenant AAD tenant associated to the AAD credentials. @@ -179,7 +184,7 @@ public Mono exchangeAadAccessTokenForAcrRefreshTokenAsync(PostC /** * Exchange AAD tokens for an ACR refresh Token. - * + * * @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token. * @param serviceParam Indicates the name of your Azure container registry. * @param tenant AAD tenant associated to the AAD credentials. @@ -202,7 +207,7 @@ public Response exchangeAadAccessTokenForAcrRefreshTokenWithRes /** * Exchange AAD tokens for an ACR refresh Token. - * + * * @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token. * @param serviceParam Indicates the name of your Azure container registry. * @param tenant AAD tenant associated to the AAD credentials. @@ -222,10 +227,10 @@ public AcrRefreshToken exchangeAadAccessTokenForAcrRefreshToken(PostContentSchem /** * Exchange ACR Refresh token for an ACR Access Token. - * + * * @param serviceParam Indicates the name of your Azure container registry. * @param scope Which is expected to be a valid scope, and can be specified more than once for multiple scope - * requests. You obtained this from the Www-Authenticate response header from the challenge. + * requests. You obtained this from the Www-Authenticate response header from the challenge. * @param refreshToken Must be a valid ACR refresh token. * @param grantType Grant type is expected to be refresh_token. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -236,17 +241,16 @@ public AcrRefreshToken exchangeAadAccessTokenForAcrRefreshToken(PostContentSchem @ServiceMethod(returns = ReturnType.SINGLE) public Mono> exchangeAcrRefreshTokenForAcrAccessTokenWithResponseAsync(String serviceParam, String scope, String refreshToken, TokenGrantType grantType) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.exchangeAcrRefreshTokenForAcrAccessToken(this.client.getUrl(), - this.client.getApiVersion(), serviceParam, scope, refreshToken, grantType, accept, context)); + return FluxUtil.withContext(context -> exchangeAcrRefreshTokenForAcrAccessTokenWithResponseAsync(serviceParam, + scope, refreshToken, grantType, context)); } /** * Exchange ACR Refresh token for an ACR Access Token. - * + * * @param serviceParam Indicates the name of your Azure container registry. * @param scope Which is expected to be a valid scope, and can be specified more than once for multiple scope - * requests. You obtained this from the Www-Authenticate response header from the challenge. + * requests. You obtained this from the Www-Authenticate response header from the challenge. * @param refreshToken Must be a valid ACR refresh token. * @param grantType Grant type is expected to be refresh_token. * @param context The context to associate with this operation. @@ -265,10 +269,10 @@ public Mono> exchangeAcrRefreshTokenForAcrAccessTokenWi /** * Exchange ACR Refresh token for an ACR Access Token. - * + * * @param serviceParam Indicates the name of your Azure container registry. * @param scope Which is expected to be a valid scope, and can be specified more than once for multiple scope - * requests. You obtained this from the Www-Authenticate response header from the challenge. + * requests. You obtained this from the Www-Authenticate response header from the challenge. * @param refreshToken Must be a valid ACR refresh token. * @param grantType Grant type is expected to be refresh_token. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -285,10 +289,10 @@ public Mono exchangeAcrRefreshTokenForAcrAccessTokenAsync(String /** * Exchange ACR Refresh token for an ACR Access Token. - * + * * @param serviceParam Indicates the name of your Azure container registry. * @param scope Which is expected to be a valid scope, and can be specified more than once for multiple scope - * requests. You obtained this from the Www-Authenticate response header from the challenge. + * requests. You obtained this from the Www-Authenticate response header from the challenge. * @param refreshToken Must be a valid ACR refresh token. * @param grantType Grant type is expected to be refresh_token. * @param context The context to associate with this operation. @@ -306,10 +310,10 @@ public Mono exchangeAcrRefreshTokenForAcrAccessTokenAsync(String /** * Exchange ACR Refresh token for an ACR Access Token. - * + * * @param serviceParam Indicates the name of your Azure container registry. * @param scope Which is expected to be a valid scope, and can be specified more than once for multiple scope - * requests. You obtained this from the Www-Authenticate response header from the challenge. + * requests. You obtained this from the Www-Authenticate response header from the challenge. * @param refreshToken Must be a valid ACR refresh token. * @param grantType Grant type is expected to be refresh_token. * @param context The context to associate with this operation. @@ -328,10 +332,10 @@ public Response exchangeAcrRefreshTokenForAcrAccessTokenWithResp /** * Exchange ACR Refresh token for an ACR Access Token. - * + * * @param serviceParam Indicates the name of your Azure container registry. * @param scope Which is expected to be a valid scope, and can be specified more than once for multiple scope - * requests. You obtained this from the Www-Authenticate response header from the challenge. + * requests. You obtained this from the Www-Authenticate response header from the challenge. * @param refreshToken Must be a valid ACR refresh token. * @param grantType Grant type is expected to be refresh_token. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AzureContainerRegistryImpl.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AzureContainerRegistryImpl.java index b1a2d756dc2c5..0da735ccf77e9 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AzureContainerRegistryImpl.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AzureContainerRegistryImpl.java @@ -6,92 +6,107 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; -/** Initializes a new instance of the AzureContainerRegistry type. */ +/** + * Initializes a new instance of the AzureContainerRegistry type. + */ public final class AzureContainerRegistryImpl { - /** Registry login URL. */ + /** + * Registry login URL. + */ private final String url; /** * Gets Registry login URL. - * + * * @return the url value. */ public String getUrl() { return this.url; } - /** Api Version. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ public SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The ContainerRegistriesImpl object to access its operations. */ + /** + * The ContainerRegistriesImpl object to access its operations. + */ private final ContainerRegistriesImpl containerRegistries; /** * Gets the ContainerRegistriesImpl object to access its operations. - * + * * @return the ContainerRegistriesImpl object. */ public ContainerRegistriesImpl getContainerRegistries() { return this.containerRegistries; } - /** The ContainerRegistryBlobsImpl object to access its operations. */ + /** + * The ContainerRegistryBlobsImpl object to access its operations. + */ private final ContainerRegistryBlobsImpl containerRegistryBlobs; /** * Gets the ContainerRegistryBlobsImpl object to access its operations. - * + * * @return the ContainerRegistryBlobsImpl object. */ public ContainerRegistryBlobsImpl getContainerRegistryBlobs() { return this.containerRegistryBlobs; } - /** The AuthenticationsImpl object to access its operations. */ + /** + * The AuthenticationsImpl object to access its operations. + */ private final AuthenticationsImpl authentications; /** * Gets the AuthenticationsImpl object to access its operations. - * + * * @return the AuthenticationsImpl object. */ public AuthenticationsImpl getAuthentications() { @@ -100,18 +115,18 @@ public AuthenticationsImpl getAuthentications() { /** * Initializes an instance of AzureContainerRegistry client. - * + * * @param url Registry login URL. * @param apiVersion Api Version. */ public AzureContainerRegistryImpl(String url, String apiVersion) { - this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build(), + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), JacksonAdapter.createDefaultSerializerAdapter(), url, apiVersion); } /** * Initializes an instance of AzureContainerRegistry client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param url Registry login URL. * @param apiVersion Api Version. @@ -122,7 +137,7 @@ public AzureContainerRegistryImpl(HttpPipeline httpPipeline, String url, String /** * Initializes an instance of AzureContainerRegistry client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param url Registry login URL. diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ContainerRegistriesImpl.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ContainerRegistriesImpl.java index 8fe5426e27bda..d50a7b93bbb9c 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ContainerRegistriesImpl.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ContainerRegistriesImpl.java @@ -53,17 +53,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ContainerRegistries. */ +/** + * An instance of this class provides access to all the operations defined in ContainerRegistries. + */ public final class ContainerRegistriesImpl { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ContainerRegistriesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureContainerRegistryImpl client; /** * Initializes an instance of ContainerRegistriesImpl. - * + * * @param client the instance of the service client containing this operation class. */ ContainerRegistriesImpl(AzureContainerRegistryImpl client) { @@ -112,6 +118,14 @@ Mono> createManifes @BodyParam("application/vnd.docker.distribution.manifest.v2+json") Flux payload, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context); + @Put("/v2/{name}/manifests/{reference}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> createManifestNoCustomHeaders(@HostParam("url") String url, @PathParam("name") String name, + @PathParam("reference") String reference, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/vnd.docker.distribution.manifest.v2+json") Flux payload, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context); + @Put("/v2/{name}/manifests/{reference}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -121,6 +135,14 @@ Mono> createManifes @BodyParam("application/vnd.docker.distribution.manifest.v2+json") BinaryData payload, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context); + @Put("/v2/{name}/manifests/{reference}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> createManifestNoCustomHeaders(@HostParam("url") String url, @PathParam("name") String name, + @PathParam("reference") String reference, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/vnd.docker.distribution.manifest.v2+json") BinaryData payload, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context); + @Put("/v2/{name}/manifests/{reference}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -130,6 +152,14 @@ ResponseBase createManifestSync( @BodyParam("application/vnd.docker.distribution.manifest.v2+json") BinaryData payload, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context); + @Put("/v2/{name}/manifests/{reference}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response createManifestNoCustomHeadersSync(@HostParam("url") String url, @PathParam("name") String name, + @PathParam("reference") String reference, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/vnd.docker.distribution.manifest.v2+json") BinaryData payload, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context); + @Delete("/v2/{name}/manifests/{reference}") @ExpectedResponses({ 202, 404 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -149,6 +179,13 @@ Mono> getR @HostParam("url") String url, @QueryParam("last") String last, @QueryParam("n") Integer n, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Get("/acr/v1/_catalog") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> getRepositoriesNoCustomHeaders(@HostParam("url") String url, + @QueryParam("last") String last, @QueryParam("n") Integer n, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Get("/acr/v1/_catalog") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -156,6 +193,13 @@ ResponseBase getReposit @HostParam("url") String url, @QueryParam("last") String last, @QueryParam("n") Integer n, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Get("/acr/v1/_catalog") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response getRepositoriesNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("last") String last, @QueryParam("n") Integer n, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Get("/acr/v1/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -208,6 +252,14 @@ Mono> getTags(@HostPara @QueryParam("orderby") String orderBy, @QueryParam("digest") String digest, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Get("/acr/v1/{name}/_tags") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> getTagsNoCustomHeaders(@HostParam("url") String url, @PathParam("name") String name, + @QueryParam("last") String last, @QueryParam("n") Integer n, @QueryParam("orderby") String orderBy, + @QueryParam("digest") String digest, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Get("/acr/v1/{name}/_tags") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -216,6 +268,14 @@ ResponseBase getTagsSync(@HostParam( @QueryParam("orderby") String orderBy, @QueryParam("digest") String digest, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Get("/acr/v1/{name}/_tags") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response getTagsNoCustomHeadersSync(@HostParam("url") String url, @PathParam("name") String name, + @QueryParam("last") String last, @QueryParam("n") Integer n, @QueryParam("orderby") String orderBy, + @QueryParam("digest") String digest, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Get("/acr/v1/{name}/_tags/{reference}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -268,6 +328,14 @@ Mono> getMani @QueryParam("n") Integer n, @QueryParam("orderby") String orderBy, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Get("/acr/v1/{name}/_manifests") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> getManifestsNoCustomHeaders(@HostParam("url") String url, + @PathParam("name") String name, @QueryParam("last") String last, @QueryParam("n") Integer n, + @QueryParam("orderby") String orderBy, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Get("/acr/v1/{name}/_manifests") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -276,6 +344,14 @@ ResponseBase getManifestsS @QueryParam("n") Integer n, @QueryParam("orderby") String orderBy, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Get("/acr/v1/{name}/_manifests") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response getManifestsNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("name") String name, @QueryParam("last") String last, @QueryParam("n") Integer n, + @QueryParam("orderby") String orderBy, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Get("/acr/v1/{name}/_manifests/{digest}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -315,6 +391,13 @@ Mono> @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> getRepositoriesNextNoCustomHeaders( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, + @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -322,6 +405,13 @@ ResponseBase getRep @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response getRepositoriesNextNoCustomHeadersSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, + @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -329,6 +419,13 @@ Mono> getTagsNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> getTagsNextNoCustomHeaders( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, + @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -336,6 +433,12 @@ ResponseBase getTagsNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response getTagsNextNoCustomHeadersSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("url") String url, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -343,30 +446,43 @@ Mono> get @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> getManifestsNextNoCustomHeaders( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, + @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) ResponseBase getManifestsNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, @HeaderParam("Accept") String accept, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response getManifestsNextNoCustomHeadersSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, + @HeaderParam("Accept") String accept, Context context); } /** * Tells whether this Docker Registry instance supports Docker Registry HTTP API v2. - * + * * @throws AcrErrorsException 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) public Mono> checkDockerV2SupportWithResponseAsync() { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.checkDockerV2Support(this.client.getUrl(), accept, context)); + return FluxUtil.withContext(context -> checkDockerV2SupportWithResponseAsync(context)); } /** * Tells whether this Docker Registry instance supports Docker Registry HTTP API v2. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -381,7 +497,7 @@ public Mono> checkDockerV2SupportWithResponseAsync(Context contex /** * Tells whether this Docker Registry instance supports Docker Registry HTTP API v2. - * + * * @throws AcrErrorsException 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. @@ -393,7 +509,7 @@ public Mono checkDockerV2SupportAsync() { /** * Tells whether this Docker Registry instance supports Docker Registry HTTP API v2. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -407,7 +523,7 @@ public Mono checkDockerV2SupportAsync(Context context) { /** * Tells whether this Docker Registry instance supports Docker Registry HTTP API v2. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -422,7 +538,7 @@ public Response checkDockerV2SupportWithResponse(Context context) { /** * Tells whether this Docker Registry instance supports Docker Registry HTTP API v2. - * + * * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -433,36 +549,35 @@ public void checkDockerV2Support() { /** * Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param accept Accept header string delimited by comma. For example, - * application/vnd.docker.distribution.manifest.v2+json. + * application/vnd.docker.distribution.manifest.v2+json. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the manifest identified by `name` and `reference` where `reference` can be a tag or digest along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getManifestWithResponseAsync(String name, String reference, String accept) { - return FluxUtil - .withContext(context -> service.getManifest(this.client.getUrl(), name, reference, accept, context)); + return FluxUtil.withContext(context -> getManifestWithResponseAsync(name, reference, accept, context)); } /** * Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param accept Accept header string delimited by comma. For example, - * application/vnd.docker.distribution.manifest.v2+json. + * application/vnd.docker.distribution.manifest.v2+json. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the manifest identified by `name` and `reference` where `reference` can be a tag or digest along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getManifestWithResponseAsync(String name, String reference, String accept, @@ -472,16 +587,16 @@ public Mono> getManifestWithResponseAsync(String name, Stri /** * Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param accept Accept header string delimited by comma. For example, - * application/vnd.docker.distribution.manifest.v2+json. + * application/vnd.docker.distribution.manifest.v2+json. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the manifest identified by `name` and `reference` where `reference` can be a tag or digest on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getManifestAsync(String name, String reference, String accept) { @@ -490,17 +605,17 @@ public Mono getManifestAsync(String name, String reference, String a /** * Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param accept Accept header string delimited by comma. For example, - * application/vnd.docker.distribution.manifest.v2+json. + * application/vnd.docker.distribution.manifest.v2+json. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the manifest identified by `name` and `reference` where `reference` can be a tag or digest on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getManifestAsync(String name, String reference, String accept, Context context) { @@ -510,17 +625,17 @@ public Mono getManifestAsync(String name, String reference, String a /** * Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param accept Accept header string delimited by comma. For example, - * application/vnd.docker.distribution.manifest.v2+json. + * application/vnd.docker.distribution.manifest.v2+json. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the manifest identified by `name` and `reference` where `reference` can be a tag or digest along with - * {@link Response}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getManifestWithResponse(String name, String reference, String accept, Context context) { @@ -529,11 +644,11 @@ public Response getManifestWithResponse(String name, String referenc /** * Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param accept Accept header string delimited by comma. For example, - * application/vnd.docker.distribution.manifest.v2+json. + * application/vnd.docker.distribution.manifest.v2+json. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -546,7 +661,7 @@ public BinaryData getManifest(String name, String reference, String accept) { /** * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param payload Manifest body, can take v1 or v2 values depending on accept header. @@ -560,14 +675,13 @@ public BinaryData getManifest(String name, String reference, String accept) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createManifestWithResponseAsync( String name, String reference, Flux payload, long contentLength, String contentType) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createManifest(this.client.getUrl(), name, reference, - contentType, payload, contentLength, accept, context)); + return FluxUtil.withContext( + context -> createManifestWithResponseAsync(name, reference, payload, contentLength, contentType, context)); } /** * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param payload Manifest body, can take v1 or v2 values depending on accept header. @@ -590,7 +704,7 @@ public Mono> create /** * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param payload Manifest body, can take v1 or v2 values depending on accept header. @@ -610,7 +724,7 @@ public Mono createManifestAsync(String name, String reference, Flux createManifestAsync(String name, String reference, Flux> createManifestNoCustomHeadersWithResponseAsync(String name, String reference, + Flux payload, long contentLength, String contentType) { + return FluxUtil.withContext(context -> createManifestNoCustomHeadersWithResponseAsync(name, reference, payload, + contentLength, contentType, context)); + } + + /** + * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. + * + * @param name Name of the image (including the namespace). + * @param reference A tag or a digest, pointing to a specific image. + * @param payload Manifest body, can take v1 or v2 values depending on accept header. + * @param contentLength The Content-Length header for the request. + * @param contentType The manifest's Content-Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> createManifestNoCustomHeadersWithResponseAsync(String name, String reference, + Flux payload, long contentLength, String contentType, Context context) { + final String accept = "application/json"; + return service.createManifestNoCustomHeaders(this.client.getUrl(), name, reference, contentType, payload, + contentLength, accept, context); + } + + /** + * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param payload Manifest body, can take v1 or v2 values depending on accept header. @@ -645,14 +801,13 @@ public Mono createManifestAsync(String name, String reference, Flux> createManifestWithResponseAsync( String name, String reference, BinaryData payload, long contentLength, String contentType) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createManifest(this.client.getUrl(), name, reference, - contentType, payload, contentLength, accept, context)); + return FluxUtil.withContext( + context -> createManifestWithResponseAsync(name, reference, payload, contentLength, contentType, context)); } /** * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param payload Manifest body, can take v1 or v2 values depending on accept header. @@ -674,7 +829,7 @@ public Mono> create /** * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param payload Manifest body, can take v1 or v2 values depending on accept header. @@ -694,7 +849,7 @@ public Mono createManifestAsync(String name, String reference, BinaryData /** * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param payload Manifest body, can take v1 or v2 values depending on accept header. @@ -715,7 +870,49 @@ public Mono createManifestAsync(String name, String reference, BinaryData /** * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * + * @param name Name of the image (including the namespace). + * @param reference A tag or a digest, pointing to a specific image. + * @param payload Manifest body, can take v1 or v2 values depending on accept header. + * @param contentLength The Content-Length header for the request. + * @param contentType The manifest's Content-Type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> createManifestNoCustomHeadersWithResponseAsync(String name, String reference, + BinaryData payload, long contentLength, String contentType) { + return FluxUtil.withContext(context -> createManifestNoCustomHeadersWithResponseAsync(name, reference, payload, + contentLength, contentType, context)); + } + + /** + * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. + * + * @param name Name of the image (including the namespace). + * @param reference A tag or a digest, pointing to a specific image. + * @param payload Manifest body, can take v1 or v2 values depending on accept header. + * @param contentLength The Content-Length header for the request. + * @param contentType The manifest's Content-Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> createManifestNoCustomHeadersWithResponseAsync(String name, String reference, + BinaryData payload, long contentLength, String contentType, Context context) { + final String accept = "application/json"; + return service.createManifestNoCustomHeaders(this.client.getUrl(), name, reference, contentType, payload, + contentLength, accept, context); + } + + /** + * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param payload Manifest body, can take v1 or v2 values depending on accept header. @@ -737,7 +934,7 @@ public ResponseBase createManife /** * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. - * + * * @param name Name of the image (including the namespace). * @param reference A tag or a digest, pointing to a specific image. * @param payload Manifest body, can take v1 or v2 values depending on accept header. @@ -753,9 +950,31 @@ public void createManifest(String name, String reference, BinaryData payload, lo createManifestWithResponse(name, reference, payload, contentLength, contentType, Context.NONE); } + /** + * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. + * + * @param name Name of the image (including the namespace). + * @param reference A tag or a digest, pointing to a specific image. + * @param payload Manifest body, can take v1 or v2 values depending on accept header. + * @param contentLength The Content-Length header for the request. + * @param contentType The manifest's Content-Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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 createManifestNoCustomHeadersWithResponse(String name, String reference, BinaryData payload, + long contentLength, String contentType, Context context) { + final String accept = "application/json"; + return service.createManifestNoCustomHeadersSync(this.client.getUrl(), name, reference, contentType, payload, + contentLength, accept, context); + } + /** * Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`. - * + * * @param name Name of the image (including the namespace). * @param reference Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -765,14 +984,12 @@ public void createManifest(String name, String reference, BinaryData payload, lo */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteManifestWithResponseAsync(String name, String reference) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.deleteManifest(this.client.getUrl(), name, reference, accept, context)); + return FluxUtil.withContext(context -> deleteManifestWithResponseAsync(name, reference, context)); } /** * Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`. - * + * * @param name Name of the image (including the namespace). * @param reference Digest of a BLOB. * @param context The context to associate with this operation. @@ -789,7 +1006,7 @@ public Mono> deleteManifestWithResponseAsync(String name, String /** * Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`. - * + * * @param name Name of the image (including the namespace). * @param reference Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -804,7 +1021,7 @@ public Mono deleteManifestAsync(String name, String reference) { /** * Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`. - * + * * @param name Name of the image (including the namespace). * @param reference Digest of a BLOB. * @param context The context to associate with this operation. @@ -820,7 +1037,7 @@ public Mono deleteManifestAsync(String name, String reference, Context con /** * Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`. - * + * * @param name Name of the image (including the namespace). * @param reference Digest of a BLOB. * @param context The context to associate with this operation. @@ -837,7 +1054,7 @@ public Response deleteManifestWithResponse(String name, String reference, /** * Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`. - * + * * @param name Name of the image (including the namespace). * @param reference Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -851,9 +1068,9 @@ public void deleteManifest(String name, String reference) { /** * List repositories. - * + * * @param last Query parameter for the last item in previous query. Result set will include values lexically after - * last. + * last. * @param n query parameter for max number of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -871,9 +1088,9 @@ public Mono> getRepositoriesSinglePageAsync(String last, I /** * List repositories. - * + * * @param last Query parameter for the last item in previous query. Result set will include values lexically after - * last. + * last. * @param n query parameter for max number of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -889,9 +1106,49 @@ public PagedFlux getRepositoriesAsync(String last, Integer n, Context co /** * List repositories. - * + * * @param last Query parameter for the last item in previous query. Result set will include values lexically after - * last. + * last. + * @param n query parameter for max number of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of repositories along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRepositoriesNoCustomHeadersSinglePageAsync(String last, Integer n, + Context context) { + final String accept = "application/json"; + return service + .getRepositoriesNoCustomHeaders(this.client.getUrl(), last, n, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getRepositories(), res.getValue().getLink(), null)); + } + + /** + * List repositories. + * + * @param last Query parameter for the last item in previous query. Result set will include values lexically after + * last. + * @param n query parameter for max number of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of repositories as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getRepositoriesNoCustomHeadersAsync(String last, Integer n, Context context) { + return new PagedFlux<>(() -> getRepositoriesNoCustomHeadersSinglePageAsync(last, n, context), + nextLink -> getRepositoriesNextSinglePageAsync(nextLink, context)); + } + + /** + * List repositories. + * + * @param last Query parameter for the last item in previous query. Result set will include values lexically after + * last. * @param n query parameter for max number of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -910,9 +1167,9 @@ public PagedResponse getRepositoriesSinglePage(String last, Integer n, C /** * List repositories. - * + * * @param last Query parameter for the last item in previous query. Result set will include values lexically after - * last. + * last. * @param n query parameter for max number of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -926,9 +1183,48 @@ public PagedIterable getRepositories(String last, Integer n, Context con nextLink -> getRepositoriesNextSinglePage(nextLink, context)); } + /** + * List repositories. + * + * @param last Query parameter for the last item in previous query. Result set will include values lexically after + * last. + * @param n query parameter for max number of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of repositories along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getRepositoriesNoCustomHeadersSinglePage(String last, Integer n, Context context) { + final String accept = "application/json"; + Response res = service.getRepositoriesNoCustomHeadersSync(this.client.getUrl(), last, n, + this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getRepositories(), res.getValue().getLink(), null); + } + + /** + * List repositories. + * + * @param last Query parameter for the last item in previous query. Result set will include values lexically after + * last. + * @param n query parameter for max number of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of repositories as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getRepositoriesNoCustomHeaders(String last, Integer n, Context context) { + return new PagedIterable<>(() -> getRepositoriesNoCustomHeadersSinglePage(last, n, context), + nextLink -> getRepositoriesNextSinglePage(nextLink, context)); + } + /** * Get repository attributes. - * + * * @param name Name of the image (including the namespace). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -937,14 +1233,12 @@ public PagedIterable getRepositories(String last, Integer n, Context con */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getPropertiesWithResponseAsync(String name) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.getProperties(this.client.getUrl(), name, this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> getPropertiesWithResponseAsync(name, context)); } /** * Get repository attributes. - * + * * @param name Name of the image (including the namespace). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -960,7 +1254,7 @@ public Mono> getPropertiesWithResponseAs /** * Get repository attributes. - * + * * @param name Name of the image (including the namespace). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -974,7 +1268,7 @@ public Mono getPropertiesAsync(String name) { /** * Get repository attributes. - * + * * @param name Name of the image (including the namespace). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -989,7 +1283,7 @@ public Mono getPropertiesAsync(String name, Conte /** * Get repository attributes. - * + * * @param name Name of the image (including the namespace). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1005,7 +1299,7 @@ public Response getPropertiesWithResponse(String /** * Get repository attributes. - * + * * @param name Name of the image (including the namespace). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1019,7 +1313,7 @@ public ContainerRepositoryProperties getProperties(String name) { /** * Delete the repository identified by `name`. - * + * * @param name Name of the image (including the namespace). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1028,14 +1322,12 @@ public ContainerRepositoryProperties getProperties(String name) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteRepositoryWithResponseAsync(String name) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.deleteRepository(this.client.getUrl(), name, - this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> deleteRepositoryWithResponseAsync(name, context)); } /** * Delete the repository identified by `name`. - * + * * @param name Name of the image (including the namespace). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1051,7 +1343,7 @@ public Mono> deleteRepositoryWithResponseAsync( /** * Delete the repository identified by `name`. - * + * * @param name Name of the image (including the namespace). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1065,7 +1357,7 @@ public Mono deleteRepositoryAsync(String name) { /** * Delete the repository identified by `name`. - * + * * @param name Name of the image (including the namespace). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1080,7 +1372,7 @@ public Mono deleteRepositoryAsync(String name, Context c /** * Delete the repository identified by `name`. - * + * * @param name Name of the image (including the namespace). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1096,7 +1388,7 @@ public Response deleteRepositoryWithResponse(String name /** * Delete the repository identified by `name`. - * + * * @param name Name of the image (including the namespace). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1110,7 +1402,7 @@ public DeleteRepositoryResult deleteRepository(String name) { /** * Update the attribute identified by `name` where `reference` is the name of the repository. - * + * * @param name Name of the image (including the namespace). * @param value Repository attribute value. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1121,14 +1413,12 @@ public DeleteRepositoryResult deleteRepository(String name) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updatePropertiesWithResponseAsync(String name, RepositoryWriteableProperties value) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.updateProperties(this.client.getUrl(), name, - this.client.getApiVersion(), value, accept, context)); + return FluxUtil.withContext(context -> updatePropertiesWithResponseAsync(name, value, context)); } /** * Update the attribute identified by `name` where `reference` is the name of the repository. - * + * * @param name Name of the image (including the namespace). * @param value Repository attribute value. * @param context The context to associate with this operation. @@ -1147,7 +1437,7 @@ public Mono> updatePropertiesWithRespons /** * Update the attribute identified by `name` where `reference` is the name of the repository. - * + * * @param name Name of the image (including the namespace). * @param value Repository attribute value. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1162,7 +1452,7 @@ public Mono updatePropertiesAsync(String name, Re /** * Update the attribute identified by `name` where `reference` is the name of the repository. - * + * * @param name Name of the image (including the namespace). * @param value Repository attribute value. * @param context The context to associate with this operation. @@ -1179,7 +1469,7 @@ public Mono updatePropertiesAsync(String name, Re /** * Update the attribute identified by `name` where `reference` is the name of the repository. - * + * * @param name Name of the image (including the namespace). * @param value Repository attribute value. * @param context The context to associate with this operation. @@ -1198,7 +1488,7 @@ public Response updatePropertiesWithResponse(Stri /** * Update the attribute identified by `name` where `reference` is the name of the repository. - * + * * @param name Name of the image (including the namespace). * @param value Repository attribute value. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1213,10 +1503,10 @@ public ContainerRepositoryProperties updateProperties(String name, RepositoryWri /** * List tags of a repository. - * + * * @param name Name of the image (including the namespace). * @param last Query parameter for the last item in previous query. Result set will include values lexically after - * last. + * last. * @param n query parameter for max number of items. * @param orderBy orderby query parameter. * @param digest filter by digest. @@ -1238,10 +1528,10 @@ public Mono> getTagsSinglePageAsync(String name /** * List tags of a repository. - * + * * @param name Name of the image (including the namespace). * @param last Query parameter for the last item in previous query. Result set will include values lexically after - * last. + * last. * @param n query parameter for max number of items. * @param orderBy orderby query parameter. * @param digest filter by digest. @@ -1260,10 +1550,58 @@ public PagedFlux getTagsAsync(String name, String last, Integ /** * List tags of a repository. - * + * + * @param name Name of the image (including the namespace). + * @param last Query parameter for the last item in previous query. Result set will include values lexically after + * last. + * @param n query parameter for max number of items. + * @param orderBy orderby query parameter. + * @param digest filter by digest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of tag details along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTagsNoCustomHeadersSinglePageAsync(String name, String last, + Integer n, String orderBy, String digest, Context context) { + final String accept = "application/json"; + return service + .getTagsNoCustomHeaders(this.client.getUrl(), name, last, n, orderBy, digest, this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getTagAttributeBases(), res.getValue().getLink(), null)); + } + + /** + * List tags of a repository. + * * @param name Name of the image (including the namespace). * @param last Query parameter for the last item in previous query. Result set will include values lexically after - * last. + * last. + * @param n query parameter for max number of items. + * @param orderBy orderby query parameter. + * @param digest filter by digest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of tag details as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getTagsNoCustomHeadersAsync(String name, String last, Integer n, String orderBy, + String digest, Context context) { + return new PagedFlux<>(() -> getTagsNoCustomHeadersSinglePageAsync(name, last, n, orderBy, digest, context), + nextLink -> getTagsNextSinglePageAsync(nextLink, context)); + } + + /** + * List tags of a repository. + * + * @param name Name of the image (including the namespace). + * @param last Query parameter for the last item in previous query. Result set will include values lexically after + * last. * @param n query parameter for max number of items. * @param orderBy orderby query parameter. * @param digest filter by digest. @@ -1285,10 +1623,10 @@ public PagedResponse getTagsSinglePage(String name, String la /** * List tags of a repository. - * + * * @param name Name of the image (including the namespace). * @param last Query parameter for the last item in previous query. Result set will include values lexically after - * last. + * last. * @param n query parameter for max number of items. * @param orderBy orderby query parameter. * @param digest filter by digest. @@ -1305,9 +1643,56 @@ public PagedIterable getTags(String name, String last, Intege nextLink -> getTagsNextSinglePage(nextLink, context)); } + /** + * List tags of a repository. + * + * @param name Name of the image (including the namespace). + * @param last Query parameter for the last item in previous query. Result set will include values lexically after + * last. + * @param n query parameter for max number of items. + * @param orderBy orderby query parameter. + * @param digest filter by digest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of tag details along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getTagsNoCustomHeadersSinglePage(String name, String last, Integer n, + String orderBy, String digest, Context context) { + final String accept = "application/json"; + Response res = service.getTagsNoCustomHeadersSync(this.client.getUrl(), name, last, n, orderBy, digest, + this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getTagAttributeBases(), res.getValue().getLink(), null); + } + + /** + * List tags of a repository. + * + * @param name Name of the image (including the namespace). + * @param last Query parameter for the last item in previous query. Result set will include values lexically after + * last. + * @param n query parameter for max number of items. + * @param orderBy orderby query parameter. + * @param digest filter by digest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of tag details as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getTagsNoCustomHeaders(String name, String last, Integer n, String orderBy, + String digest, Context context) { + return new PagedIterable<>(() -> getTagsNoCustomHeadersSinglePage(name, last, n, orderBy, digest, context), + nextLink -> getTagsNextSinglePage(nextLink, context)); + } + /** * Get tag attributes by tag. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1318,14 +1703,12 @@ public PagedIterable getTags(String name, String last, Intege @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getTagPropertiesWithResponseAsync(String name, String reference) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getTagProperties(this.client.getUrl(), name, reference, - this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> getTagPropertiesWithResponseAsync(name, reference, context)); } /** * Get tag attributes by tag. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @param context The context to associate with this operation. @@ -1344,7 +1727,7 @@ public Mono> getTagPropertiesWithRespons /** * Get tag attributes by tag. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1359,7 +1742,7 @@ public Mono getTagPropertiesAsync(String name, St /** * Get tag attributes by tag. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @param context The context to associate with this operation. @@ -1376,7 +1759,7 @@ public Mono getTagPropertiesAsync(String name, St /** * Get tag attributes by tag. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @param context The context to associate with this operation. @@ -1395,7 +1778,7 @@ public Response getTagPropertiesWithResponse(Stri /** * Get tag attributes by tag. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1410,7 +1793,7 @@ public ArtifactTagPropertiesInternal getTagProperties(String name, String refere /** * Update tag attributes. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @param value Tag attribute value. @@ -1422,14 +1805,12 @@ public ArtifactTagPropertiesInternal getTagProperties(String name, String refere @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateTagAttributesWithResponseAsync(String name, String reference, TagWriteableProperties value) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.updateTagAttributes(this.client.getUrl(), name, reference, - this.client.getApiVersion(), value, accept, context)); + return FluxUtil.withContext(context -> updateTagAttributesWithResponseAsync(name, reference, value, context)); } /** * Update tag attributes. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @param value Tag attribute value. @@ -1449,7 +1830,7 @@ public Mono> updateTagAttributesWithResp /** * Update tag attributes. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @param value Tag attribute value. @@ -1467,7 +1848,7 @@ public Mono updateTagAttributesAsync(String name, /** * Update tag attributes. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @param value Tag attribute value. @@ -1486,7 +1867,7 @@ public Mono updateTagAttributesAsync(String name, /** * Update tag attributes. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @param value Tag attribute value. @@ -1506,7 +1887,7 @@ public Response updateTagAttributesWithResponse(S /** * Update tag attributes. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @param value Tag attribute value. @@ -1523,7 +1904,7 @@ public ArtifactTagPropertiesInternal updateTagAttributes(String name, String ref /** * Delete tag. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1533,14 +1914,12 @@ public ArtifactTagPropertiesInternal updateTagAttributes(String name, String ref */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteTagWithResponseAsync(String name, String reference) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.deleteTag(this.client.getUrl(), name, reference, - this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> deleteTagWithResponseAsync(name, reference, context)); } /** * Delete tag. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @param context The context to associate with this operation. @@ -1557,7 +1936,7 @@ public Mono> deleteTagWithResponseAsync(String name, String refer /** * Delete tag. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1572,7 +1951,7 @@ public Mono deleteTagAsync(String name, String reference) { /** * Delete tag. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @param context The context to associate with this operation. @@ -1588,7 +1967,7 @@ public Mono deleteTagAsync(String name, String reference, Context context) /** * Delete tag. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @param context The context to associate with this operation. @@ -1606,7 +1985,7 @@ public Response deleteTagWithResponse(String name, String reference, Conte /** * Delete tag. - * + * * @param name Name of the image (including the namespace). * @param reference Tag name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1620,10 +1999,10 @@ public void deleteTag(String name, String reference) { /** * List manifests of a repository. - * + * * @param name Name of the image (including the namespace). * @param last Query parameter for the last item in previous query. Result set will include values lexically after - * last. + * last. * @param n query parameter for max number of items. * @param orderBy orderby query parameter. * @param context The context to associate with this operation. @@ -1644,10 +2023,10 @@ public Mono> getManifestsSinglePageAsync(S /** * List manifests of a repository. - * + * * @param name Name of the image (including the namespace). * @param last Query parameter for the last item in previous query. Result set will include values lexically after - * last. + * last. * @param n query parameter for max number of items. * @param orderBy orderby query parameter. * @param context The context to associate with this operation. @@ -1665,10 +2044,56 @@ public PagedFlux getManifestsAsync(String name, String l /** * List manifests of a repository. - * + * + * @param name Name of the image (including the namespace). + * @param last Query parameter for the last item in previous query. Result set will include values lexically after + * last. + * @param n query parameter for max number of items. + * @param orderBy orderby query parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return manifest attributes along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getManifestsNoCustomHeadersSinglePageAsync(String name, + String last, Integer n, String orderBy, Context context) { + final String accept = "application/json"; + return service + .getManifestsNoCustomHeaders(this.client.getUrl(), name, last, n, orderBy, this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getManifests(), res.getValue().getLink(), null)); + } + + /** + * List manifests of a repository. + * + * @param name Name of the image (including the namespace). + * @param last Query parameter for the last item in previous query. Result set will include values lexically after + * last. + * @param n query parameter for max number of items. + * @param orderBy orderby query parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return manifest attributes as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getManifestsNoCustomHeadersAsync(String name, String last, Integer n, + String orderBy, Context context) { + return new PagedFlux<>(() -> getManifestsNoCustomHeadersSinglePageAsync(name, last, n, orderBy, context), + nextLink -> getManifestsNextSinglePageAsync(nextLink, context)); + } + + /** + * List manifests of a repository. + * * @param name Name of the image (including the namespace). * @param last Query parameter for the last item in previous query. Result set will include values lexically after - * last. + * last. * @param n query parameter for max number of items. * @param orderBy orderby query parameter. * @param context The context to associate with this operation. @@ -1689,10 +2114,10 @@ public PagedResponse getManifestsSinglePage(String name, /** * List manifests of a repository. - * + * * @param name Name of the image (including the namespace). * @param last Query parameter for the last item in previous query. Result set will include values lexically after - * last. + * last. * @param n query parameter for max number of items. * @param orderBy orderby query parameter. * @param context The context to associate with this operation. @@ -1708,9 +2133,54 @@ public PagedIterable getManifests(String name, String la nextLink -> getManifestsNextSinglePage(nextLink, context)); } + /** + * List manifests of a repository. + * + * @param name Name of the image (including the namespace). + * @param last Query parameter for the last item in previous query. Result set will include values lexically after + * last. + * @param n query parameter for max number of items. + * @param orderBy orderby query parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return manifest attributes along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getManifestsNoCustomHeadersSinglePage(String name, String last, + Integer n, String orderBy, Context context) { + final String accept = "application/json"; + Response res = service.getManifestsNoCustomHeadersSync(this.client.getUrl(), name, last, n, + orderBy, this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getManifests(), res.getValue().getLink(), null); + } + + /** + * List manifests of a repository. + * + * @param name Name of the image (including the namespace). + * @param last Query parameter for the last item in previous query. Result set will include values lexically after + * last. + * @param n query parameter for max number of items. + * @param orderBy orderby query parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return manifest attributes as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getManifestsNoCustomHeaders(String name, String last, Integer n, + String orderBy, Context context) { + return new PagedIterable<>(() -> getManifestsNoCustomHeadersSinglePage(name, last, n, orderBy, context), + nextLink -> getManifestsNextSinglePage(nextLink, context)); + } + /** * Get manifest attributes. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1721,14 +2191,12 @@ public PagedIterable getManifests(String name, String la @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getManifestPropertiesWithResponseAsync(String name, String digest) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getManifestProperties(this.client.getUrl(), name, digest, - this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> getManifestPropertiesWithResponseAsync(name, digest, context)); } /** * Get manifest attributes. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param context The context to associate with this operation. @@ -1747,7 +2215,7 @@ public Mono> getManifestPropertiesW /** * Get manifest attributes. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1762,7 +2230,7 @@ public Mono getManifestPropertiesAsync(Strin /** * Get manifest attributes. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param context The context to associate with this operation. @@ -1780,7 +2248,7 @@ public Mono getManifestPropertiesAsync(Strin /** * Get manifest attributes. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param context The context to associate with this operation. @@ -1799,7 +2267,7 @@ public Response getManifestPropertiesWithRes /** * Get manifest attributes. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1814,7 +2282,7 @@ public ArtifactManifestPropertiesInternal getManifestProperties(String name, Str /** * Update properties of a manifest. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param value Manifest attribute value. @@ -1826,14 +2294,12 @@ public ArtifactManifestPropertiesInternal getManifestProperties(String name, Str @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateManifestPropertiesWithResponseAsync(String name, String digest, ManifestWriteableProperties value) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.updateManifestProperties(this.client.getUrl(), name, digest, - this.client.getApiVersion(), value, accept, context)); + return FluxUtil.withContext(context -> updateManifestPropertiesWithResponseAsync(name, digest, value, context)); } /** * Update properties of a manifest. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param value Manifest attribute value. @@ -1853,7 +2319,7 @@ public Mono> updateManifestProperti /** * Update properties of a manifest. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param value Manifest attribute value. @@ -1871,7 +2337,7 @@ public Mono updateManifestPropertiesAsync(St /** * Update properties of a manifest. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param value Manifest attribute value. @@ -1890,7 +2356,7 @@ public Mono updateManifestPropertiesAsync(St /** * Update properties of a manifest. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param value Manifest attribute value. @@ -1910,7 +2376,7 @@ public Response updateManifestPropertiesWith /** * Update properties of a manifest. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param value Manifest attribute value. @@ -1927,9 +2393,8 @@ public ArtifactManifestPropertiesInternal updateManifestProperties(String name, /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1946,9 +2411,27 @@ public Mono> getRepositoriesNextSinglePageAsync(String nex /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of repositories along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRepositoriesNextNoCustomHeadersSinglePageAsync(String nextLink, + Context context) { + final String accept = "application/json"; + return service.getRepositoriesNextNoCustomHeaders(nextLink, this.client.getUrl(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getRepositories(), res.getValue().getLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1966,9 +2449,27 @@ public PagedResponse getRepositoriesNextSinglePage(String nextLink, Cont /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of repositories along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getRepositoriesNextNoCustomHeadersSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.getRepositoriesNextNoCustomHeadersSync(nextLink, this.client.getUrl(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getRepositories(), res.getValue().getLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1985,9 +2486,27 @@ public Mono> getTagsNextSinglePageAsync(String /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of tag details along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTagsNextNoCustomHeadersSinglePageAsync(String nextLink, + Context context) { + final String accept = "application/json"; + return service.getTagsNextNoCustomHeaders(nextLink, this.client.getUrl(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getTagAttributeBases(), res.getValue().getLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -2005,9 +2524,26 @@ public PagedResponse getTagsNextSinglePage(String nextLink, C /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of tag details along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getTagsNextNoCustomHeadersSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res = service.getTagsNextNoCustomHeadersSync(nextLink, this.client.getUrl(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getTagAttributeBases(), res.getValue().getLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -2025,9 +2561,27 @@ public Mono> getManifestsNextSinglePageAsy /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return manifest attributes along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getManifestsNextNoCustomHeadersSinglePageAsync(String nextLink, + Context context) { + final String accept = "application/json"; + return service.getManifestsNextNoCustomHeaders(nextLink, this.client.getUrl(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getManifests(), res.getValue().getLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -2042,4 +2596,24 @@ public PagedResponse getManifestsNextSinglePage(String n return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().getManifests(), res.getValue().getLink(), res.getDeserializedHeaders()); } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return manifest attributes along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getManifestsNextNoCustomHeadersSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.getManifestsNextNoCustomHeadersSync(nextLink, this.client.getUrl(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getManifests(), res.getValue().getLink(), null); + } } diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ContainerRegistryBlobsImpl.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ContainerRegistryBlobsImpl.java index d7519a66da379..c2d0cce578a2c 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ContainerRegistryBlobsImpl.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ContainerRegistryBlobsImpl.java @@ -43,17 +43,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ContainerRegistryBlobs. */ +/** + * An instance of this class provides access to all the operations defined in ContainerRegistryBlobs. + */ public final class ContainerRegistryBlobsImpl { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ContainerRegistryBlobsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureContainerRegistryImpl client; /** * Initializes an instance of ContainerRegistryBlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ ContainerRegistryBlobsImpl(AzureContainerRegistryImpl client) { @@ -76,6 +82,12 @@ Mono> getBlob(@Ho @PathParam("name") String name, @PathParam("digest") String digest, @HeaderParam("Accept") String accept, Context context); + @Get("/v2/{name}/blobs/{digest}") + @ExpectedResponses({ 200, 307 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getBlobNoCustomHeaders(@HostParam("url") String url, @PathParam("name") String name, + @PathParam("digest") String digest, @HeaderParam("Accept") String accept, Context context); + @Get("/v2/{name}/blobs/{digest}") @ExpectedResponses({ 200, 307 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -83,6 +95,12 @@ ResponseBase getBlobSync(@Host @PathParam("name") String name, @PathParam("digest") String digest, @HeaderParam("Accept") String accept, Context context); + @Get("/v2/{name}/blobs/{digest}") + @ExpectedResponses({ 200, 307 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getBlobNoCustomHeadersSync(@HostParam("url") String url, @PathParam("name") String name, + @PathParam("digest") String digest, @HeaderParam("Accept") String accept, Context context); + @Head("/v2/{name}/blobs/{digest}") @ExpectedResponses({ 200, 307 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -90,6 +108,13 @@ Mono> checkBlob @HostParam("url") String url, @PathParam("name") String name, @PathParam("digest") String digest, @HeaderParam("Accept") String accept, Context context); + @Head("/v2/{name}/blobs/{digest}") + @ExpectedResponses({ 200, 307 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> checkBlobExistsNoCustomHeaders(@HostParam("url") String url, + @PathParam("name") String name, @PathParam("digest") String digest, @HeaderParam("Accept") String accept, + Context context); + @Head("/v2/{name}/blobs/{digest}") @ExpectedResponses({ 200, 307 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -97,18 +122,36 @@ ResponseBase checkBlobExists @HostParam("url") String url, @PathParam("name") String name, @PathParam("digest") String digest, @HeaderParam("Accept") String accept, Context context); + @Head("/v2/{name}/blobs/{digest}") + @ExpectedResponses({ 200, 307 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response checkBlobExistsNoCustomHeadersSync(@HostParam("url") String url, @PathParam("name") String name, + @PathParam("digest") String digest, @HeaderParam("Accept") String accept, Context context); + @Delete("/v2/{name}/blobs/{digest}") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> deleteBlob(@HostParam("url") String url, @PathParam("name") String name, @PathParam("digest") String digest, Context context); + @Delete("/v2/{name}/blobs/{digest}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteBlobNoCustomHeaders(@HostParam("url") String url, @PathParam("name") String name, + @PathParam("digest") String digest, Context context); + @Delete("/v2/{name}/blobs/{digest}") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(HttpResponseException.class) ResponseBase deleteBlobSync(@HostParam("url") String url, @PathParam("name") String name, @PathParam("digest") String digest, Context context); + @Delete("/v2/{name}/blobs/{digest}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteBlobNoCustomHeadersSync(@HostParam("url") String url, @PathParam("name") String name, + @PathParam("digest") String digest, Context context); + @Post("/v2/{name}/blobs/uploads/") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -116,6 +159,13 @@ Mono> mountBlob(@Host @PathParam("name") String name, @QueryParam("from") String from, @QueryParam("mount") String mount, @HeaderParam("Accept") String accept, Context context); + @Post("/v2/{name}/blobs/uploads/") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> mountBlobNoCustomHeaders(@HostParam("url") String url, @PathParam("name") String name, + @QueryParam("from") String from, @QueryParam("mount") String mount, @HeaderParam("Accept") String accept, + Context context); + @Post("/v2/{name}/blobs/uploads/") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -123,6 +173,13 @@ ResponseBase mountBlobSync(@HostPa @PathParam("name") String name, @QueryParam("from") String from, @QueryParam("mount") String mount, @HeaderParam("Accept") String accept, Context context); + @Post("/v2/{name}/blobs/uploads/") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response mountBlobNoCustomHeadersSync(@HostParam("url") String url, @PathParam("name") String name, + @QueryParam("from") String from, @QueryParam("mount") String mount, @HeaderParam("Accept") String accept, + Context context); + @Get("/{nextBlobUuidLink}") @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -130,6 +187,13 @@ Mono> getUpload @HostParam("url") String url, @PathParam(value = "nextBlobUuidLink", encoded = true) String nextLink, @HeaderParam("Accept") String accept, Context context); + @Get("/{nextBlobUuidLink}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> getUploadStatusNoCustomHeaders(@HostParam("url") String url, + @PathParam(value = "nextBlobUuidLink", encoded = true) String nextLink, + @HeaderParam("Accept") String accept, Context context); + @Get("/{nextBlobUuidLink}") @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -137,6 +201,13 @@ ResponseBase getUploadStatus @HostParam("url") String url, @PathParam(value = "nextBlobUuidLink", encoded = true) String nextLink, @HeaderParam("Accept") String accept, Context context); + @Get("/{nextBlobUuidLink}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response getUploadStatusNoCustomHeadersSync(@HostParam("url") String url, + @PathParam(value = "nextBlobUuidLink", encoded = true) String nextLink, + @HeaderParam("Accept") String accept, Context context); + @Patch("/{nextBlobUuidLink}") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -145,6 +216,14 @@ Mono> uploadChunk(@ @BodyParam("application/octet-stream") Flux value, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context); + @Patch("/{nextBlobUuidLink}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> uploadChunkNoCustomHeaders(@HostParam("url") String url, + @PathParam(value = "nextBlobUuidLink", encoded = true) String nextLink, + @BodyParam("application/octet-stream") Flux value, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context); + @Patch("/{nextBlobUuidLink}") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -153,6 +232,14 @@ Mono> uploadChunk(@ @BodyParam("application/octet-stream") BinaryData value, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context); + @Patch("/{nextBlobUuidLink}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> uploadChunkNoCustomHeaders(@HostParam("url") String url, + @PathParam(value = "nextBlobUuidLink", encoded = true) String nextLink, + @BodyParam("application/octet-stream") BinaryData value, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Accept") String accept, Context context); + @Patch("/{nextBlobUuidLink}") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -161,6 +248,14 @@ ResponseBase uploadChunkSync(@Ho @BodyParam("application/octet-stream") BinaryData value, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context); + @Patch("/{nextBlobUuidLink}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response uploadChunkNoCustomHeadersSync(@HostParam("url") String url, + @PathParam(value = "nextBlobUuidLink", encoded = true) String nextLink, + @BodyParam("application/octet-stream") BinaryData value, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Accept") String accept, Context context); + @Put("/{nextBlobUuidLink}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -170,6 +265,14 @@ Mono> completeUp @BodyParam("application/octet-stream") Flux value, @HeaderParam("Content-Length") Long contentLength, @HeaderParam("Accept") String accept, Context context); + @Put("/{nextBlobUuidLink}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> completeUploadNoCustomHeaders(@HostParam("url") String url, + @QueryParam("digest") String digest, @PathParam(value = "nextBlobUuidLink", encoded = true) String nextLink, + @BodyParam("application/octet-stream") Flux value, + @HeaderParam("Content-Length") Long contentLength, @HeaderParam("Accept") String accept, Context context); + @Put("/{nextBlobUuidLink}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -179,6 +282,14 @@ Mono> completeUp @BodyParam("application/octet-stream") BinaryData value, @HeaderParam("Content-Length") Long contentLength, @HeaderParam("Accept") String accept, Context context); + @Put("/{nextBlobUuidLink}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> completeUploadNoCustomHeaders(@HostParam("url") String url, + @QueryParam("digest") String digest, @PathParam(value = "nextBlobUuidLink", encoded = true) String nextLink, + @BodyParam("application/octet-stream") BinaryData value, @HeaderParam("Content-Length") Long contentLength, + @HeaderParam("Accept") String accept, Context context); + @Put("/{nextBlobUuidLink}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -187,6 +298,14 @@ ResponseBase completeUploadSy @BodyParam("application/octet-stream") BinaryData value, @HeaderParam("Content-Length") Long contentLength, @HeaderParam("Accept") String accept, Context context); + @Put("/{nextBlobUuidLink}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response completeUploadNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("digest") String digest, @PathParam(value = "nextBlobUuidLink", encoded = true) String nextLink, + @BodyParam("application/octet-stream") BinaryData value, @HeaderParam("Content-Length") Long contentLength, + @HeaderParam("Accept") String accept, Context context); + @Delete("/{nextBlobUuidLink}") @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -207,12 +326,24 @@ Response cancelUploadSync(@HostParam("url") String url, Mono> startUpload(@HostParam("url") String url, @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + @Post("/v2/{name}/blobs/uploads/") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> startUploadNoCustomHeaders(@HostParam("url") String url, @PathParam("name") String name, + @HeaderParam("Accept") String accept, Context context); + @Post("/v2/{name}/blobs/uploads/") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) ResponseBase startUploadSync(@HostParam("url") String url, @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + @Post("/v2/{name}/blobs/uploads/") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response startUploadNoCustomHeadersSync(@HostParam("url") String url, @PathParam("name") String name, + @HeaderParam("Accept") String accept, Context context); + @Get("/v2/{name}/blobs/{digest}") @ExpectedResponses({ 206 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -220,6 +351,13 @@ Mono> getChunk(@ @PathParam("name") String name, @PathParam("digest") String digest, @HeaderParam("Range") String range, @HeaderParam("Accept") String accept, Context context); + @Get("/v2/{name}/blobs/{digest}") + @ExpectedResponses({ 206 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getChunkNoCustomHeaders(@HostParam("url") String url, @PathParam("name") String name, + @PathParam("digest") String digest, @HeaderParam("Range") String range, + @HeaderParam("Accept") String accept, Context context); + @Get("/v2/{name}/blobs/{digest}") @ExpectedResponses({ 206 }) @UnexpectedResponseExceptionType(HttpResponseException.class) @@ -227,6 +365,13 @@ ResponseBase getChunkSync(@Ho @PathParam("name") String name, @PathParam("digest") String digest, @HeaderParam("Range") String range, @HeaderParam("Accept") String accept, Context context); + @Get("/v2/{name}/blobs/{digest}") + @ExpectedResponses({ 206 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getChunkNoCustomHeadersSync(@HostParam("url") String url, @PathParam("name") String name, + @PathParam("digest") String digest, @HeaderParam("Range") String range, + @HeaderParam("Accept") String accept, Context context); + @Head("/v2/{name}/blobs/{digest}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) @@ -234,17 +379,31 @@ Mono> checkChu @HostParam("url") String url, @PathParam("name") String name, @PathParam("digest") String digest, @HeaderParam("Range") String range, @HeaderParam("Accept") String accept, Context context); + @Head("/v2/{name}/blobs/{digest}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Mono> checkChunkExistsNoCustomHeaders(@HostParam("url") String url, + @PathParam("name") String name, @PathParam("digest") String digest, @HeaderParam("Range") String range, + @HeaderParam("Accept") String accept, Context context); + @Head("/v2/{name}/blobs/{digest}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(AcrErrorsException.class) ResponseBase checkChunkExistsSync( @HostParam("url") String url, @PathParam("name") String name, @PathParam("digest") String digest, @HeaderParam("Range") String range, @HeaderParam("Accept") String accept, Context context); + + @Head("/v2/{name}/blobs/{digest}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(AcrErrorsException.class) + Response checkChunkExistsNoCustomHeadersSync(@HostParam("url") String url, @PathParam("name") String name, + @PathParam("digest") String digest, @HeaderParam("Range") String range, + @HeaderParam("Accept") String accept, Context context); } /** * Retrieve the blob from the registry identified by digest. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -255,13 +414,12 @@ ResponseBase checkChunkExis @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getBlobWithResponseAsync(String name, String digest) { - final String accept = "application/octet-stream"; - return FluxUtil.withContext(context -> service.getBlob(this.client.getUrl(), name, digest, accept, context)); + return FluxUtil.withContext(context -> getBlobWithResponseAsync(name, digest, context)); } /** * Retrieve the blob from the registry identified by digest. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param context The context to associate with this operation. @@ -279,7 +437,7 @@ public Mono> getB /** * Retrieve the blob from the registry identified by digest. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -294,7 +452,7 @@ public Mono getBlobAsync(String name, String digest) { /** * Retrieve the blob from the registry identified by digest. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param context The context to associate with this operation. @@ -310,7 +468,40 @@ public Mono getBlobAsync(String name, String digest, Context context /** * Retrieve the blob from the registry identified by digest. - * + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getBlobNoCustomHeadersWithResponseAsync(String name, String digest) { + return FluxUtil.withContext(context -> getBlobNoCustomHeadersWithResponseAsync(name, digest, context)); + } + + /** + * Retrieve the blob from the registry identified by digest. + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getBlobNoCustomHeadersWithResponseAsync(String name, String digest, + Context context) { + final String accept = "application/octet-stream"; + return service.getBlobNoCustomHeaders(this.client.getUrl(), name, digest, accept, context); + } + + /** + * Retrieve the blob from the registry identified by digest. + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param context The context to associate with this operation. @@ -328,7 +519,7 @@ public ResponseBase getBlobWit /** * Retrieve the blob from the registry identified by digest. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -341,9 +532,26 @@ public BinaryData getBlob(String name, String digest) { return getBlobWithResponse(name, digest, Context.NONE).getValue(); } + /** + * Retrieve the blob from the registry identified by digest. + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBlobNoCustomHeadersWithResponse(String name, String digest, Context context) { + final String accept = "application/octet-stream"; + return service.getBlobNoCustomHeadersSync(this.client.getUrl(), name, digest, accept, context); + } + /** * Same as GET, except only the headers are returned. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -354,14 +562,12 @@ public BinaryData getBlob(String name, String digest) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> checkBlobExistsWithResponseAsync(String name, String digest) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.checkBlobExists(this.client.getUrl(), name, digest, accept, context)); + return FluxUtil.withContext(context -> checkBlobExistsWithResponseAsync(name, digest, context)); } /** * Same as GET, except only the headers are returned. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param context The context to associate with this operation. @@ -379,7 +585,7 @@ public BinaryData getBlob(String name, String digest) { /** * Same as GET, except only the headers are returned. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -394,7 +600,7 @@ public Mono checkBlobExistsAsync(String name, String digest) { /** * Same as GET, except only the headers are returned. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param context The context to associate with this operation. @@ -410,7 +616,40 @@ public Mono checkBlobExistsAsync(String name, String digest, Context conte /** * Same as GET, except only the headers are returned. - * + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> checkBlobExistsNoCustomHeadersWithResponseAsync(String name, String digest) { + return FluxUtil.withContext(context -> checkBlobExistsNoCustomHeadersWithResponseAsync(name, digest, context)); + } + + /** + * Same as GET, except only the headers are returned. + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> checkBlobExistsNoCustomHeadersWithResponseAsync(String name, String digest, + Context context) { + final String accept = "application/json"; + return service.checkBlobExistsNoCustomHeaders(this.client.getUrl(), name, digest, accept, context); + } + + /** + * Same as GET, except only the headers are returned. + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param context The context to associate with this operation. @@ -428,7 +667,7 @@ public ResponseBase checkBlo /** * Same as GET, except only the headers are returned. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -440,9 +679,26 @@ public void checkBlobExists(String name, String digest) { checkBlobExistsWithResponse(name, digest, Context.NONE); } + /** + * Same as GET, except only the headers are returned. + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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 checkBlobExistsNoCustomHeadersWithResponse(String name, String digest, Context context) { + final String accept = "application/json"; + return service.checkBlobExistsNoCustomHeadersSync(this.client.getUrl(), name, digest, accept, context); + } + /** * Removes an already uploaded blob. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -453,12 +709,12 @@ public void checkBlobExists(String name, String digest) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteBlobWithResponseAsync(String name, String digest) { - return FluxUtil.withContext(context -> service.deleteBlob(this.client.getUrl(), name, digest, context)); + return FluxUtil.withContext(context -> deleteBlobWithResponseAsync(name, digest, context)); } /** * Removes an already uploaded blob. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param context The context to associate with this operation. @@ -475,7 +731,7 @@ public Mono> deleteB /** * Removes an already uploaded blob. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -490,7 +746,7 @@ public Mono deleteBlobAsync(String name, String digest) { /** * Removes an already uploaded blob. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param context The context to associate with this operation. @@ -506,7 +762,39 @@ public Mono deleteBlobAsync(String name, String digest, Context context) { /** * Removes an already uploaded blob. - * + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> deleteBlobNoCustomHeadersWithResponseAsync(String name, String digest) { + return FluxUtil.withContext(context -> deleteBlobNoCustomHeadersWithResponseAsync(name, digest, context)); + } + + /** + * Removes an already uploaded blob. + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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) + public Mono> deleteBlobNoCustomHeadersWithResponseAsync(String name, String digest, + Context context) { + return service.deleteBlobNoCustomHeaders(this.client.getUrl(), name, digest, context); + } + + /** + * Removes an already uploaded blob. + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param context The context to associate with this operation. @@ -523,7 +811,7 @@ public ResponseBase deleteBlobWit /** * Removes an already uploaded blob. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -535,9 +823,25 @@ public void deleteBlob(String name, String digest) { deleteBlobWithResponse(name, digest, Context.NONE); } + /** + * Removes an already uploaded blob. + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 deleteBlobNoCustomHeadersWithResponse(String name, String digest, Context context) { + return service.deleteBlobNoCustomHeadersSync(this.client.getUrl(), name, digest, context); + } + /** * Mount a blob identified by the `mount` parameter from another repository. - * + * * @param name Name of the image (including the namespace). * @param from Name of the source repository. * @param mount Digest of blob to mount from the source repository. @@ -549,14 +853,12 @@ public void deleteBlob(String name, String digest) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> mountBlobWithResponseAsync(String name, String from, String mount) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.mountBlob(this.client.getUrl(), name, from, mount, accept, context)); + return FluxUtil.withContext(context -> mountBlobWithResponseAsync(name, from, mount, context)); } /** * Mount a blob identified by the `mount` parameter from another repository. - * + * * @param name Name of the image (including the namespace). * @param from Name of the source repository. * @param mount Digest of blob to mount from the source repository. @@ -575,7 +877,7 @@ public Mono> mountBlo /** * Mount a blob identified by the `mount` parameter from another repository. - * + * * @param name Name of the image (including the namespace). * @param from Name of the source repository. * @param mount Digest of blob to mount from the source repository. @@ -591,7 +893,7 @@ public Mono mountBlobAsync(String name, String from, String mount) { /** * Mount a blob identified by the `mount` parameter from another repository. - * + * * @param name Name of the image (including the namespace). * @param from Name of the source repository. * @param mount Digest of blob to mount from the source repository. @@ -608,7 +910,42 @@ public Mono mountBlobAsync(String name, String from, String mount, Context /** * Mount a blob identified by the `mount` parameter from another repository. - * + * + * @param name Name of the image (including the namespace). + * @param from Name of the source repository. + * @param mount Digest of blob to mount from the source repository. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> mountBlobNoCustomHeadersWithResponseAsync(String name, String from, String mount) { + return FluxUtil.withContext(context -> mountBlobNoCustomHeadersWithResponseAsync(name, from, mount, context)); + } + + /** + * Mount a blob identified by the `mount` parameter from another repository. + * + * @param name Name of the image (including the namespace). + * @param from Name of the source repository. + * @param mount Digest of blob to mount from the source repository. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> mountBlobNoCustomHeadersWithResponseAsync(String name, String from, String mount, + Context context) { + final String accept = "application/json"; + return service.mountBlobNoCustomHeaders(this.client.getUrl(), name, from, mount, accept, context); + } + + /** + * Mount a blob identified by the `mount` parameter from another repository. + * * @param name Name of the image (including the namespace). * @param from Name of the source repository. * @param mount Digest of blob to mount from the source repository. @@ -627,7 +964,7 @@ public ResponseBase mountBlobWithR /** * Mount a blob identified by the `mount` parameter from another repository. - * + * * @param name Name of the image (including the namespace). * @param from Name of the source repository. * @param mount Digest of blob to mount from the source repository. @@ -640,12 +977,31 @@ public void mountBlob(String name, String from, String mount) { mountBlobWithResponse(name, from, mount, Context.NONE); } + /** + * Mount a blob identified by the `mount` parameter from another repository. + * + * @param name Name of the image (including the namespace). + * @param from Name of the source repository. + * @param mount Digest of blob to mount from the source repository. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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 mountBlobNoCustomHeadersWithResponse(String name, String from, String mount, + Context context) { + final String accept = "application/json"; + return service.mountBlobNoCustomHeadersSync(this.client.getUrl(), name, from, mount, accept, context); + } + /** * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the current * status of a resumable upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -654,17 +1010,15 @@ public void mountBlob(String name, String from, String mount) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getUploadStatusWithResponseAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getUploadStatus(this.client.getUrl(), nextLink, accept, context)); + return FluxUtil.withContext(context -> getUploadStatusWithResponseAsync(nextLink, context)); } /** * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the current * status of a resumable upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -681,9 +1035,9 @@ public void mountBlob(String name, String from, String mount) { /** * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the current * status of a resumable upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -697,9 +1051,9 @@ public Mono getUploadStatusAsync(String nextLink) { /** * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the current * status of a resumable upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -714,9 +1068,43 @@ public Mono getUploadStatusAsync(String nextLink, Context context) { /** * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the current * status of a resumable upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> getUploadStatusNoCustomHeadersWithResponseAsync(String nextLink) { + return FluxUtil.withContext(context -> getUploadStatusNoCustomHeadersWithResponseAsync(nextLink, context)); + } + + /** + * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the current + * status of a resumable upload. + * + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do + * substring(1) ). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> getUploadStatusNoCustomHeadersWithResponseAsync(String nextLink, Context context) { + final String accept = "application/json"; + return service.getUploadStatusNoCustomHeaders(this.client.getUrl(), nextLink, accept, context); + } + + /** + * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the current + * status of a resumable upload. + * + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do + * substring(1) ). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -733,9 +1121,9 @@ public ResponseBase getUploa /** * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the current * status of a resumable upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -745,11 +1133,29 @@ public void getUploadStatus(String nextLink) { getUploadStatusWithResponse(nextLink, Context.NONE); } + /** + * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the current + * status of a resumable upload. + * + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do + * substring(1) ). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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 getUploadStatusNoCustomHeadersWithResponse(String nextLink, Context context) { + final String accept = "application/json"; + return service.getUploadStatusNoCustomHeadersSync(this.client.getUrl(), nextLink, accept, context); + } + /** * Upload a stream of data without completing the upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Raw data of blob. * @param contentLength The Content-Length header for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -760,16 +1166,14 @@ public void getUploadStatus(String nextLink) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> uploadChunkWithResponseAsync(String nextLink, Flux value, long contentLength) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.uploadChunk(this.client.getUrl(), nextLink, value, contentLength, accept, context)); + return FluxUtil.withContext(context -> uploadChunkWithResponseAsync(nextLink, value, contentLength, context)); } /** * Upload a stream of data without completing the upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Raw data of blob. * @param contentLength The Content-Length header for the request. * @param context The context to associate with this operation. @@ -787,9 +1191,9 @@ public void getUploadStatus(String nextLink) { /** * Upload a stream of data without completing the upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Raw data of blob. * @param contentLength The Content-Length header for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -804,9 +1208,9 @@ public Mono uploadChunkAsync(String nextLink, Flux value, long /** * Upload a stream of data without completing the upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Raw data of blob. * @param contentLength The Content-Length header for the request. * @param context The context to associate with this operation. @@ -822,9 +1226,49 @@ public Mono uploadChunkAsync(String nextLink, Flux value, long /** * Upload a stream of data without completing the upload. - * + * + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do + * substring(1) ). + * @param value Raw data of blob. + * @param contentLength The Content-Length header for the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> uploadChunkNoCustomHeadersWithResponseAsync(String nextLink, Flux value, + long contentLength) { + return FluxUtil.withContext( + context -> uploadChunkNoCustomHeadersWithResponseAsync(nextLink, value, contentLength, context)); + } + + /** + * Upload a stream of data without completing the upload. + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). + * @param value Raw data of blob. + * @param contentLength The Content-Length header for the request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> uploadChunkNoCustomHeadersWithResponseAsync(String nextLink, Flux value, + long contentLength, Context context) { + final String accept = "application/json"; + return service.uploadChunkNoCustomHeaders(this.client.getUrl(), nextLink, value, contentLength, accept, + context); + } + + /** + * Upload a stream of data without completing the upload. + * + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do + * substring(1) ). * @param value Raw data of blob. * @param contentLength The Content-Length header for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -835,16 +1279,14 @@ public Mono uploadChunkAsync(String nextLink, Flux value, long @ServiceMethod(returns = ReturnType.SINGLE) public Mono> uploadChunkWithResponseAsync(String nextLink, BinaryData value, long contentLength) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.uploadChunk(this.client.getUrl(), nextLink, value, contentLength, accept, context)); + return FluxUtil.withContext(context -> uploadChunkWithResponseAsync(nextLink, value, contentLength, context)); } /** * Upload a stream of data without completing the upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Raw data of blob. * @param contentLength The Content-Length header for the request. * @param context The context to associate with this operation. @@ -862,44 +1304,84 @@ public Mono uploadChunkAsync(String nextLink, Flux value, long /** * Upload a stream of data without completing the upload. - * + * + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do + * substring(1) ). + * @param value Raw data of blob. + * @param contentLength The Content-Length header for the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono uploadChunkAsync(String nextLink, BinaryData value, long contentLength) { + return uploadChunkWithResponseAsync(nextLink, value, contentLength).flatMap(ignored -> Mono.empty()); + } + + /** + * Upload a stream of data without completing the upload. + * + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do + * substring(1) ). + * @param value Raw data of blob. + * @param contentLength The Content-Length header for the request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono uploadChunkAsync(String nextLink, BinaryData value, long contentLength, Context context) { + return uploadChunkWithResponseAsync(nextLink, value, contentLength, context).flatMap(ignored -> Mono.empty()); + } + + /** + * Upload a stream of data without completing the upload. + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Raw data of blob. * @param contentLength The Content-Length header for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadChunkAsync(String nextLink, BinaryData value, long contentLength) { - return uploadChunkWithResponseAsync(nextLink, value, contentLength).flatMap(ignored -> Mono.empty()); + public Mono> uploadChunkNoCustomHeadersWithResponseAsync(String nextLink, BinaryData value, + long contentLength) { + return FluxUtil.withContext( + context -> uploadChunkNoCustomHeadersWithResponseAsync(nextLink, value, contentLength, context)); } /** * Upload a stream of data without completing the upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Raw data of blob. * @param contentLength The Content-Length header for the request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadChunkAsync(String nextLink, BinaryData value, long contentLength, Context context) { - return uploadChunkWithResponseAsync(nextLink, value, contentLength, context).flatMap(ignored -> Mono.empty()); + public Mono> uploadChunkNoCustomHeadersWithResponseAsync(String nextLink, BinaryData value, + long contentLength, Context context) { + final String accept = "application/json"; + return service.uploadChunkNoCustomHeaders(this.client.getUrl(), nextLink, value, contentLength, accept, + context); } /** * Upload a stream of data without completing the upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Raw data of blob. * @param contentLength The Content-Length header for the request. * @param context The context to associate with this operation. @@ -917,9 +1399,9 @@ public ResponseBase uploadChunkW /** * Upload a stream of data without completing the upload. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Raw data of blob. * @param contentLength The Content-Length header for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -931,13 +1413,34 @@ public void uploadChunk(String nextLink, BinaryData value, long contentLength) { uploadChunkWithResponse(nextLink, value, contentLength, Context.NONE); } + /** + * Upload a stream of data without completing the upload. + * + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do + * substring(1) ). + * @param value Raw data of blob. + * @param contentLength The Content-Length header for the request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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 uploadChunkNoCustomHeadersWithResponse(String nextLink, BinaryData value, long contentLength, + Context context) { + final String accept = "application/json"; + return service.uploadChunkNoCustomHeadersSync(this.client.getUrl(), nextLink, value, contentLength, accept, + context); + } + /** * Complete the upload, providing all the data in the body, if necessary. A request without a body will just * complete the upload with previously uploaded content. - * + * * @param digest Digest of a BLOB. * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Optional raw data of blob. * @param contentLength The Content-Length header for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -948,18 +1451,17 @@ public void uploadChunk(String nextLink, BinaryData value, long contentLength) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> completeUploadWithResponseAsync(String digest, String nextLink, Flux value, Long contentLength) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.completeUpload(this.client.getUrl(), digest, nextLink, value, - contentLength, accept, context)); + return FluxUtil + .withContext(context -> completeUploadWithResponseAsync(digest, nextLink, value, contentLength, context)); } /** * Complete the upload, providing all the data in the body, if necessary. A request without a body will just * complete the upload with previously uploaded content. - * + * * @param digest Digest of a BLOB. * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Optional raw data of blob. * @param contentLength The Content-Length header for the request. * @param context The context to associate with this operation. @@ -978,10 +1480,10 @@ public Mono> com /** * Complete the upload, providing all the data in the body, if necessary. A request without a body will just * complete the upload with previously uploaded content. - * + * * @param digest Digest of a BLOB. * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Optional raw data of blob. * @param contentLength The Content-Length header for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -997,10 +1499,10 @@ public Mono completeUploadAsync(String digest, String nextLink, Flux completeUploadAsync(String digest, String nextLink, Flux> completeUploadNoCustomHeadersWithResponseAsync(String digest, String nextLink, + Flux value, Long contentLength) { + return FluxUtil.withContext( + context -> completeUploadNoCustomHeadersWithResponseAsync(digest, nextLink, value, contentLength, context)); + } + + /** + * Complete the upload, providing all the data in the body, if necessary. A request without a body will just + * complete the upload with previously uploaded content. + * + * @param digest Digest of a BLOB. + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do + * substring(1) ). + * @param value Optional raw data of blob. + * @param contentLength The Content-Length header for the request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> completeUploadNoCustomHeadersWithResponseAsync(String digest, String nextLink, + Flux value, Long contentLength, Context context) { + final String accept = "application/json"; + return service.completeUploadNoCustomHeaders(this.client.getUrl(), digest, nextLink, value, contentLength, + accept, context); + } + + /** + * Complete the upload, providing all the data in the body, if necessary. A request without a body will just + * complete the upload with previously uploaded content. + * * @param digest Digest of a BLOB. * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Optional raw data of blob. * @param contentLength The Content-Length header for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1033,18 +1579,17 @@ public Mono completeUploadAsync(String digest, String nextLink, Flux> completeUploadWithResponseAsync(String digest, String nextLink, BinaryData value, Long contentLength) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.completeUpload(this.client.getUrl(), digest, nextLink, value, - contentLength, accept, context)); + return FluxUtil + .withContext(context -> completeUploadWithResponseAsync(digest, nextLink, value, contentLength, context)); } /** * Complete the upload, providing all the data in the body, if necessary. A request without a body will just * complete the upload with previously uploaded content. - * + * * @param digest Digest of a BLOB. * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Optional raw data of blob. * @param contentLength The Content-Length header for the request. * @param context The context to associate with this operation. @@ -1063,10 +1608,10 @@ public Mono> com /** * Complete the upload, providing all the data in the body, if necessary. A request without a body will just * complete the upload with previously uploaded content. - * + * * @param digest Digest of a BLOB. * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Optional raw data of blob. * @param contentLength The Content-Length header for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1082,10 +1627,10 @@ public Mono completeUploadAsync(String digest, String nextLink, BinaryData /** * Complete the upload, providing all the data in the body, if necessary. A request without a body will just * complete the upload with previously uploaded content. - * + * * @param digest Digest of a BLOB. * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Optional raw data of blob. * @param contentLength The Content-Length header for the request. * @param context The context to associate with this operation. @@ -1104,10 +1649,54 @@ public Mono completeUploadAsync(String digest, String nextLink, BinaryData /** * Complete the upload, providing all the data in the body, if necessary. A request without a body will just * complete the upload with previously uploaded content. - * + * + * @param digest Digest of a BLOB. + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do + * substring(1) ). + * @param value Optional raw data of blob. + * @param contentLength The Content-Length header for the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> completeUploadNoCustomHeadersWithResponseAsync(String digest, String nextLink, + BinaryData value, Long contentLength) { + return FluxUtil.withContext( + context -> completeUploadNoCustomHeadersWithResponseAsync(digest, nextLink, value, contentLength, context)); + } + + /** + * Complete the upload, providing all the data in the body, if necessary. A request without a body will just + * complete the upload with previously uploaded content. + * + * @param digest Digest of a BLOB. + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do + * substring(1) ). + * @param value Optional raw data of blob. + * @param contentLength The Content-Length header for the request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> completeUploadNoCustomHeadersWithResponseAsync(String digest, String nextLink, + BinaryData value, Long contentLength, Context context) { + final String accept = "application/json"; + return service.completeUploadNoCustomHeaders(this.client.getUrl(), digest, nextLink, value, contentLength, + accept, context); + } + + /** + * Complete the upload, providing all the data in the body, if necessary. A request without a body will just + * complete the upload with previously uploaded content. + * * @param digest Digest of a BLOB. * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Optional raw data of blob. * @param contentLength The Content-Length header for the request. * @param context The context to associate with this operation. @@ -1127,10 +1716,10 @@ public ResponseBase completeU /** * Complete the upload, providing all the data in the body, if necessary. A request without a body will just * complete the upload with previously uploaded content. - * + * * @param digest Digest of a BLOB. * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param value Optional raw data of blob. * @param contentLength The Content-Length header for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1142,12 +1731,35 @@ public void completeUpload(String digest, String nextLink, BinaryData value, Lon completeUploadWithResponse(digest, nextLink, value, contentLength, Context.NONE); } + /** + * Complete the upload, providing all the data in the body, if necessary. A request without a body will just + * complete the upload with previously uploaded content. + * + * @param digest Digest of a BLOB. + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do + * substring(1) ). + * @param value Optional raw data of blob. + * @param contentLength The Content-Length header for the request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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 completeUploadNoCustomHeadersWithResponse(String digest, String nextLink, BinaryData value, + Long contentLength, Context context) { + final String accept = "application/json"; + return service.completeUploadNoCustomHeadersSync(this.client.getUrl(), digest, nextLink, value, contentLength, + accept, context); + } + /** * Cancel outstanding upload processes, releasing associated resources. If this is not called, the unfinished * uploads will eventually timeout. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1155,16 +1767,15 @@ public void completeUpload(String digest, String nextLink, BinaryData value, Lon */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> cancelUploadWithResponseAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.cancelUpload(this.client.getUrl(), nextLink, accept, context)); + return FluxUtil.withContext(context -> cancelUploadWithResponseAsync(nextLink, context)); } /** * Cancel outstanding upload processes, releasing associated resources. If this is not called, the unfinished * uploads will eventually timeout. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1180,9 +1791,9 @@ public Mono> cancelUploadWithResponseAsync(String nextLink, Conte /** * Cancel outstanding upload processes, releasing associated resources. If this is not called, the unfinished * uploads will eventually timeout. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1196,9 +1807,9 @@ public Mono cancelUploadAsync(String nextLink) { /** * Cancel outstanding upload processes, releasing associated resources. If this is not called, the unfinished * uploads will eventually timeout. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1213,9 +1824,9 @@ public Mono cancelUploadAsync(String nextLink, Context context) { /** * Cancel outstanding upload processes, releasing associated resources. If this is not called, the unfinished * uploads will eventually timeout. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1231,9 +1842,9 @@ public Response cancelUploadWithResponse(String nextLink, Context context) /** * Cancel outstanding upload processes, releasing associated resources. If this is not called, the unfinished * uploads will eventually timeout. - * + * * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / (must do - * substring(1) ). + * substring(1) ). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1245,7 +1856,7 @@ public void cancelUpload(String nextLink) { /** * Initiate a resumable blob upload with an empty request body. - * + * * @param name Name of the image (including the namespace). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1255,13 +1866,12 @@ public void cancelUpload(String nextLink) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> startUploadWithResponseAsync(String name) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.startUpload(this.client.getUrl(), name, accept, context)); + return FluxUtil.withContext(context -> startUploadWithResponseAsync(name, context)); } /** * Initiate a resumable blob upload with an empty request body. - * + * * @param name Name of the image (including the namespace). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1278,7 +1888,7 @@ public Mono> startU /** * Initiate a resumable blob upload with an empty request body. - * + * * @param name Name of the image (including the namespace). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1292,7 +1902,7 @@ public Mono startUploadAsync(String name) { /** * Initiate a resumable blob upload with an empty request body. - * + * * @param name Name of the image (including the namespace). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1307,7 +1917,37 @@ public Mono startUploadAsync(String name, Context context) { /** * Initiate a resumable blob upload with an empty request body. - * + * + * @param name Name of the image (including the namespace). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> startUploadNoCustomHeadersWithResponseAsync(String name) { + return FluxUtil.withContext(context -> startUploadNoCustomHeadersWithResponseAsync(name, context)); + } + + /** + * Initiate a resumable blob upload with an empty request body. + * + * @param name Name of the image (including the namespace). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> startUploadNoCustomHeadersWithResponseAsync(String name, Context context) { + final String accept = "application/json"; + return service.startUploadNoCustomHeaders(this.client.getUrl(), name, accept, context); + } + + /** + * Initiate a resumable blob upload with an empty request body. + * * @param name Name of the image (including the namespace). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1324,7 +1964,7 @@ public ResponseBase startUploadW /** * Initiate a resumable blob upload with an empty request body. - * + * * @param name Name of the image (including the namespace). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AcrErrorsException thrown if the request is rejected by server. @@ -1335,11 +1975,27 @@ public void startUpload(String name) { startUploadWithResponse(name, Context.NONE); } + /** + * Initiate a resumable blob upload with an empty request body. + * + * @param name Name of the image (including the namespace). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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 startUploadNoCustomHeadersWithResponse(String name, Context context) { + final String accept = "application/json"; + return service.startUploadNoCustomHeadersSync(this.client.getUrl(), name, accept, context); + } + /** * Retrieve the blob from the registry identified by `digest`. This endpoint may also support RFC7233 compliant * range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is * returned, range requests can be used to fetch partial content. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. @@ -1351,16 +2007,14 @@ public void startUpload(String name) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getChunkWithResponseAsync(String name, String digest, String range) { - final String accept = "application/octet-stream"; - return FluxUtil - .withContext(context -> service.getChunk(this.client.getUrl(), name, digest, range, accept, context)); + return FluxUtil.withContext(context -> getChunkWithResponseAsync(name, digest, range, context)); } /** * Retrieve the blob from the registry identified by `digest`. This endpoint may also support RFC7233 compliant * range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is * returned, range requests can be used to fetch partial content. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. @@ -1381,7 +2035,7 @@ public Mono> get * Retrieve the blob from the registry identified by `digest`. This endpoint may also support RFC7233 compliant * range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is * returned, range requests can be used to fetch partial content. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. @@ -1399,7 +2053,7 @@ public Mono getChunkAsync(String name, String digest, String range) * Retrieve the blob from the registry identified by `digest`. This endpoint may also support RFC7233 compliant * range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is * returned, range requests can be used to fetch partial content. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. @@ -1418,7 +2072,47 @@ public Mono getChunkAsync(String name, String digest, String range, * Retrieve the blob from the registry identified by `digest`. This endpoint may also support RFC7233 compliant * range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is * returned, range requests can be used to fetch partial content. - * + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getChunkNoCustomHeadersWithResponseAsync(String name, String digest, + String range) { + return FluxUtil.withContext(context -> getChunkNoCustomHeadersWithResponseAsync(name, digest, range, context)); + } + + /** + * Retrieve the blob from the registry identified by `digest`. This endpoint may also support RFC7233 compliant + * range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is + * returned, range requests can be used to fetch partial content. + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getChunkNoCustomHeadersWithResponseAsync(String name, String digest, String range, + Context context) { + final String accept = "application/octet-stream"; + return service.getChunkNoCustomHeaders(this.client.getUrl(), name, digest, range, accept, context); + } + + /** + * Retrieve the blob from the registry identified by `digest`. This endpoint may also support RFC7233 compliant + * range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is + * returned, range requests can be used to fetch partial content. + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. @@ -1439,7 +2133,7 @@ public ResponseBase getChunkW * Retrieve the blob from the registry identified by `digest`. This endpoint may also support RFC7233 compliant * range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is * returned, range requests can be used to fetch partial content. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. @@ -1453,9 +2147,30 @@ public BinaryData getChunk(String name, String digest, String range) { return getChunkWithResponse(name, digest, range, Context.NONE).getValue(); } + /** + * Retrieve the blob from the registry identified by `digest`. This endpoint may also support RFC7233 compliant + * range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is + * returned, range requests can be used to fetch partial content. + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException 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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getChunkNoCustomHeadersWithResponse(String name, String digest, String range, + Context context) { + final String accept = "application/octet-stream"; + return service.getChunkNoCustomHeadersSync(this.client.getUrl(), name, digest, range, accept, context); + } + /** * Same as GET, except only the headers are returned. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. @@ -1467,14 +2182,12 @@ public BinaryData getChunk(String name, String digest, String range) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> checkChunkExistsWithResponseAsync(String name, String digest, String range) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.checkChunkExists(this.client.getUrl(), name, digest, range, accept, context)); + return FluxUtil.withContext(context -> checkChunkExistsWithResponseAsync(name, digest, range, context)); } /** * Same as GET, except only the headers are returned. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. @@ -1493,7 +2206,7 @@ public BinaryData getChunk(String name, String digest, String range) { /** * Same as GET, except only the headers are returned. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. @@ -1509,7 +2222,7 @@ public Mono checkChunkExistsAsync(String name, String digest, String range /** * Same as GET, except only the headers are returned. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. @@ -1526,7 +2239,44 @@ public Mono checkChunkExistsAsync(String name, String digest, String range /** * Same as GET, except only the headers are returned. - * + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> checkChunkExistsNoCustomHeadersWithResponseAsync(String name, String digest, + String range) { + return FluxUtil + .withContext(context -> checkChunkExistsNoCustomHeadersWithResponseAsync(name, digest, range, context)); + } + + /** + * Same as GET, except only the headers are returned. + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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) + public Mono> checkChunkExistsNoCustomHeadersWithResponseAsync(String name, String digest, + String range, Context context) { + final String accept = "application/json"; + return service.checkChunkExistsNoCustomHeaders(this.client.getUrl(), name, digest, range, accept, context); + } + + /** + * Same as GET, except only the headers are returned. + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. @@ -1545,7 +2295,7 @@ public ResponseBase checkCh /** * Same as GET, except only the headers are returned. - * + * * @param name Name of the image (including the namespace). * @param digest Digest of a BLOB. * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. @@ -1557,4 +2307,23 @@ public ResponseBase checkCh public void checkChunkExists(String name, String digest, String range) { checkChunkExistsWithResponse(name, digest, range, Context.NONE); } + + /** + * Same as GET, except only the headers are returned. + * + * @param name Name of the image (including the namespace). + * @param digest Digest of a BLOB. + * @param range Format : bytes=<start>-<end>, HTTP Range header specifying blob chunk. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws AcrErrorsException 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 checkChunkExistsNoCustomHeadersWithResponse(String name, String digest, String range, + Context context) { + final String accept = "application/json"; + return service.checkChunkExistsNoCustomHeadersSync(this.client.getUrl(), name, digest, range, accept, context); + } } diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrAccessToken.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrAccessToken.java index fea1cf4c9d424..daa2ec2b08b8f 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrAccessToken.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrAccessToken.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** The AcrAccessToken model. */ +/** + * The AcrAccessToken model. + */ @Fluent public final class AcrAccessToken implements JsonSerializable { /* @@ -19,13 +21,15 @@ public final class AcrAccessToken implements JsonSerializable { */ private String accessToken; - /** Creates an instance of AcrAccessToken class. */ + /** + * Creates an instance of AcrAccessToken class. + */ public AcrAccessToken() { } /** * Get the accessToken property: The access token for performing authenticated requests. - * + * * @return the accessToken value. */ public String getAccessToken() { @@ -34,7 +38,7 @@ public String getAccessToken() { /** * Set the accessToken property: The access token for performing authenticated requests. - * + * * @param accessToken the accessToken value to set. * @return the AcrAccessToken object itself. */ @@ -43,6 +47,9 @@ public AcrAccessToken setAccessToken(String accessToken) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -52,10 +59,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of AcrAccessToken from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of AcrAccessToken if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IOException If an error occurs while reading the AcrAccessToken. */ public static AcrAccessToken fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrErrorInfo.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrErrorInfo.java index e275ec75e05fb..5a95f94c40f21 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrErrorInfo.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrErrorInfo.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** Error information. */ +/** + * Error information. + */ @Fluent public final class AcrErrorInfo implements JsonSerializable { /* @@ -29,13 +31,15 @@ public final class AcrErrorInfo implements JsonSerializable { */ private Object detail; - /** Creates an instance of AcrErrorInfo class. */ + /** + * Creates an instance of AcrErrorInfo class. + */ public AcrErrorInfo() { } /** * Get the code property: Error code. - * + * * @return the code value. */ public String getCode() { @@ -44,7 +48,7 @@ public String getCode() { /** * Set the code property: Error code. - * + * * @param code the code value to set. * @return the AcrErrorInfo object itself. */ @@ -55,7 +59,7 @@ public AcrErrorInfo setCode(String code) { /** * Get the message property: Error message. - * + * * @return the message value. */ public String getMessage() { @@ -64,7 +68,7 @@ public String getMessage() { /** * Set the message property: Error message. - * + * * @param message the message value to set. * @return the AcrErrorInfo object itself. */ @@ -75,7 +79,7 @@ public AcrErrorInfo setMessage(String message) { /** * Get the detail property: Error details. - * + * * @return the detail value. */ public Object getDetail() { @@ -84,7 +88,7 @@ public Object getDetail() { /** * Set the detail property: Error details. - * + * * @param detail the detail value to set. * @return the AcrErrorInfo object itself. */ @@ -93,21 +97,24 @@ public AcrErrorInfo setDetail(Object detail) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("code", this.code); jsonWriter.writeStringField("message", this.message); - jsonWriter.writeUntyped(this.detail); + jsonWriter.writeUntypedField("detail", this.detail); return jsonWriter.writeEndObject(); } /** * Reads an instance of AcrErrorInfo from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of AcrErrorInfo if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IOException If an error occurs while reading the AcrErrorInfo. */ public static AcrErrorInfo fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrErrors.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrErrors.java index 018b4e30cf13e..40b089160419b 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrErrors.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrErrors.java @@ -12,7 +12,9 @@ import java.io.IOException; import java.util.List; -/** Acr error response describing why the operation failed. */ +/** + * Acr error response describing why the operation failed. + */ @Fluent public final class AcrErrors implements JsonSerializable { /* @@ -20,13 +22,15 @@ public final class AcrErrors implements JsonSerializable { */ private List errors; - /** Creates an instance of AcrErrors class. */ + /** + * Creates an instance of AcrErrors class. + */ public AcrErrors() { } /** * Get the errors property: Array of detailed error. - * + * * @return the errors value. */ public List getErrors() { @@ -35,7 +39,7 @@ public List getErrors() { /** * Set the errors property: Array of detailed error. - * + * * @param errors the errors value to set. * @return the AcrErrors object itself. */ @@ -44,6 +48,9 @@ public AcrErrors setErrors(List errors) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -53,10 +60,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of AcrErrors from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of AcrErrors if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. + * to JSON null. * @throws IOException If an error occurs while reading the AcrErrors. */ public static AcrErrors fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrErrorsException.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrErrorsException.java index 435377c8f9bc1..518234e327ceb 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrErrorsException.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrErrorsException.java @@ -7,11 +7,13 @@ import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpResponse; -/** Exception thrown for an invalid response with AcrErrors information. */ +/** + * Exception thrown for an invalid response with AcrErrors information. + */ public final class AcrErrorsException extends HttpResponseException { /** * Initializes a new instance of the AcrErrorsException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. */ @@ -21,7 +23,7 @@ public AcrErrorsException(String message, HttpResponse response) { /** * Initializes a new instance of the AcrErrorsException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. * @param value the deserialized response value. @@ -30,7 +32,9 @@ public AcrErrorsException(String message, HttpResponse response, AcrErrors value super(message, response, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AcrErrors getValue() { return (AcrErrors) super.getValue(); diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrManifests.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrManifests.java index 91ef734a79762..dca9854018bc5 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrManifests.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrManifests.java @@ -12,7 +12,9 @@ import java.io.IOException; import java.util.List; -/** Manifest attributes. */ +/** + * Manifest attributes. + */ @Fluent public final class AcrManifests implements JsonSerializable { /* @@ -35,14 +37,16 @@ public final class AcrManifests implements JsonSerializable { */ private String link; - /** Creates an instance of AcrManifests class. */ + /** + * Creates an instance of AcrManifests class. + */ public AcrManifests() { } /** * Get the registryLoginServer property: Registry login server name. This is likely to be similar to * {registry-name}.azurecr.io. - * + * * @return the registryLoginServer value. */ public String getRegistryLoginServer() { @@ -52,7 +56,7 @@ public String getRegistryLoginServer() { /** * Set the registryLoginServer property: Registry login server name. This is likely to be similar to * {registry-name}.azurecr.io. - * + * * @param registryLoginServer the registryLoginServer value to set. * @return the AcrManifests object itself. */ @@ -63,7 +67,7 @@ public AcrManifests setRegistryLoginServer(String registryLoginServer) { /** * Get the repository property: Image name. - * + * * @return the repository value. */ public String getRepository() { @@ -72,7 +76,7 @@ public String getRepository() { /** * Set the repository property: Image name. - * + * * @param repository the repository value to set. * @return the AcrManifests object itself. */ @@ -83,7 +87,7 @@ public AcrManifests setRepository(String repository) { /** * Get the manifests property: List of manifests. - * + * * @return the manifests value. */ public List getManifests() { @@ -92,7 +96,7 @@ public List getManifests() { /** * Set the manifests property: List of manifests. - * + * * @param manifests the manifests value to set. * @return the AcrManifests object itself. */ @@ -103,7 +107,7 @@ public AcrManifests setManifests(List manifests) { /** * Get the link property: The link property. - * + * * @return the link value. */ public String getLink() { @@ -112,7 +116,7 @@ public String getLink() { /** * Set the link property: The link property. - * + * * @param link the link value to set. * @return the AcrManifests object itself. */ @@ -121,6 +125,9 @@ public AcrManifests setLink(String link) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -133,10 +140,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of AcrManifests from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of AcrManifests if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IOException If an error occurs while reading the AcrManifests. */ public static AcrManifests fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrRefreshToken.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrRefreshToken.java index 58ff180cce36d..6436979b34658 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrRefreshToken.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/AcrRefreshToken.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** The AcrRefreshToken model. */ +/** + * The AcrRefreshToken model. + */ @Fluent public final class AcrRefreshToken implements JsonSerializable { /* @@ -19,13 +21,15 @@ public final class AcrRefreshToken implements JsonSerializable */ private String refreshToken; - /** Creates an instance of AcrRefreshToken class. */ + /** + * Creates an instance of AcrRefreshToken class. + */ public AcrRefreshToken() { } /** * Get the refreshToken property: The refresh token to be used for generating access tokens. - * + * * @return the refreshToken value. */ public String getRefreshToken() { @@ -34,7 +38,7 @@ public String getRefreshToken() { /** * Set the refreshToken property: The refresh token to be used for generating access tokens. - * + * * @param refreshToken the refreshToken value to set. * @return the AcrRefreshToken object itself. */ @@ -43,6 +47,9 @@ public AcrRefreshToken setRefreshToken(String refreshToken) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -52,10 +59,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of AcrRefreshToken from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of AcrRefreshToken if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IOException If an error occurs while reading the AcrRefreshToken. */ public static AcrRefreshToken fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ArtifactManifestPropertiesInternal.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ArtifactManifestPropertiesInternal.java index 9965080ea46dc..4dc19b736b6e2 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ArtifactManifestPropertiesInternal.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ArtifactManifestPropertiesInternal.java @@ -8,16 +8,19 @@ import com.azure.containers.containerregistry.models.ArtifactManifestPlatform; import com.azure.containers.containerregistry.models.ArtifactOperatingSystem; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; import java.util.List; -import java.util.Objects; -/** Manifest attributes details. */ +/** + * Manifest attributes details. + */ @Fluent public class ArtifactManifestPropertiesInternal implements JsonSerializable { /* @@ -91,14 +94,16 @@ public class ArtifactManifestPropertiesInternal implements JsonSerializable getRelatedArtifacts() { @@ -270,7 +275,7 @@ public List getRelatedArtifacts() { /** * Set the relatedArtifacts property: List of artifacts that are referenced by this manifest list, with information * about the platform each supports. This list will be empty if this is a leaf manifest and not a manifest list. - * + * * @param relatedArtifacts the relatedArtifacts value to set. * @return the ArtifactManifestPropertiesInternal object itself. */ @@ -281,7 +286,7 @@ public ArtifactManifestPropertiesInternal setRelatedArtifacts(List getTags() { @@ -290,7 +295,7 @@ public List getTags() { /** * Set the tags property: List of tags. - * + * * @param tags the tags value to set. * @return the ArtifactManifestPropertiesInternal object itself. */ @@ -301,7 +306,7 @@ public ArtifactManifestPropertiesInternal setTags(List tags) { /** * Get the deleteEnabled property: Delete enabled. - * + * * @return the deleteEnabled value. */ public Boolean isDeleteEnabled() { @@ -310,7 +315,7 @@ public Boolean isDeleteEnabled() { /** * Set the deleteEnabled property: Delete enabled. - * + * * @param deleteEnabled the deleteEnabled value to set. * @return the ArtifactManifestPropertiesInternal object itself. */ @@ -321,7 +326,7 @@ public ArtifactManifestPropertiesInternal setDeleteEnabled(Boolean deleteEnabled /** * Get the writeEnabled property: Write enabled. - * + * * @return the writeEnabled value. */ public Boolean isWriteEnabled() { @@ -330,7 +335,7 @@ public Boolean isWriteEnabled() { /** * Set the writeEnabled property: Write enabled. - * + * * @param writeEnabled the writeEnabled value to set. * @return the ArtifactManifestPropertiesInternal object itself. */ @@ -341,7 +346,7 @@ public ArtifactManifestPropertiesInternal setWriteEnabled(Boolean writeEnabled) /** * Get the listEnabled property: List enabled. - * + * * @return the listEnabled value. */ public Boolean isListEnabled() { @@ -350,7 +355,7 @@ public Boolean isListEnabled() { /** * Set the listEnabled property: List enabled. - * + * * @param listEnabled the listEnabled value to set. * @return the ArtifactManifestPropertiesInternal object itself. */ @@ -361,7 +366,7 @@ public ArtifactManifestPropertiesInternal setListEnabled(Boolean listEnabled) { /** * Get the readEnabled property: Read enabled. - * + * * @return the readEnabled value. */ public Boolean isReadEnabled() { @@ -370,7 +375,7 @@ public Boolean isReadEnabled() { /** * Set the readEnabled property: Read enabled. - * + * * @param readEnabled the readEnabled value to set. * @return the ArtifactManifestPropertiesInternal object itself. */ @@ -379,6 +384,9 @@ public ArtifactManifestPropertiesInternal setReadEnabled(Boolean readEnabled) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -399,10 +407,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject("manifest"); jsonWriter.writeStringField("digest", this.digest); jsonWriter.writeNumberField("imageSize", this.sizeInBytes); - jsonWriter.writeStringField("createdTime", Objects.toString(this.createdOn, null)); - jsonWriter.writeStringField("lastUpdateTime", Objects.toString(this.lastUpdatedOn, null)); - jsonWriter.writeStringField("architecture", Objects.toString(this.architecture, null)); - jsonWriter.writeStringField("os", Objects.toString(this.operatingSystem, null)); + jsonWriter.writeStringField("createdTime", + this.createdOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdOn)); + jsonWriter.writeStringField("lastUpdateTime", + this.lastUpdatedOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastUpdatedOn)); + jsonWriter.writeStringField("architecture", + this.architecture == null ? null : this.architecture.toString()); + jsonWriter.writeStringField("os", this.operatingSystem == null ? null : this.operatingSystem.toString()); jsonWriter.writeArrayField("references", this.relatedArtifacts, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("tags", this.tags, (writer, element) -> writer.writeString(element)); @@ -421,10 +432,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ArtifactManifestPropertiesInternal from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ArtifactManifestPropertiesInternal if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. + * null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ArtifactManifestPropertiesInternal. */ @@ -451,11 +462,11 @@ public static ArtifactManifestPropertiesInternal fromJson(JsonReader jsonReader) deserializedArtifactManifestPropertiesInternal.sizeInBytes = reader.getNullable(JsonReader::getLong); } else if ("createdTime".equals(fieldName)) { - deserializedArtifactManifestPropertiesInternal.createdOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedArtifactManifestPropertiesInternal.createdOn = reader.getNullable( + nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastUpdateTime".equals(fieldName)) { - deserializedArtifactManifestPropertiesInternal.lastUpdatedOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedArtifactManifestPropertiesInternal.lastUpdatedOn = reader.getNullable( + nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("architecture".equals(fieldName)) { deserializedArtifactManifestPropertiesInternal.architecture = ArtifactArchitecture.fromString(reader.getString()); diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ArtifactTagPropertiesInternal.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ArtifactTagPropertiesInternal.java index 2087bd539d273..dedccafdb7f23 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ArtifactTagPropertiesInternal.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ArtifactTagPropertiesInternal.java @@ -5,15 +5,18 @@ package com.azure.containers.containerregistry.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; -import java.util.Objects; +import java.time.format.DateTimeFormatter; -/** Tag attributes. */ +/** + * Tag attributes. + */ @Fluent public class ArtifactTagPropertiesInternal implements JsonSerializable { /* @@ -66,14 +69,16 @@ public class ArtifactTagPropertiesInternal implements JsonSerializable OffsetDateTime.parse(nonNullReader.getString())); + deserializedArtifactTagPropertiesInternal.createdOn = reader.getNullable( + nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastUpdateTime".equals(fieldName)) { - deserializedArtifactTagPropertiesInternal.lastUpdatedOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedArtifactTagPropertiesInternal.lastUpdatedOn = reader.getNullable( + nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("changeableAttributes".equals(fieldName) && reader.currentToken() == JsonToken.START_OBJECT) { while (reader.nextToken() != JsonToken.END_OBJECT) { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesCreateManifestHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesCreateManifestHeaders.java index 0c6c4f69f03f5..163c8c9606479 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesCreateManifestHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesCreateManifestHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistriesCreateManifestHeaders model. */ +/** + * The ContainerRegistriesCreateManifestHeaders model. + */ @Fluent public final class ContainerRegistriesCreateManifestHeaders { /* @@ -31,7 +33,7 @@ public final class ContainerRegistriesCreateManifestHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistriesCreateManifestHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistriesCreateManifestHeaders(HttpHeaders rawHeaders) { @@ -45,7 +47,7 @@ public ContainerRegistriesCreateManifestHeaders(HttpHeaders rawHeaders) { /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -54,7 +56,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the ContainerRegistriesCreateManifestHeaders object itself. */ @@ -65,7 +67,7 @@ public ContainerRegistriesCreateManifestHeaders setContentLength(Long contentLen /** * Get the dockerContentDigest property: The Docker-Content-Digest property. - * + * * @return the dockerContentDigest value. */ public String getDockerContentDigest() { @@ -74,7 +76,7 @@ public String getDockerContentDigest() { /** * Set the dockerContentDigest property: The Docker-Content-Digest property. - * + * * @param dockerContentDigest the dockerContentDigest value to set. * @return the ContainerRegistriesCreateManifestHeaders object itself. */ @@ -85,7 +87,7 @@ public ContainerRegistriesCreateManifestHeaders setDockerContentDigest(String do /** * Get the location property: The Location property. - * + * * @return the location value. */ public String getLocation() { @@ -94,7 +96,7 @@ public String getLocation() { /** * Set the location property: The Location property. - * + * * @param location the location value to set. * @return the ContainerRegistriesCreateManifestHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetManifestsHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetManifestsHeaders.java index 68c7719f622f0..5524b23dd32ce 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetManifestsHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetManifestsHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistriesGetManifestsHeaders model. */ +/** + * The ContainerRegistriesGetManifestsHeaders model. + */ @Fluent public final class ContainerRegistriesGetManifestsHeaders { /* @@ -19,7 +21,7 @@ public final class ContainerRegistriesGetManifestsHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistriesGetManifestsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistriesGetManifestsHeaders(HttpHeaders rawHeaders) { @@ -28,7 +30,7 @@ public ContainerRegistriesGetManifestsHeaders(HttpHeaders rawHeaders) { /** * Get the link property: The Link property. - * + * * @return the link value. */ public String getLink() { @@ -37,7 +39,7 @@ public String getLink() { /** * Set the link property: The Link property. - * + * * @param link the link value to set. * @return the ContainerRegistriesGetManifestsHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetManifestsNextHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetManifestsNextHeaders.java index 6a44dbce12e68..a835105b34eee 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetManifestsNextHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetManifestsNextHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistriesGetManifestsNextHeaders model. */ +/** + * The ContainerRegistriesGetManifestsNextHeaders model. + */ @Fluent public final class ContainerRegistriesGetManifestsNextHeaders { /* @@ -19,7 +21,7 @@ public final class ContainerRegistriesGetManifestsNextHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistriesGetManifestsNextHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistriesGetManifestsNextHeaders(HttpHeaders rawHeaders) { @@ -28,7 +30,7 @@ public ContainerRegistriesGetManifestsNextHeaders(HttpHeaders rawHeaders) { /** * Get the link property: The Link property. - * + * * @return the link value. */ public String getLink() { @@ -37,7 +39,7 @@ public String getLink() { /** * Set the link property: The Link property. - * + * * @param link the link value to set. * @return the ContainerRegistriesGetManifestsNextHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetRepositoriesHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetRepositoriesHeaders.java index 2b5887e922272..02c23b2bb532e 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetRepositoriesHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetRepositoriesHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistriesGetRepositoriesHeaders model. */ +/** + * The ContainerRegistriesGetRepositoriesHeaders model. + */ @Fluent public final class ContainerRegistriesGetRepositoriesHeaders { /* @@ -19,7 +21,7 @@ public final class ContainerRegistriesGetRepositoriesHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistriesGetRepositoriesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistriesGetRepositoriesHeaders(HttpHeaders rawHeaders) { @@ -28,7 +30,7 @@ public ContainerRegistriesGetRepositoriesHeaders(HttpHeaders rawHeaders) { /** * Get the link property: The Link property. - * + * * @return the link value. */ public String getLink() { @@ -37,7 +39,7 @@ public String getLink() { /** * Set the link property: The Link property. - * + * * @param link the link value to set. * @return the ContainerRegistriesGetRepositoriesHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetRepositoriesNextHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetRepositoriesNextHeaders.java index 360d2781780bb..d1cd46f90f6a1 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetRepositoriesNextHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetRepositoriesNextHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistriesGetRepositoriesNextHeaders model. */ +/** + * The ContainerRegistriesGetRepositoriesNextHeaders model. + */ @Fluent public final class ContainerRegistriesGetRepositoriesNextHeaders { /* @@ -19,7 +21,7 @@ public final class ContainerRegistriesGetRepositoriesNextHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistriesGetRepositoriesNextHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistriesGetRepositoriesNextHeaders(HttpHeaders rawHeaders) { @@ -28,7 +30,7 @@ public ContainerRegistriesGetRepositoriesNextHeaders(HttpHeaders rawHeaders) { /** * Get the link property: The Link property. - * + * * @return the link value. */ public String getLink() { @@ -37,7 +39,7 @@ public String getLink() { /** * Set the link property: The Link property. - * + * * @param link the link value to set. * @return the ContainerRegistriesGetRepositoriesNextHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetTagsHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetTagsHeaders.java index 630a804abc6b1..84e5f513bea97 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetTagsHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetTagsHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistriesGetTagsHeaders model. */ +/** + * The ContainerRegistriesGetTagsHeaders model. + */ @Fluent public final class ContainerRegistriesGetTagsHeaders { /* @@ -19,7 +21,7 @@ public final class ContainerRegistriesGetTagsHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistriesGetTagsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistriesGetTagsHeaders(HttpHeaders rawHeaders) { @@ -28,7 +30,7 @@ public ContainerRegistriesGetTagsHeaders(HttpHeaders rawHeaders) { /** * Get the link property: The Link property. - * + * * @return the link value. */ public String getLink() { @@ -37,7 +39,7 @@ public String getLink() { /** * Set the link property: The Link property. - * + * * @param link the link value to set. * @return the ContainerRegistriesGetTagsHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetTagsNextHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetTagsNextHeaders.java index c4d8a36e6aff9..b29ef94c88908 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetTagsNextHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistriesGetTagsNextHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistriesGetTagsNextHeaders model. */ +/** + * The ContainerRegistriesGetTagsNextHeaders model. + */ @Fluent public final class ContainerRegistriesGetTagsNextHeaders { /* @@ -19,7 +21,7 @@ public final class ContainerRegistriesGetTagsNextHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistriesGetTagsNextHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistriesGetTagsNextHeaders(HttpHeaders rawHeaders) { @@ -28,7 +30,7 @@ public ContainerRegistriesGetTagsNextHeaders(HttpHeaders rawHeaders) { /** * Get the link property: The Link property. - * + * * @return the link value. */ public String getLink() { @@ -37,7 +39,7 @@ public String getLink() { /** * Set the link property: The Link property. - * + * * @param link the link value to set. * @return the ContainerRegistriesGetTagsNextHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsCheckBlobExistsHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsCheckBlobExistsHeaders.java index d7dd22c56c77f..3abf10c80a85a 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsCheckBlobExistsHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsCheckBlobExistsHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistryBlobsCheckBlobExistsHeaders model. */ +/** + * The ContainerRegistryBlobsCheckBlobExistsHeaders model. + */ @Fluent public final class ContainerRegistryBlobsCheckBlobExistsHeaders { /* @@ -31,7 +33,7 @@ public final class ContainerRegistryBlobsCheckBlobExistsHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistryBlobsCheckBlobExistsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistryBlobsCheckBlobExistsHeaders(HttpHeaders rawHeaders) { @@ -45,7 +47,7 @@ public ContainerRegistryBlobsCheckBlobExistsHeaders(HttpHeaders rawHeaders) { /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -54,7 +56,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the ContainerRegistryBlobsCheckBlobExistsHeaders object itself. */ @@ -65,7 +67,7 @@ public ContainerRegistryBlobsCheckBlobExistsHeaders setContentLength(Long conten /** * Get the dockerContentDigest property: The Docker-Content-Digest property. - * + * * @return the dockerContentDigest value. */ public String getDockerContentDigest() { @@ -74,7 +76,7 @@ public String getDockerContentDigest() { /** * Set the dockerContentDigest property: The Docker-Content-Digest property. - * + * * @param dockerContentDigest the dockerContentDigest value to set. * @return the ContainerRegistryBlobsCheckBlobExistsHeaders object itself. */ @@ -85,7 +87,7 @@ public ContainerRegistryBlobsCheckBlobExistsHeaders setDockerContentDigest(Strin /** * Get the location property: The Location property. - * + * * @return the location value. */ public String getLocation() { @@ -94,7 +96,7 @@ public String getLocation() { /** * Set the location property: The Location property. - * + * * @param location the location value to set. * @return the ContainerRegistryBlobsCheckBlobExistsHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsCheckChunkExistsHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsCheckChunkExistsHeaders.java index c85b6b5fe2310..c83fe2e169565 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsCheckChunkExistsHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsCheckChunkExistsHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistryBlobsCheckChunkExistsHeaders model. */ +/** + * The ContainerRegistryBlobsCheckChunkExistsHeaders model. + */ @Fluent public final class ContainerRegistryBlobsCheckChunkExistsHeaders { /* @@ -24,7 +26,7 @@ public final class ContainerRegistryBlobsCheckChunkExistsHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistryBlobsCheckChunkExistsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistryBlobsCheckChunkExistsHeaders(HttpHeaders rawHeaders) { @@ -37,7 +39,7 @@ public ContainerRegistryBlobsCheckChunkExistsHeaders(HttpHeaders rawHeaders) { /** * Get the contentRange property: The Content-Range property. - * + * * @return the contentRange value. */ public String getContentRange() { @@ -46,7 +48,7 @@ public String getContentRange() { /** * Set the contentRange property: The Content-Range property. - * + * * @param contentRange the contentRange value to set. * @return the ContainerRegistryBlobsCheckChunkExistsHeaders object itself. */ @@ -57,7 +59,7 @@ public ContainerRegistryBlobsCheckChunkExistsHeaders setContentRange(String cont /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -66,7 +68,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the ContainerRegistryBlobsCheckChunkExistsHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsCompleteUploadHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsCompleteUploadHeaders.java index d15c1888b25e4..4305b7fec7819 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsCompleteUploadHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsCompleteUploadHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistryBlobsCompleteUploadHeaders model. */ +/** + * The ContainerRegistryBlobsCompleteUploadHeaders model. + */ @Fluent public final class ContainerRegistryBlobsCompleteUploadHeaders { /* @@ -31,7 +33,7 @@ public final class ContainerRegistryBlobsCompleteUploadHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistryBlobsCompleteUploadHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistryBlobsCompleteUploadHeaders(HttpHeaders rawHeaders) { @@ -42,7 +44,7 @@ public ContainerRegistryBlobsCompleteUploadHeaders(HttpHeaders rawHeaders) { /** * Get the range property: The Range property. - * + * * @return the range value. */ public String getRange() { @@ -51,7 +53,7 @@ public String getRange() { /** * Set the range property: The Range property. - * + * * @param range the range value to set. * @return the ContainerRegistryBlobsCompleteUploadHeaders object itself. */ @@ -62,7 +64,7 @@ public ContainerRegistryBlobsCompleteUploadHeaders setRange(String range) { /** * Get the location property: The Location property. - * + * * @return the location value. */ public String getLocation() { @@ -71,7 +73,7 @@ public String getLocation() { /** * Set the location property: The Location property. - * + * * @param location the location value to set. * @return the ContainerRegistryBlobsCompleteUploadHeaders object itself. */ @@ -82,7 +84,7 @@ public ContainerRegistryBlobsCompleteUploadHeaders setLocation(String location) /** * Get the dockerContentDigest property: The Docker-Content-Digest property. - * + * * @return the dockerContentDigest value. */ public String getDockerContentDigest() { @@ -91,7 +93,7 @@ public String getDockerContentDigest() { /** * Set the dockerContentDigest property: The Docker-Content-Digest property. - * + * * @param dockerContentDigest the dockerContentDigest value to set. * @return the ContainerRegistryBlobsCompleteUploadHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsDeleteBlobHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsDeleteBlobHeaders.java index ddbcd108966bb..8025c8cf71d58 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsDeleteBlobHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsDeleteBlobHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistryBlobsDeleteBlobHeaders model. */ +/** + * The ContainerRegistryBlobsDeleteBlobHeaders model. + */ @Fluent public final class ContainerRegistryBlobsDeleteBlobHeaders { /* @@ -21,7 +23,7 @@ public final class ContainerRegistryBlobsDeleteBlobHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistryBlobsDeleteBlobHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistryBlobsDeleteBlobHeaders(HttpHeaders rawHeaders) { @@ -30,7 +32,7 @@ public ContainerRegistryBlobsDeleteBlobHeaders(HttpHeaders rawHeaders) { /** * Get the dockerContentDigest property: The Docker-Content-Digest property. - * + * * @return the dockerContentDigest value. */ public String getDockerContentDigest() { @@ -39,7 +41,7 @@ public String getDockerContentDigest() { /** * Set the dockerContentDigest property: The Docker-Content-Digest property. - * + * * @param dockerContentDigest the dockerContentDigest value to set. * @return the ContainerRegistryBlobsDeleteBlobHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsGetBlobHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsGetBlobHeaders.java index ed17eb1dbddbd..855fab53791df 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsGetBlobHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsGetBlobHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistryBlobsGetBlobHeaders model. */ +/** + * The ContainerRegistryBlobsGetBlobHeaders model. + */ @Fluent public final class ContainerRegistryBlobsGetBlobHeaders { /* @@ -31,7 +33,7 @@ public final class ContainerRegistryBlobsGetBlobHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistryBlobsGetBlobHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistryBlobsGetBlobHeaders(HttpHeaders rawHeaders) { @@ -45,7 +47,7 @@ public ContainerRegistryBlobsGetBlobHeaders(HttpHeaders rawHeaders) { /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -54,7 +56,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the ContainerRegistryBlobsGetBlobHeaders object itself. */ @@ -65,7 +67,7 @@ public ContainerRegistryBlobsGetBlobHeaders setContentLength(Long contentLength) /** * Get the dockerContentDigest property: The Docker-Content-Digest property. - * + * * @return the dockerContentDigest value. */ public String getDockerContentDigest() { @@ -74,7 +76,7 @@ public String getDockerContentDigest() { /** * Set the dockerContentDigest property: The Docker-Content-Digest property. - * + * * @param dockerContentDigest the dockerContentDigest value to set. * @return the ContainerRegistryBlobsGetBlobHeaders object itself. */ @@ -85,7 +87,7 @@ public ContainerRegistryBlobsGetBlobHeaders setDockerContentDigest(String docker /** * Get the location property: The Location property. - * + * * @return the location value. */ public String getLocation() { @@ -94,7 +96,7 @@ public String getLocation() { /** * Set the location property: The Location property. - * + * * @param location the location value to set. * @return the ContainerRegistryBlobsGetBlobHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsGetChunkHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsGetChunkHeaders.java index 2ae89f11f29e7..a4fd99c5c106d 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsGetChunkHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsGetChunkHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistryBlobsGetChunkHeaders model. */ +/** + * The ContainerRegistryBlobsGetChunkHeaders model. + */ @Fluent public final class ContainerRegistryBlobsGetChunkHeaders { /* @@ -24,7 +26,7 @@ public final class ContainerRegistryBlobsGetChunkHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistryBlobsGetChunkHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistryBlobsGetChunkHeaders(HttpHeaders rawHeaders) { @@ -37,7 +39,7 @@ public ContainerRegistryBlobsGetChunkHeaders(HttpHeaders rawHeaders) { /** * Get the contentRange property: The Content-Range property. - * + * * @return the contentRange value. */ public String getContentRange() { @@ -46,7 +48,7 @@ public String getContentRange() { /** * Set the contentRange property: The Content-Range property. - * + * * @param contentRange the contentRange value to set. * @return the ContainerRegistryBlobsGetChunkHeaders object itself. */ @@ -57,7 +59,7 @@ public ContainerRegistryBlobsGetChunkHeaders setContentRange(String contentRange /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -66,7 +68,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the ContainerRegistryBlobsGetChunkHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsGetUploadStatusHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsGetUploadStatusHeaders.java index 526860d65918d..f798d9bfda3bd 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsGetUploadStatusHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsGetUploadStatusHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistryBlobsGetUploadStatusHeaders model. */ +/** + * The ContainerRegistryBlobsGetUploadStatusHeaders model. + */ @Fluent public final class ContainerRegistryBlobsGetUploadStatusHeaders { /* @@ -26,7 +28,7 @@ public final class ContainerRegistryBlobsGetUploadStatusHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistryBlobsGetUploadStatusHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistryBlobsGetUploadStatusHeaders(HttpHeaders rawHeaders) { @@ -36,7 +38,7 @@ public ContainerRegistryBlobsGetUploadStatusHeaders(HttpHeaders rawHeaders) { /** * Get the dockerUploadUUID property: The Docker-Upload-UUID property. - * + * * @return the dockerUploadUUID value. */ public String getDockerUploadUUID() { @@ -45,7 +47,7 @@ public String getDockerUploadUUID() { /** * Set the dockerUploadUUID property: The Docker-Upload-UUID property. - * + * * @param dockerUploadUUID the dockerUploadUUID value to set. * @return the ContainerRegistryBlobsGetUploadStatusHeaders object itself. */ @@ -56,7 +58,7 @@ public ContainerRegistryBlobsGetUploadStatusHeaders setDockerUploadUUID(String d /** * Get the range property: The Range property. - * + * * @return the range value. */ public String getRange() { @@ -65,7 +67,7 @@ public String getRange() { /** * Set the range property: The Range property. - * + * * @param range the range value to set. * @return the ContainerRegistryBlobsGetUploadStatusHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsMountBlobHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsMountBlobHeaders.java index 11e26582ed175..17fa926ad49f6 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsMountBlobHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsMountBlobHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistryBlobsMountBlobHeaders model. */ +/** + * The ContainerRegistryBlobsMountBlobHeaders model. + */ @Fluent public final class ContainerRegistryBlobsMountBlobHeaders { /* @@ -33,7 +35,7 @@ public final class ContainerRegistryBlobsMountBlobHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistryBlobsMountBlobHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistryBlobsMountBlobHeaders(HttpHeaders rawHeaders) { @@ -44,7 +46,7 @@ public ContainerRegistryBlobsMountBlobHeaders(HttpHeaders rawHeaders) { /** * Get the dockerUploadUUID property: The Docker-Upload-UUID property. - * + * * @return the dockerUploadUUID value. */ public String getDockerUploadUUID() { @@ -53,7 +55,7 @@ public String getDockerUploadUUID() { /** * Set the dockerUploadUUID property: The Docker-Upload-UUID property. - * + * * @param dockerUploadUUID the dockerUploadUUID value to set. * @return the ContainerRegistryBlobsMountBlobHeaders object itself. */ @@ -64,7 +66,7 @@ public ContainerRegistryBlobsMountBlobHeaders setDockerUploadUUID(String dockerU /** * Get the location property: The Location property. - * + * * @return the location value. */ public String getLocation() { @@ -73,7 +75,7 @@ public String getLocation() { /** * Set the location property: The Location property. - * + * * @param location the location value to set. * @return the ContainerRegistryBlobsMountBlobHeaders object itself. */ @@ -84,7 +86,7 @@ public ContainerRegistryBlobsMountBlobHeaders setLocation(String location) { /** * Get the dockerContentDigest property: The Docker-Content-Digest property. - * + * * @return the dockerContentDigest value. */ public String getDockerContentDigest() { @@ -93,7 +95,7 @@ public String getDockerContentDigest() { /** * Set the dockerContentDigest property: The Docker-Content-Digest property. - * + * * @param dockerContentDigest the dockerContentDigest value to set. * @return the ContainerRegistryBlobsMountBlobHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsStartUploadHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsStartUploadHeaders.java index 57f1065652e05..2515dc099f964 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsStartUploadHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsStartUploadHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistryBlobsStartUploadHeaders model. */ +/** + * The ContainerRegistryBlobsStartUploadHeaders model. + */ @Fluent public final class ContainerRegistryBlobsStartUploadHeaders { /* @@ -31,7 +33,7 @@ public final class ContainerRegistryBlobsStartUploadHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistryBlobsStartUploadHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistryBlobsStartUploadHeaders(HttpHeaders rawHeaders) { @@ -42,7 +44,7 @@ public ContainerRegistryBlobsStartUploadHeaders(HttpHeaders rawHeaders) { /** * Get the dockerUploadUUID property: The Docker-Upload-UUID property. - * + * * @return the dockerUploadUUID value. */ public String getDockerUploadUUID() { @@ -51,7 +53,7 @@ public String getDockerUploadUUID() { /** * Set the dockerUploadUUID property: The Docker-Upload-UUID property. - * + * * @param dockerUploadUUID the dockerUploadUUID value to set. * @return the ContainerRegistryBlobsStartUploadHeaders object itself. */ @@ -62,7 +64,7 @@ public ContainerRegistryBlobsStartUploadHeaders setDockerUploadUUID(String docke /** * Get the range property: The Range property. - * + * * @return the range value. */ public String getRange() { @@ -71,7 +73,7 @@ public String getRange() { /** * Set the range property: The Range property. - * + * * @param range the range value to set. * @return the ContainerRegistryBlobsStartUploadHeaders object itself. */ @@ -82,7 +84,7 @@ public ContainerRegistryBlobsStartUploadHeaders setRange(String range) { /** * Get the location property: The Location property. - * + * * @return the location value. */ public String getLocation() { @@ -91,7 +93,7 @@ public String getLocation() { /** * Set the location property: The Location property. - * + * * @param location the location value to set. * @return the ContainerRegistryBlobsStartUploadHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsUploadChunkHeaders.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsUploadChunkHeaders.java index bcc852189c94b..cefa3fcad9ef7 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsUploadChunkHeaders.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ContainerRegistryBlobsUploadChunkHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The ContainerRegistryBlobsUploadChunkHeaders model. */ +/** + * The ContainerRegistryBlobsUploadChunkHeaders model. + */ @Fluent public final class ContainerRegistryBlobsUploadChunkHeaders { /* @@ -31,7 +33,7 @@ public final class ContainerRegistryBlobsUploadChunkHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainerRegistryBlobsUploadChunkHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainerRegistryBlobsUploadChunkHeaders(HttpHeaders rawHeaders) { @@ -42,7 +44,7 @@ public ContainerRegistryBlobsUploadChunkHeaders(HttpHeaders rawHeaders) { /** * Get the dockerUploadUUID property: The Docker-Upload-UUID property. - * + * * @return the dockerUploadUUID value. */ public String getDockerUploadUUID() { @@ -51,7 +53,7 @@ public String getDockerUploadUUID() { /** * Set the dockerUploadUUID property: The Docker-Upload-UUID property. - * + * * @param dockerUploadUUID the dockerUploadUUID value to set. * @return the ContainerRegistryBlobsUploadChunkHeaders object itself. */ @@ -62,7 +64,7 @@ public ContainerRegistryBlobsUploadChunkHeaders setDockerUploadUUID(String docke /** * Get the range property: The Range property. - * + * * @return the range value. */ public String getRange() { @@ -71,7 +73,7 @@ public String getRange() { /** * Set the range property: The Range property. - * + * * @param range the range value to set. * @return the ContainerRegistryBlobsUploadChunkHeaders object itself. */ @@ -82,7 +84,7 @@ public ContainerRegistryBlobsUploadChunkHeaders setRange(String range) { /** * Get the location property: The Location property. - * + * * @return the location value. */ public String getLocation() { @@ -91,7 +93,7 @@ public String getLocation() { /** * Set the location property: The Location property. - * + * * @param location the location value to set. * @return the ContainerRegistryBlobsUploadChunkHeaders object itself. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/DeleteRepositoryResult.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/DeleteRepositoryResult.java index 19ead6e8c3a69..236bcebad0d1c 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/DeleteRepositoryResult.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/DeleteRepositoryResult.java @@ -12,7 +12,9 @@ import java.io.IOException; import java.util.List; -/** Deleted repository. */ +/** + * Deleted repository. + */ @Immutable public final class DeleteRepositoryResult implements JsonSerializable { /* @@ -25,13 +27,15 @@ public final class DeleteRepositoryResult implements JsonSerializable deletedTags; - /** Creates an instance of DeleteRepositoryResult class. */ + /** + * Creates an instance of DeleteRepositoryResult class. + */ public DeleteRepositoryResult() { } /** * Get the deletedManifests property: SHA of the deleted image. - * + * * @return the deletedManifests value. */ public List getDeletedManifests() { @@ -40,28 +44,28 @@ public List getDeletedManifests() { /** * Get the deletedTags property: Tag of the deleted image. - * + * * @return the deletedTags value. */ public List getDeletedTags() { return this.deletedTags; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("manifestsDeleted", this.deletedManifests, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("tagsDeleted", this.deletedTags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } /** * Reads an instance of DeleteRepositoryResult from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of DeleteRepositoryResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. + * was pointing to JSON null. * @throws IOException If an error occurs while reading the DeleteRepositoryResult. */ public static DeleteRepositoryResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/FsLayer.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/FsLayer.java index 36931d6bce562..2ce01641d541f 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/FsLayer.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/FsLayer.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** Image layer information. */ +/** + * Image layer information. + */ @Fluent public final class FsLayer implements JsonSerializable { /* @@ -19,13 +21,15 @@ public final class FsLayer implements JsonSerializable { */ private String blobSum; - /** Creates an instance of FsLayer class. */ + /** + * Creates an instance of FsLayer class. + */ public FsLayer() { } /** * Get the blobSum property: SHA of an image layer. - * + * * @return the blobSum value. */ public String getBlobSum() { @@ -34,7 +38,7 @@ public String getBlobSum() { /** * Set the blobSum property: SHA of an image layer. - * + * * @param blobSum the blobSum value to set. * @return the FsLayer object itself. */ @@ -43,6 +47,9 @@ public FsLayer setBlobSum(String blobSum) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -52,10 +59,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of FsLayer from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of FsLayer if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. + * JSON null. * @throws IOException If an error occurs while reading the FsLayer. */ public static FsLayer fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/History.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/History.java index 1c8de1345ff87..96c4b7b1149a1 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/History.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/History.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** A list of unstructured historical data for v1 compatibility. */ +/** + * A list of unstructured historical data for v1 compatibility. + */ @Fluent public final class History implements JsonSerializable { /* @@ -19,13 +21,15 @@ public final class History implements JsonSerializable { */ private String v1Compatibility; - /** Creates an instance of History class. */ + /** + * Creates an instance of History class. + */ public History() { } /** * Get the v1Compatibility property: The raw v1 compatibility information. - * + * * @return the v1Compatibility value. */ public String getV1Compatibility() { @@ -34,7 +38,7 @@ public String getV1Compatibility() { /** * Set the v1Compatibility property: The raw v1 compatibility information. - * + * * @param v1Compatibility the v1Compatibility value to set. * @return the History object itself. */ @@ -43,6 +47,9 @@ public History setV1Compatibility(String v1Compatibility) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -52,10 +59,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of History from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of History if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. + * JSON null. * @throws IOException If an error occurs while reading the History. */ public static History fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ImageSignature.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ImageSignature.java index e5e3929a4b44c..235e578d24497 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ImageSignature.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ImageSignature.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** Signature of a signed manifest. */ +/** + * Signature of a signed manifest. + */ @Fluent public final class ImageSignature implements JsonSerializable { /* @@ -29,13 +31,15 @@ public final class ImageSignature implements JsonSerializable { */ private String protectedProperty; - /** Creates an instance of ImageSignature class. */ + /** + * Creates an instance of ImageSignature class. + */ public ImageSignature() { } /** * Get the headerProperty property: A JSON web signature. - * + * * @return the headerProperty value. */ public JWK getHeaderProperty() { @@ -44,7 +48,7 @@ public JWK getHeaderProperty() { /** * Set the headerProperty property: A JSON web signature. - * + * * @param headerProperty the headerProperty value to set. * @return the ImageSignature object itself. */ @@ -55,7 +59,7 @@ public ImageSignature setHeaderProperty(JWK headerProperty) { /** * Get the signature property: A signature for the image manifest, signed by a libtrust private key. - * + * * @return the signature value. */ public String getSignature() { @@ -64,7 +68,7 @@ public String getSignature() { /** * Set the signature property: A signature for the image manifest, signed by a libtrust private key. - * + * * @param signature the signature value to set. * @return the ImageSignature object itself. */ @@ -75,7 +79,7 @@ public ImageSignature setSignature(String signature) { /** * Get the protectedProperty property: The signed protected header. - * + * * @return the protectedProperty value. */ public String getProtectedProperty() { @@ -84,7 +88,7 @@ public String getProtectedProperty() { /** * Set the protectedProperty property: The signed protected header. - * + * * @param protectedProperty the protectedProperty value to set. * @return the ImageSignature object itself. */ @@ -93,6 +97,9 @@ public ImageSignature setProtectedProperty(String protectedProperty) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -104,10 +111,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ImageSignature from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ImageSignature if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IOException If an error occurs while reading the ImageSignature. */ public static ImageSignature fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/JWK.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/JWK.java index 9f4762a0f9c55..fcc339e707ac6 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/JWK.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/JWK.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** A JSON web signature. */ +/** + * A JSON web signature. + */ @Fluent public final class JWK implements JsonSerializable { /* @@ -24,13 +26,15 @@ public final class JWK implements JsonSerializable { */ private String alg; - /** Creates an instance of JWK class. */ + /** + * Creates an instance of JWK class. + */ public JWK() { } /** * Get the jwk property: JSON web key parameter. - * + * * @return the jwk value. */ public JWKHeader getJwk() { @@ -39,7 +43,7 @@ public JWKHeader getJwk() { /** * Set the jwk property: JSON web key parameter. - * + * * @param jwk the jwk value to set. * @return the JWK object itself. */ @@ -50,7 +54,7 @@ public JWK setJwk(JWKHeader jwk) { /** * Get the alg property: The algorithm used to sign or encrypt the JWT. - * + * * @return the alg value. */ public String getAlg() { @@ -59,7 +63,7 @@ public String getAlg() { /** * Set the alg property: The algorithm used to sign or encrypt the JWT. - * + * * @param alg the alg value to set. * @return the JWK object itself. */ @@ -68,6 +72,9 @@ public JWK setAlg(String alg) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -78,10 +85,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of JWK from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of JWK if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. + * JSON null. * @throws IOException If an error occurs while reading the JWK. */ public static JWK fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/JWKHeader.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/JWKHeader.java index f49d1a4db583c..ff0689f51f683 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/JWKHeader.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/JWKHeader.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** JSON web key parameter. */ +/** + * JSON web key parameter. + */ @Fluent public final class JWKHeader implements JsonSerializable { /* @@ -39,13 +41,15 @@ public final class JWKHeader implements JsonSerializable { */ private String y; - /** Creates an instance of JWKHeader class. */ + /** + * Creates an instance of JWKHeader class. + */ public JWKHeader() { } /** * Get the crv property: crv value. - * + * * @return the crv value. */ public String getCrv() { @@ -54,7 +58,7 @@ public String getCrv() { /** * Set the crv property: crv value. - * + * * @param crv the crv value to set. * @return the JWKHeader object itself. */ @@ -65,7 +69,7 @@ public JWKHeader setCrv(String crv) { /** * Get the kid property: kid value. - * + * * @return the kid value. */ public String getKid() { @@ -74,7 +78,7 @@ public String getKid() { /** * Set the kid property: kid value. - * + * * @param kid the kid value to set. * @return the JWKHeader object itself. */ @@ -85,7 +89,7 @@ public JWKHeader setKid(String kid) { /** * Get the kty property: kty value. - * + * * @return the kty value. */ public String getKty() { @@ -94,7 +98,7 @@ public String getKty() { /** * Set the kty property: kty value. - * + * * @param kty the kty value to set. * @return the JWKHeader object itself. */ @@ -105,7 +109,7 @@ public JWKHeader setKty(String kty) { /** * Get the x property: x value. - * + * * @return the x value. */ public String getX() { @@ -114,7 +118,7 @@ public String getX() { /** * Set the x property: x value. - * + * * @param x the x value to set. * @return the JWKHeader object itself. */ @@ -125,7 +129,7 @@ public JWKHeader setX(String x) { /** * Get the y property: y value. - * + * * @return the y value. */ public String getY() { @@ -134,7 +138,7 @@ public String getY() { /** * Set the y property: y value. - * + * * @param y the y value to set. * @return the JWKHeader object itself. */ @@ -143,6 +147,9 @@ public JWKHeader setY(String y) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -156,10 +163,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of JWKHeader from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of JWKHeader if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. + * to JSON null. * @throws IOException If an error occurs while reading the JWKHeader. */ public static JWKHeader fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Manifest.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Manifest.java index 2cda0730d668e..a8e7c9c5512fd 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Manifest.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Manifest.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** Returns the requested manifest file. */ +/** + * Returns the requested manifest file. + */ @Fluent public class Manifest implements JsonSerializable { /* @@ -19,13 +21,15 @@ public class Manifest implements JsonSerializable { */ private Integer schemaVersion; - /** Creates an instance of Manifest class. */ + /** + * Creates an instance of Manifest class. + */ public Manifest() { } /** * Get the schemaVersion property: Schema version. - * + * * @return the schemaVersion value. */ public Integer getSchemaVersion() { @@ -34,7 +38,7 @@ public Integer getSchemaVersion() { /** * Set the schemaVersion property: Schema version. - * + * * @param schemaVersion the schemaVersion value to set. * @return the Manifest object itself. */ @@ -43,6 +47,9 @@ public Manifest setSchemaVersion(Integer schemaVersion) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -52,10 +59,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of Manifest from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of Manifest if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. + * to JSON null. * @throws IOException If an error occurs while reading the Manifest. */ public static Manifest fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestAttributesBase.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestAttributesBase.java index 13a6de1fb9099..2aee756436230 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestAttributesBase.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestAttributesBase.java @@ -8,16 +8,19 @@ import com.azure.containers.containerregistry.models.ArtifactManifestPlatform; import com.azure.containers.containerregistry.models.ArtifactOperatingSystem; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; import java.util.List; -import java.util.Objects; -/** Manifest details. */ +/** + * Manifest details. + */ @Fluent public class ManifestAttributesBase implements JsonSerializable { /* @@ -81,13 +84,15 @@ public class ManifestAttributesBase implements JsonSerializable getRelatedArtifacts() { @@ -218,7 +223,7 @@ public List getRelatedArtifacts() { /** * Set the relatedArtifacts property: List of artifacts that are referenced by this manifest list, with information * about the platform each supports. This list will be empty if this is a leaf manifest and not a manifest list. - * + * * @param relatedArtifacts the relatedArtifacts value to set. * @return the ManifestAttributesBase object itself. */ @@ -229,7 +234,7 @@ public ManifestAttributesBase setRelatedArtifacts(List /** * Get the tags property: List of tags. - * + * * @return the tags value. */ public List getTags() { @@ -238,7 +243,7 @@ public List getTags() { /** * Set the tags property: List of tags. - * + * * @param tags the tags value to set. * @return the ManifestAttributesBase object itself. */ @@ -249,7 +254,7 @@ public ManifestAttributesBase setTags(List tags) { /** * Get the deleteEnabled property: Delete enabled. - * + * * @return the deleteEnabled value. */ public Boolean isDeleteEnabled() { @@ -258,7 +263,7 @@ public Boolean isDeleteEnabled() { /** * Set the deleteEnabled property: Delete enabled. - * + * * @param deleteEnabled the deleteEnabled value to set. * @return the ManifestAttributesBase object itself. */ @@ -269,7 +274,7 @@ public ManifestAttributesBase setDeleteEnabled(Boolean deleteEnabled) { /** * Get the writeEnabled property: Write enabled. - * + * * @return the writeEnabled value. */ public Boolean isWriteEnabled() { @@ -278,7 +283,7 @@ public Boolean isWriteEnabled() { /** * Set the writeEnabled property: Write enabled. - * + * * @param writeEnabled the writeEnabled value to set. * @return the ManifestAttributesBase object itself. */ @@ -289,7 +294,7 @@ public ManifestAttributesBase setWriteEnabled(Boolean writeEnabled) { /** * Get the listEnabled property: List enabled. - * + * * @return the listEnabled value. */ public Boolean isListEnabled() { @@ -298,7 +303,7 @@ public Boolean isListEnabled() { /** * Set the listEnabled property: List enabled. - * + * * @param listEnabled the listEnabled value to set. * @return the ManifestAttributesBase object itself. */ @@ -309,7 +314,7 @@ public ManifestAttributesBase setListEnabled(Boolean listEnabled) { /** * Get the readEnabled property: Read enabled. - * + * * @return the readEnabled value. */ public Boolean isReadEnabled() { @@ -318,7 +323,7 @@ public Boolean isReadEnabled() { /** * Set the readEnabled property: Read enabled. - * + * * @param readEnabled the readEnabled value to set. * @return the ManifestAttributesBase object itself. */ @@ -327,15 +332,20 @@ public ManifestAttributesBase setReadEnabled(Boolean readEnabled) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("digest", this.digest); - jsonWriter.writeStringField("createdTime", Objects.toString(this.createdOn, null)); - jsonWriter.writeStringField("lastUpdateTime", Objects.toString(this.lastUpdatedOn, null)); + jsonWriter.writeStringField("createdTime", + this.createdOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdOn)); + jsonWriter.writeStringField("lastUpdateTime", + this.lastUpdatedOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastUpdatedOn)); jsonWriter.writeNumberField("imageSize", this.sizeInBytes); - jsonWriter.writeStringField("architecture", Objects.toString(this.architecture, null)); - jsonWriter.writeStringField("os", Objects.toString(this.operatingSystem, null)); + jsonWriter.writeStringField("architecture", this.architecture == null ? null : this.architecture.toString()); + jsonWriter.writeStringField("os", this.operatingSystem == null ? null : this.operatingSystem.toString()); jsonWriter.writeArrayField("references", this.relatedArtifacts, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("tags", this.tags, (writer, element) -> writer.writeString(element)); if (deleteEnabled != null || writeEnabled != null || listEnabled != null || readEnabled != null) { @@ -351,10 +361,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ManifestAttributesBase from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ManifestAttributesBase if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. + * was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ManifestAttributesBase. */ @@ -368,11 +378,11 @@ public static ManifestAttributesBase fromJson(JsonReader jsonReader) throws IOEx if ("digest".equals(fieldName)) { deserializedManifestAttributesBase.digest = reader.getString(); } else if ("createdTime".equals(fieldName)) { - deserializedManifestAttributesBase.createdOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedManifestAttributesBase.createdOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastUpdateTime".equals(fieldName)) { - deserializedManifestAttributesBase.lastUpdatedOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedManifestAttributesBase.lastUpdatedOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("imageSize".equals(fieldName)) { deserializedManifestAttributesBase.sizeInBytes = reader.getNullable(JsonReader::getLong); } else if ("architecture".equals(fieldName)) { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestAttributesManifest.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestAttributesManifest.java index 1984a6ee1ef12..5600e38912daa 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestAttributesManifest.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestAttributesManifest.java @@ -13,7 +13,9 @@ import java.io.IOException; import java.util.List; -/** List of manifest attributes. */ +/** + * List of manifest attributes. + */ @Fluent public final class ManifestAttributesManifest implements JsonSerializable { /* @@ -21,13 +23,15 @@ public final class ManifestAttributesManifest implements JsonSerializable references; - /** Creates an instance of ManifestAttributesManifest class. */ + /** + * Creates an instance of ManifestAttributesManifest class. + */ public ManifestAttributesManifest() { } /** * Get the references property: List of manifest attributes details. - * + * * @return the references value. */ public List getReferences() { @@ -36,7 +40,7 @@ public List getReferences() { /** * Set the references property: List of manifest attributes details. - * + * * @param references the references value to set. * @return the ManifestAttributesManifest object itself. */ @@ -45,6 +49,9 @@ public ManifestAttributesManifest setReferences(List r return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -54,10 +61,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ManifestAttributesManifest from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ManifestAttributesManifest if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. + * it was pointing to JSON null. * @throws IOException If an error occurs while reading the ManifestAttributesManifest. */ public static ManifestAttributesManifest fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestList.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestList.java index d19c9e1cfdc1d..41ee142f09637 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestList.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestList.java @@ -11,7 +11,9 @@ import java.io.IOException; import java.util.List; -/** Returns the requested Docker multi-arch-manifest file. */ +/** + * Returns the requested Docker multi-arch-manifest file. + */ @Fluent public final class ManifestList extends Manifest { /* @@ -24,13 +26,15 @@ public final class ManifestList extends Manifest { */ private List manifests; - /** Creates an instance of ManifestList class. */ + /** + * Creates an instance of ManifestList class. + */ public ManifestList() { } /** * Get the mediaType property: Media type for this Manifest. - * + * * @return the mediaType value. */ public String getMediaType() { @@ -39,7 +43,7 @@ public String getMediaType() { /** * Set the mediaType property: Media type for this Manifest. - * + * * @param mediaType the mediaType value to set. * @return the ManifestList object itself. */ @@ -50,7 +54,7 @@ public ManifestList setMediaType(String mediaType) { /** * Get the manifests property: List of V2 image layer information. - * + * * @return the manifests value. */ public List getManifests() { @@ -59,7 +63,7 @@ public List getManifests() { /** * Set the manifests property: List of V2 image layer information. - * + * * @param manifests the manifests value to set. * @return the ManifestList object itself. */ @@ -68,13 +72,18 @@ public ManifestList setManifests(List manifests) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManifestList setSchemaVersion(Integer schemaVersion) { super.setSchemaVersion(schemaVersion); return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -86,10 +95,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ManifestList from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ManifestList if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IOException If an error occurs while reading the ManifestList. */ public static ManifestList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestListAttributes.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestListAttributes.java index 6c3818c584ac4..3b3aff1cf58f1 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestListAttributes.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestListAttributes.java @@ -11,12 +11,14 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** The ManifestListAttributes model. */ +/** + * The ManifestListAttributes model. + */ @Fluent public final class ManifestListAttributes implements JsonSerializable { /* - * The MIME type of the referenced object. This will generally be application/vnd.docker.image.manifest.v2+json, - * but it could also be application/vnd.docker.image.manifest.v1+json + * The MIME type of the referenced object. This will generally be application/vnd.docker.image.manifest.v2+json, but + * it could also be application/vnd.docker.image.manifest.v1+json */ private String mediaType; @@ -36,7 +38,9 @@ public final class ManifestListAttributes implements JsonSerializable signatures; - /** Creates an instance of ManifestWrapper class. */ + /** + * Creates an instance of ManifestWrapper class. + */ public ManifestWrapper() { } /** * Get the mediaType property: Media type for this Manifest. - * + * * @return the mediaType value. */ public String getMediaType() { @@ -86,7 +90,7 @@ public String getMediaType() { /** * Set the mediaType property: Media type for this Manifest. - * + * * @param mediaType the mediaType value to set. * @return the ManifestWrapper object itself. */ @@ -97,7 +101,7 @@ public ManifestWrapper setMediaType(String mediaType) { /** * Get the manifests property: (ManifestList, OCIIndex) List of V2 image layer information. - * + * * @return the manifests value. */ public List getManifests() { @@ -106,7 +110,7 @@ public List getManifests() { /** * Set the manifests property: (ManifestList, OCIIndex) List of V2 image layer information. - * + * * @param manifests the manifests value to set. * @return the ManifestWrapper object itself. */ @@ -117,7 +121,7 @@ public ManifestWrapper setManifests(List manifests) { /** * Get the config property: (V2, OCI) Image config descriptor. - * + * * @return the config value. */ public OciDescriptor getConfig() { @@ -126,7 +130,7 @@ public OciDescriptor getConfig() { /** * Set the config property: (V2, OCI) Image config descriptor. - * + * * @param config the config value to set. * @return the ManifestWrapper object itself. */ @@ -137,7 +141,7 @@ public ManifestWrapper setConfig(OciDescriptor config) { /** * Get the layers property: (V2, OCI) List of V2 image layer information. - * + * * @return the layers value. */ public List getLayers() { @@ -146,7 +150,7 @@ public List getLayers() { /** * Set the layers property: (V2, OCI) List of V2 image layer information. - * + * * @param layers the layers value to set. * @return the ManifestWrapper object itself. */ @@ -157,7 +161,7 @@ public ManifestWrapper setLayers(List layers) { /** * Get the annotations property: (OCI, OCIIndex) Additional metadata. - * + * * @return the annotations value. */ public OciAnnotations getAnnotations() { @@ -166,7 +170,7 @@ public OciAnnotations getAnnotations() { /** * Set the annotations property: (OCI, OCIIndex) Additional metadata. - * + * * @param annotations the annotations value to set. * @return the ManifestWrapper object itself. */ @@ -177,7 +181,7 @@ public ManifestWrapper setAnnotations(OciAnnotations annotations) { /** * Get the architecture property: (V1) CPU architecture. - * + * * @return the architecture value. */ public String getArchitecture() { @@ -186,7 +190,7 @@ public String getArchitecture() { /** * Set the architecture property: (V1) CPU architecture. - * + * * @param architecture the architecture value to set. * @return the ManifestWrapper object itself. */ @@ -197,7 +201,7 @@ public ManifestWrapper setArchitecture(String architecture) { /** * Get the name property: (V1) Image name. - * + * * @return the name value. */ public String getName() { @@ -206,7 +210,7 @@ public String getName() { /** * Set the name property: (V1) Image name. - * + * * @param name the name value to set. * @return the ManifestWrapper object itself. */ @@ -217,7 +221,7 @@ public ManifestWrapper setName(String name) { /** * Get the tag property: (V1) Image tag. - * + * * @return the tag value. */ public String getTag() { @@ -226,7 +230,7 @@ public String getTag() { /** * Set the tag property: (V1) Image tag. - * + * * @param tag the tag value to set. * @return the ManifestWrapper object itself. */ @@ -237,7 +241,7 @@ public ManifestWrapper setTag(String tag) { /** * Get the fsLayers property: (V1) List of layer information. - * + * * @return the fsLayers value. */ public List getFsLayers() { @@ -246,7 +250,7 @@ public List getFsLayers() { /** * Set the fsLayers property: (V1) List of layer information. - * + * * @param fsLayers the fsLayers value to set. * @return the ManifestWrapper object itself. */ @@ -257,7 +261,7 @@ public ManifestWrapper setFsLayers(List fsLayers) { /** * Get the history property: (V1) Image history. - * + * * @return the history value. */ public List getHistory() { @@ -266,7 +270,7 @@ public List getHistory() { /** * Set the history property: (V1) Image history. - * + * * @param history the history value to set. * @return the ManifestWrapper object itself. */ @@ -277,7 +281,7 @@ public ManifestWrapper setHistory(List history) { /** * Get the signatures property: (V1) Image signature. - * + * * @return the signatures value. */ public List getSignatures() { @@ -286,7 +290,7 @@ public List getSignatures() { /** * Set the signatures property: (V1) Image signature. - * + * * @param signatures the signatures value to set. * @return the ManifestWrapper object itself. */ @@ -295,13 +299,18 @@ public ManifestWrapper setSignatures(List signatures) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManifestWrapper setSchemaVersion(Integer schemaVersion) { super.setSchemaVersion(schemaVersion); return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -322,10 +331,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ManifestWrapper from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ManifestWrapper if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IOException If an error occurs while reading the ManifestWrapper. */ public static ManifestWrapper fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestWriteableProperties.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestWriteableProperties.java index 43a94e0335ac8..3631d35e28d2a 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestWriteableProperties.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/ManifestWriteableProperties.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** Changeable attributes. */ +/** + * Changeable attributes. + */ @Fluent public final class ManifestWriteableProperties implements JsonSerializable { /* @@ -34,13 +36,15 @@ public final class ManifestWriteableProperties implements JsonSerializable getManifests() { @@ -40,7 +44,7 @@ public List getManifests() { /** * Set the manifests property: List of OCI image layer information. - * + * * @param manifests the manifests value to set. * @return the OCIIndex object itself. */ @@ -51,7 +55,7 @@ public OCIIndex setManifests(List manifests) { /** * Get the annotations property: Additional information provided through arbitrary metadata. - * + * * @return the annotations value. */ public OciAnnotations getAnnotations() { @@ -60,7 +64,7 @@ public OciAnnotations getAnnotations() { /** * Set the annotations property: Additional information provided through arbitrary metadata. - * + * * @param annotations the annotations value to set. * @return the OCIIndex object itself. */ @@ -69,13 +73,18 @@ public OCIIndex setAnnotations(OciAnnotations annotations) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OCIIndex setSchemaVersion(Integer schemaVersion) { super.setSchemaVersion(schemaVersion); return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -87,10 +96,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of OCIIndex from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of OCIIndex if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. + * to JSON null. * @throws IOException If an error occurs while reading the OCIIndex. */ public static OCIIndex fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java index aafe5feea0d0d..4f39f36ba4df1 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java @@ -10,9 +10,10 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.Objects; -/** The Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema model. */ +/** + * The Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema model. + */ @Fluent public final class Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema implements JsonSerializable { @@ -49,7 +50,7 @@ public Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlenc /** * Get the grantType property: Can take a value of access_token_refresh_token, or access_token, or refresh_token. - * + * * @return the grantType value. */ public PostContentSchemaGrantType getGrantType() { @@ -58,7 +59,7 @@ public PostContentSchemaGrantType getGrantType() { /** * Set the grantType property: Can take a value of access_token_refresh_token, or access_token, or refresh_token. - * + * * @param grantType the grantType value to set. * @return the Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema object itself. */ @@ -70,7 +71,7 @@ public PostContentSchemaGrantType getGrantType() { /** * Get the service property: Indicates the name of your Azure container registry. - * + * * @return the service value. */ public String getService() { @@ -79,7 +80,7 @@ public String getService() { /** * Set the service property: Indicates the name of your Azure container registry. - * + * * @param service the service value to set. * @return the Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema object itself. */ @@ -91,7 +92,7 @@ public String getService() { /** * Get the tenant property: AAD tenant associated to the AAD credentials. - * + * * @return the tenant value. */ public String getTenant() { @@ -100,7 +101,7 @@ public String getTenant() { /** * Set the tenant property: AAD tenant associated to the AAD credentials. - * + * * @param tenant the tenant value to set. * @return the Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema object itself. */ @@ -113,7 +114,7 @@ public String getTenant() { /** * Get the refreshToken property: AAD refresh token, mandatory when grant_type is access_token_refresh_token or * refresh_token. - * + * * @return the refreshToken value. */ public String getRefreshToken() { @@ -123,7 +124,7 @@ public String getRefreshToken() { /** * Set the refreshToken property: AAD refresh token, mandatory when grant_type is access_token_refresh_token or * refresh_token. - * + * * @param refreshToken the refreshToken value to set. * @return the Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema object itself. */ @@ -136,7 +137,7 @@ public String getRefreshToken() { /** * Get the aadAccessToken property: AAD access token, mandatory when grant_type is access_token_refresh_token or * access_token. - * + * * @return the aadAccessToken value. */ public String getAadAccessToken() { @@ -146,7 +147,7 @@ public String getAadAccessToken() { /** * Set the aadAccessToken property: AAD access token, mandatory when grant_type is access_token_refresh_token or * access_token. - * + * * @param aadAccessToken the aadAccessToken value to set. * @return the Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema object itself. */ @@ -156,10 +157,13 @@ public String getAadAccessToken() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("grant_type", Objects.toString(this.grantType, null)); + jsonWriter.writeStringField("grant_type", this.grantType == null ? null : this.grantType.toString()); jsonWriter.writeStringField("service", this.service); jsonWriter.writeStringField("tenant", this.tenant); jsonWriter.writeStringField("refresh_token", this.refreshToken); @@ -170,13 +174,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema from the * JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema if the - * JsonReader was pointing to an instance of it, or null if it was pointing to JSON null. + * JsonReader was pointing to an instance of it, or null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the - * Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema. + * Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema. */ public static Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java index 774e9eafb2121..9f8de19b2bcbf 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java @@ -10,9 +10,10 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.Objects; -/** The PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema model. */ +/** + * The PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema model. + */ @Fluent public final class PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema implements JsonSerializable { @@ -37,13 +38,15 @@ public final class PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFo */ private TokenGrantType grantType = TokenGrantType.REFRESH_TOKEN; - /** Creates an instance of PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema class. */ + /** + * Creates an instance of PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema class. + */ public PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema() { } /** * Get the service property: Indicates the name of your Azure container registry. - * + * * @return the service value. */ public String getService() { @@ -52,7 +55,7 @@ public String getService() { /** * Set the service property: Indicates the name of your Azure container registry. - * + * * @param service the service value to set. * @return the PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema object itself. */ @@ -64,7 +67,7 @@ public PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencoded /** * Get the scope property: Which is expected to be a valid scope, and can be specified more than once for multiple * scope requests. You obtained this from the Www-Authenticate response header from the challenge. - * + * * @return the scope value. */ public String getScope() { @@ -74,7 +77,7 @@ public String getScope() { /** * Set the scope property: Which is expected to be a valid scope, and can be specified more than once for multiple * scope requests. You obtained this from the Www-Authenticate response header from the challenge. - * + * * @param scope the scope value to set. * @return the PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema object itself. */ @@ -85,7 +88,7 @@ public PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencoded /** * Get the acrRefreshToken property: Must be a valid ACR refresh token. - * + * * @return the acrRefreshToken value. */ public String getAcrRefreshToken() { @@ -94,7 +97,7 @@ public String getAcrRefreshToken() { /** * Set the acrRefreshToken property: Must be a valid ACR refresh token. - * + * * @param acrRefreshToken the acrRefreshToken value to set. * @return the PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema object itself. */ @@ -106,7 +109,7 @@ public String getAcrRefreshToken() { /** * Get the grantType property: Grant type is expected to be refresh_token. - * + * * @return the grantType value. */ public TokenGrantType getGrantType() { @@ -115,7 +118,7 @@ public TokenGrantType getGrantType() { /** * Set the grantType property: Grant type is expected to be refresh_token. - * + * * @param grantType the grantType value to set. * @return the PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema object itself. */ @@ -125,26 +128,29 @@ public TokenGrantType getGrantType() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("service", this.service); jsonWriter.writeStringField("scope", this.scope); jsonWriter.writeStringField("refresh_token", this.acrRefreshToken); - jsonWriter.writeStringField("grant_type", Objects.toString(this.grantType, null)); + jsonWriter.writeStringField("grant_type", this.grantType == null ? null : this.grantType.toString()); return jsonWriter.writeEndObject(); } /** * Reads an instance of PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema from the * JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema if the - * JsonReader was pointing to an instance of it, or null if it was pointing to JSON null. + * JsonReader was pointing to an instance of it, or null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the - * PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema. + * PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema. */ public static PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Platform.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Platform.java index 66238cd2b5fdf..2b0c7ebc9328b 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Platform.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Platform.java @@ -40,8 +40,8 @@ public final class Platform implements JsonSerializable { private List osFeatures; /* - * The optional variant field specifies a variant of the CPU, for example armv6l to specify a particular CPU - * variant of the ARM CPU. + * The optional variant field specifies a variant of the CPU, for example armv6l to specify a particular CPU variant + * of the ARM CPU. */ private String variant; @@ -51,13 +51,15 @@ public final class Platform implements JsonSerializable { */ private List features; - /** Creates an instance of Platform class. */ + /** + * Creates an instance of Platform class. + */ public Platform() { } /** * Get the architecture property: Specifies the CPU architecture, for example amd64 or ppc64le. - * + * * @return the architecture value. */ public String getArchitecture() { @@ -66,7 +68,7 @@ public String getArchitecture() { /** * Set the architecture property: Specifies the CPU architecture, for example amd64 or ppc64le. - * + * * @param architecture the architecture value to set. * @return the Platform object itself. */ @@ -77,7 +79,7 @@ public Platform setArchitecture(String architecture) { /** * Get the os property: The os field specifies the operating system, for example linux or windows. - * + * * @return the os value. */ public String getOs() { @@ -86,7 +88,7 @@ public String getOs() { /** * Set the os property: The os field specifies the operating system, for example linux or windows. - * + * * @param os the os value to set. * @return the Platform object itself. */ @@ -98,7 +100,7 @@ public Platform setOs(String os) { /** * Get the osVersion property: The optional os.version field specifies the operating system version, for example * 10.0.10586. - * + * * @return the osVersion value. */ public String getOsVersion() { @@ -108,7 +110,7 @@ public String getOsVersion() { /** * Set the osVersion property: The optional os.version field specifies the operating system version, for example * 10.0.10586. - * + * * @param osVersion the osVersion value to set. * @return the Platform object itself. */ @@ -120,7 +122,7 @@ public Platform setOsVersion(String osVersion) { /** * Get the osFeatures property: The optional os.features field specifies an array of strings, each listing a * required OS feature (for example on Windows win32k. - * + * * @return the osFeatures value. */ public List getOsFeatures() { @@ -130,7 +132,7 @@ public List getOsFeatures() { /** * Set the osFeatures property: The optional os.features field specifies an array of strings, each listing a * required OS feature (for example on Windows win32k. - * + * * @param osFeatures the osFeatures value to set. * @return the Platform object itself. */ @@ -142,7 +144,7 @@ public Platform setOsFeatures(List osFeatures) { /** * Get the variant property: The optional variant field specifies a variant of the CPU, for example armv6l to * specify a particular CPU variant of the ARM CPU. - * + * * @return the variant value. */ public String getVariant() { @@ -152,7 +154,7 @@ public String getVariant() { /** * Set the variant property: The optional variant field specifies a variant of the CPU, for example armv6l to * specify a particular CPU variant of the ARM CPU. - * + * * @param variant the variant value to set. * @return the Platform object itself. */ @@ -164,7 +166,7 @@ public Platform setVariant(String variant) { /** * Get the features property: The optional features field specifies an array of strings, each listing a required CPU * feature (for example sse4 or aes. - * + * * @return the features value. */ public List getFeatures() { @@ -174,7 +176,7 @@ public List getFeatures() { /** * Set the features property: The optional features field specifies an array of strings, each listing a required CPU * feature (for example sse4 or aes. - * + * * @param features the features value to set. * @return the Platform object itself. */ @@ -183,6 +185,9 @@ public Platform setFeatures(List features) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -197,10 +202,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of Platform from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of Platform if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. + * to JSON null. * @throws IOException If an error occurs while reading the Platform. */ public static Platform fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/PostContentSchemaGrantType.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/PostContentSchemaGrantType.java index bc3fee4e5bcdc..e81b3eedd599c 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/PostContentSchemaGrantType.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/PostContentSchemaGrantType.java @@ -7,21 +7,29 @@ import com.azure.core.util.ExpandableStringEnum; import java.util.Collection; -/** Can take a value of access_token_refresh_token, or access_token, or refresh_token. */ +/** + * Can take a value of access_token_refresh_token, or access_token, or refresh_token. + */ public final class PostContentSchemaGrantType extends ExpandableStringEnum { - /** Static value access_token_refresh_token for PostContentSchemaGrantType. */ + /** + * Static value access_token_refresh_token for PostContentSchemaGrantType. + */ public static final PostContentSchemaGrantType ACCESS_TOKEN_REFRESH_TOKEN = fromString("access_token_refresh_token"); - /** Static value access_token for PostContentSchemaGrantType. */ + /** + * Static value access_token for PostContentSchemaGrantType. + */ public static final PostContentSchemaGrantType ACCESS_TOKEN = fromString("access_token"); - /** Static value refresh_token for PostContentSchemaGrantType. */ + /** + * Static value refresh_token for PostContentSchemaGrantType. + */ public static final PostContentSchemaGrantType REFRESH_TOKEN = fromString("refresh_token"); /** * Creates a new instance of PostContentSchemaGrantType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public PostContentSchemaGrantType() { /** * Creates or finds a PostContentSchemaGrantType from its string representation. - * + * * @param name a name to look for. * @return the corresponding PostContentSchemaGrantType. */ @@ -40,7 +48,7 @@ public static PostContentSchemaGrantType fromString(String name) { /** * Gets known PostContentSchemaGrantType values. - * + * * @return known PostContentSchemaGrantType values. */ public static Collection values() { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Repositories.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Repositories.java index d2ae3429a1545..d26724e74f9e2 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Repositories.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/Repositories.java @@ -12,7 +12,9 @@ import java.io.IOException; import java.util.List; -/** List of repositories. */ +/** + * List of repositories. + */ @Fluent public final class Repositories implements JsonSerializable { /* @@ -25,13 +27,15 @@ public final class Repositories implements JsonSerializable { */ private String link; - /** Creates an instance of Repositories class. */ + /** + * Creates an instance of Repositories class. + */ public Repositories() { } /** * Get the repositories property: Repository names. - * + * * @return the repositories value. */ public List getRepositories() { @@ -40,7 +44,7 @@ public List getRepositories() { /** * Set the repositories property: Repository names. - * + * * @param repositories the repositories value to set. * @return the Repositories object itself. */ @@ -51,7 +55,7 @@ public Repositories setRepositories(List repositories) { /** * Get the link property: The link property. - * + * * @return the link value. */ public String getLink() { @@ -60,7 +64,7 @@ public String getLink() { /** * Set the link property: The link property. - * + * * @param link the link value to set. * @return the Repositories object itself. */ @@ -69,6 +73,9 @@ public Repositories setLink(String link) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -79,10 +86,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of Repositories from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of Repositories if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IOException If an error occurs while reading the Repositories. */ public static Repositories fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/RepositoryTags.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/RepositoryTags.java index ed4e77e909653..4322bb92a1fc6 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/RepositoryTags.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/RepositoryTags.java @@ -12,7 +12,9 @@ import java.io.IOException; import java.util.List; -/** Result of the request to list tags of the image. */ +/** + * Result of the request to list tags of the image. + */ @Fluent public final class RepositoryTags implements JsonSerializable { /* @@ -25,13 +27,15 @@ public final class RepositoryTags implements JsonSerializable { */ private List tags; - /** Creates an instance of RepositoryTags class. */ + /** + * Creates an instance of RepositoryTags class. + */ public RepositoryTags() { } /** * Get the name property: Name of the image. - * + * * @return the name value. */ public String getName() { @@ -40,7 +44,7 @@ public String getName() { /** * Set the name property: Name of the image. - * + * * @param name the name value to set. * @return the RepositoryTags object itself. */ @@ -51,7 +55,7 @@ public RepositoryTags setName(String name) { /** * Get the tags property: List of tags. - * + * * @return the tags value. */ public List getTags() { @@ -60,7 +64,7 @@ public List getTags() { /** * Set the tags property: List of tags. - * + * * @param tags the tags value to set. * @return the RepositoryTags object itself. */ @@ -69,6 +73,9 @@ public RepositoryTags setTags(List tags) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -79,10 +86,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of RepositoryTags from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of RepositoryTags if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IOException If an error occurs while reading the RepositoryTags. */ public static RepositoryTags fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/RepositoryWriteableProperties.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/RepositoryWriteableProperties.java index 0591a9ae2715c..39921cf82183b 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/RepositoryWriteableProperties.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/RepositoryWriteableProperties.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** Changeable attributes for Repository. */ +/** + * Changeable attributes for Repository. + */ @Fluent public final class RepositoryWriteableProperties implements JsonSerializable { /* @@ -34,13 +36,15 @@ public final class RepositoryWriteableProperties implements JsonSerializable { /* @@ -56,13 +59,15 @@ public class TagAttributesBase implements JsonSerializable { */ private Boolean readEnabled; - /** Creates an instance of TagAttributesBase class. */ + /** + * Creates an instance of TagAttributesBase class. + */ public TagAttributesBase() { } /** * Get the name property: Tag name. - * + * * @return the name value. */ public String getName() { @@ -71,7 +76,7 @@ public String getName() { /** * Set the name property: Tag name. - * + * * @param name the name value to set. * @return the TagAttributesBase object itself. */ @@ -82,7 +87,7 @@ public TagAttributesBase setName(String name) { /** * Get the digest property: Tag digest. - * + * * @return the digest value. */ public String getDigest() { @@ -91,7 +96,7 @@ public String getDigest() { /** * Set the digest property: Tag digest. - * + * * @param digest the digest value to set. * @return the TagAttributesBase object itself. */ @@ -102,7 +107,7 @@ public TagAttributesBase setDigest(String digest) { /** * Get the createdOn property: Tag created time. - * + * * @return the createdOn value. */ public OffsetDateTime getCreatedOn() { @@ -111,7 +116,7 @@ public OffsetDateTime getCreatedOn() { /** * Set the createdOn property: Tag created time. - * + * * @param createdOn the createdOn value to set. * @return the TagAttributesBase object itself. */ @@ -122,7 +127,7 @@ public TagAttributesBase setCreatedOn(OffsetDateTime createdOn) { /** * Get the lastUpdatedOn property: Tag last update time. - * + * * @return the lastUpdatedOn value. */ public OffsetDateTime getLastUpdatedOn() { @@ -131,7 +136,7 @@ public OffsetDateTime getLastUpdatedOn() { /** * Set the lastUpdatedOn property: Tag last update time. - * + * * @param lastUpdatedOn the lastUpdatedOn value to set. * @return the TagAttributesBase object itself. */ @@ -142,7 +147,7 @@ public TagAttributesBase setLastUpdatedOn(OffsetDateTime lastUpdatedOn) { /** * Get the deleteEnabled property: Delete enabled. - * + * * @return the deleteEnabled value. */ public Boolean isDeleteEnabled() { @@ -151,7 +156,7 @@ public Boolean isDeleteEnabled() { /** * Set the deleteEnabled property: Delete enabled. - * + * * @param deleteEnabled the deleteEnabled value to set. * @return the TagAttributesBase object itself. */ @@ -162,7 +167,7 @@ public TagAttributesBase setDeleteEnabled(Boolean deleteEnabled) { /** * Get the writeEnabled property: Write enabled. - * + * * @return the writeEnabled value. */ public Boolean isWriteEnabled() { @@ -171,7 +176,7 @@ public Boolean isWriteEnabled() { /** * Set the writeEnabled property: Write enabled. - * + * * @param writeEnabled the writeEnabled value to set. * @return the TagAttributesBase object itself. */ @@ -182,7 +187,7 @@ public TagAttributesBase setWriteEnabled(Boolean writeEnabled) { /** * Get the listEnabled property: List enabled. - * + * * @return the listEnabled value. */ public Boolean isListEnabled() { @@ -191,7 +196,7 @@ public Boolean isListEnabled() { /** * Set the listEnabled property: List enabled. - * + * * @param listEnabled the listEnabled value to set. * @return the TagAttributesBase object itself. */ @@ -202,7 +207,7 @@ public TagAttributesBase setListEnabled(Boolean listEnabled) { /** * Get the readEnabled property: Read enabled. - * + * * @return the readEnabled value. */ public Boolean isReadEnabled() { @@ -211,7 +216,7 @@ public Boolean isReadEnabled() { /** * Set the readEnabled property: Read enabled. - * + * * @param readEnabled the readEnabled value to set. * @return the TagAttributesBase object itself. */ @@ -220,13 +225,18 @@ public TagAttributesBase setReadEnabled(Boolean readEnabled) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("name", this.name); jsonWriter.writeStringField("digest", this.digest); - jsonWriter.writeStringField("createdTime", Objects.toString(this.createdOn, null)); - jsonWriter.writeStringField("lastUpdateTime", Objects.toString(this.lastUpdatedOn, null)); + jsonWriter.writeStringField("createdTime", + this.createdOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdOn)); + jsonWriter.writeStringField("lastUpdateTime", + this.lastUpdatedOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastUpdatedOn)); if (deleteEnabled != null || writeEnabled != null || listEnabled != null || readEnabled != null) { jsonWriter.writeStartObject("changeableAttributes"); jsonWriter.writeBooleanField("deleteEnabled", this.deleteEnabled); @@ -240,10 +250,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TagAttributesBase from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TagAttributesBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the TagAttributesBase. */ @@ -259,11 +269,11 @@ public static TagAttributesBase fromJson(JsonReader jsonReader) throws IOExcepti } else if ("digest".equals(fieldName)) { deserializedTagAttributesBase.digest = reader.getString(); } else if ("createdTime".equals(fieldName)) { - deserializedTagAttributesBase.createdOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedTagAttributesBase.createdOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastUpdateTime".equals(fieldName)) { - deserializedTagAttributesBase.lastUpdatedOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedTagAttributesBase.lastUpdatedOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("changeableAttributes".equals(fieldName) && reader.currentToken() == JsonToken.START_OBJECT) { while (reader.nextToken() != JsonToken.END_OBJECT) { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/TagAttributesTag.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/TagAttributesTag.java index ecb9a56fcf008..d3d99a7f723e8 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/TagAttributesTag.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/TagAttributesTag.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** Tag. */ +/** + * Tag. + */ @Fluent public final class TagAttributesTag implements JsonSerializable { /* @@ -19,13 +21,15 @@ public final class TagAttributesTag implements JsonSerializable { /* @@ -35,14 +37,16 @@ public final class TagList implements JsonSerializable { */ private String link; - /** Creates an instance of TagList class. */ + /** + * Creates an instance of TagList class. + */ public TagList() { } /** * Get the registryLoginServer property: Registry login server name. This is likely to be similar to * {registry-name}.azurecr.io. - * + * * @return the registryLoginServer value. */ public String getRegistryLoginServer() { @@ -52,7 +56,7 @@ public String getRegistryLoginServer() { /** * Set the registryLoginServer property: Registry login server name. This is likely to be similar to * {registry-name}.azurecr.io. - * + * * @param registryLoginServer the registryLoginServer value to set. * @return the TagList object itself. */ @@ -63,7 +67,7 @@ public TagList setRegistryLoginServer(String registryLoginServer) { /** * Get the repository property: Image name. - * + * * @return the repository value. */ public String getRepository() { @@ -72,7 +76,7 @@ public String getRepository() { /** * Set the repository property: Image name. - * + * * @param repository the repository value to set. * @return the TagList object itself. */ @@ -83,7 +87,7 @@ public TagList setRepository(String repository) { /** * Get the tagAttributeBases property: List of tag attribute details. - * + * * @return the tagAttributeBases value. */ public List getTagAttributeBases() { @@ -92,7 +96,7 @@ public List getTagAttributeBases() { /** * Set the tagAttributeBases property: List of tag attribute details. - * + * * @param tagAttributeBases the tagAttributeBases value to set. * @return the TagList object itself. */ @@ -103,7 +107,7 @@ public TagList setTagAttributeBases(List tagAttributeBases) { /** * Get the link property: The link property. - * + * * @return the link value. */ public String getLink() { @@ -112,7 +116,7 @@ public String getLink() { /** * Set the link property: The link property. - * + * * @param link the link value to set. * @return the TagList object itself. */ @@ -121,6 +125,9 @@ public TagList setLink(String link) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -133,10 +140,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TagList from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TagList if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. + * JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the TagList. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/TagWriteableProperties.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/TagWriteableProperties.java index f28ea136d72c3..f1b35c5a6207b 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/TagWriteableProperties.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/TagWriteableProperties.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** Changeable attributes. */ +/** + * Changeable attributes. + */ @Fluent public final class TagWriteableProperties implements JsonSerializable { /* @@ -34,13 +36,15 @@ public final class TagWriteableProperties implements JsonSerializable signatures; - /** Creates an instance of V1Manifest class. */ + /** + * Creates an instance of V1Manifest class. + */ public V1Manifest() { } /** * Get the architecture property: CPU architecture. - * + * * @return the architecture value. */ public String getArchitecture() { @@ -59,7 +63,7 @@ public String getArchitecture() { /** * Set the architecture property: CPU architecture. - * + * * @param architecture the architecture value to set. * @return the V1Manifest object itself. */ @@ -70,7 +74,7 @@ public V1Manifest setArchitecture(String architecture) { /** * Get the name property: Image name. - * + * * @return the name value. */ public String getName() { @@ -79,7 +83,7 @@ public String getName() { /** * Set the name property: Image name. - * + * * @param name the name value to set. * @return the V1Manifest object itself. */ @@ -90,7 +94,7 @@ public V1Manifest setName(String name) { /** * Get the tag property: Image tag. - * + * * @return the tag value. */ public String getTag() { @@ -99,7 +103,7 @@ public String getTag() { /** * Set the tag property: Image tag. - * + * * @param tag the tag value to set. * @return the V1Manifest object itself. */ @@ -110,7 +114,7 @@ public V1Manifest setTag(String tag) { /** * Get the fsLayers property: List of layer information. - * + * * @return the fsLayers value. */ public List getFsLayers() { @@ -119,7 +123,7 @@ public List getFsLayers() { /** * Set the fsLayers property: List of layer information. - * + * * @param fsLayers the fsLayers value to set. * @return the V1Manifest object itself. */ @@ -130,7 +134,7 @@ public V1Manifest setFsLayers(List fsLayers) { /** * Get the history property: Image history. - * + * * @return the history value. */ public List getHistory() { @@ -139,7 +143,7 @@ public List getHistory() { /** * Set the history property: Image history. - * + * * @param history the history value to set. * @return the V1Manifest object itself. */ @@ -150,7 +154,7 @@ public V1Manifest setHistory(List history) { /** * Get the signatures property: Image signature. - * + * * @return the signatures value. */ public List getSignatures() { @@ -159,7 +163,7 @@ public List getSignatures() { /** * Set the signatures property: Image signature. - * + * * @param signatures the signatures value to set. * @return the V1Manifest object itself. */ @@ -168,13 +172,18 @@ public V1Manifest setSignatures(List signatures) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V1Manifest setSchemaVersion(Integer schemaVersion) { super.setSchemaVersion(schemaVersion); return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -190,10 +199,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of V1Manifest from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of V1Manifest if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. + * to JSON null. * @throws IOException If an error occurs while reading the V1Manifest. */ public static V1Manifest fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/V2Manifest.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/V2Manifest.java index f9ab254a5893a..ebe758874e1f8 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/V2Manifest.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/V2Manifest.java @@ -12,7 +12,9 @@ import java.io.IOException; import java.util.List; -/** Returns the requested Docker V2 Manifest file. */ +/** + * Returns the requested Docker V2 Manifest file. + */ @Fluent public final class V2Manifest extends Manifest { /* @@ -30,13 +32,15 @@ public final class V2Manifest extends Manifest { */ private List layers; - /** Creates an instance of V2Manifest class. */ + /** + * Creates an instance of V2Manifest class. + */ public V2Manifest() { } /** * Get the mediaType property: Media type for this Manifest. - * + * * @return the mediaType value. */ public String getMediaType() { @@ -45,7 +49,7 @@ public String getMediaType() { /** * Set the mediaType property: Media type for this Manifest. - * + * * @param mediaType the mediaType value to set. * @return the V2Manifest object itself. */ @@ -56,7 +60,7 @@ public V2Manifest setMediaType(String mediaType) { /** * Get the config property: V2 image config descriptor. - * + * * @return the config value. */ public OciDescriptor getConfig() { @@ -65,7 +69,7 @@ public OciDescriptor getConfig() { /** * Set the config property: V2 image config descriptor. - * + * * @param config the config value to set. * @return the V2Manifest object itself. */ @@ -76,7 +80,7 @@ public V2Manifest setConfig(OciDescriptor config) { /** * Get the layers property: List of V2 image layer information. - * + * * @return the layers value. */ public List getLayers() { @@ -85,7 +89,7 @@ public List getLayers() { /** * Set the layers property: List of V2 image layer information. - * + * * @param layers the layers value to set. * @return the V2Manifest object itself. */ @@ -94,13 +98,18 @@ public V2Manifest setLayers(List layers) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V2Manifest setSchemaVersion(Integer schemaVersion) { super.setSchemaVersion(schemaVersion); return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -113,10 +122,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of V2Manifest from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of V2Manifest if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. + * to JSON null. * @throws IOException If an error occurs while reading the V2Manifest. */ public static V2Manifest fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/package-info.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/package-info.java index 7e364a717af4e..381b5980f7914 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/package-info.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for AzureContainerRegistry. Metadata API definition for the Azure Container - * Registry runtime. + * Package containing the data models for AzureContainerRegistry. + * Metadata API definition for the Azure Container Registry runtime. */ package com.azure.containers.containerregistry.implementation.models; diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/package-info.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/package-info.java index fba4c94ce1861..5819c3b71987c 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/package-info.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for AzureContainerRegistry. Metadata API definition for the Azure Container - * Registry runtime. + * Package containing the implementations for AzureContainerRegistry. + * Metadata API definition for the Azure Container Registry runtime. */ package com.azure.containers.containerregistry.implementation; diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactArchitecture.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactArchitecture.java index 1e15203fe3cdf..ebb6a8c7eb4d6 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactArchitecture.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactArchitecture.java @@ -7,50 +7,78 @@ import com.azure.core.util.ExpandableStringEnum; import java.util.Collection; -/** The artifact platform's architecture. */ +/** + * The artifact platform's architecture. + */ public final class ArtifactArchitecture extends ExpandableStringEnum { - /** i386. */ + /** + * i386. + */ public static final ArtifactArchitecture I386 = fromString("386"); - /** AMD64. */ + /** + * AMD64. + */ public static final ArtifactArchitecture AMD64 = fromString("amd64"); - /** ARM. */ + /** + * ARM. + */ public static final ArtifactArchitecture ARM = fromString("arm"); - /** ARM64. */ + /** + * ARM64. + */ public static final ArtifactArchitecture ARM64 = fromString("arm64"); - /** MIPS. */ + /** + * MIPS. + */ public static final ArtifactArchitecture MIPS = fromString("mips"); - /** MIPSLE. */ + /** + * MIPSLE. + */ public static final ArtifactArchitecture MIPS_LE = fromString("mipsle"); - /** MIPS64. */ + /** + * MIPS64. + */ public static final ArtifactArchitecture MIPS64 = fromString("mips64"); - /** MIPS64LE. */ + /** + * MIPS64LE. + */ public static final ArtifactArchitecture MIPS64LE = fromString("mips64le"); - /** PPC64. */ + /** + * PPC64. + */ public static final ArtifactArchitecture PPC64 = fromString("ppc64"); - /** PPC64LE. */ + /** + * PPC64LE. + */ public static final ArtifactArchitecture PPC64LE = fromString("ppc64le"); - /** RISCv64. */ + /** + * RISCv64. + */ public static final ArtifactArchitecture RISC_V64 = fromString("riscv64"); - /** s390x. */ + /** + * s390x. + */ public static final ArtifactArchitecture S390X = fromString("s390x"); - /** Wasm. */ + /** + * Wasm. + */ public static final ArtifactArchitecture WASM = fromString("wasm"); /** * Creates a new instance of ArtifactArchitecture value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -59,7 +87,7 @@ public ArtifactArchitecture() { /** * Creates or finds a ArtifactArchitecture from its string representation. - * + * * @param name a name to look for. * @return the corresponding ArtifactArchitecture. */ @@ -69,7 +97,7 @@ public static ArtifactArchitecture fromString(String name) { /** * Gets known ArtifactArchitecture values. - * + * * @return known ArtifactArchitecture values. */ public static Collection values() { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactManifestOrder.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactManifestOrder.java index 8c84e3e838c34..9e468e8afd57b 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactManifestOrder.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactManifestOrder.java @@ -7,20 +7,28 @@ import com.azure.core.util.ExpandableStringEnum; import java.util.Collection; -/** Sort options for ordering manifests in a collection. */ +/** + * Sort options for ordering manifests in a collection. + */ public final class ArtifactManifestOrder extends ExpandableStringEnum { - /** Do not provide an orderby value in the request. */ + /** + * Do not provide an orderby value in the request. + */ public static final ArtifactManifestOrder NONE = fromString("none"); - /** Order manifests by LastUpdatedOn field, from most recently updated to least recently updated. */ + /** + * Order manifests by LastUpdatedOn field, from most recently updated to least recently updated. + */ public static final ArtifactManifestOrder LAST_UPDATED_ON_DESCENDING = fromString("timedesc"); - /** Order manifest by LastUpdatedOn field, from least recently updated to most recently updated. */ + /** + * Order manifest by LastUpdatedOn field, from least recently updated to most recently updated. + */ public static final ArtifactManifestOrder LAST_UPDATED_ON_ASCENDING = fromString("timeasc"); /** * Creates a new instance of ArtifactManifestOrder value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -29,7 +37,7 @@ public ArtifactManifestOrder() { /** * Creates or finds a ArtifactManifestOrder from its string representation. - * + * * @param name a name to look for. * @return the corresponding ArtifactManifestOrder. */ @@ -39,7 +47,7 @@ public static ArtifactManifestOrder fromString(String name) { /** * Gets known ArtifactManifestOrder values. - * + * * @return known ArtifactManifestOrder values. */ public static Collection values() { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactManifestPlatform.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactManifestPlatform.java index 9a1cff6001e42..e5572db6dadc0 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactManifestPlatform.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactManifestPlatform.java @@ -10,9 +10,10 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.Objects; -/** The artifact's platform, consisting of operating system and architecture. */ +/** + * The artifact's platform, consisting of operating system and architecture. + */ @Immutable public final class ArtifactManifestPlatform implements JsonSerializable { /* @@ -30,13 +31,15 @@ public final class ArtifactManifestPlatform implements JsonSerializable { - /** Static value aix for ArtifactOperatingSystem. */ + /** + * Static value aix for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem AIX = fromString("aix"); - /** Static value android for ArtifactOperatingSystem. */ + /** + * Static value android for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem ANDROID = fromString("android"); - /** Static value darwin for ArtifactOperatingSystem. */ + /** + * Static value darwin for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem DARWIN = fromString("darwin"); - /** Static value dragonfly for ArtifactOperatingSystem. */ + /** + * Static value dragonfly for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem DRAGONFLY = fromString("dragonfly"); - /** Static value freebsd for ArtifactOperatingSystem. */ + /** + * Static value freebsd for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem FREE_BSD = fromString("freebsd"); - /** Static value illumos for ArtifactOperatingSystem. */ + /** + * Static value illumos for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem ILLUMOS = fromString("illumos"); - /** Static value ios for ArtifactOperatingSystem. */ + /** + * Static value ios for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem IOS = fromString("ios"); - /** Static value js for ArtifactOperatingSystem. */ + /** + * Static value js for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem JS = fromString("js"); - /** Static value linux for ArtifactOperatingSystem. */ + /** + * Static value linux for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem LINUX = fromString("linux"); - /** Static value netbsd for ArtifactOperatingSystem. */ + /** + * Static value netbsd for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem NET_BSD = fromString("netbsd"); - /** Static value openbsd for ArtifactOperatingSystem. */ + /** + * Static value openbsd for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem OPEN_BSD = fromString("openbsd"); - /** Static value plan9 for ArtifactOperatingSystem. */ + /** + * Static value plan9 for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem PLAN9 = fromString("plan9"); - /** Static value solaris for ArtifactOperatingSystem. */ + /** + * Static value solaris for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem SOLARIS = fromString("solaris"); - /** Static value windows for ArtifactOperatingSystem. */ + /** + * Static value windows for ArtifactOperatingSystem. + */ public static final ArtifactOperatingSystem WINDOWS = fromString("windows"); /** * Creates a new instance of ArtifactOperatingSystem value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -62,7 +92,7 @@ public ArtifactOperatingSystem() { /** * Creates or finds a ArtifactOperatingSystem from its string representation. - * + * * @param name a name to look for. * @return the corresponding ArtifactOperatingSystem. */ @@ -72,7 +102,7 @@ public static ArtifactOperatingSystem fromString(String name) { /** * Gets known ArtifactOperatingSystem values. - * + * * @return known ArtifactOperatingSystem values. */ public static Collection values() { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactTagOrder.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactTagOrder.java index 471a010bc36a9..f20ecb7de38a5 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactTagOrder.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ArtifactTagOrder.java @@ -7,20 +7,28 @@ import com.azure.core.util.ExpandableStringEnum; import java.util.Collection; -/** Sort options for ordering tags in a collection. */ +/** + * Sort options for ordering tags in a collection. + */ public final class ArtifactTagOrder extends ExpandableStringEnum { - /** Do not provide an orderby value in the request. */ + /** + * Do not provide an orderby value in the request. + */ public static final ArtifactTagOrder NONE = fromString("none"); - /** Order tags by LastUpdatedOn field, from most recently updated to least recently updated. */ + /** + * Order tags by LastUpdatedOn field, from most recently updated to least recently updated. + */ public static final ArtifactTagOrder LAST_UPDATED_ON_DESCENDING = fromString("timedesc"); - /** Order tags by LastUpdatedOn field, from least recently updated to most recently updated. */ + /** + * Order tags by LastUpdatedOn field, from least recently updated to most recently updated. + */ public static final ArtifactTagOrder LAST_UPDATED_ON_ASCENDING = fromString("timeasc"); /** * Creates a new instance of ArtifactTagOrder value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -29,7 +37,7 @@ public ArtifactTagOrder() { /** * Creates or finds a ArtifactTagOrder from its string representation. - * + * * @param name a name to look for. * @return the corresponding ArtifactTagOrder. */ @@ -39,7 +47,7 @@ public static ArtifactTagOrder fromString(String name) { /** * Gets known ArtifactTagOrder values. - * + * * @return known ArtifactTagOrder values. */ public static Collection values() { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ContainerRepositoryProperties.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ContainerRepositoryProperties.java index 898c78d005a1e..16c8c0db6626b 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ContainerRepositoryProperties.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ContainerRepositoryProperties.java @@ -5,17 +5,19 @@ package com.azure.containers.containerregistry.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; -import java.util.Objects; -/** Properties of this repository. */ +/** + * Properties of this repository. + */ @Fluent -public final class ContainerRepositoryProperties implements JsonSerializable { +public class ContainerRepositoryProperties implements JsonSerializable { /* * Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. */ @@ -66,14 +68,16 @@ public final class ContainerRepositoryProperties implements JsonSerializable OffsetDateTime.parse(nonNullReader.getString())); + deserializedContainerRepositoryProperties.createdOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastUpdateTime".equals(fieldName)) { - deserializedContainerRepositoryProperties.lastUpdatedOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedContainerRepositoryProperties.lastUpdatedOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("manifestCount".equals(fieldName)) { deserializedContainerRepositoryProperties.manifestCount = reader.getInt(); } else if ("tagCount".equals(fieldName)) { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciAnnotations.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciAnnotations.java index 2e435fa34ef76..d3290d6c685b5 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciAnnotations.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciAnnotations.java @@ -5,17 +5,20 @@ package com.azure.containers.containerregistry.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; import java.util.LinkedHashMap; import java.util.Map; -import java.util.Objects; -/** Additional information provided through arbitrary metadata. */ +/** + * Additional information provided through arbitrary metadata. + */ @Fluent public final class OciAnnotations implements JsonSerializable { /* @@ -45,8 +48,8 @@ public final class OciAnnotations implements JsonSerializable { private String source; /* - * Version of the packaged software. The version MAY match a label or tag in the source code repository, may also - * be Semantic versioning-compatible + * Version of the packaged software. The version MAY match a label or tag in the source code repository, may also be + * Semantic versioning-compatible */ private String version; @@ -85,14 +88,16 @@ public final class OciAnnotations implements JsonSerializable { */ private Map additionalProperties; - /** Creates an instance of OciAnnotations class. */ + /** + * Creates an instance of OciAnnotations class. + */ public OciAnnotations() { } /** * Get the createdOn property: Date and time on which the image was built (string, date-time as defined by * https://tools.ietf.org/html/rfc3339#section-5.6). - * + * * @return the createdOn value. */ public OffsetDateTime getCreatedOn() { @@ -102,7 +107,7 @@ public OffsetDateTime getCreatedOn() { /** * Set the createdOn property: Date and time on which the image was built (string, date-time as defined by * https://tools.ietf.org/html/rfc3339#section-5.6). - * + * * @param createdOn the createdOn value to set. * @return the OciAnnotations object itself. */ @@ -113,7 +118,7 @@ public OciAnnotations setCreatedOn(OffsetDateTime createdOn) { /** * Get the authors property: Contact details of the people or organization responsible for the image. - * + * * @return the authors value. */ public String getAuthors() { @@ -122,7 +127,7 @@ public String getAuthors() { /** * Set the authors property: Contact details of the people or organization responsible for the image. - * + * * @param authors the authors value to set. * @return the OciAnnotations object itself. */ @@ -133,7 +138,7 @@ public OciAnnotations setAuthors(String authors) { /** * Get the url property: URL to find more information on the image. - * + * * @return the url value. */ public String getUrl() { @@ -142,7 +147,7 @@ public String getUrl() { /** * Set the url property: URL to find more information on the image. - * + * * @param url the url value to set. * @return the OciAnnotations object itself. */ @@ -153,7 +158,7 @@ public OciAnnotations setUrl(String url) { /** * Get the documentation property: URL to get documentation on the image. - * + * * @return the documentation value. */ public String getDocumentation() { @@ -162,7 +167,7 @@ public String getDocumentation() { /** * Set the documentation property: URL to get documentation on the image. - * + * * @param documentation the documentation value to set. * @return the OciAnnotations object itself. */ @@ -173,7 +178,7 @@ public OciAnnotations setDocumentation(String documentation) { /** * Get the source property: URL to get source code for building the image. - * + * * @return the source value. */ public String getSource() { @@ -182,7 +187,7 @@ public String getSource() { /** * Set the source property: URL to get source code for building the image. - * + * * @param source the source value to set. * @return the OciAnnotations object itself. */ @@ -194,7 +199,7 @@ public OciAnnotations setSource(String source) { /** * Get the version property: Version of the packaged software. The version MAY match a label or tag in the source * code repository, may also be Semantic versioning-compatible. - * + * * @return the version value. */ public String getVersion() { @@ -204,7 +209,7 @@ public String getVersion() { /** * Set the version property: Version of the packaged software. The version MAY match a label or tag in the source * code repository, may also be Semantic versioning-compatible. - * + * * @param version the version value to set. * @return the OciAnnotations object itself. */ @@ -215,7 +220,7 @@ public OciAnnotations setVersion(String version) { /** * Get the revision property: Source control revision identifier for the packaged software. - * + * * @return the revision value. */ public String getRevision() { @@ -224,7 +229,7 @@ public String getRevision() { /** * Set the revision property: Source control revision identifier for the packaged software. - * + * * @param revision the revision value to set. * @return the OciAnnotations object itself. */ @@ -235,7 +240,7 @@ public OciAnnotations setRevision(String revision) { /** * Get the vendor property: Name of the distributing entity, organization or individual. - * + * * @return the vendor value. */ public String getVendor() { @@ -244,7 +249,7 @@ public String getVendor() { /** * Set the vendor property: Name of the distributing entity, organization or individual. - * + * * @param vendor the vendor value to set. * @return the OciAnnotations object itself. */ @@ -256,7 +261,7 @@ public OciAnnotations setVendor(String vendor) { /** * Get the licenses property: License(s) under which contained software is distributed as an SPDX License * Expression. - * + * * @return the licenses value. */ public String getLicenses() { @@ -266,7 +271,7 @@ public String getLicenses() { /** * Set the licenses property: License(s) under which contained software is distributed as an SPDX License * Expression. - * + * * @param licenses the licenses value to set. * @return the OciAnnotations object itself. */ @@ -277,7 +282,7 @@ public OciAnnotations setLicenses(String licenses) { /** * Get the name property: Name of the reference for a target. - * + * * @return the name value. */ public String getName() { @@ -286,7 +291,7 @@ public String getName() { /** * Set the name property: Name of the reference for a target. - * + * * @param name the name value to set. * @return the OciAnnotations object itself. */ @@ -297,7 +302,7 @@ public OciAnnotations setName(String name) { /** * Get the title property: Human-readable title of the image. - * + * * @return the title value. */ public String getTitle() { @@ -306,7 +311,7 @@ public String getTitle() { /** * Set the title property: Human-readable title of the image. - * + * * @param title the title value to set. * @return the OciAnnotations object itself. */ @@ -317,7 +322,7 @@ public OciAnnotations setTitle(String title) { /** * Get the description property: Human-readable description of the software packaged in the image. - * + * * @return the description value. */ public String getDescription() { @@ -326,7 +331,7 @@ public String getDescription() { /** * Set the description property: Human-readable description of the software packaged in the image. - * + * * @param description the description value to set. * @return the OciAnnotations object itself. */ @@ -337,7 +342,7 @@ public OciAnnotations setDescription(String description) { /** * Get the additionalProperties property: Additional information provided through arbitrary metadata. - * + * * @return the additionalProperties value. */ public Map getAdditionalProperties() { @@ -346,7 +351,7 @@ public Map getAdditionalProperties() { /** * Set the additionalProperties property: Additional information provided through arbitrary metadata. - * + * * @param additionalProperties the additionalProperties value to set. * @return the OciAnnotations object itself. */ @@ -355,10 +360,14 @@ public OciAnnotations setAdditionalProperties(Map additionalProp return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("org.opencontainers.image.created", Objects.toString(this.createdOn, null)); + jsonWriter.writeStringField("org.opencontainers.image.created", + this.createdOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdOn)); jsonWriter.writeStringField("org.opencontainers.image.authors", this.authors); jsonWriter.writeStringField("org.opencontainers.image.url", this.url); jsonWriter.writeStringField("org.opencontainers.image.documentation", this.documentation); @@ -380,10 +389,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of OciAnnotations from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of OciAnnotations if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IOException If an error occurs while reading the OciAnnotations. */ public static OciAnnotations fromJson(JsonReader jsonReader) throws IOException { @@ -395,8 +404,8 @@ public static OciAnnotations fromJson(JsonReader jsonReader) throws IOException reader.nextToken(); if ("org.opencontainers.image.created".equals(fieldName)) { - deserializedOciAnnotations.createdOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedOciAnnotations.createdOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("org.opencontainers.image.authors".equals(fieldName)) { deserializedOciAnnotations.authors = reader.getString(); } else if ("org.opencontainers.image.url".equals(fieldName)) { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciDescriptor.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciDescriptor.java index 9433c3a425e3c..f14889ed23008 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciDescriptor.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciDescriptor.java @@ -12,7 +12,9 @@ import java.io.IOException; import java.util.List; -/** Docker V2 image layer descriptor including config and layers. */ +/** + * Docker V2 image layer descriptor including config and layers. + */ @Fluent public final class OciDescriptor implements JsonSerializable { /* @@ -40,13 +42,15 @@ public final class OciDescriptor implements JsonSerializable { */ private OciAnnotations annotations; - /** Creates an instance of OciDescriptor class. */ + /** + * Creates an instance of OciDescriptor class. + */ public OciDescriptor() { } /** * Get the mediaType property: Layer media type. - * + * * @return the mediaType value. */ public String getMediaType() { @@ -55,7 +59,7 @@ public String getMediaType() { /** * Set the mediaType property: Layer media type. - * + * * @param mediaType the mediaType value to set. * @return the OciDescriptor object itself. */ @@ -66,7 +70,7 @@ public OciDescriptor setMediaType(String mediaType) { /** * Get the sizeInBytes property: Layer size. - * + * * @return the sizeInBytes value. */ public Long getSizeInBytes() { @@ -75,7 +79,7 @@ public Long getSizeInBytes() { /** * Set the sizeInBytes property: Layer size. - * + * * @param sizeInBytes the sizeInBytes value to set. * @return the OciDescriptor object itself. */ @@ -86,7 +90,7 @@ public OciDescriptor setSizeInBytes(Long sizeInBytes) { /** * Get the digest property: Layer digest. - * + * * @return the digest value. */ public String getDigest() { @@ -95,7 +99,7 @@ public String getDigest() { /** * Set the digest property: Layer digest. - * + * * @param digest the digest value to set. * @return the OciDescriptor object itself. */ @@ -106,7 +110,7 @@ public OciDescriptor setDigest(String digest) { /** * Get the urls property: Specifies a list of URIs from which this object may be downloaded. - * + * * @return the urls value. */ public List getUrls() { @@ -115,7 +119,7 @@ public List getUrls() { /** * Set the urls property: Specifies a list of URIs from which this object may be downloaded. - * + * * @param urls the urls value to set. * @return the OciDescriptor object itself. */ @@ -126,7 +130,7 @@ public OciDescriptor setUrls(List urls) { /** * Get the annotations property: Additional information provided through arbitrary metadata. - * + * * @return the annotations value. */ public OciAnnotations getAnnotations() { @@ -135,7 +139,7 @@ public OciAnnotations getAnnotations() { /** * Set the annotations property: Additional information provided through arbitrary metadata. - * + * * @param annotations the annotations value to set. * @return the OciDescriptor object itself. */ @@ -144,6 +148,9 @@ public OciDescriptor setAnnotations(OciAnnotations annotations) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -157,10 +164,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of OciDescriptor from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of OciDescriptor if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IOException If an error occurs while reading the OciDescriptor. */ public static OciDescriptor fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciImageManifest.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciImageManifest.java index be37e94e30fc7..be229aa876d72 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciImageManifest.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciImageManifest.java @@ -12,7 +12,9 @@ import java.io.IOException; import java.util.List; -/** Returns the requested OCI Manifest file. */ +/** + * Returns the requested OCI Manifest file. + */ @Fluent public final class OciImageManifest implements JsonSerializable { /* @@ -35,13 +37,15 @@ public final class OciImageManifest implements JsonSerializable getLayers() { @@ -70,7 +74,7 @@ public List getLayers() { /** * Set the layers property: List of V2 image layer information. - * + * * @param layers the layers value to set. * @return the OciImageManifest object itself. */ @@ -81,7 +85,7 @@ public OciImageManifest setLayers(List layers) { /** * Get the annotations property: Additional information provided through arbitrary metadata. - * + * * @return the annotations value. */ public OciAnnotations getAnnotations() { @@ -90,7 +94,7 @@ public OciAnnotations getAnnotations() { /** * Set the annotations property: Additional information provided through arbitrary metadata. - * + * * @param annotations the annotations value to set. * @return the OciImageManifest object itself. */ @@ -101,7 +105,7 @@ public OciImageManifest setAnnotations(OciAnnotations annotations) { /** * Get the schemaVersion property: Schema version. - * + * * @return the schemaVersion value. */ public int getSchemaVersion() { @@ -110,7 +114,7 @@ public int getSchemaVersion() { /** * Set the schemaVersion property: Schema version. - * + * * @param schemaVersion the schemaVersion value to set. * @return the OciImageManifest object itself. */ @@ -119,6 +123,9 @@ public OciImageManifest setSchemaVersion(int schemaVersion) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -131,10 +138,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of OciImageManifest from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of OciImageManifest if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OciImageManifest. */ diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/package-info.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/package-info.java index 5d718823618da..5e46d54159a61 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/package-info.java +++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for AzureContainerRegistry. Metadata API definition for the Azure Container - * Registry runtime. + * Package containing the data models for AzureContainerRegistry. + * Metadata API definition for the Azure Container Registry runtime. */ package com.azure.containers.containerregistry.models; diff --git a/sdk/containerregistry/azure-containers-containerregistry/swagger/autorest.md b/sdk/containerregistry/azure-containers-containerregistry/swagger/autorest.md index 45b91831358fd..1d780873316cc 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/swagger/autorest.md +++ b/sdk/containerregistry/azure-containers-containerregistry/swagger/autorest.md @@ -1,12 +1,13 @@ -# Azure Containers ContainerRegistry APIs for Java +# Azure Container Registry for Java > see https://aka.ms/autorest -This is the template AutoRest configuration file for client SDKs. +This is the AutoRest configuration file for Container Registry. +--- ## Getting Started - -To build the SDK, simply [Install AutoRest](https://aka.ms/autorest) and in this folder, run: +To build the SDK for Container Registry, simply [Install AutoRest](https://aka.ms/autorest) and +in this folder, run: > `autorest` @@ -15,48 +16,19 @@ To see additional help and options, run: > `autorest --help` ### Setup - -Fork and clone [autorest.java](https://github.com/Azure/autorest.java) and run the following: - ```ps -You need to have the following installed on your machine: - -Node.JS LTS -Java 8+ -Maven 3.x -You need to have autorest installed through NPM: - -npm i -g autorest +npm install -g autorest ``` ### Generation - -Generating client SDKs from Swagger involves using the `autorest` command installed to the command line above while -also referencing the Java AutoRest packages, either the local installation performed above or using a released version. - -#### Local Installation - -Using a local installation of Java AutoRest allows for the most up-to-date code to be used and allows for debugging of -code generation, see the [autorest.java usage](https://github.com/Azure/autorest.java#usage) for more details. - -```ps -cd -autorest --use= -``` - -#### Released Version - -Using a released build of Java AutoRest ensures that a well-tested and durable implementation is used, as rebuilding -the local installation of Java AutoRest won't affect code generation as it would above. - ```ps cd -autorest --java --use:@autorest/java@4.1.* +autorest ``` ### Code generation settings ``` yaml -use: '@autorest/java@4.1.15' +use: '@autorest/java@4.1.39' input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/c8d9a26a2857828e095903efa72512cf3a76c15d/specification/containerregistry/data-plane/Azure.ContainerRegistry/stable/2021-07-01/containerregistry.json java: true output-folder: ./.. diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/README.md b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/README.md index be74df69b8148..54a6fc0e9fdc0 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/README.md +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/README.md @@ -2,25 +2,33 @@ > see https://aka.ms/autorest +This is the AutoRest configuration file for Device Update for IoT Hub. + +--- +## Getting Started +To build the SDK for Device Update for IoT Hub, simply [Install AutoRest](https://aka.ms/autorest) and +in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + ### Setup ```ps -Fork and clone https://github.com/Azure/autorest.java -git checkout main -git submodule update --init --recursive -mvn package -Dlocal -npm install npm install -g autorest ``` ### Generation ```ps cd -autorest --java --use=C:/work/autorest.java +autorest ``` ## Generate autorest code ```yaml -use: '@autorest/java@4.1.17' +use: '@autorest/java@4.1.39' input-file: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/stable/2022-10-01/deviceupdate.json java: true output-folder: ./ diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceManagementAsyncClient.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceManagementAsyncClient.java new file mode 100644 index 0000000000000..8e41002143a91 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceManagementAsyncClient.java @@ -0,0 +1,1763 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.PollerFlux; +import com.azure.iot.deviceupdate.implementation.DeviceManagementsImpl; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous DeviceUpdateClient type. + */ +@ServiceClient(builder = DeviceManagementClientBuilder.class, isAsync = true) +public final class DeviceManagementAsyncClient { + @Generated + private final DeviceManagementsImpl serviceClient; + + /** + * Initializes an instance of DeviceManagementAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + DeviceManagementAsyncClient(DeviceManagementsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Gets a list of all device classes (sets of devices compatible with the same updates based on the model Id and + * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device + * Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of device classes returned. You can filter on + * friendly name.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device classes (sets of devices compatible with the same updates based on the model Id and + * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device + * Update for IoT Hub as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDeviceClasses(RequestOptions requestOptions) { + return this.serviceClient.listDeviceClassesAsync(requestOptions); + } + + /** + * Gets the properties of a device class. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the properties of a device class along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeviceClassWithResponse(String deviceClassId, RequestOptions requestOptions) { + return this.serviceClient.getDeviceClassWithResponseAsync(deviceClassId, requestOptions); + } + + /** + * Update device class details. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     friendlyName: String (Required)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param deviceClassPatch The device class json merge patch body. Currently only supports patching friendlyName. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device class metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateDeviceClassWithResponse(String deviceClassId, BinaryData deviceClassPatch, + RequestOptions requestOptions) { + return this.serviceClient.updateDeviceClassWithResponseAsync(deviceClassId, deviceClassPatch, requestOptions); + } + + /** + * Deletes a device class. Device classes are created automatically when Device Update-enabled devices are connected + * to the hub but are not automatically cleaned up since they are referenced by DeviceClassSubgroups. If the user + * has deleted all DeviceClassSubgroups for a device class they can also delete the device class to remove the + * records from the system and to stop checking the compatibility of this device class with new updates. If a device + * is ever reconnected for this device class it will be re-created. + * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteDeviceClassWithResponse(String deviceClassId, RequestOptions requestOptions) { + return this.serviceClient.deleteDeviceClassWithResponseAsync(deviceClassId, requestOptions); + } + + /** + * Gets a list of installable updates for a device class. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of installable updates for a device class as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listInstallableUpdatesForDeviceClass(String deviceClassId, + RequestOptions requestOptions) { + return this.serviceClient.listInstallableUpdatesForDeviceClassAsync(deviceClassId, requestOptions); + } + + /** + * Gets a list of devices connected to Device Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of devices returned. You can filter on + * GroupId, DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to query for devices with + * no deployment status (that have never been deployed to).
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of devices connected to Device Update for IoT Hub as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDevices(RequestOptions requestOptions) { + return this.serviceClient.listDevicesAsync(requestOptions); + } + + /** + * Import existing devices from IoT Hub. This is a long-running-operation; use Operation-Location response header + * value to check for operation status. + *

Request Body Schema

+ * + *
+     * {@code
+     * String(Devices/Modules/All)
+     * }
+     * 
+ * + * @param importType The types of devices to import. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginImportDevices(BinaryData importType, RequestOptions requestOptions) { + return this.serviceClient.beginImportDevicesAsync(importType, requestOptions); + } + + /** + * Gets the device properties and latest deployment status for a device connected to Device Update for IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceId Device identifier in Azure IoT Hub. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device properties and latest deployment status for a device connected to Device Update for IoT Hub + * along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeviceWithResponse(String deviceId, RequestOptions requestOptions) { + return this.serviceClient.getDeviceWithResponseAsync(deviceId, requestOptions); + } + + /** + * Gets the device module properties and latest deployment status for a device module connected to Device Update for + * IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceId Device identifier in Azure IoT Hub. + * @param moduleId Device module identifier in Azure IoT Hub. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device module properties and latest deployment status for a device module connected to Device Update + * for IoT Hub along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeviceModuleWithResponse(String deviceId, String moduleId, + RequestOptions requestOptions) { + return this.serviceClient.getDeviceModuleWithResponseAsync(deviceId, moduleId, requestOptions); + } + + /** + * Gets the breakdown of how many devices are on their latest update, have new updates available, or are in progress + * receiving new updates. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     totalDeviceCount: int (Required)
+     *     onLatestUpdateDeviceCount: int (Required)
+     *     newUpdatesAvailableDeviceCount: int (Required)
+     *     updatesInProgressDeviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the breakdown of how many devices are on their latest update, have new updates available, or are in + * progress receiving new updates along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getUpdateComplianceWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getUpdateComplianceWithResponseAsync(requestOptions); + } + + /** + * Gets a list of all device groups. The $default group will always be returned first. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of groups returned. You can order by groupId, + * deviceCount, createdDate, subgroupsWithNewUpdatesAvailableCount, subgroupsWithUpdatesInProgressCount, or + * subgroupsOnLatestUpdateCount.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     groupType: String(IoTHubTag/DefaultNoTag) (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+     *     subgroupsWithUpdatesInProgressCount: Integer (Optional)
+     *     subgroupsWithOnLatestUpdateCount: Integer (Optional)
+     *     deployments (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device groups as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listGroups(RequestOptions requestOptions) { + return this.serviceClient.listGroupsAsync(requestOptions); + } + + /** + * Gets the device group properties. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     groupType: String(IoTHubTag/DefaultNoTag) (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+     *     subgroupsWithUpdatesInProgressCount: Integer (Optional)
+     *     subgroupsWithOnLatestUpdateCount: Integer (Optional)
+     *     deployments (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device group properties along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getGroupWithResponse(String groupId, RequestOptions requestOptions) { + return this.serviceClient.getGroupWithResponseAsync(groupId, requestOptions); + } + + /** + * Deletes a device group. This group is automatically created when a Device Update-enabled device is connected to + * the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are + * retained for history purposes. Users can call this method to delete a group if they do not need to retain any of + * the history of the group and no longer need it. If a device is ever connected again for this group after the + * group was deleted it will be automatically re-created but there will be no history. + * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteGroupWithResponse(String groupId, RequestOptions requestOptions) { + return this.serviceClient.deleteGroupWithResponseAsync(groupId, requestOptions); + } + + /** + * Get device group update compliance information such as how many devices are on their latest update, how many need + * new updates, and how many are in progress on receiving a new update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     totalDeviceCount: int (Required)
+     *     onLatestUpdateDeviceCount: int (Required)
+     *     newUpdatesAvailableDeviceCount: int (Required)
+     *     updatesInProgressDeviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device group update compliance information such as how many devices are on their latest update, how many + * need new updates, and how many are in progress on receiving a new update along with {@link Response} on + * successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getUpdateComplianceForGroupWithResponse(String groupId, + RequestOptions requestOptions) { + return this.serviceClient.getUpdateComplianceForGroupWithResponseAsync(groupId, requestOptions); + } + + /** + * Get the best available updates for a device group and a count of how many devices need each update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the best available updates for a device group and a count of how many devices need each update as + * paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listBestUpdatesForGroup(String groupId, RequestOptions requestOptions) { + return this.serviceClient.listBestUpdatesForGroupAsync(groupId, requestOptions); + } + + /** + * Gets a list of deployments for a device group. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of deployments returned. You can order by start + * date.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of deployments for a device group as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDeploymentsForGroup(String groupId, RequestOptions requestOptions) { + return this.serviceClient.listDeploymentsForGroupAsync(groupId, requestOptions); + } + + /** + * Gets the deployment properties. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the deployment properties along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeploymentWithResponse(String groupId, String deploymentId, + RequestOptions requestOptions) { + return this.serviceClient.getDeploymentWithResponseAsync(groupId, deploymentId, requestOptions); + } + + /** + * Creates or updates a deployment. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param deployment The deployment properties. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return deployment metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateDeploymentWithResponse(String groupId, String deploymentId, + BinaryData deployment, RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateDeploymentWithResponseAsync(groupId, deploymentId, deployment, + requestOptions); + } + + /** + * Deletes a deployment. + * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteDeploymentWithResponse(String groupId, String deploymentId, + RequestOptions requestOptions) { + return this.serviceClient.deleteDeploymentWithResponseAsync(groupId, deploymentId, requestOptions); + } + + /** + * Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deploymentState: String(Active/ActiveWithSubgroupFailures/Failed/Inactive/Canceled) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     subgroupStatus (Required): [
+     *          (Required){
+     *             groupId: String (Required)
+     *             deviceClassId: String (Required)
+     *             deploymentState: String(Active/Failed/Inactive/Canceled) (Required)
+     *             error (Optional): (recursive schema, see error above)
+     *             totalDevices: Integer (Optional)
+     *             devicesInProgressCount: Integer (Optional)
+     *             devicesCompletedFailedCount: Integer (Optional)
+     *             devicesCompletedSucceededCount: Integer (Optional)
+     *             devicesCanceledCount: Integer (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeploymentStatusWithResponse(String groupId, String deploymentId, + RequestOptions requestOptions) { + return this.serviceClient.getDeploymentStatusWithResponseAsync(groupId, deploymentId, requestOptions); + } + + /** + * Get the device class subgroups for the group. A device class subgroup is the set of devices within the group that + * share the same device class. All devices within the same device class are compatible with the same updates. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of device class subgroups returned. You can + * filter on compat properties by name and value. (i.e. filter=compatProperties/propertyName1 eq 'value1' and + * compatProperties/propertyName2 eq 'value2')
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     groupId: String (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     deploymentId: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device class subgroups for the group as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDeviceClassSubgroupsForGroup(String groupId, RequestOptions requestOptions) { + return this.serviceClient.listDeviceClassSubgroupsForGroupAsync(groupId, requestOptions); + } + + /** + * Gets device class subgroup details. A device class subgroup is the set of devices within the group that share the + * same device class. All devices within the same device class are compatible with the same updates. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     groupId: String (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     deploymentId: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device class subgroup details along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + RequestOptions requestOptions) { + return this.serviceClient.getDeviceClassSubgroupWithResponseAsync(groupId, deviceClassId, requestOptions); + } + + /** + * Deletes a device class subgroup. This subgroup is automatically created when a Device Update-enabled device is + * connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned + * up but are retained for history purposes. Users can call this method to delete a subgroup if they do not need to + * retain any of the history of the subgroup and no longer need it. If a device is ever connected again for this + * subgroup after the subgroup was deleted it will be automatically re-created but there will be no history. + * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + RequestOptions requestOptions) { + return this.serviceClient.deleteDeviceClassSubgroupWithResponseAsync(groupId, deviceClassId, requestOptions); + } + + /** + * Get device class subgroup update compliance information such as how many devices are on their latest update, how + * many need new updates, and how many are in progress on receiving a new update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     totalDeviceCount: int (Required)
+     *     onLatestUpdateDeviceCount: int (Required)
+     *     newUpdatesAvailableDeviceCount: int (Required)
+     *     updatesInProgressDeviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device class subgroup update compliance information such as how many devices are on their latest update, + * how many need new updates, and how many are in progress on receiving a new update along with {@link Response} on + * successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeviceClassSubgroupUpdateComplianceWithResponse(String groupId, + String deviceClassId, RequestOptions requestOptions) { + return this.serviceClient.getDeviceClassSubgroupUpdateComplianceWithResponseAsync(groupId, deviceClassId, + requestOptions); + } + + /** + * Get the best available update for a device class subgroup and a count of how many devices need this update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the best available update for a device class subgroup and a count of how many devices need this update + * along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getBestUpdatesForDeviceClassSubgroupWithResponse(String groupId, + String deviceClassId, RequestOptions requestOptions) { + return this.serviceClient.getBestUpdatesForDeviceClassSubgroupWithResponseAsync(groupId, deviceClassId, + requestOptions); + } + + /** + * Gets a list of deployments for a device class subgroup. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of deployments returned. You can order by start + * date.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of deployments for a device class subgroup as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDeploymentsForDeviceClassSubgroup(String groupId, String deviceClassId, + RequestOptions requestOptions) { + return this.serviceClient.listDeploymentsForDeviceClassSubgroupAsync(groupId, deviceClassId, requestOptions); + } + + /** + * Gets the deployment properties. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the deployment properties along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeploymentForDeviceClassSubgroupWithResponse(String groupId, + String deviceClassId, String deploymentId, RequestOptions requestOptions) { + return this.serviceClient.getDeploymentForDeviceClassSubgroupWithResponseAsync(groupId, deviceClassId, + deploymentId, requestOptions); + } + + /** + * Deletes a device class subgroup deployment. + * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteDeploymentForDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + String deploymentId, RequestOptions requestOptions) { + return this.serviceClient.deleteDeploymentForDeviceClassSubgroupWithResponseAsync(groupId, deviceClassId, + deploymentId, requestOptions); + } + + /** + * Stops a deployment. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return deployment metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stopDeploymentWithResponse(String groupId, String deviceClassId, + String deploymentId, RequestOptions requestOptions) { + return this.serviceClient.stopDeploymentWithResponseAsync(groupId, deviceClassId, deploymentId, requestOptions); + } + + /** + * Retries a deployment with failed devices. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return deployment metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> retryDeploymentWithResponse(String groupId, String deviceClassId, + String deploymentId, RequestOptions requestOptions) { + return this.serviceClient.retryDeploymentWithResponseAsync(groupId, deviceClassId, deploymentId, + requestOptions); + } + + /** + * Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     deploymentState: String(Active/Failed/Inactive/Canceled) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     totalDevices: Integer (Optional)
+     *     devicesInProgressCount: Integer (Optional)
+     *     devicesCompletedFailedCount: Integer (Optional)
+     *     devicesCompletedSucceededCount: Integer (Optional)
+     *     devicesCanceledCount: Integer (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeviceClassSubgroupDeploymentStatusWithResponse(String groupId, + String deviceClassId, String deploymentId, RequestOptions requestOptions) { + return this.serviceClient.getDeviceClassSubgroupDeploymentStatusWithResponseAsync(groupId, deviceClassId, + deploymentId, requestOptions); + } + + /** + * Gets a list of devices in a deployment along with their state. Useful for getting a list of failed devices. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of deployment device states returned. You can + * filter on deviceId and moduleId and/or deviceState.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     retryCount: int (Required)
+     *     movedOnToNewDeployment: boolean (Required)
+     *     deviceState: String(Succeeded/InProgress/Canceled/Failed) (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of devices in a deployment along with their state as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDeviceStatesForDeviceClassSubgroupDeployment(String groupId, String deviceClassId, + String deploymentId, RequestOptions requestOptions) { + return this.serviceClient.listDeviceStatesForDeviceClassSubgroupDeploymentAsync(groupId, deviceClassId, + deploymentId, requestOptions); + } + + /** + * Retrieve operation status. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param operationId Operation identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return operation metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOperationStatusWithResponse(String operationId, + RequestOptions requestOptions) { + return this.serviceClient.getOperationStatusWithResponseAsync(operationId, requestOptions); + } + + /** + * Get a list of all device import operations. Completed operations are kept for 7 days before auto-deleted. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of operations returned. Only one specific + * filter is supported: "status eq 'NotStarted' or status eq 'Running'"
topIntegerNoSpecifies a non-negative integer n that limits the number of items + * returned from a collection. The service returns the number of available items up to but not greater than the + * specified value n.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device import operations as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listOperationStatuses(RequestOptions requestOptions) { + return this.serviceClient.listOperationStatusesAsync(requestOptions); + } + + /** + * Start the device diagnostics log collection on specified devices. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param logCollectionId Log collection identifier. + * @param logCollection The log collection properties. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return diagnostics request body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> startLogCollectionWithResponse(String logCollectionId, BinaryData logCollection, + RequestOptions requestOptions) { + return this.serviceClient.startLogCollectionWithResponseAsync(logCollectionId, logCollection, requestOptions); + } + + /** + * Get the device diagnostics log collection. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param logCollectionId Log collection identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device diagnostics log collection along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLogCollectionWithResponse(String logCollectionId, + RequestOptions requestOptions) { + return this.serviceClient.getLogCollectionWithResponseAsync(logCollectionId, requestOptions); + } + + /** + * Get all device diagnostics log collections. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all device diagnostics log collections as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listLogCollections(RequestOptions requestOptions) { + return this.serviceClient.listLogCollectionsAsync(requestOptions); + } + + /** + * Get log collection with detailed status. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     *     deviceStatus (Optional): [
+     *          (Optional){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *             status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *             resultCode: String (Optional)
+     *             extendedResultCode: String (Optional)
+     *             logLocation: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param logCollectionId Log collection identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return log collection with detailed status along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLogCollectionDetailedStatusWithResponse(String logCollectionId, + RequestOptions requestOptions) { + return this.serviceClient.getLogCollectionDetailedStatusWithResponseAsync(logCollectionId, requestOptions); + } + + /** + * Get list of device health. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     state: String(healthy/unhealthy) (Required)
+     *     digitalTwinModelId: String (Optional)
+     *     healthChecks (Required): [
+     *          (Required){
+     *             name: String (Optional)
+     *             result: String(success/userError) (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param filter Restricts the set of devices for which device health is returned. You can filter on status, device + * id and module id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of device health as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listHealthOfDevices(String filter, RequestOptions requestOptions) { + return this.serviceClient.listHealthOfDevicesAsync(filter, requestOptions); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClient.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClient.java new file mode 100644 index 0000000000000..90816a6c7fffd --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClient.java @@ -0,0 +1,1757 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.iot.deviceupdate.implementation.DeviceManagementsImpl; + +/** + * Initializes a new instance of the synchronous DeviceUpdateClient type. + */ +@ServiceClient(builder = DeviceManagementClientBuilder.class) +public final class DeviceManagementClient { + @Generated + private final DeviceManagementsImpl serviceClient; + + /** + * Initializes an instance of DeviceManagementClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + DeviceManagementClient(DeviceManagementsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Gets a list of all device classes (sets of devices compatible with the same updates based on the model Id and + * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device + * Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of device classes returned. You can filter on + * friendly name.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device classes (sets of devices compatible with the same updates based on the model Id and + * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device + * Update for IoT Hub as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeviceClasses(RequestOptions requestOptions) { + return this.serviceClient.listDeviceClasses(requestOptions); + } + + /** + * Gets the properties of a device class. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the properties of a device class along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceClassWithResponse(String deviceClassId, RequestOptions requestOptions) { + return this.serviceClient.getDeviceClassWithResponse(deviceClassId, requestOptions); + } + + /** + * Update device class details. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     friendlyName: String (Required)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param deviceClassPatch The device class json merge patch body. Currently only supports patching friendlyName. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device class metadata along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateDeviceClassWithResponse(String deviceClassId, BinaryData deviceClassPatch, + RequestOptions requestOptions) { + return this.serviceClient.updateDeviceClassWithResponse(deviceClassId, deviceClassPatch, requestOptions); + } + + /** + * Deletes a device class. Device classes are created automatically when Device Update-enabled devices are connected + * to the hub but are not automatically cleaned up since they are referenced by DeviceClassSubgroups. If the user + * has deleted all DeviceClassSubgroups for a device class they can also delete the device class to remove the + * records from the system and to stop checking the compatibility of this device class with new updates. If a device + * is ever reconnected for this device class it will be re-created. + * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDeviceClassWithResponse(String deviceClassId, RequestOptions requestOptions) { + return this.serviceClient.deleteDeviceClassWithResponse(deviceClassId, requestOptions); + } + + /** + * Gets a list of installable updates for a device class. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of installable updates for a device class as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstallableUpdatesForDeviceClass(String deviceClassId, + RequestOptions requestOptions) { + return this.serviceClient.listInstallableUpdatesForDeviceClass(deviceClassId, requestOptions); + } + + /** + * Gets a list of devices connected to Device Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of devices returned. You can filter on + * GroupId, DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to query for devices with + * no deployment status (that have never been deployed to).
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of devices connected to Device Update for IoT Hub as paginated response with + * {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDevices(RequestOptions requestOptions) { + return this.serviceClient.listDevices(requestOptions); + } + + /** + * Import existing devices from IoT Hub. This is a long-running-operation; use Operation-Location response header + * value to check for operation status. + *

Request Body Schema

+ * + *
+     * {@code
+     * String(Devices/Modules/All)
+     * }
+     * 
+ * + * @param importType The types of devices to import. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginImportDevices(BinaryData importType, RequestOptions requestOptions) { + return this.serviceClient.beginImportDevices(importType, requestOptions); + } + + /** + * Gets the device properties and latest deployment status for a device connected to Device Update for IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceId Device identifier in Azure IoT Hub. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device properties and latest deployment status for a device connected to Device Update for IoT Hub + * along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceWithResponse(String deviceId, RequestOptions requestOptions) { + return this.serviceClient.getDeviceWithResponse(deviceId, requestOptions); + } + + /** + * Gets the device module properties and latest deployment status for a device module connected to Device Update for + * IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceId Device identifier in Azure IoT Hub. + * @param moduleId Device module identifier in Azure IoT Hub. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device module properties and latest deployment status for a device module connected to Device Update + * for IoT Hub along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceModuleWithResponse(String deviceId, String moduleId, + RequestOptions requestOptions) { + return this.serviceClient.getDeviceModuleWithResponse(deviceId, moduleId, requestOptions); + } + + /** + * Gets the breakdown of how many devices are on their latest update, have new updates available, or are in progress + * receiving new updates. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     totalDeviceCount: int (Required)
+     *     onLatestUpdateDeviceCount: int (Required)
+     *     newUpdatesAvailableDeviceCount: int (Required)
+     *     updatesInProgressDeviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the breakdown of how many devices are on their latest update, have new updates available, or are in + * progress receiving new updates along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpdateComplianceWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getUpdateComplianceWithResponse(requestOptions); + } + + /** + * Gets a list of all device groups. The $default group will always be returned first. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of groups returned. You can order by groupId, + * deviceCount, createdDate, subgroupsWithNewUpdatesAvailableCount, subgroupsWithUpdatesInProgressCount, or + * subgroupsOnLatestUpdateCount.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     groupType: String(IoTHubTag/DefaultNoTag) (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+     *     subgroupsWithUpdatesInProgressCount: Integer (Optional)
+     *     subgroupsWithOnLatestUpdateCount: Integer (Optional)
+     *     deployments (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device groups as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGroups(RequestOptions requestOptions) { + return this.serviceClient.listGroups(requestOptions); + } + + /** + * Gets the device group properties. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     groupType: String(IoTHubTag/DefaultNoTag) (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+     *     subgroupsWithUpdatesInProgressCount: Integer (Optional)
+     *     subgroupsWithOnLatestUpdateCount: Integer (Optional)
+     *     deployments (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device group properties along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getGroupWithResponse(String groupId, RequestOptions requestOptions) { + return this.serviceClient.getGroupWithResponse(groupId, requestOptions); + } + + /** + * Deletes a device group. This group is automatically created when a Device Update-enabled device is connected to + * the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are + * retained for history purposes. Users can call this method to delete a group if they do not need to retain any of + * the history of the group and no longer need it. If a device is ever connected again for this group after the + * group was deleted it will be automatically re-created but there will be no history. + * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteGroupWithResponse(String groupId, RequestOptions requestOptions) { + return this.serviceClient.deleteGroupWithResponse(groupId, requestOptions); + } + + /** + * Get device group update compliance information such as how many devices are on their latest update, how many need + * new updates, and how many are in progress on receiving a new update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     totalDeviceCount: int (Required)
+     *     onLatestUpdateDeviceCount: int (Required)
+     *     newUpdatesAvailableDeviceCount: int (Required)
+     *     updatesInProgressDeviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device group update compliance information such as how many devices are on their latest update, how many + * need new updates, and how many are in progress on receiving a new update along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpdateComplianceForGroupWithResponse(String groupId, RequestOptions requestOptions) { + return this.serviceClient.getUpdateComplianceForGroupWithResponse(groupId, requestOptions); + } + + /** + * Get the best available updates for a device group and a count of how many devices need each update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the best available updates for a device group and a count of how many devices need each update as + * paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBestUpdatesForGroup(String groupId, RequestOptions requestOptions) { + return this.serviceClient.listBestUpdatesForGroup(groupId, requestOptions); + } + + /** + * Gets a list of deployments for a device group. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of deployments returned. You can order by start + * date.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of deployments for a device group as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeploymentsForGroup(String groupId, RequestOptions requestOptions) { + return this.serviceClient.listDeploymentsForGroup(groupId, requestOptions); + } + + /** + * Gets the deployment properties. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the deployment properties along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeploymentWithResponse(String groupId, String deploymentId, + RequestOptions requestOptions) { + return this.serviceClient.getDeploymentWithResponse(groupId, deploymentId, requestOptions); + } + + /** + * Creates or updates a deployment. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param deployment The deployment properties. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return deployment metadata along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateDeploymentWithResponse(String groupId, String deploymentId, + BinaryData deployment, RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateDeploymentWithResponse(groupId, deploymentId, deployment, + requestOptions); + } + + /** + * Deletes a deployment. + * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDeploymentWithResponse(String groupId, String deploymentId, + RequestOptions requestOptions) { + return this.serviceClient.deleteDeploymentWithResponse(groupId, deploymentId, requestOptions); + } + + /** + * Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deploymentState: String(Active/ActiveWithSubgroupFailures/Failed/Inactive/Canceled) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     subgroupStatus (Required): [
+     *          (Required){
+     *             groupId: String (Required)
+     *             deviceClassId: String (Required)
+     *             deploymentState: String(Active/Failed/Inactive/Canceled) (Required)
+     *             error (Optional): (recursive schema, see error above)
+     *             totalDevices: Integer (Optional)
+     *             devicesInProgressCount: Integer (Optional)
+     *             devicesCompletedFailedCount: Integer (Optional)
+     *             devicesCompletedSucceededCount: Integer (Optional)
+     *             devicesCanceledCount: Integer (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeploymentStatusWithResponse(String groupId, String deploymentId, + RequestOptions requestOptions) { + return this.serviceClient.getDeploymentStatusWithResponse(groupId, deploymentId, requestOptions); + } + + /** + * Get the device class subgroups for the group. A device class subgroup is the set of devices within the group that + * share the same device class. All devices within the same device class are compatible with the same updates. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of device class subgroups returned. You can + * filter on compat properties by name and value. (i.e. filter=compatProperties/propertyName1 eq 'value1' and + * compatProperties/propertyName2 eq 'value2')
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     groupId: String (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     deploymentId: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device class subgroups for the group as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeviceClassSubgroupsForGroup(String groupId, RequestOptions requestOptions) { + return this.serviceClient.listDeviceClassSubgroupsForGroup(groupId, requestOptions); + } + + /** + * Gets device class subgroup details. A device class subgroup is the set of devices within the group that share the + * same device class. All devices within the same device class are compatible with the same updates. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     groupId: String (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     deploymentId: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device class subgroup details along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + RequestOptions requestOptions) { + return this.serviceClient.getDeviceClassSubgroupWithResponse(groupId, deviceClassId, requestOptions); + } + + /** + * Deletes a device class subgroup. This subgroup is automatically created when a Device Update-enabled device is + * connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned + * up but are retained for history purposes. Users can call this method to delete a subgroup if they do not need to + * retain any of the history of the subgroup and no longer need it. If a device is ever connected again for this + * subgroup after the subgroup was deleted it will be automatically re-created but there will be no history. + * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + RequestOptions requestOptions) { + return this.serviceClient.deleteDeviceClassSubgroupWithResponse(groupId, deviceClassId, requestOptions); + } + + /** + * Get device class subgroup update compliance information such as how many devices are on their latest update, how + * many need new updates, and how many are in progress on receiving a new update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     totalDeviceCount: int (Required)
+     *     onLatestUpdateDeviceCount: int (Required)
+     *     newUpdatesAvailableDeviceCount: int (Required)
+     *     updatesInProgressDeviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device class subgroup update compliance information such as how many devices are on their latest update, + * how many need new updates, and how many are in progress on receiving a new update along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceClassSubgroupUpdateComplianceWithResponse(String groupId, String deviceClassId, + RequestOptions requestOptions) { + return this.serviceClient.getDeviceClassSubgroupUpdateComplianceWithResponse(groupId, deviceClassId, + requestOptions); + } + + /** + * Get the best available update for a device class subgroup and a count of how many devices need this update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the best available update for a device class subgroup and a count of how many devices need this update + * along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBestUpdatesForDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + RequestOptions requestOptions) { + return this.serviceClient.getBestUpdatesForDeviceClassSubgroupWithResponse(groupId, deviceClassId, + requestOptions); + } + + /** + * Gets a list of deployments for a device class subgroup. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of deployments returned. You can order by start + * date.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of deployments for a device class subgroup as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeploymentsForDeviceClassSubgroup(String groupId, String deviceClassId, + RequestOptions requestOptions) { + return this.serviceClient.listDeploymentsForDeviceClassSubgroup(groupId, deviceClassId, requestOptions); + } + + /** + * Gets the deployment properties. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the deployment properties along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeploymentForDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + String deploymentId, RequestOptions requestOptions) { + return this.serviceClient.getDeploymentForDeviceClassSubgroupWithResponse(groupId, deviceClassId, deploymentId, + requestOptions); + } + + /** + * Deletes a device class subgroup deployment. + * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDeploymentForDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + String deploymentId, RequestOptions requestOptions) { + return this.serviceClient.deleteDeploymentForDeviceClassSubgroupWithResponse(groupId, deviceClassId, + deploymentId, requestOptions); + } + + /** + * Stops a deployment. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return deployment metadata along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopDeploymentWithResponse(String groupId, String deviceClassId, String deploymentId, + RequestOptions requestOptions) { + return this.serviceClient.stopDeploymentWithResponse(groupId, deviceClassId, deploymentId, requestOptions); + } + + /** + * Retries a deployment with failed devices. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return deployment metadata along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response retryDeploymentWithResponse(String groupId, String deviceClassId, String deploymentId, + RequestOptions requestOptions) { + return this.serviceClient.retryDeploymentWithResponse(groupId, deviceClassId, deploymentId, requestOptions); + } + + /** + * Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     deploymentState: String(Active/Failed/Inactive/Canceled) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     totalDevices: Integer (Optional)
+     *     devicesInProgressCount: Integer (Optional)
+     *     devicesCompletedFailedCount: Integer (Optional)
+     *     devicesCompletedSucceededCount: Integer (Optional)
+     *     devicesCanceledCount: Integer (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceClassSubgroupDeploymentStatusWithResponse(String groupId, String deviceClassId, + String deploymentId, RequestOptions requestOptions) { + return this.serviceClient.getDeviceClassSubgroupDeploymentStatusWithResponse(groupId, deviceClassId, + deploymentId, requestOptions); + } + + /** + * Gets a list of devices in a deployment along with their state. Useful for getting a list of failed devices. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of deployment device states returned. You can + * filter on deviceId and moduleId and/or deviceState.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     retryCount: int (Required)
+     *     movedOnToNewDeployment: boolean (Required)
+     *     deviceState: String(Succeeded/InProgress/Canceled/Failed) (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of devices in a deployment along with their state as paginated response with + * {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeviceStatesForDeviceClassSubgroupDeployment(String groupId, + String deviceClassId, String deploymentId, RequestOptions requestOptions) { + return this.serviceClient.listDeviceStatesForDeviceClassSubgroupDeployment(groupId, deviceClassId, deploymentId, + requestOptions); + } + + /** + * Retrieve operation status. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param operationId Operation identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return operation metadata along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOperationStatusWithResponse(String operationId, RequestOptions requestOptions) { + return this.serviceClient.getOperationStatusWithResponse(operationId, requestOptions); + } + + /** + * Get a list of all device import operations. Completed operations are kept for 7 days before auto-deleted. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of operations returned. Only one specific + * filter is supported: "status eq 'NotStarted' or status eq 'Running'"
topIntegerNoSpecifies a non-negative integer n that limits the number of items + * returned from a collection. The service returns the number of available items up to but not greater than the + * specified value n.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device import operations as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOperationStatuses(RequestOptions requestOptions) { + return this.serviceClient.listOperationStatuses(requestOptions); + } + + /** + * Start the device diagnostics log collection on specified devices. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param logCollectionId Log collection identifier. + * @param logCollection The log collection properties. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return diagnostics request body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response startLogCollectionWithResponse(String logCollectionId, BinaryData logCollection, + RequestOptions requestOptions) { + return this.serviceClient.startLogCollectionWithResponse(logCollectionId, logCollection, requestOptions); + } + + /** + * Get the device diagnostics log collection. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param logCollectionId Log collection identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device diagnostics log collection along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getLogCollectionWithResponse(String logCollectionId, RequestOptions requestOptions) { + return this.serviceClient.getLogCollectionWithResponse(logCollectionId, requestOptions); + } + + /** + * Get all device diagnostics log collections. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all device diagnostics log collections as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listLogCollections(RequestOptions requestOptions) { + return this.serviceClient.listLogCollections(requestOptions); + } + + /** + * Get log collection with detailed status. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     *     deviceStatus (Optional): [
+     *          (Optional){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *             status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *             resultCode: String (Optional)
+     *             extendedResultCode: String (Optional)
+     *             logLocation: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param logCollectionId Log collection identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return log collection with detailed status along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getLogCollectionDetailedStatusWithResponse(String logCollectionId, + RequestOptions requestOptions) { + return this.serviceClient.getLogCollectionDetailedStatusWithResponse(logCollectionId, requestOptions); + } + + /** + * Get list of device health. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     state: String(healthy/unhealthy) (Required)
+     *     digitalTwinModelId: String (Optional)
+     *     healthChecks (Required): [
+     *          (Required){
+     *             name: String (Optional)
+     *             result: String(success/userError) (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param filter Restricts the set of devices for which device health is returned. You can filter on status, device + * id and module id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of device health as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHealthOfDevices(String filter, RequestOptions requestOptions) { + return this.serviceClient.listHealthOfDevices(filter, requestOptions); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClientBuilder.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClientBuilder.java new file mode 100644 index 0000000000000..7c9de28741385 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClientBuilder.java @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +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.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +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.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.iot.deviceupdate.implementation.DeviceUpdateClientImpl; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the DeviceManagementClient type. + */ +@ServiceClientBuilder(serviceClients = { DeviceManagementClient.class, DeviceManagementAsyncClient.class }) +public final class DeviceManagementClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://api.adu.microsoft.com/.default" }; + + @Generated + private static final Map PROPERTIES = CoreUtils.getProperties("azure-iot-deviceupdate.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the DeviceManagementClientBuilder. + */ + @Generated + public DeviceManagementClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceManagementClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceManagementClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceManagementClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceManagementClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceManagementClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceManagementClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceManagementClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceManagementClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The Device Update for IoT Hub account instance identifier. + */ + @Generated + private String instanceId; + + /** + * Sets The Device Update for IoT Hub account instance identifier. + * + * @param instanceId the instanceId value. + * @return the DeviceManagementClientBuilder. + */ + @Generated + public DeviceManagementClientBuilder instanceId(String instanceId) { + this.instanceId = instanceId; + return this; + } + + /* + * Service version + */ + @Generated + private DeviceUpdateServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the DeviceManagementClientBuilder. + */ + @Generated + public DeviceManagementClientBuilder serviceVersion(DeviceUpdateServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the DeviceManagementClientBuilder. + */ + @Generated + public DeviceManagementClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of DeviceUpdateClientImpl with the provided parameters. + * + * @return an instance of DeviceUpdateClientImpl. + */ + @Generated + private DeviceUpdateClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + DeviceUpdateServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : DeviceUpdateServiceVersion.getLatest(); + DeviceUpdateClientImpl client = new DeviceUpdateClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, this.instanceId, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + Objects.requireNonNull(instanceId, "'instanceId' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of DeviceManagementAsyncClient class. + * + * @return an instance of DeviceManagementAsyncClient. + */ + @Generated + public DeviceManagementAsyncClient buildAsyncClient() { + return new DeviceManagementAsyncClient(buildInnerClient().getDeviceManagements()); + } + + /** + * Builds an instance of DeviceManagementClient class. + * + * @return an instance of DeviceManagementClient. + */ + @Generated + public DeviceManagementClient buildClient() { + return new DeviceManagementClient(buildInnerClient().getDeviceManagements()); + } + + private static final ClientLogger LOGGER = new ClientLogger(DeviceManagementClientBuilder.class); +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateAsyncClient.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateAsyncClient.java new file mode 100644 index 0000000000000..9fec7aa679b48 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateAsyncClient.java @@ -0,0 +1,606 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.PollerFlux; +import com.azure.iot.deviceupdate.implementation.DeviceUpdatesImpl; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous DeviceUpdateClient type. + */ +@ServiceClient(builder = DeviceUpdateClientBuilder.class, isAsync = true) +public final class DeviceUpdateAsyncClient { + @Generated + private final DeviceUpdatesImpl serviceClient; + + /** + * Initializes an instance of DeviceUpdateAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + DeviceUpdateAsyncClient(DeviceUpdatesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a list of all updates that have been imported to Device Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
searchStringNoRequest updates matching a free-text search + * expression.
filterStringNoOptional to filter updates by isDeployable property.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all updates that have been imported to Device Update for IoT Hub as paginated response with + * {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listUpdates(RequestOptions requestOptions) { + return this.serviceClient.listUpdatesAsync(requestOptions); + } + + /** + * Import new update version. This is a long-running-operation; use Operation-Location response header value to + * check for operation status. + *

Request Body Schema

+ * + *
+     * {@code
+     * [
+     *      (Required){
+     *         importManifest (Required): {
+     *             url: String (Required)
+     *             sizeInBytes: long (Required)
+     *             hashes (Required): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *         friendlyName: String (Optional)
+     *         files (Optional): [
+     *              (Optional){
+     *                 filename: String (Required)
+     *                 url: String (Required)
+     *             }
+     *         ]
+     *     }
+     * ]
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param updateToImport The update to be imported (see schema + * https://json.schemastore.org/azure-deviceupdate-import-manifest-5.0.json for details). + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of update metadata. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginImportUpdate(BinaryData updateToImport, + RequestOptions requestOptions) { + return this.serviceClient.beginImportUpdateAsync(updateToImport, requestOptions); + } + + /** + * Get a specific update version. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a specific update version along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getUpdateWithResponse(String provider, String name, String version, + RequestOptions requestOptions) { + return this.serviceClient.getUpdateWithResponseAsync(provider, name, version, requestOptions); + } + + /** + * Delete a specific update version. This is a long-running-operation; use Operation-Location response header value + * to check for operation status. + * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginDeleteUpdate(String provider, String name, String version, + RequestOptions requestOptions) { + return this.serviceClient.beginDeleteUpdateAsync(provider, name, version, requestOptions); + } + + /** + * Get a list of all update providers that have been imported to Device Update for IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update providers that have been imported to Device Update for IoT Hub as paginated response + * with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listProviders(RequestOptions requestOptions) { + return this.serviceClient.listProvidersAsync(requestOptions); + } + + /** + * Get a list of all update names that match the specified provider. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update names that match the specified provider as paginated response with + * {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listNames(String provider, RequestOptions requestOptions) { + return this.serviceClient.listNamesAsync(provider, requestOptions); + } + + /** + * Get a list of all update versions that match the specified provider and name. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoOptional to filter updates by isDeployable property.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update versions that match the specified provider and name as paginated response with + * {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listVersions(String provider, String name, RequestOptions requestOptions) { + return this.serviceClient.listVersionsAsync(provider, name, requestOptions); + } + + /** + * Get a list of all update file identifiers for the specified version. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update file identifiers for the specified version as paginated response with + * {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listFiles(String provider, String name, String version, + RequestOptions requestOptions) { + return this.serviceClient.listFilesAsync(provider, name, version, requestOptions); + } + + /** + * Get a specific update file from the version. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     fileName: String (Required)
+     *     sizeInBytes: long (Required)
+     *     hashes (Required): {
+     *         String: String (Required)
+     *     }
+     *     mimeType: String (Optional)
+     *     scanResult: String (Optional)
+     *     scanDetails: String (Optional)
+     *     properties (Optional): {
+     *         String: String (Required)
+     *     }
+     *     fileId: String (Required)
+     *     relatedFiles (Optional): [
+     *          (Optional){
+     *             fileName: String (Required)
+     *             sizeInBytes: long (Required)
+     *             hashes (Required): {
+     *                 String: String (Required)
+     *             }
+     *             mimeType: String (Optional)
+     *             scanResult: String (Optional)
+     *             scanDetails: String (Optional)
+     *             properties (Optional): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *     ]
+     *     downloadHandler (Optional): {
+     *         id: String (Required)
+     *     }
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param fileId File identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a specific update file from the version along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getFileWithResponse(String provider, String name, String version, String fileId, + RequestOptions requestOptions) { + return this.serviceClient.getFileWithResponseAsync(provider, name, version, fileId, requestOptions); + } + + /** + * Get a list of all import update operations. Completed operations are kept for 7 days before auto-deleted. Delete + * operations are not returned by this API version. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoOptional to filter operations by status property. Only one + * specific filter is supported: "status eq 'NotStarted' or status eq 'Running'"
topIntegerNoSpecifies a non-negative integer n that limits the number of items + * returned from a collection. The service returns the number of available items up to but not greater than the + * specified value n.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     update (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     resourceLocation: String (Optional)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all import update operations as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listOperationStatuses(RequestOptions requestOptions) { + return this.serviceClient.listOperationStatusesAsync(requestOptions); + } + + /** + * Retrieve operation status. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     update (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     resourceLocation: String (Optional)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param operationId Operation identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return operation metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOperationStatusWithResponse(String operationId, + RequestOptions requestOptions) { + return this.serviceClient.getOperationStatusWithResponseAsync(operationId, requestOptions); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClient.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClient.java new file mode 100644 index 0000000000000..5823d70121954 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClient.java @@ -0,0 +1,603 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.iot.deviceupdate.implementation.DeviceUpdatesImpl; + +/** + * Initializes a new instance of the synchronous DeviceUpdateClient type. + */ +@ServiceClient(builder = DeviceUpdateClientBuilder.class) +public final class DeviceUpdateClient { + @Generated + private final DeviceUpdatesImpl serviceClient; + + /** + * Initializes an instance of DeviceUpdateClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + DeviceUpdateClient(DeviceUpdatesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a list of all updates that have been imported to Device Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
searchStringNoRequest updates matching a free-text search + * expression.
filterStringNoOptional to filter updates by isDeployable property.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all updates that have been imported to Device Update for IoT Hub as paginated response with + * {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUpdates(RequestOptions requestOptions) { + return this.serviceClient.listUpdates(requestOptions); + } + + /** + * Import new update version. This is a long-running-operation; use Operation-Location response header value to + * check for operation status. + *

Request Body Schema

+ * + *
+     * {@code
+     * [
+     *      (Required){
+     *         importManifest (Required): {
+     *             url: String (Required)
+     *             sizeInBytes: long (Required)
+     *             hashes (Required): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *         friendlyName: String (Optional)
+     *         files (Optional): [
+     *              (Optional){
+     *                 filename: String (Required)
+     *                 url: String (Required)
+     *             }
+     *         ]
+     *     }
+     * ]
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param updateToImport The update to be imported (see schema + * https://json.schemastore.org/azure-deviceupdate-import-manifest-5.0.json for details). + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of update metadata. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginImportUpdate(BinaryData updateToImport, + RequestOptions requestOptions) { + return this.serviceClient.beginImportUpdate(updateToImport, requestOptions); + } + + /** + * Get a specific update version. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a specific update version along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpdateWithResponse(String provider, String name, String version, + RequestOptions requestOptions) { + return this.serviceClient.getUpdateWithResponse(provider, name, version, requestOptions); + } + + /** + * Delete a specific update version. This is a long-running-operation; use Operation-Location response header value + * to check for operation status. + * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginDeleteUpdate(String provider, String name, String version, + RequestOptions requestOptions) { + return this.serviceClient.beginDeleteUpdate(provider, name, version, requestOptions); + } + + /** + * Get a list of all update providers that have been imported to Device Update for IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update providers that have been imported to Device Update for IoT Hub as paginated response + * with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProviders(RequestOptions requestOptions) { + return this.serviceClient.listProviders(requestOptions); + } + + /** + * Get a list of all update names that match the specified provider. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update names that match the specified provider as paginated response with + * {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNames(String provider, RequestOptions requestOptions) { + return this.serviceClient.listNames(provider, requestOptions); + } + + /** + * Get a list of all update versions that match the specified provider and name. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoOptional to filter updates by isDeployable property.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update versions that match the specified provider and name as paginated response with + * {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVersions(String provider, String name, RequestOptions requestOptions) { + return this.serviceClient.listVersions(provider, name, requestOptions); + } + + /** + * Get a list of all update file identifiers for the specified version. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update file identifiers for the specified version as paginated response with + * {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listFiles(String provider, String name, String version, + RequestOptions requestOptions) { + return this.serviceClient.listFiles(provider, name, version, requestOptions); + } + + /** + * Get a specific update file from the version. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     fileName: String (Required)
+     *     sizeInBytes: long (Required)
+     *     hashes (Required): {
+     *         String: String (Required)
+     *     }
+     *     mimeType: String (Optional)
+     *     scanResult: String (Optional)
+     *     scanDetails: String (Optional)
+     *     properties (Optional): {
+     *         String: String (Required)
+     *     }
+     *     fileId: String (Required)
+     *     relatedFiles (Optional): [
+     *          (Optional){
+     *             fileName: String (Required)
+     *             sizeInBytes: long (Required)
+     *             hashes (Required): {
+     *                 String: String (Required)
+     *             }
+     *             mimeType: String (Optional)
+     *             scanResult: String (Optional)
+     *             scanDetails: String (Optional)
+     *             properties (Optional): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *     ]
+     *     downloadHandler (Optional): {
+     *         id: String (Required)
+     *     }
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param fileId File identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a specific update file from the version along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFileWithResponse(String provider, String name, String version, String fileId, + RequestOptions requestOptions) { + return this.serviceClient.getFileWithResponse(provider, name, version, fileId, requestOptions); + } + + /** + * Get a list of all import update operations. Completed operations are kept for 7 days before auto-deleted. Delete + * operations are not returned by this API version. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoOptional to filter operations by status property. Only one + * specific filter is supported: "status eq 'NotStarted' or status eq 'Running'"
topIntegerNoSpecifies a non-negative integer n that limits the number of items + * returned from a collection. The service returns the number of available items up to but not greater than the + * specified value n.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     update (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     resourceLocation: String (Optional)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all import update operations as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOperationStatuses(RequestOptions requestOptions) { + return this.serviceClient.listOperationStatuses(requestOptions); + } + + /** + * Retrieve operation status. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     update (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     resourceLocation: String (Optional)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param operationId Operation identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return operation metadata along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOperationStatusWithResponse(String operationId, RequestOptions requestOptions) { + return this.serviceClient.getOperationStatusWithResponse(operationId, requestOptions); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClientBuilder.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClientBuilder.java new file mode 100644 index 0000000000000..b849d28c8605f --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClientBuilder.java @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +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.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +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.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.iot.deviceupdate.implementation.DeviceUpdateClientImpl; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the DeviceUpdateClient type. + */ +@ServiceClientBuilder(serviceClients = { DeviceUpdateClient.class, DeviceUpdateAsyncClient.class }) +public final class DeviceUpdateClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://api.adu.microsoft.com/.default" }; + + @Generated + private static final Map PROPERTIES = CoreUtils.getProperties("azure-iot-deviceupdate.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the DeviceUpdateClientBuilder. + */ + @Generated + public DeviceUpdateClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceUpdateClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceUpdateClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceUpdateClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceUpdateClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceUpdateClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceUpdateClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceUpdateClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceUpdateClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public DeviceUpdateClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The Device Update for IoT Hub account instance identifier. + */ + @Generated + private String instanceId; + + /** + * Sets The Device Update for IoT Hub account instance identifier. + * + * @param instanceId the instanceId value. + * @return the DeviceUpdateClientBuilder. + */ + @Generated + public DeviceUpdateClientBuilder instanceId(String instanceId) { + this.instanceId = instanceId; + return this; + } + + /* + * Service version + */ + @Generated + private DeviceUpdateServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the DeviceUpdateClientBuilder. + */ + @Generated + public DeviceUpdateClientBuilder serviceVersion(DeviceUpdateServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the DeviceUpdateClientBuilder. + */ + @Generated + public DeviceUpdateClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of DeviceUpdateClientImpl with the provided parameters. + * + * @return an instance of DeviceUpdateClientImpl. + */ + @Generated + private DeviceUpdateClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + DeviceUpdateServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : DeviceUpdateServiceVersion.getLatest(); + DeviceUpdateClientImpl client = new DeviceUpdateClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, this.instanceId, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + Objects.requireNonNull(instanceId, "'instanceId' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of DeviceUpdateAsyncClient class. + * + * @return an instance of DeviceUpdateAsyncClient. + */ + @Generated + public DeviceUpdateAsyncClient buildAsyncClient() { + return new DeviceUpdateAsyncClient(buildInnerClient().getDeviceUpdates()); + } + + /** + * Builds an instance of DeviceUpdateClient class. + * + * @return an instance of DeviceUpdateClient. + */ + @Generated + public DeviceUpdateClient buildClient() { + return new DeviceUpdateClient(buildInnerClient().getDeviceUpdates()); + } + + private static final ClientLogger LOGGER = new ClientLogger(DeviceUpdateClientBuilder.class); +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateServiceVersion.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateServiceVersion.java new file mode 100644 index 0000000000000..c37b79ed8538c --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateServiceVersion.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of DeviceUpdate. + */ +public enum DeviceUpdateServiceVersion implements ServiceVersion { + /** + * Enum value 2022-10-01. + */ + V2022_10_01("2022-10-01"); + + private final String version; + + DeviceUpdateServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link DeviceUpdateServiceVersion}. + */ + public static DeviceUpdateServiceVersion getLatest() { + return V2022_10_01; + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceManagementsImpl.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceManagementsImpl.java new file mode 100644 index 0000000000000..3daeb035e5a65 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceManagementsImpl.java @@ -0,0 +1,7189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.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.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.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +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.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.polling.SyncDefaultPollingStrategy; +import com.azure.core.util.polling.SyncPoller; +import com.azure.core.util.serializer.TypeReference; +import com.azure.iot.deviceupdate.DeviceUpdateServiceVersion; +import java.time.Duration; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DeviceManagements. + */ +public final class DeviceManagementsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final DeviceManagementsService service; + + /** + * The service client containing this operation class. + */ + private final DeviceUpdateClientImpl client; + + /** + * Initializes an instance of DeviceManagementsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DeviceManagementsImpl(DeviceUpdateClientImpl client) { + this.service + = RestProxy.create(DeviceManagementsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public DeviceUpdateServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for DeviceUpdateClientDeviceManagements to be used by the proxy service + * to perform REST calls. + */ + @Host("https://{endpoint}") + @ServiceInterface(name = "DeviceUpdateClientDe") + public interface DeviceManagementsService { + @Get("/deviceUpdate/{instanceId}/management/deviceClasses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDeviceClasses(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceClasses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDeviceClassesSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDeviceClass(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDeviceClassSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Patch("/deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> updateDeviceClass(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/merge-patch+json") BinaryData deviceClassPatch, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Patch("/deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response updateDeviceClassSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/merge-patch+json") BinaryData deviceClassPatch, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteDeviceClass(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteDeviceClassSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}/installableUpdates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listInstallableUpdatesForDeviceClass(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}/installableUpdates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listInstallableUpdatesForDeviceClassSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/devices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDevices(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/devices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDevicesSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/deviceUpdate/{instanceId}/management/devices:import") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> importDevices(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData importType, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/deviceUpdate/{instanceId}/management/devices:import") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response importDevicesSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData importType, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/devices/{deviceId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDevice(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("deviceId") String deviceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/devices/{deviceId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDeviceSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("deviceId") String deviceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/devices/{deviceId}/modules/{moduleId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDeviceModule(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("deviceId") String deviceId, + @PathParam("moduleId") String moduleId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/devices/{deviceId}/modules/{moduleId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDeviceModuleSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("deviceId") String deviceId, + @PathParam("moduleId") String moduleId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/updateCompliance") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getUpdateCompliance(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/updateCompliance") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getUpdateComplianceSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listGroups(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listGroupsSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getGroup(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getGroupSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/deviceUpdate/{instanceId}/management/groups/{groupId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteGroup(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/deviceUpdate/{instanceId}/management/groups/{groupId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteGroupSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/updateCompliance") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getUpdateComplianceForGroup(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/updateCompliance") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getUpdateComplianceForGroupSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/bestUpdates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listBestUpdatesForGroup(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/bestUpdates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listBestUpdatesForGroupSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDeploymentsForGroup(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDeploymentsForGroupSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDeployment(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deploymentId") String deploymentId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDeploymentSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deploymentId") String deploymentId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrUpdateDeployment(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deploymentId") String deploymentId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData deployment, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateDeploymentSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deploymentId") String deploymentId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData deployment, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteDeployment(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deploymentId") String deploymentId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteDeploymentSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deploymentId") String deploymentId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}/status") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDeploymentStatus(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deploymentId") String deploymentId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}/status") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDeploymentStatusSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deploymentId") String deploymentId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDeviceClassSubgroupsForGroup(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDeviceClassSubgroupsForGroupSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDeviceClassSubgroup(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDeviceClassSubgroupSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteDeviceClassSubgroup(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteDeviceClassSubgroupSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/updateCompliance") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDeviceClassSubgroupUpdateCompliance(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/updateCompliance") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDeviceClassSubgroupUpdateComplianceSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/bestUpdates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getBestUpdatesForDeviceClassSubgroup(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/bestUpdates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getBestUpdatesForDeviceClassSubgroupSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDeploymentsForDeviceClassSubgroup(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDeploymentsForDeviceClassSubgroupSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDeploymentForDeviceClassSubgroup(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @PathParam("deploymentId") String deploymentId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDeploymentForDeviceClassSubgroupSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @PathParam("deploymentId") String deploymentId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteDeploymentForDeviceClassSubgroup(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @PathParam("deploymentId") String deploymentId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteDeploymentForDeviceClassSubgroupSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @PathParam("deploymentId") String deploymentId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}:cancel") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> stopDeployment(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @PathParam("deploymentId") String deploymentId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}:cancel") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response stopDeploymentSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @PathParam("deploymentId") String deploymentId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}:retry") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> retryDeployment(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @PathParam("deploymentId") String deploymentId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}:retry") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response retryDeploymentSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @PathParam("deploymentId") String deploymentId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}/status") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDeviceClassSubgroupDeploymentStatus(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @PathParam("deploymentId") String deploymentId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}/status") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDeviceClassSubgroupDeploymentStatusSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("groupId") String groupId, + @PathParam("deviceClassId") String deviceClassId, @PathParam("deploymentId") String deploymentId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}/devicestates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDeviceStatesForDeviceClassSubgroupDeployment( + @HostParam("endpoint") String endpoint, @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("groupId") String groupId, @PathParam("deviceClassId") String deviceClassId, + @PathParam("deploymentId") String deploymentId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}/devicestates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDeviceStatesForDeviceClassSubgroupDeploymentSync( + @HostParam("endpoint") String endpoint, @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("groupId") String groupId, @PathParam("deviceClassId") String deviceClassId, + @PathParam("deploymentId") String deploymentId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getOperationStatus(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("operationId") String operationId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getOperationStatusSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("operationId") String operationId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listOperationStatuses(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listOperationStatusesSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections/{operationId}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> startLogCollection(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("operationId") String logCollectionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData logCollection, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections/{operationId}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response startLogCollectionSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("operationId") String logCollectionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData logCollection, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getLogCollection(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("operationId") String logCollectionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getLogCollectionSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("operationId") String logCollectionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listLogCollections(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listLogCollectionsSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections/{operationId}/detailedStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getLogCollectionDetailedStatus(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("operationId") String logCollectionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections/{operationId}/detailedStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getLogCollectionDetailedStatusSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("operationId") String logCollectionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceDiagnostics/deviceHealth") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listHealthOfDevices(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @QueryParam("filter") String filter, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/management/deviceDiagnostics/deviceHealth") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listHealthOfDevicesSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @QueryParam("filter") String filter, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDeviceClassesNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDeviceClassesNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listInstallableUpdatesForDeviceClassNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listInstallableUpdatesForDeviceClassNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDevicesNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDevicesNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listGroupsNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listGroupsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listBestUpdatesForGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listBestUpdatesForGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDeploymentsForGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDeploymentsForGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDeviceClassSubgroupsForGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDeviceClassSubgroupsForGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDeploymentsForDeviceClassSubgroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDeploymentsForDeviceClassSubgroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDeviceStatesForDeviceClassSubgroupDeploymentNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDeviceStatesForDeviceClassSubgroupDeploymentNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listOperationStatusesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listOperationStatusesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listLogCollectionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listLogCollectionsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listHealthOfDevicesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listHealthOfDevicesNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * Gets a list of all device classes (sets of devices compatible with the same updates based on the model Id and + * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device + * Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of device classes returned. You can filter on + * friendly name.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device classes (sets of devices compatible with the same updates based on the model Id and + * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device + * Update for IoT Hub along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeviceClassesSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeviceClasses(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Gets a list of all device classes (sets of devices compatible with the same updates based on the model Id and + * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device + * Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of device classes returned. You can filter on + * friendly name.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device classes (sets of devices compatible with the same updates based on the model Id and + * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device + * Update for IoT Hub as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDeviceClassesAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listDeviceClassesSinglePageAsync(requestOptions), + nextLink -> listDeviceClassesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets a list of all device classes (sets of devices compatible with the same updates based on the model Id and + * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device + * Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of device classes returned. You can filter on + * friendly name.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device classes (sets of devices compatible with the same updates based on the model Id and + * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device + * Update for IoT Hub along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeviceClassesSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDeviceClassesSync(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Gets a list of all device classes (sets of devices compatible with the same updates based on the model Id and + * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device + * Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of device classes returned. You can filter on + * friendly name.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device classes (sets of devices compatible with the same updates based on the model Id and + * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device + * Update for IoT Hub as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeviceClasses(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listDeviceClassesSinglePage(requestOptions), + nextLink -> listDeviceClassesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets the properties of a device class. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the properties of a device class along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeviceClassWithResponseAsync(String deviceClassId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeviceClass(this.client.getEndpoint(), this.client.getInstanceId(), + deviceClassId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets the properties of a device class. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the properties of a device class along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceClassWithResponse(String deviceClassId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDeviceClassSync(this.client.getEndpoint(), this.client.getInstanceId(), deviceClassId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Update device class details. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     friendlyName: String (Required)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param deviceClassPatch The device class json merge patch body. Currently only supports patching friendlyName. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device class metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateDeviceClassWithResponseAsync(String deviceClassId, + BinaryData deviceClassPatch, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.updateDeviceClass(this.client.getEndpoint(), this.client.getInstanceId(), deviceClassId, + this.client.getServiceVersion().getVersion(), deviceClassPatch, accept, requestOptions, context)); + } + + /** + * Update device class details. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     friendlyName: String (Required)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param deviceClassPatch The device class json merge patch body. Currently only supports patching friendlyName. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device class metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateDeviceClassWithResponse(String deviceClassId, BinaryData deviceClassPatch, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.updateDeviceClassSync(this.client.getEndpoint(), this.client.getInstanceId(), deviceClassId, + this.client.getServiceVersion().getVersion(), deviceClassPatch, accept, requestOptions, Context.NONE); + } + + /** + * Deletes a device class. Device classes are created automatically when Device Update-enabled devices are connected + * to the hub but are not automatically cleaned up since they are referenced by DeviceClassSubgroups. If the user + * has deleted all DeviceClassSubgroups for a device class they can also delete the device class to remove the + * records from the system and to stop checking the compatibility of this device class with new updates. If a device + * is ever reconnected for this device class it will be re-created. + * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteDeviceClassWithResponseAsync(String deviceClassId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteDeviceClass(this.client.getEndpoint(), this.client.getInstanceId(), + deviceClassId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes a device class. Device classes are created automatically when Device Update-enabled devices are connected + * to the hub but are not automatically cleaned up since they are referenced by DeviceClassSubgroups. If the user + * has deleted all DeviceClassSubgroups for a device class they can also delete the device class to remove the + * records from the system and to stop checking the compatibility of this device class with new updates. If a device + * is ever reconnected for this device class it will be re-created. + * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDeviceClassWithResponse(String deviceClassId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteDeviceClassSync(this.client.getEndpoint(), this.client.getInstanceId(), deviceClassId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Gets a list of installable updates for a device class. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of installable updates for a device class along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstallableUpdatesForDeviceClassSinglePageAsync(String deviceClassId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listInstallableUpdatesForDeviceClass(this.client.getEndpoint(), + this.client.getInstanceId(), deviceClassId, this.client.getServiceVersion().getVersion(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Gets a list of installable updates for a device class. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of installable updates for a device class as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listInstallableUpdatesForDeviceClassAsync(String deviceClassId, + RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listInstallableUpdatesForDeviceClassSinglePageAsync(deviceClassId, requestOptions), + nextLink -> listInstallableUpdatesForDeviceClassNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets a list of installable updates for a device class. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of installable updates for a device class along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listInstallableUpdatesForDeviceClassSinglePage(String deviceClassId, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listInstallableUpdatesForDeviceClassSync(this.client.getEndpoint(), this.client.getInstanceId(), + deviceClassId, this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Gets a list of installable updates for a device class. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of installable updates for a device class as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstallableUpdatesForDeviceClass(String deviceClassId, + RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listInstallableUpdatesForDeviceClassSinglePage(deviceClassId, requestOptions), + nextLink -> listInstallableUpdatesForDeviceClassNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets a list of devices connected to Device Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of devices returned. You can filter on + * GroupId, DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to query for devices with + * no deployment status (that have never been deployed to).
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of devices connected to Device Update for IoT Hub along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDevicesSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDevices(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Gets a list of devices connected to Device Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of devices returned. You can filter on + * GroupId, DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to query for devices with + * no deployment status (that have never been deployed to).
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of devices connected to Device Update for IoT Hub as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDevicesAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listDevicesSinglePageAsync(requestOptions), + nextLink -> listDevicesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets a list of devices connected to Device Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of devices returned. You can filter on + * GroupId, DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to query for devices with + * no deployment status (that have never been deployed to).
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of devices connected to Device Update for IoT Hub along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDevicesSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDevicesSync(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Gets a list of devices connected to Device Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of devices returned. You can filter on + * GroupId, DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to query for devices with + * no deployment status (that have never been deployed to).
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of devices connected to Device Update for IoT Hub as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDevices(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listDevicesSinglePage(requestOptions), + nextLink -> listDevicesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Import existing devices from IoT Hub. This is a long-running-operation; use Operation-Location response header + * value to check for operation status. + *

Request Body Schema

+ * + *
+     * {@code
+     * String(Devices/Modules/All)
+     * }
+     * 
+ * + * @param importType The types of devices to import. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> importDevicesWithResponseAsync(BinaryData importType, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.importDevices(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), importType, accept, requestOptions, context)); + } + + /** + * Import existing devices from IoT Hub. This is a long-running-operation; use Operation-Location response header + * value to check for operation status. + *

Request Body Schema

+ * + *
+     * {@code
+     * String(Devices/Modules/All)
+     * }
+     * 
+ * + * @param importType The types of devices to import. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response importDevicesWithResponse(BinaryData importType, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.importDevicesSync(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), importType, accept, requestOptions, Context.NONE); + } + + /** + * Import existing devices from IoT Hub. This is a long-running-operation; use Operation-Location response header + * value to check for operation status. + *

Request Body Schema

+ * + *
+     * {@code
+     * String(Devices/Modules/All)
+     * }
+     * 
+ * + * @param importType The types of devices to import. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginImportDevicesAsync(BinaryData importType, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.importDevicesWithResponseAsync(importType, requestOptions), + new OperationResourcePollingStrategyWithEndpoint<>(this.client.getHttpPipeline(), + "https://" + this.client.getEndpoint(), null, null, + requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Import existing devices from IoT Hub. This is a long-running-operation; use Operation-Location response header + * value to check for operation status. + *

Request Body Schema

+ * + *
+     * {@code
+     * String(Devices/Modules/All)
+     * }
+     * 
+ * + * @param importType The types of devices to import. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginImportDevices(BinaryData importType, RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.importDevicesWithResponse(importType, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Gets the device properties and latest deployment status for a device connected to Device Update for IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceId Device identifier in Azure IoT Hub. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device properties and latest deployment status for a device connected to Device Update for IoT Hub + * along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeviceWithResponseAsync(String deviceId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getDevice(this.client.getEndpoint(), this.client.getInstanceId(), + deviceId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets the device properties and latest deployment status for a device connected to Device Update for IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceId Device identifier in Azure IoT Hub. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device properties and latest deployment status for a device connected to Device Update for IoT Hub + * along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceWithResponse(String deviceId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDeviceSync(this.client.getEndpoint(), this.client.getInstanceId(), deviceId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Gets the device module properties and latest deployment status for a device module connected to Device Update for + * IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceId Device identifier in Azure IoT Hub. + * @param moduleId Device module identifier in Azure IoT Hub. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device module properties and latest deployment status for a device module connected to Device Update + * for IoT Hub along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeviceModuleWithResponseAsync(String deviceId, String moduleId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeviceModule(this.client.getEndpoint(), this.client.getInstanceId(), + deviceId, moduleId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets the device module properties and latest deployment status for a device module connected to Device Update for + * IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param deviceId Device identifier in Azure IoT Hub. + * @param moduleId Device module identifier in Azure IoT Hub. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device module properties and latest deployment status for a device module connected to Device Update + * for IoT Hub along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceModuleWithResponse(String deviceId, String moduleId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDeviceModuleSync(this.client.getEndpoint(), this.client.getInstanceId(), deviceId, moduleId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Gets the breakdown of how many devices are on their latest update, have new updates available, or are in progress + * receiving new updates. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     totalDeviceCount: int (Required)
+     *     onLatestUpdateDeviceCount: int (Required)
+     *     newUpdatesAvailableDeviceCount: int (Required)
+     *     updatesInProgressDeviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the breakdown of how many devices are on their latest update, have new updates available, or are in + * progress receiving new updates along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getUpdateComplianceWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getUpdateCompliance(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets the breakdown of how many devices are on their latest update, have new updates available, or are in progress + * receiving new updates. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     totalDeviceCount: int (Required)
+     *     onLatestUpdateDeviceCount: int (Required)
+     *     newUpdatesAvailableDeviceCount: int (Required)
+     *     updatesInProgressDeviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the breakdown of how many devices are on their latest update, have new updates available, or are in + * progress receiving new updates along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpdateComplianceWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getUpdateComplianceSync(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Gets a list of all device groups. The $default group will always be returned first. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of groups returned. You can order by groupId, + * deviceCount, createdDate, subgroupsWithNewUpdatesAvailableCount, subgroupsWithUpdatesInProgressCount, or + * subgroupsOnLatestUpdateCount.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     groupType: String(IoTHubTag/DefaultNoTag) (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+     *     subgroupsWithUpdatesInProgressCount: Integer (Optional)
+     *     subgroupsWithOnLatestUpdateCount: Integer (Optional)
+     *     deployments (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device groups along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listGroupsSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listGroups(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Gets a list of all device groups. The $default group will always be returned first. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of groups returned. You can order by groupId, + * deviceCount, createdDate, subgroupsWithNewUpdatesAvailableCount, subgroupsWithUpdatesInProgressCount, or + * subgroupsOnLatestUpdateCount.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     groupType: String(IoTHubTag/DefaultNoTag) (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+     *     subgroupsWithUpdatesInProgressCount: Integer (Optional)
+     *     subgroupsWithOnLatestUpdateCount: Integer (Optional)
+     *     deployments (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listGroupsAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listGroupsSinglePageAsync(requestOptions), + nextLink -> listGroupsNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets a list of all device groups. The $default group will always be returned first. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of groups returned. You can order by groupId, + * deviceCount, createdDate, subgroupsWithNewUpdatesAvailableCount, subgroupsWithUpdatesInProgressCount, or + * subgroupsOnLatestUpdateCount.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     groupType: String(IoTHubTag/DefaultNoTag) (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+     *     subgroupsWithUpdatesInProgressCount: Integer (Optional)
+     *     subgroupsWithOnLatestUpdateCount: Integer (Optional)
+     *     deployments (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device groups along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listGroupsSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listGroupsSync(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Gets a list of all device groups. The $default group will always be returned first. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of groups returned. You can order by groupId, + * deviceCount, createdDate, subgroupsWithNewUpdatesAvailableCount, subgroupsWithUpdatesInProgressCount, or + * subgroupsOnLatestUpdateCount.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     groupType: String(IoTHubTag/DefaultNoTag) (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+     *     subgroupsWithUpdatesInProgressCount: Integer (Optional)
+     *     subgroupsWithOnLatestUpdateCount: Integer (Optional)
+     *     deployments (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGroups(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listGroupsSinglePage(requestOptions), + nextLink -> listGroupsNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets the device group properties. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     groupType: String(IoTHubTag/DefaultNoTag) (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+     *     subgroupsWithUpdatesInProgressCount: Integer (Optional)
+     *     subgroupsWithOnLatestUpdateCount: Integer (Optional)
+     *     deployments (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device group properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getGroupWithResponseAsync(String groupId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getGroup(this.client.getEndpoint(), this.client.getInstanceId(), + groupId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets the device group properties. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     groupType: String(IoTHubTag/DefaultNoTag) (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+     *     subgroupsWithUpdatesInProgressCount: Integer (Optional)
+     *     subgroupsWithOnLatestUpdateCount: Integer (Optional)
+     *     deployments (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device group properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getGroupWithResponse(String groupId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getGroupSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Deletes a device group. This group is automatically created when a Device Update-enabled device is connected to + * the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are + * retained for history purposes. Users can call this method to delete a group if they do not need to retain any of + * the history of the group and no longer need it. If a device is ever connected again for this group after the + * group was deleted it will be automatically re-created but there will be no history. + * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteGroupWithResponseAsync(String groupId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteGroup(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes a device group. This group is automatically created when a Device Update-enabled device is connected to + * the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are + * retained for history purposes. Users can call this method to delete a group if they do not need to retain any of + * the history of the group and no longer need it. If a device is ever connected again for this group after the + * group was deleted it will be automatically re-created but there will be no history. + * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteGroupWithResponse(String groupId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteGroupSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Get device group update compliance information such as how many devices are on their latest update, how many need + * new updates, and how many are in progress on receiving a new update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     totalDeviceCount: int (Required)
+     *     onLatestUpdateDeviceCount: int (Required)
+     *     newUpdatesAvailableDeviceCount: int (Required)
+     *     updatesInProgressDeviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device group update compliance information such as how many devices are on their latest update, how many + * need new updates, and how many are in progress on receiving a new update along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getUpdateComplianceForGroupWithResponseAsync(String groupId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.getUpdateComplianceForGroup(this.client.getEndpoint(), this.client.getInstanceId(), + groupId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get device group update compliance information such as how many devices are on their latest update, how many need + * new updates, and how many are in progress on receiving a new update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     totalDeviceCount: int (Required)
+     *     onLatestUpdateDeviceCount: int (Required)
+     *     newUpdatesAvailableDeviceCount: int (Required)
+     *     updatesInProgressDeviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device group update compliance information such as how many devices are on their latest update, how many + * need new updates, and how many are in progress on receiving a new update along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpdateComplianceForGroupWithResponse(String groupId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getUpdateComplianceForGroupSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Get the best available updates for a device group and a count of how many devices need each update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the best available updates for a device group and a count of how many devices need each update along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBestUpdatesForGroupSinglePageAsync(String groupId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBestUpdatesForGroup(this.client.getEndpoint(), this.client.getInstanceId(), + groupId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the best available updates for a device group and a count of how many devices need each update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the best available updates for a device group and a count of how many devices need each update as + * paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listBestUpdatesForGroupAsync(String groupId, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listBestUpdatesForGroupSinglePageAsync(groupId, requestOptions), + nextLink -> listBestUpdatesForGroupNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the best available updates for a device group and a count of how many devices need each update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the best available updates for a device group and a count of how many devices need each update along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBestUpdatesForGroupSinglePage(String groupId, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listBestUpdatesForGroupSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the best available updates for a device group and a count of how many devices need each update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the best available updates for a device group and a count of how many devices need each update as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBestUpdatesForGroup(String groupId, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listBestUpdatesForGroupSinglePage(groupId, requestOptions), + nextLink -> listBestUpdatesForGroupNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets a list of deployments for a device group. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of deployments returned. You can order by start + * date.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of deployments for a device group along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsForGroupSinglePageAsync(String groupId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listDeploymentsForGroup(this.client.getEndpoint(), this.client.getInstanceId(), + groupId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Gets a list of deployments for a device group. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of deployments returned. You can order by start + * date.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of deployments for a device group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDeploymentsForGroupAsync(String groupId, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listDeploymentsForGroupSinglePageAsync(groupId, requestOptions), + nextLink -> listDeploymentsForGroupNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets a list of deployments for a device group. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of deployments returned. You can order by start + * date.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of deployments for a device group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeploymentsForGroupSinglePage(String groupId, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listDeploymentsForGroupSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Gets a list of deployments for a device group. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of deployments returned. You can order by start + * date.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of deployments for a device group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeploymentsForGroup(String groupId, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listDeploymentsForGroupSinglePage(groupId, requestOptions), + nextLink -> listDeploymentsForGroupNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets the deployment properties. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the deployment properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeploymentWithResponseAsync(String groupId, String deploymentId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeployment(this.client.getEndpoint(), this.client.getInstanceId(), + groupId, deploymentId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets the deployment properties. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the deployment properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeploymentWithResponse(String groupId, String deploymentId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDeploymentSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, deploymentId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Creates or updates a deployment. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param deployment The deployment properties. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return deployment metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateDeploymentWithResponseAsync(String groupId, String deploymentId, + BinaryData deployment, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.createOrUpdateDeployment(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deploymentId, this.client.getServiceVersion().getVersion(), + deployment, accept, requestOptions, context)); + } + + /** + * Creates or updates a deployment. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param deployment The deployment properties. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return deployment metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateDeploymentWithResponse(String groupId, String deploymentId, + BinaryData deployment, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.createOrUpdateDeploymentSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + deploymentId, this.client.getServiceVersion().getVersion(), deployment, accept, requestOptions, + Context.NONE); + } + + /** + * Deletes a deployment. + * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteDeploymentWithResponseAsync(String groupId, String deploymentId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteDeployment(this.client.getEndpoint(), this.client.getInstanceId(), + groupId, deploymentId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes a deployment. + * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDeploymentWithResponse(String groupId, String deploymentId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteDeploymentSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + deploymentId, this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deploymentState: String(Active/ActiveWithSubgroupFailures/Failed/Inactive/Canceled) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     subgroupStatus (Required): [
+     *          (Required){
+     *             groupId: String (Required)
+     *             deviceClassId: String (Required)
+     *             deploymentState: String(Active/Failed/Inactive/Canceled) (Required)
+     *             error (Optional): (recursive schema, see error above)
+     *             totalDevices: Integer (Optional)
+     *             devicesInProgressCount: Integer (Optional)
+     *             devicesCompletedFailedCount: Integer (Optional)
+     *             devicesCompletedSucceededCount: Integer (Optional)
+     *             devicesCanceledCount: Integer (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeploymentStatusWithResponseAsync(String groupId, String deploymentId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeploymentStatus(this.client.getEndpoint(), this.client.getInstanceId(), + groupId, deploymentId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deploymentState: String(Active/ActiveWithSubgroupFailures/Failed/Inactive/Canceled) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     subgroupStatus (Required): [
+     *          (Required){
+     *             groupId: String (Required)
+     *             deviceClassId: String (Required)
+     *             deploymentState: String(Active/Failed/Inactive/Canceled) (Required)
+     *             error (Optional): (recursive schema, see error above)
+     *             totalDevices: Integer (Optional)
+     *             devicesInProgressCount: Integer (Optional)
+     *             devicesCompletedFailedCount: Integer (Optional)
+     *             devicesCompletedSucceededCount: Integer (Optional)
+     *             devicesCanceledCount: Integer (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeploymentStatusWithResponse(String groupId, String deploymentId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDeploymentStatusSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + deploymentId, this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Get the device class subgroups for the group. A device class subgroup is the set of devices within the group that + * share the same device class. All devices within the same device class are compatible with the same updates. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of device class subgroups returned. You can + * filter on compat properties by name and value. (i.e. filter=compatProperties/propertyName1 eq 'value1' and + * compatProperties/propertyName2 eq 'value2')
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     groupId: String (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     deploymentId: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device class subgroups for the group along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeviceClassSubgroupsForGroupSinglePageAsync(String groupId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeviceClassSubgroupsForGroup(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, this.client.getServiceVersion().getVersion(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the device class subgroups for the group. A device class subgroup is the set of devices within the group that + * share the same device class. All devices within the same device class are compatible with the same updates. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of device class subgroups returned. You can + * filter on compat properties by name and value. (i.e. filter=compatProperties/propertyName1 eq 'value1' and + * compatProperties/propertyName2 eq 'value2')
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     groupId: String (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     deploymentId: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device class subgroups for the group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDeviceClassSubgroupsForGroupAsync(String groupId, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listDeviceClassSubgroupsForGroupSinglePageAsync(groupId, requestOptions), + nextLink -> listDeviceClassSubgroupsForGroupNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the device class subgroups for the group. A device class subgroup is the set of devices within the group that + * share the same device class. All devices within the same device class are compatible with the same updates. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of device class subgroups returned. You can + * filter on compat properties by name and value. (i.e. filter=compatProperties/propertyName1 eq 'value1' and + * compatProperties/propertyName2 eq 'value2')
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     groupId: String (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     deploymentId: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device class subgroups for the group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeviceClassSubgroupsForGroupSinglePage(String groupId, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listDeviceClassSubgroupsForGroupSync(this.client.getEndpoint(), this.client.getInstanceId(), + groupId, this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the device class subgroups for the group. A device class subgroup is the set of devices within the group that + * share the same device class. All devices within the same device class are compatible with the same updates. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of device class subgroups returned. You can + * filter on compat properties by name and value. (i.e. filter=compatProperties/propertyName1 eq 'value1' and + * compatProperties/propertyName2 eq 'value2')
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     groupId: String (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     deploymentId: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device class subgroups for the group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeviceClassSubgroupsForGroup(String groupId, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listDeviceClassSubgroupsForGroupSinglePage(groupId, requestOptions), + nextLink -> listDeviceClassSubgroupsForGroupNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets device class subgroup details. A device class subgroup is the set of devices within the group that share the + * same device class. All devices within the same device class are compatible with the same updates. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     groupId: String (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     deploymentId: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device class subgroup details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeviceClassSubgroupWithResponseAsync(String groupId, String deviceClassId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.getDeviceClassSubgroup(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + deviceClassId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets device class subgroup details. A device class subgroup is the set of devices within the group that share the + * same device class. All devices within the same device class are compatible with the same updates. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     groupId: String (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     deploymentId: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device class subgroup details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDeviceClassSubgroupSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + deviceClassId, this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Deletes a device class subgroup. This subgroup is automatically created when a Device Update-enabled device is + * connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned + * up but are retained for history purposes. Users can call this method to delete a subgroup if they do not need to + * retain any of the history of the subgroup and no longer need it. If a device is ever connected again for this + * subgroup after the subgroup was deleted it will be automatically re-created but there will be no history. + * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteDeviceClassSubgroupWithResponseAsync(String groupId, String deviceClassId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.deleteDeviceClassSubgroup(this.client.getEndpoint(), this.client.getInstanceId(), + groupId, deviceClassId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes a device class subgroup. This subgroup is automatically created when a Device Update-enabled device is + * connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned + * up but are retained for history purposes. Users can call this method to delete a subgroup if they do not need to + * retain any of the history of the subgroup and no longer need it. If a device is ever connected again for this + * subgroup after the subgroup was deleted it will be automatically re-created but there will be no history. + * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteDeviceClassSubgroupSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + deviceClassId, this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Get device class subgroup update compliance information such as how many devices are on their latest update, how + * many need new updates, and how many are in progress on receiving a new update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     totalDeviceCount: int (Required)
+     *     onLatestUpdateDeviceCount: int (Required)
+     *     newUpdatesAvailableDeviceCount: int (Required)
+     *     updatesInProgressDeviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device class subgroup update compliance information such as how many devices are on their latest update, + * how many need new updates, and how many are in progress on receiving a new update along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeviceClassSubgroupUpdateComplianceWithResponseAsync(String groupId, + String deviceClassId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getDeviceClassSubgroupUpdateCompliance(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, this.client.getServiceVersion().getVersion(), accept, + requestOptions, context)); + } + + /** + * Get device class subgroup update compliance information such as how many devices are on their latest update, how + * many need new updates, and how many are in progress on receiving a new update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     totalDeviceCount: int (Required)
+     *     onLatestUpdateDeviceCount: int (Required)
+     *     newUpdatesAvailableDeviceCount: int (Required)
+     *     updatesInProgressDeviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return device class subgroup update compliance information such as how many devices are on their latest update, + * how many need new updates, and how many are in progress on receiving a new update along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceClassSubgroupUpdateComplianceWithResponse(String groupId, String deviceClassId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDeviceClassSubgroupUpdateComplianceSync(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, this.client.getServiceVersion().getVersion(), accept, + requestOptions, Context.NONE); + } + + /** + * Get the best available update for a device class subgroup and a count of how many devices need this update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the best available update for a device class subgroup and a count of how many devices need this update + * along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getBestUpdatesForDeviceClassSubgroupWithResponseAsync(String groupId, + String deviceClassId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getBestUpdatesForDeviceClassSubgroup(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, this.client.getServiceVersion().getVersion(), accept, + requestOptions, context)); + } + + /** + * Get the best available update for a device class subgroup and a count of how many devices need this update. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the best available update for a device class subgroup and a count of how many devices need this update + * along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBestUpdatesForDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getBestUpdatesForDeviceClassSubgroupSync(this.client.getEndpoint(), this.client.getInstanceId(), + groupId, deviceClassId, this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Gets a list of deployments for a device class subgroup. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of deployments returned. You can order by start + * date.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of deployments for a device class subgroup along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsForDeviceClassSubgroupSinglePageAsync(String groupId, + String deviceClassId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeploymentsForDeviceClassSubgroup(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, this.client.getServiceVersion().getVersion(), + accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Gets a list of deployments for a device class subgroup. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of deployments returned. You can order by start + * date.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of deployments for a device class subgroup as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDeploymentsForDeviceClassSubgroupAsync(String groupId, String deviceClassId, + RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>( + () -> listDeploymentsForDeviceClassSubgroupSinglePageAsync(groupId, deviceClassId, requestOptions), + nextLink -> listDeploymentsForDeviceClassSubgroupNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets a list of deployments for a device class subgroup. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of deployments returned. You can order by start + * date.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of deployments for a device class subgroup along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeploymentsForDeviceClassSubgroupSinglePage(String groupId, + String deviceClassId, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDeploymentsForDeviceClassSubgroupSync(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, this.client.getServiceVersion().getVersion(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Gets a list of deployments for a device class subgroup. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoOrders the set of deployments returned. You can order by start + * date.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of deployments for a device class subgroup as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeploymentsForDeviceClassSubgroup(String groupId, String deviceClassId, + RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>( + () -> listDeploymentsForDeviceClassSubgroupSinglePage(groupId, deviceClassId, requestOptions), + nextLink -> listDeploymentsForDeviceClassSubgroupNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets the deployment properties. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the deployment properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeploymentForDeviceClassSubgroupWithResponseAsync(String groupId, + String deviceClassId, String deploymentId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getDeploymentForDeviceClassSubgroup(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, deploymentId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets the deployment properties. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the deployment properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeploymentForDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + String deploymentId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDeploymentForDeviceClassSubgroupSync(this.client.getEndpoint(), this.client.getInstanceId(), + groupId, deviceClassId, deploymentId, this.client.getServiceVersion().getVersion(), accept, requestOptions, + Context.NONE); + } + + /** + * Deletes a device class subgroup deployment. + * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteDeploymentForDeviceClassSubgroupWithResponseAsync(String groupId, + String deviceClassId, String deploymentId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.deleteDeploymentForDeviceClassSubgroup(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, deploymentId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes a device class subgroup deployment. + * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDeploymentForDeviceClassSubgroupWithResponse(String groupId, String deviceClassId, + String deploymentId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteDeploymentForDeviceClassSubgroupSync(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, deploymentId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Stops a deployment. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return deployment metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stopDeploymentWithResponseAsync(String groupId, String deviceClassId, + String deploymentId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.stopDeployment(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, deploymentId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Stops a deployment. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return deployment metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopDeploymentWithResponse(String groupId, String deviceClassId, String deploymentId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.stopDeploymentSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + deviceClassId, deploymentId, this.client.getServiceVersion().getVersion(), accept, requestOptions, + Context.NONE); + } + + /** + * Retries a deployment with failed devices. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return deployment metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> retryDeploymentWithResponseAsync(String groupId, String deviceClassId, + String deploymentId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.retryDeployment(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, deploymentId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Retries a deployment with failed devices. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return deployment metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response retryDeploymentWithResponse(String groupId, String deviceClassId, String deploymentId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.retryDeploymentSync(this.client.getEndpoint(), this.client.getInstanceId(), groupId, + deviceClassId, deploymentId, this.client.getServiceVersion().getVersion(), accept, requestOptions, + Context.NONE); + } + + /** + * Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     deploymentState: String(Active/Failed/Inactive/Canceled) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     totalDevices: Integer (Optional)
+     *     devicesInProgressCount: Integer (Optional)
+     *     devicesCompletedFailedCount: Integer (Optional)
+     *     devicesCompletedSucceededCount: Integer (Optional)
+     *     devicesCanceledCount: Integer (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDeviceClassSubgroupDeploymentStatusWithResponseAsync(String groupId, + String deviceClassId, String deploymentId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getDeviceClassSubgroupDeploymentStatus(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, deploymentId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     deploymentState: String(Active/Failed/Inactive/Canceled) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     totalDevices: Integer (Optional)
+     *     devicesInProgressCount: Integer (Optional)
+     *     devicesCompletedFailedCount: Integer (Optional)
+     *     devicesCompletedSucceededCount: Integer (Optional)
+     *     devicesCanceledCount: Integer (Optional)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the status of a deployment including a breakdown of how many devices in the deployment are in progress, + * completed, or failed along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeviceClassSubgroupDeploymentStatusWithResponse(String groupId, String deviceClassId, + String deploymentId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDeviceClassSubgroupDeploymentStatusSync(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, deploymentId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Gets a list of devices in a deployment along with their state. Useful for getting a list of failed devices. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of deployment device states returned. You can + * filter on deviceId and moduleId and/or deviceState.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     retryCount: int (Required)
+     *     movedOnToNewDeployment: boolean (Required)
+     *     deviceState: String(Succeeded/InProgress/Canceled/Failed) (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of devices in a deployment along with their state along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeviceStatesForDeviceClassSubgroupDeploymentSinglePageAsync( + String groupId, String deviceClassId, String deploymentId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeviceStatesForDeviceClassSubgroupDeployment(this.client.getEndpoint(), + this.client.getInstanceId(), groupId, deviceClassId, deploymentId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Gets a list of devices in a deployment along with their state. Useful for getting a list of failed devices. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of deployment device states returned. You can + * filter on deviceId and moduleId and/or deviceState.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     retryCount: int (Required)
+     *     movedOnToNewDeployment: boolean (Required)
+     *     deviceState: String(Succeeded/InProgress/Canceled/Failed) (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of devices in a deployment along with their state as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDeviceStatesForDeviceClassSubgroupDeploymentAsync(String groupId, + String deviceClassId, String deploymentId, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>( + () -> listDeviceStatesForDeviceClassSubgroupDeploymentSinglePageAsync(groupId, deviceClassId, deploymentId, + requestOptions), + nextLink -> listDeviceStatesForDeviceClassSubgroupDeploymentNextSinglePageAsync(nextLink, + requestOptionsForNextPage)); + } + + /** + * Gets a list of devices in a deployment along with their state. Useful for getting a list of failed devices. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of deployment device states returned. You can + * filter on deviceId and moduleId and/or deviceState.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     retryCount: int (Required)
+     *     movedOnToNewDeployment: boolean (Required)
+     *     deviceState: String(Succeeded/InProgress/Canceled/Failed) (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of devices in a deployment along with their state along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeviceStatesForDeviceClassSubgroupDeploymentSinglePage(String groupId, + String deviceClassId, String deploymentId, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDeviceStatesForDeviceClassSubgroupDeploymentSync( + this.client.getEndpoint(), this.client.getInstanceId(), groupId, deviceClassId, deploymentId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Gets a list of devices in a deployment along with their state. Useful for getting a list of failed devices. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of deployment device states returned. You can + * filter on deviceId and moduleId and/or deviceState.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     retryCount: int (Required)
+     *     movedOnToNewDeployment: boolean (Required)
+     *     deviceState: String(Succeeded/InProgress/Canceled/Failed) (Required)
+     * }
+     * }
+     * 
+ * + * @param groupId Group identifier. + * @param deviceClassId Device class identifier. + * @param deploymentId Deployment identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of devices in a deployment along with their state as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeviceStatesForDeviceClassSubgroupDeployment(String groupId, + String deviceClassId, String deploymentId, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>( + () -> listDeviceStatesForDeviceClassSubgroupDeploymentSinglePage(groupId, deviceClassId, deploymentId, + requestOptions), + nextLink -> listDeviceStatesForDeviceClassSubgroupDeploymentNextSinglePage(nextLink, + requestOptionsForNextPage)); + } + + /** + * Retrieve operation status. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param operationId Operation identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return operation metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOperationStatusWithResponseAsync(String operationId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getOperationStatus(this.client.getEndpoint(), this.client.getInstanceId(), + operationId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Retrieve operation status. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param operationId Operation identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return operation metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOperationStatusWithResponse(String operationId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getOperationStatusSync(this.client.getEndpoint(), this.client.getInstanceId(), operationId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Get a list of all device import operations. Completed operations are kept for 7 days before auto-deleted. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of operations returned. Only one specific + * filter is supported: "status eq 'NotStarted' or status eq 'Running'"
topIntegerNoSpecifies a non-negative integer n that limits the number of items + * returned from a collection. The service returns the number of available items up to but not greater than the + * specified value n.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device import operations along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationStatusesSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listOperationStatuses(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get a list of all device import operations. Completed operations are kept for 7 days before auto-deleted. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of operations returned. Only one specific + * filter is supported: "status eq 'NotStarted' or status eq 'Running'"
topIntegerNoSpecifies a non-negative integer n that limits the number of items + * returned from a collection. The service returns the number of available items up to but not greater than the + * specified value n.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device import operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listOperationStatusesAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listOperationStatusesSinglePageAsync(requestOptions), + nextLink -> listOperationStatusesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of all device import operations. Completed operations are kept for 7 days before auto-deleted. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of operations returned. Only one specific + * filter is supported: "status eq 'NotStarted' or status eq 'Running'"
topIntegerNoSpecifies a non-negative integer n that limits the number of items + * returned from a collection. The service returns the number of available items up to but not greater than the + * specified value n.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device import operations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listOperationStatusesSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listOperationStatusesSync(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get a list of all device import operations. Completed operations are kept for 7 days before auto-deleted. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoRestricts the set of operations returned. Only one specific + * filter is supported: "status eq 'NotStarted' or status eq 'Running'"
topIntegerNoSpecifies a non-negative integer n that limits the number of items + * returned from a collection. The service returns the number of available items up to but not greater than the + * specified value n.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all device import operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOperationStatuses(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listOperationStatusesSinglePage(requestOptions), + nextLink -> listOperationStatusesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Start the device diagnostics log collection on specified devices. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param logCollectionId Log collection identifier. + * @param logCollection The log collection properties. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return diagnostics request body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> startLogCollectionWithResponseAsync(String logCollectionId, + BinaryData logCollection, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.startLogCollection(this.client.getEndpoint(), + this.client.getInstanceId(), logCollectionId, this.client.getServiceVersion().getVersion(), logCollection, + accept, requestOptions, context)); + } + + /** + * Start the device diagnostics log collection on specified devices. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param logCollectionId Log collection identifier. + * @param logCollection The log collection properties. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return diagnostics request body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response startLogCollectionWithResponse(String logCollectionId, BinaryData logCollection, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.startLogCollectionSync(this.client.getEndpoint(), this.client.getInstanceId(), logCollectionId, + this.client.getServiceVersion().getVersion(), logCollection, accept, requestOptions, Context.NONE); + } + + /** + * Get the device diagnostics log collection. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param logCollectionId Log collection identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device diagnostics log collection along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLogCollectionWithResponseAsync(String logCollectionId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getLogCollection(this.client.getEndpoint(), this.client.getInstanceId(), + logCollectionId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get the device diagnostics log collection. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param logCollectionId Log collection identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the device diagnostics log collection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getLogCollectionWithResponse(String logCollectionId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getLogCollectionSync(this.client.getEndpoint(), this.client.getInstanceId(), logCollectionId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Get all device diagnostics log collections. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all device diagnostics log collections along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listLogCollectionsSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listLogCollections(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get all device diagnostics log collections. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all device diagnostics log collections as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listLogCollectionsAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listLogCollectionsSinglePageAsync(requestOptions), + nextLink -> listLogCollectionsNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get all device diagnostics log collections. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all device diagnostics log collections along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listLogCollectionsSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listLogCollectionsSync(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get all device diagnostics log collections. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all device diagnostics log collections as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listLogCollections(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listLogCollectionsSinglePage(requestOptions), + nextLink -> listLogCollectionsNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get log collection with detailed status. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     *     deviceStatus (Optional): [
+     *          (Optional){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *             status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *             resultCode: String (Optional)
+     *             extendedResultCode: String (Optional)
+     *             logLocation: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param logCollectionId Log collection identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return log collection with detailed status along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLogCollectionDetailedStatusWithResponseAsync(String logCollectionId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.getLogCollectionDetailedStatus(this.client.getEndpoint(), this.client.getInstanceId(), + logCollectionId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get log collection with detailed status. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     *     deviceStatus (Optional): [
+     *          (Optional){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *             status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *             resultCode: String (Optional)
+     *             extendedResultCode: String (Optional)
+     *             logLocation: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param logCollectionId Log collection identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return log collection with detailed status along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getLogCollectionDetailedStatusWithResponse(String logCollectionId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getLogCollectionDetailedStatusSync(this.client.getEndpoint(), this.client.getInstanceId(), + logCollectionId, this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Get list of device health. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     state: String(healthy/unhealthy) (Required)
+     *     digitalTwinModelId: String (Optional)
+     *     healthChecks (Required): [
+     *          (Required){
+     *             name: String (Optional)
+     *             result: String(success/userError) (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param filter Restricts the set of devices for which device health is returned. You can filter on status, device + * id and module id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of device health along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHealthOfDevicesSinglePageAsync(String filter, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listHealthOfDevices(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), filter, accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get list of device health. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     state: String(healthy/unhealthy) (Required)
+     *     digitalTwinModelId: String (Optional)
+     *     healthChecks (Required): [
+     *          (Required){
+     *             name: String (Optional)
+     *             result: String(success/userError) (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param filter Restricts the set of devices for which device health is returned. You can filter on status, device + * id and module id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of device health as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listHealthOfDevicesAsync(String filter, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listHealthOfDevicesSinglePageAsync(filter, requestOptions), + nextLink -> listHealthOfDevicesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get list of device health. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     state: String(healthy/unhealthy) (Required)
+     *     digitalTwinModelId: String (Optional)
+     *     healthChecks (Required): [
+     *          (Required){
+     *             name: String (Optional)
+     *             result: String(success/userError) (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param filter Restricts the set of devices for which device health is returned. You can filter on status, device + * id and module id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of device health along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listHealthOfDevicesSinglePage(String filter, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listHealthOfDevicesSync(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), filter, accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get list of device health. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     state: String(healthy/unhealthy) (Required)
+     *     digitalTwinModelId: String (Optional)
+     *     healthChecks (Required): [
+     *          (Required){
+     *             name: String (Optional)
+     *             result: String(success/userError) (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param filter Restricts the set of devices for which device health is returned. You can filter on status, device + * id and module id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of device health as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHealthOfDevices(String filter, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listHealthOfDevicesSinglePage(filter, requestOptions), + nextLink -> listHealthOfDevicesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of device classes along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeviceClassesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeviceClassesNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     friendlyName: String (Optional)
+     *     deviceClassProperties (Required): {
+     *         contractModel (Optional): {
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *         compatProperties (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     bestCompatibleUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of device classes along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeviceClassesNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDeviceClassesNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of update information along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstallableUpdatesForDeviceClassNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listInstallableUpdatesForDeviceClassNext(nextLink, + this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of update information along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listInstallableUpdatesForDeviceClassNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listInstallableUpdatesForDeviceClassNextSync(nextLink, + this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of devices along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDevicesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listDevicesNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     deviceClassId: String (Required)
+     *     groupId: String (Optional)
+     *     lastAttemptedUpdate (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+     *     installedUpdate (Optional): (recursive schema, see installedUpdate above)
+     *     onLatestUpdate: boolean (Required)
+     *     lastDeploymentId: String (Optional)
+     *     lastInstallResult (Optional): {
+     *         resultCode: int (Required)
+     *         extendedResultCode: int (Required)
+     *         resultDetails: String (Optional)
+     *         stepResults (Optional): [
+     *              (Optional){
+     *                 update (Optional): (recursive schema, see update above)
+     *                 description: String (Optional)
+     *                 resultCode: int (Required)
+     *                 extendedResultCode: int (Required)
+     *                 resultDetails: String (Optional)
+     *             }
+     *         ]
+     *     }
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of devices along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDevicesNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listDevicesNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     groupType: String(IoTHubTag/DefaultNoTag) (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+     *     subgroupsWithUpdatesInProgressCount: Integer (Optional)
+     *     subgroupsWithOnLatestUpdateCount: Integer (Optional)
+     *     deployments (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of groups along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listGroupsNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listGroupsNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     groupType: String(IoTHubTag/DefaultNoTag) (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+     *     subgroupsWithUpdatesInProgressCount: Integer (Optional)
+     *     subgroupsWithOnLatestUpdateCount: Integer (Optional)
+     *     deployments (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of groups along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listGroupsNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listGroupsNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of updatable devices for a device class subgroup along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBestUpdatesForGroupNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listBestUpdatesForGroupNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     groupId: String (Required)
+     *     deviceClassId: String (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     deviceCount: int (Required)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of updatable devices for a device class subgroup along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBestUpdatesForGroupNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listBestUpdatesForGroupNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of deployments along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsForGroupNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeploymentsForGroupNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of deployments along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeploymentsForGroupNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDeploymentsForGroupNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     groupId: String (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     deploymentId: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of device class subgroups within a group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeviceClassSubgroupsForGroupNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeviceClassSubgroupsForGroupNext(nextLink, this.client.getEndpoint(), + accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceClassId: String (Required)
+     *     groupId: String (Required)
+     *     createdDateTime: String (Required)
+     *     deviceCount: Integer (Optional)
+     *     deploymentId: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of device class subgroups within a group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeviceClassSubgroupsForGroupNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDeviceClassSubgroupsForGroupNextSync(nextLink, this.client.getEndpoint(), + accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of deployments along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsForDeviceClassSubgroupNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeploymentsForDeviceClassSubgroupNext(nextLink, + this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deploymentId: String (Required)
+     *     startDateTime: OffsetDateTime (Required)
+     *     update (Required): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     groupId: String (Required)
+     *     deviceClassSubgroups (Optional): [
+     *         String (Optional)
+     *     ]
+     *     isCanceled: Boolean (Optional)
+     *     isRetried: Boolean (Optional)
+     *     rollbackPolicy (Optional): {
+     *         update (Required): (recursive schema, see update above)
+     *         failure (Required): {
+     *             devicesFailedPercentage: int (Required)
+     *             devicesFailedCount: int (Required)
+     *         }
+     *     }
+     *     isCloudInitiatedRollback: Boolean (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of deployments along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeploymentsForDeviceClassSubgroupNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDeploymentsForDeviceClassSubgroupNextSync(nextLink, + this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     retryCount: int (Required)
+     *     movedOnToNewDeployment: boolean (Required)
+     *     deviceState: String(Succeeded/InProgress/Canceled/Failed) (Required)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of deployment device states along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeviceStatesForDeviceClassSubgroupDeploymentNextSinglePageAsync( + String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeviceStatesForDeviceClassSubgroupDeploymentNext(nextLink, + this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     retryCount: int (Required)
+     *     movedOnToNewDeployment: boolean (Required)
+     *     deviceState: String(Succeeded/InProgress/Canceled/Failed) (Required)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of deployment device states along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeviceStatesForDeviceClassSubgroupDeploymentNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDeviceStatesForDeviceClassSubgroupDeploymentNextSync(nextLink, + this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of device operations with server paging support along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationStatusesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listOperationStatusesNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of device operations with server paging support along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listOperationStatusesNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listOperationStatusesNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of log collections with server paging support along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listLogCollectionsNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listLogCollectionsNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Optional)
+     *     deviceList (Required): [
+     *          (Required){
+     *             deviceId: String (Required)
+     *             moduleId: String (Optional)
+     *         }
+     *     ]
+     *     description: String (Optional)
+     *     createdDateTime: String (Optional)
+     *     lastActionDateTime: String (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of log collections with server paging support along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listLogCollectionsNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listLogCollectionsNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     state: String(healthy/unhealthy) (Required)
+     *     digitalTwinModelId: String (Optional)
+     *     healthChecks (Required): [
+     *          (Required){
+     *             name: String (Optional)
+     *             result: String(success/userError) (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return array of Device Health, with server paging support along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHealthOfDevicesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listHealthOfDevicesNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     deviceId: String (Required)
+     *     moduleId: String (Optional)
+     *     state: String(healthy/unhealthy) (Required)
+     *     digitalTwinModelId: String (Optional)
+     *     healthChecks (Required): [
+     *          (Required){
+     *             name: String (Optional)
+     *             result: String(success/userError) (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return array of Device Health, with server paging support along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listHealthOfDevicesNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listHealthOfDevicesNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceUpdateClientImpl.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceUpdateClientImpl.java new file mode 100644 index 0000000000000..0571bd27bca5b --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceUpdateClientImpl.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.implementation; + +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.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.iot.deviceupdate.DeviceUpdateServiceVersion; + +/** + * Initializes a new instance of the DeviceUpdateClient type. + */ +public final class DeviceUpdateClientImpl { + /** + * The Device Update for IoT Hub account endpoint (hostname only, no protocol). + */ + private final String endpoint; + + /** + * Gets The Device Update for IoT Hub account endpoint (hostname only, no protocol). + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * The Device Update for IoT Hub account instance identifier. + */ + private final String instanceId; + + /** + * Gets The Device Update for IoT Hub account instance identifier. + * + * @return the instanceId value. + */ + public String getInstanceId() { + return this.instanceId; + } + + /** + * Service version. + */ + private final DeviceUpdateServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public DeviceUpdateServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * 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. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The DeviceUpdatesImpl object to access its operations. + */ + private final DeviceUpdatesImpl deviceUpdates; + + /** + * Gets the DeviceUpdatesImpl object to access its operations. + * + * @return the DeviceUpdatesImpl object. + */ + public DeviceUpdatesImpl getDeviceUpdates() { + return this.deviceUpdates; + } + + /** + * The DeviceManagementsImpl object to access its operations. + */ + private final DeviceManagementsImpl deviceManagements; + + /** + * Gets the DeviceManagementsImpl object to access its operations. + * + * @return the DeviceManagementsImpl object. + */ + public DeviceManagementsImpl getDeviceManagements() { + return this.deviceManagements; + } + + /** + * Initializes an instance of DeviceUpdateClient client. + * + * @param endpoint The Device Update for IoT Hub account endpoint (hostname only, no protocol). + * @param instanceId The Device Update for IoT Hub account instance identifier. + * @param serviceVersion Service version. + */ + public DeviceUpdateClientImpl(String endpoint, String instanceId, DeviceUpdateServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, instanceId, serviceVersion); + } + + /** + * Initializes an instance of DeviceUpdateClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The Device Update for IoT Hub account endpoint (hostname only, no protocol). + * @param instanceId The Device Update for IoT Hub account instance identifier. + * @param serviceVersion Service version. + */ + public DeviceUpdateClientImpl(HttpPipeline httpPipeline, String endpoint, String instanceId, + DeviceUpdateServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, instanceId, serviceVersion); + } + + /** + * Initializes an instance of DeviceUpdateClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The Device Update for IoT Hub account endpoint (hostname only, no protocol). + * @param instanceId The Device Update for IoT Hub account instance identifier. + * @param serviceVersion Service version. + */ + public DeviceUpdateClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + String instanceId, DeviceUpdateServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.instanceId = instanceId; + this.serviceVersion = serviceVersion; + this.deviceUpdates = new DeviceUpdatesImpl(this); + this.deviceManagements = new DeviceManagementsImpl(this); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceUpdatesImpl.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceUpdatesImpl.java new file mode 100644 index 0000000000000..52f758b235850 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceUpdatesImpl.java @@ -0,0 +1,2925 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.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.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +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.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +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.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.polling.SyncDefaultPollingStrategy; +import com.azure.core.util.polling.SyncPoller; +import com.azure.core.util.serializer.TypeReference; +import com.azure.iot.deviceupdate.DeviceUpdateServiceVersion; +import java.time.Duration; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DeviceUpdates. + */ +public final class DeviceUpdatesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final DeviceUpdatesService service; + + /** + * The service client containing this operation class. + */ + private final DeviceUpdateClientImpl client; + + /** + * Initializes an instance of DeviceUpdatesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DeviceUpdatesImpl(DeviceUpdateClientImpl client) { + this.service + = RestProxy.create(DeviceUpdatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public DeviceUpdateServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for DeviceUpdateClientDeviceUpdates to be used by the proxy service to + * perform REST calls. + */ + @Host("https://{endpoint}") + @ServiceInterface(name = "DeviceUpdateClientDe") + public interface DeviceUpdatesService { + @Get("/deviceUpdate/{instanceId}/updates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listUpdates(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listUpdatesSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/deviceUpdate/{instanceId}/updates:import") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> importUpdate(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData updateToImport, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/deviceUpdate/{instanceId}/updates:import") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response importUpdateSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData updateToImport, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getUpdate(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("provider") String provider, + @PathParam("name") String name, @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getUpdateSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("provider") String provider, + @PathParam("name") String name, @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteUpdate(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("provider") String provider, + @PathParam("name") String name, @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteUpdateSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("provider") String provider, + @PathParam("name") String name, @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/providers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listProviders(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/providers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listProvidersSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/providers/{provider}/names") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listNames(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("provider") String provider, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/providers/{provider}/names") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listNamesSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("provider") String provider, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listVersions(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("provider") String provider, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listVersionsSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("provider") String provider, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listFiles(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("provider") String provider, + @PathParam("name") String name, @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listFilesSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("provider") String provider, + @PathParam("name") String name, @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files/{fileId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getFile(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("provider") String provider, + @PathParam("name") String name, @PathParam("version") String version, @PathParam("fileId") String fileId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files/{fileId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getFileSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, @PathParam("provider") String provider, + @PathParam("name") String name, @PathParam("version") String version, @PathParam("fileId") String fileId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listOperationStatuses(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listOperationStatusesSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getOperationStatus(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("operationId") String operationId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/deviceUpdate/{instanceId}/updates/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getOperationStatusSync(@HostParam("endpoint") String endpoint, + @PathParam(value = "instanceId", encoded = true) String instanceId, + @PathParam("operationId") String operationId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listUpdatesNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listUpdatesNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listProvidersNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listProvidersNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listNamesNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listNamesNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listVersionsNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listVersionsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listFilesNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listFilesNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listOperationStatusesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listOperationStatusesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Get a list of all updates that have been imported to Device Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
searchStringNoRequest updates matching a free-text search + * expression.
filterStringNoOptional to filter updates by isDeployable property.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all updates that have been imported to Device Update for IoT Hub along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUpdatesSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listUpdates(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get a list of all updates that have been imported to Device Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
searchStringNoRequest updates matching a free-text search + * expression.
filterStringNoOptional to filter updates by isDeployable property.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all updates that have been imported to Device Update for IoT Hub as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listUpdatesAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listUpdatesSinglePageAsync(requestOptions), + nextLink -> listUpdatesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of all updates that have been imported to Device Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
searchStringNoRequest updates matching a free-text search + * expression.
filterStringNoOptional to filter updates by isDeployable property.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all updates that have been imported to Device Update for IoT Hub along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listUpdatesSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listUpdatesSync(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get a list of all updates that have been imported to Device Update for IoT Hub. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
searchStringNoRequest updates matching a free-text search + * expression.
filterStringNoOptional to filter updates by isDeployable property.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all updates that have been imported to Device Update for IoT Hub as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUpdates(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listUpdatesSinglePage(requestOptions), + nextLink -> listUpdatesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Import new update version. This is a long-running-operation; use Operation-Location response header value to + * check for operation status. + *

Request Body Schema

+ * + *
+     * {@code
+     * [
+     *      (Required){
+     *         importManifest (Required): {
+     *             url: String (Required)
+     *             sizeInBytes: long (Required)
+     *             hashes (Required): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *         friendlyName: String (Optional)
+     *         files (Optional): [
+     *              (Optional){
+     *                 filename: String (Required)
+     *                 url: String (Required)
+     *             }
+     *         ]
+     *     }
+     * ]
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param updateToImport The update to be imported (see schema + * https://json.schemastore.org/azure-deviceupdate-import-manifest-5.0.json for details). + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return update metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> importUpdateWithResponseAsync(BinaryData updateToImport, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.importUpdate(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), updateToImport, accept, requestOptions, context)); + } + + /** + * Import new update version. This is a long-running-operation; use Operation-Location response header value to + * check for operation status. + *

Request Body Schema

+ * + *
+     * {@code
+     * [
+     *      (Required){
+     *         importManifest (Required): {
+     *             url: String (Required)
+     *             sizeInBytes: long (Required)
+     *             hashes (Required): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *         friendlyName: String (Optional)
+     *         files (Optional): [
+     *              (Optional){
+     *                 filename: String (Required)
+     *                 url: String (Required)
+     *             }
+     *         ]
+     *     }
+     * ]
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param updateToImport The update to be imported (see schema + * https://json.schemastore.org/azure-deviceupdate-import-manifest-5.0.json for details). + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return update metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response importUpdateWithResponse(BinaryData updateToImport, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.importUpdateSync(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), updateToImport, accept, requestOptions, Context.NONE); + } + + /** + * Import new update version. This is a long-running-operation; use Operation-Location response header value to + * check for operation status. + *

Request Body Schema

+ * + *
+     * {@code
+     * [
+     *      (Required){
+     *         importManifest (Required): {
+     *             url: String (Required)
+     *             sizeInBytes: long (Required)
+     *             hashes (Required): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *         friendlyName: String (Optional)
+     *         files (Optional): [
+     *              (Optional){
+     *                 filename: String (Required)
+     *                 url: String (Required)
+     *             }
+     *         ]
+     *     }
+     * ]
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param updateToImport The update to be imported (see schema + * https://json.schemastore.org/azure-deviceupdate-import-manifest-5.0.json for details). + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of update metadata. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginImportUpdateAsync(BinaryData updateToImport, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.importUpdateWithResponseAsync(updateToImport, requestOptions), + new OperationResourcePollingStrategyWithEndpoint<>(this.client.getHttpPipeline(), + "https://" + this.client.getEndpoint(), null, null, + requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Import new update version. This is a long-running-operation; use Operation-Location response header value to + * check for operation status. + *

Request Body Schema

+ * + *
+     * {@code
+     * [
+     *      (Required){
+     *         importManifest (Required): {
+     *             url: String (Required)
+     *             sizeInBytes: long (Required)
+     *             hashes (Required): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *         friendlyName: String (Optional)
+     *         files (Optional): [
+     *              (Optional){
+     *                 filename: String (Required)
+     *                 url: String (Required)
+     *             }
+     *         ]
+     *     }
+     * ]
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param updateToImport The update to be imported (see schema + * https://json.schemastore.org/azure-deviceupdate-import-manifest-5.0.json for details). + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of update metadata. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginImportUpdate(BinaryData updateToImport, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.importUpdateWithResponse(updateToImport, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Get a specific update version. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a specific update version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getUpdateWithResponseAsync(String provider, String name, String version, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getUpdate(this.client.getEndpoint(), this.client.getInstanceId(), + provider, name, version, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a specific update version. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a specific update version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpdateWithResponse(String provider, String name, String version, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getUpdateSync(this.client.getEndpoint(), this.client.getInstanceId(), provider, name, version, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Delete a specific update version. This is a long-running-operation; use Operation-Location response header value + * to check for operation status. + * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteUpdateWithResponseAsync(String provider, String name, String version, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.deleteUpdate(this.client.getEndpoint(), this.client.getInstanceId(), provider, name, + version, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Delete a specific update version. This is a long-running-operation; use Operation-Location response header value + * to check for operation status. + * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteUpdateWithResponse(String provider, String name, String version, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteUpdateSync(this.client.getEndpoint(), this.client.getInstanceId(), provider, name, version, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Delete a specific update version. This is a long-running-operation; use Operation-Location response header value + * to check for operation status. + * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginDeleteUpdateAsync(String provider, String name, String version, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.deleteUpdateWithResponseAsync(provider, name, version, requestOptions), + new OperationResourcePollingStrategyWithEndpoint<>(this.client.getHttpPipeline(), + "https://" + this.client.getEndpoint(), null, null, + requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(Void.class)); + } + + /** + * Delete a specific update version. This is a long-running-operation; use Operation-Location response header value + * to check for operation status. + * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginDeleteUpdate(String provider, String name, String version, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.deleteUpdateWithResponse(provider, name, version, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(Void.class)); + } + + /** + * Get a list of all update providers that have been imported to Device Update for IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update providers that have been imported to Device Update for IoT Hub along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProvidersSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listProviders(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get a list of all update providers that have been imported to Device Update for IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update providers that have been imported to Device Update for IoT Hub as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listProvidersAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listProvidersSinglePageAsync(requestOptions), + nextLink -> listProvidersNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of all update providers that have been imported to Device Update for IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update providers that have been imported to Device Update for IoT Hub along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listProvidersSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listProvidersSync(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get a list of all update providers that have been imported to Device Update for IoT Hub. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update providers that have been imported to Device Update for IoT Hub as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProviders(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listProvidersSinglePage(requestOptions), + nextLink -> listProvidersNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of all update names that match the specified provider. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update names that match the specified provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNamesSinglePageAsync(String provider, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNames(this.client.getEndpoint(), this.client.getInstanceId(), provider, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get a list of all update names that match the specified provider. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update names that match the specified provider as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listNamesAsync(String provider, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listNamesSinglePageAsync(provider, requestOptions), + nextLink -> listNamesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of all update names that match the specified provider. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update names that match the specified provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNamesSinglePage(String provider, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listNamesSync(this.client.getEndpoint(), this.client.getInstanceId(), + provider, this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get a list of all update names that match the specified provider. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update names that match the specified provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNames(String provider, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listNamesSinglePage(provider, requestOptions), + nextLink -> listNamesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of all update versions that match the specified provider and name. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoOptional to filter updates by isDeployable property.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update versions that match the specified provider and name along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVersionsSinglePageAsync(String provider, String name, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVersions(this.client.getEndpoint(), this.client.getInstanceId(), + provider, name, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get a list of all update versions that match the specified provider and name. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoOptional to filter updates by isDeployable property.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update versions that match the specified provider and name as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listVersionsAsync(String provider, String name, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listVersionsSinglePageAsync(provider, name, requestOptions), + nextLink -> listVersionsNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of all update versions that match the specified provider and name. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoOptional to filter updates by isDeployable property.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update versions that match the specified provider and name along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listVersionsSinglePage(String provider, String name, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listVersionsSync(this.client.getEndpoint(), this.client.getInstanceId(), + provider, name, this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get a list of all update versions that match the specified provider and name. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoOptional to filter updates by isDeployable property.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update versions that match the specified provider and name as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVersions(String provider, String name, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listVersionsSinglePage(provider, name, requestOptions), + nextLink -> listVersionsNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of all update file identifiers for the specified version. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update file identifiers for the specified version along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFilesSinglePageAsync(String provider, String name, String version, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listFiles(this.client.getEndpoint(), this.client.getInstanceId(), provider, + name, version, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get a list of all update file identifiers for the specified version. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update file identifiers for the specified version as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listFilesAsync(String provider, String name, String version, + RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listFilesSinglePageAsync(provider, name, version, requestOptions), + nextLink -> listFilesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of all update file identifiers for the specified version. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update file identifiers for the specified version along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listFilesSinglePage(String provider, String name, String version, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listFilesSync(this.client.getEndpoint(), this.client.getInstanceId(), provider, name, version, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get a list of all update file identifiers for the specified version. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all update file identifiers for the specified version as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listFiles(String provider, String name, String version, + RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listFilesSinglePage(provider, name, version, requestOptions), + nextLink -> listFilesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a specific update file from the version. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     fileName: String (Required)
+     *     sizeInBytes: long (Required)
+     *     hashes (Required): {
+     *         String: String (Required)
+     *     }
+     *     mimeType: String (Optional)
+     *     scanResult: String (Optional)
+     *     scanDetails: String (Optional)
+     *     properties (Optional): {
+     *         String: String (Required)
+     *     }
+     *     fileId: String (Required)
+     *     relatedFiles (Optional): [
+     *          (Optional){
+     *             fileName: String (Required)
+     *             sizeInBytes: long (Required)
+     *             hashes (Required): {
+     *                 String: String (Required)
+     *             }
+     *             mimeType: String (Optional)
+     *             scanResult: String (Optional)
+     *             scanDetails: String (Optional)
+     *             properties (Optional): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *     ]
+     *     downloadHandler (Optional): {
+     *         id: String (Required)
+     *     }
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param fileId File identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a specific update file from the version along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getFileWithResponseAsync(String provider, String name, String version, + String fileId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getFile(this.client.getEndpoint(), this.client.getInstanceId(), provider, + name, version, fileId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a specific update file from the version. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     fileName: String (Required)
+     *     sizeInBytes: long (Required)
+     *     hashes (Required): {
+     *         String: String (Required)
+     *     }
+     *     mimeType: String (Optional)
+     *     scanResult: String (Optional)
+     *     scanDetails: String (Optional)
+     *     properties (Optional): {
+     *         String: String (Required)
+     *     }
+     *     fileId: String (Required)
+     *     relatedFiles (Optional): [
+     *          (Optional){
+     *             fileName: String (Required)
+     *             sizeInBytes: long (Required)
+     *             hashes (Required): {
+     *                 String: String (Required)
+     *             }
+     *             mimeType: String (Optional)
+     *             scanResult: String (Optional)
+     *             scanDetails: String (Optional)
+     *             properties (Optional): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *     ]
+     *     downloadHandler (Optional): {
+     *         id: String (Required)
+     *     }
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param provider Update provider. + * @param name Update name. + * @param version Update version. + * @param fileId File identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a specific update file from the version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFileWithResponse(String provider, String name, String version, String fileId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getFileSync(this.client.getEndpoint(), this.client.getInstanceId(), provider, name, version, + fileId, this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Get a list of all import update operations. Completed operations are kept for 7 days before auto-deleted. Delete + * operations are not returned by this API version. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoOptional to filter operations by status property. Only one + * specific filter is supported: "status eq 'NotStarted' or status eq 'Running'"
topIntegerNoSpecifies a non-negative integer n that limits the number of items + * returned from a collection. The service returns the number of available items up to but not greater than the + * specified value n.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     update (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     resourceLocation: String (Optional)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all import update operations along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationStatusesSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listOperationStatuses(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get a list of all import update operations. Completed operations are kept for 7 days before auto-deleted. Delete + * operations are not returned by this API version. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoOptional to filter operations by status property. Only one + * specific filter is supported: "status eq 'NotStarted' or status eq 'Running'"
topIntegerNoSpecifies a non-negative integer n that limits the number of items + * returned from a collection. The service returns the number of available items up to but not greater than the + * specified value n.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     update (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     resourceLocation: String (Optional)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all import update operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listOperationStatusesAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listOperationStatusesSinglePageAsync(requestOptions), + nextLink -> listOperationStatusesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of all import update operations. Completed operations are kept for 7 days before auto-deleted. Delete + * operations are not returned by this API version. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoOptional to filter operations by status property. Only one + * specific filter is supported: "status eq 'NotStarted' or status eq 'Running'"
topIntegerNoSpecifies a non-negative integer n that limits the number of items + * returned from a collection. The service returns the number of available items up to but not greater than the + * specified value n.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     update (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     resourceLocation: String (Optional)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all import update operations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listOperationStatusesSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listOperationStatusesSync(this.client.getEndpoint(), this.client.getInstanceId(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get a list of all import update operations. Completed operations are kept for 7 days before auto-deleted. Delete + * operations are not returned by this API version. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
filterStringNoOptional to filter operations by status property. Only one + * specific filter is supported: "status eq 'NotStarted' or status eq 'Running'"
topIntegerNoSpecifies a non-negative integer n that limits the number of items + * returned from a collection. The service returns the number of available items up to but not greater than the + * specified value n.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     update (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     resourceLocation: String (Optional)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of all import update operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOperationStatuses(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listOperationStatusesSinglePage(requestOptions), + nextLink -> listOperationStatusesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Retrieve operation status. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     update (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     resourceLocation: String (Optional)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param operationId Operation identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return operation metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOperationStatusWithResponseAsync(String operationId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getOperationStatus(this.client.getEndpoint(), this.client.getInstanceId(), + operationId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Retrieve operation status. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-None-MatchStringNoDefines the If-None-Match condition. The operation will + * be performed only if the ETag on the server does not match this value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     update (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     resourceLocation: String (Optional)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param operationId Operation identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return operation metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOperationStatusWithResponse(String operationId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getOperationStatusSync(this.client.getEndpoint(), this.client.getInstanceId(), operationId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of updates along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUpdatesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listUpdatesNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     updateId (Required): {
+     *         provider: String (Required)
+     *         name: String (Required)
+     *         version: String (Required)
+     *     }
+     *     description: String (Optional)
+     *     friendlyName: String (Optional)
+     *     isDeployable: Boolean (Optional)
+     *     updateType: String (Optional)
+     *     installedCriteria: String (Optional)
+     *     compatibility (Required): [
+     *          (Required){
+     *             String: String (Required)
+     *         }
+     *     ]
+     *     instructions (Optional): {
+     *         steps (Required): [
+     *              (Required){
+     *                 type: String(Inline/Reference) (Optional)
+     *                 description: String (Optional)
+     *                 handler: String (Optional)
+     *                 handlerProperties: Object (Optional)
+     *                 files (Optional): [
+     *                     String (Optional)
+     *                 ]
+     *                 updateId (Optional): (recursive schema, see updateId above)
+     *             }
+     *         ]
+     *     }
+     *     referencedBy (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     *     scanResult: String (Optional)
+     *     manifestVersion: String (Required)
+     *     importedDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of updates along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listUpdatesNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listUpdatesNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of strings with server paging support along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProvidersNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listProvidersNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of strings with server paging support along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listProvidersNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listProvidersNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of strings with server paging support along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNamesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listNamesNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of strings with server paging support along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNamesNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listNamesNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of strings with server paging support along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVersionsNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listVersionsNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of strings with server paging support along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listVersionsNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listVersionsNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of strings with server paging support along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFilesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listFilesNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of strings with server paging support along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listFilesNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listFilesNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     update (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     resourceLocation: String (Optional)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of operations with server paging support along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationStatusesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listOperationStatusesNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     operationId: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed) (Required)
+     *     update (Optional): {
+     *         updateId (Required): {
+     *             provider: String (Required)
+     *             name: String (Required)
+     *             version: String (Required)
+     *         }
+     *         description: String (Optional)
+     *         friendlyName: String (Optional)
+     *     }
+     *     resourceLocation: String (Optional)
+     *     error (Optional): {
+     *         code: String (Required)
+     *         message: String (Required)
+     *         target: String (Optional)
+     *         details (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *         innererror (Optional): {
+     *             code: String (Required)
+     *             message: String (Optional)
+     *             errorDetail: String (Optional)
+     *             innerError (Optional): (recursive schema, see innerError above)
+     *         }
+     *         occurredDateTime: OffsetDateTime (Optional)
+     *     }
+     *     traceId: String (Optional)
+     *     lastActionDateTime: OffsetDateTime (Required)
+     *     createdDateTime: OffsetDateTime (Required)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the list of operations with server paging support along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listOperationStatusesNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listOperationStatusesNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/package-info.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/package-info.java new file mode 100644 index 0000000000000..92eb6d7c7c88f --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/implementation/package-info.java @@ -0,0 +1,13 @@ +// 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 DeviceUpdateClient. + * Device Update for IoT Hub is an Azure service that enables customers to publish updates for their IoT devices to the + * cloud, and then deploy that update to their devices (approve updates to groups of devices managed and provisioned in + * IoT Hub). It leverages the proven security and reliability of the Windows Update platform, optimized for IoT devices. + * It works globally and knows when and how to update devices, enabling customers to focus on their business goals and + * let Device Update for IoT Hub handle the updates. + */ +package com.azure.iot.deviceupdate.implementation; diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/package-info.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/package-info.java new file mode 100644 index 0000000000000..a240d67ed2e80 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/com/azure/iot/deviceupdate/package-info.java @@ -0,0 +1,13 @@ +// 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 DeviceUpdateClient. + * Device Update for IoT Hub is an Azure service that enables customers to publish updates for their IoT devices to the + * cloud, and then deploy that update to their devices (approve updates to groups of devices managed and provisioned in + * IoT Hub). It leverages the proven security and reliability of the Windows Update platform, optimized for IoT devices. + * It works globally and knows when and how to update devices, enabling customers to focus on their business goals and + * let Device Update for IoT Hub handle the updates. + */ +package com.azure.iot.deviceupdate; diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/module-info.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/module-info.java new file mode 100644 index 0000000000000..5cf10a2aa67dc --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/java/module-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. + +module com.azure.iot.deviceupdate { + requires transitive com.azure.core; + + exports com.azure.iot.deviceupdate; +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/resources/azure-iot-deviceupdate.properties b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/resources/azure-iot-deviceupdate.properties new file mode 100644 index 0000000000000..ca812989b4f27 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/main/resources/azure-iot-deviceupdate.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementCancelOrRetryDeployment.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementCancelOrRetryDeployment.java new file mode 100644 index 0000000000000..52ce8be7e9db7 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementCancelOrRetryDeployment.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementCancelOrRetryDeployment { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementstopdeployment.devicemanagementcancelorretrydeployment + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.stopDeploymentWithResponse("TestGroup", "deviceClassId", + "deploymentId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementstopdeployment.devicemanagementcancelorretrydeployment + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementCreateOrUpdateDeployment.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementCreateOrUpdateDeployment.java new file mode 100644 index 0000000000000..cdaa0d3a34889 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementCreateOrUpdateDeployment.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementCreateOrUpdateDeployment { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementcreateorupdatedeployment.devicemanagementcreateorupdatedeployment + BinaryData deployment = BinaryData.fromString( + "{\"deploymentId\":\"deploymentId\",\"groupId\":\"TestGroup\",\"rollbackPolicy\":{\"failure\":{\"devicesFailedCount\":100,\"devicesFailedPercentage\":50},\"update\":{\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.2.3.3\"}}},\"startDateTime\":\"2020-04-22T12:12:12.0000000+00:00\",\"update\":{\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.2.3.4\"}}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.createOrUpdateDeploymentWithResponse("TestGroup", + "deploymentId", deployment, requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementcreateorupdatedeployment.devicemanagementcreateorupdatedeployment + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeployment.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeployment.java new file mode 100644 index 0000000000000..3f6a1f38353a5 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeployment.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementDeleteDeployment { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementdeletedeployment.devicemanagementdeletedeployment + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.deleteDeploymentWithResponse("TestGroup", "deploymentId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementdeletedeployment.devicemanagementdeletedeployment + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeploymentForDeviceClassSubgroup.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeploymentForDeviceClassSubgroup.java new file mode 100644 index 0000000000000..a46999e107dc4 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeploymentForDeviceClassSubgroup.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementDeleteDeploymentForDeviceClassSubgroup { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementdeletedeploymentfordeviceclasssubgroup.devicemanagementdeletedeploymentfordeviceclasssubgroup + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.deleteDeploymentForDeviceClassSubgroupWithResponse("TestGroup", + "deviceClassId", "deploymentId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementdeletedeploymentfordeviceclasssubgroup.devicemanagementdeletedeploymentfordeviceclasssubgroup + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClass.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClass.java new file mode 100644 index 0000000000000..e29e001d7e198 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClass.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementDeleteDeviceClass { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementdeletedeviceclass.devicemanagementdeletedeviceclass + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.deleteDeviceClassWithResponse("deviceClass1", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementdeletedeviceclass.devicemanagementdeletedeviceclass + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClassSubgroup.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClassSubgroup.java new file mode 100644 index 0000000000000..bd00e4fdf20fe --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClassSubgroup.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementDeleteDeviceClassSubgroup { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementdeletedeviceclasssubgroup.devicemanagementdeletedeviceclasssubgroup + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.deleteDeviceClassSubgroupWithResponse("group1", "deviceClassId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementdeletedeviceclasssubgroup.devicemanagementdeletedeviceclasssubgroup + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteGroup.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteGroup.java new file mode 100644 index 0000000000000..a7b62c05d97c3 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteGroup.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementDeleteGroup { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementdeletegroup.devicemanagementdeletegroup + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.deleteGroupWithResponse("group1", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementdeletegroup.devicemanagementdeletegroup + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeployment.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeployment.java new file mode 100644 index 0000000000000..a2d950a7227e1 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeployment.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetDeployment { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetdeployment.devicemanagementgetdeployment + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getDeploymentWithResponse("TestGroup", "deploymentId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetdeployment.devicemanagementgetdeployment + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentForDeviceClassSubgroup.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentForDeviceClassSubgroup.java new file mode 100644 index 0000000000000..5666c4b210383 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentForDeviceClassSubgroup.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetDeploymentForDeviceClassSubgroup { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetdeploymentfordeviceclasssubgroup.devicemanagementgetdeploymentfordeviceclasssubgroup + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.getDeploymentForDeviceClassSubgroupWithResponse( + "TestGroup", "deviceClassId", "deploymentId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetdeploymentfordeviceclasssubgroup.devicemanagementgetdeploymentfordeviceclasssubgroup + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentStatus.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentStatus.java new file mode 100644 index 0000000000000..c1fb2250e5ede --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentStatus.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetDeploymentStatus { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetdeploymentstatus.devicemanagementgetdeploymentstatus + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getDeploymentStatusWithResponse("TestGroup", "deploymentId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetdeploymentstatus.devicemanagementgetdeploymentstatus + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDevice.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDevice.java new file mode 100644 index 0000000000000..3157b7b1a5ff8 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDevice.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetDevice { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetdevice.devicemanagementgetdevice + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.getDeviceWithResponse("deviceId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetdevice.devicemanagementgetdevice + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClass.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClass.java new file mode 100644 index 0000000000000..b9a44baff49ed --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClass.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetDeviceClass { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetdeviceclass.devicemanagementgetdeviceclass + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getDeviceClassWithResponse("deviceClassId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetdeviceclass.devicemanagementgetdeviceclass + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupDeploymentStatus.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupDeploymentStatus.java new file mode 100644 index 0000000000000..7f03471b4d2ef --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupDeploymentStatus.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetDeviceClassSubgroupDeploymentStatus { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetdeviceclasssubgroupdeploymentstatus.devicemanagementgetdeviceclasssubgroupdeploymentstatus + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.getDeviceClassSubgroupDeploymentStatusWithResponse( + "TestGroup", "deviceClassId", "deploymentId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetdeviceclasssubgroupdeploymentstatus.devicemanagementgetdeviceclasssubgroupdeploymentstatus + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupUpdateCompliance.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupUpdateCompliance.java new file mode 100644 index 0000000000000..ad6a106b840ce --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupUpdateCompliance.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetDeviceClassSubgroupUpdateCompliance { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetdeviceclasssubgroupupdatecompliance.devicemanagementgetdeviceclasssubgroupupdatecompliance + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient + .getDeviceClassSubgroupUpdateComplianceWithResponse("group1", "deviceClassId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetdeviceclasssubgroupupdatecompliance.devicemanagementgetdeviceclasssubgroupupdatecompliance + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroup.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroup.java new file mode 100644 index 0000000000000..e1af0d9fdb456 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroup.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetGroup { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetgroup.devicemanagementgetgroup + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.getGroupWithResponse("group1", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetgroup.devicemanagementgetgroup + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroupUpdateCompliance.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroupUpdateCompliance.java new file mode 100644 index 0000000000000..20f76461f3fca --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroupUpdateCompliance.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetGroupUpdateCompliance { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetdeviceclasssubgroup.devicemanagementgetgroupupdatecompliance + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getDeviceClassSubgroupWithResponse("group1", "deviceClassId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetdeviceclasssubgroup.devicemanagementgetgroupupdatecompliance + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollection.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollection.java new file mode 100644 index 0000000000000..838256c911145 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollection.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetLogCollection { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetlogcollection.devicemanagementgetlogcollection + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getLogCollectionWithResponse("LogCollectionId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetlogcollection.devicemanagementgetlogcollection + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollectionDetailedStatus.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollectionDetailedStatus.java new file mode 100644 index 0000000000000..ed563c7e5a494 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollectionDetailedStatus.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetLogCollectionDetailedStatus { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetlogcollectiondetailedstatus.devicemanagementgetlogcollectiondetailedstatus + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getLogCollectionDetailedStatusWithResponse("LogCollectionId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetlogcollectiondetailedstatus.devicemanagementgetlogcollectiondetailedstatus + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetOperationStatus.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetOperationStatus.java new file mode 100644 index 0000000000000..68707fae2d014 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetOperationStatus.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetOperationStatus { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetoperationstatus.devicemanagementgetoperationstatus + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient + .getOperationStatusWithResponse("e4491c54-916f-443d-9094-bcca546ace2f", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetoperationstatus.devicemanagementgetoperationstatus + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateCompliance.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateCompliance.java new file mode 100644 index 0000000000000..c5527756c4baf --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateCompliance.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetUpdateCompliance { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetupdatecompliance.devicemanagementgetupdatecompliance + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.getUpdateComplianceWithResponse(requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetupdatecompliance.devicemanagementgetupdatecompliance + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateComplianceForGroup.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateComplianceForGroup.java new file mode 100644 index 0000000000000..e4fab59394191 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateComplianceForGroup.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementGetUpdateComplianceForGroup { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetupdatecomplianceforgroup.devicemanagementgetupdatecomplianceforgroup + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getUpdateComplianceForGroupWithResponse("group1", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetupdatecomplianceforgroup.devicemanagementgetupdatecomplianceforgroup + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementImportDevices.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementImportDevices.java new file mode 100644 index 0000000000000..94069983888f5 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementImportDevices.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementImportDevices { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementimportdevices.devicemanagementimportdevices + BinaryData importType = BinaryData.fromString("\"All\""); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response + = deviceManagementClient.beginImportDevices(importType, requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementimportdevices.devicemanagementimportdevices + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForDeviceClassSubgroup.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForDeviceClassSubgroup.java new file mode 100644 index 0000000000000..a6b64e57b9e5b --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForDeviceClassSubgroup.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListBestUpdatesForDeviceClassSubgroup { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementgetbestupdatesfordeviceclasssubgroup.devicemanagementlistbestupdatesfordeviceclasssubgroup + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient + .getBestUpdatesForDeviceClassSubgroupWithResponse("group1", "deviceClassId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementgetbestupdatesfordeviceclasssubgroup.devicemanagementlistbestupdatesfordeviceclasssubgroup + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForGroup.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForGroup.java new file mode 100644 index 0000000000000..910f2244007c5 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForGroup.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListBestUpdatesForGroup { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementlistbestupdatesforgroup.devicemanagementlistbestupdatesforgroup + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listBestUpdatesForGroup("group1", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementlistbestupdatesforgroup.devicemanagementlistbestupdatesforgroup + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForDeviceClassSubgroup.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForDeviceClassSubgroup.java new file mode 100644 index 0000000000000..163ceceae457e --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForDeviceClassSubgroup.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListDeploymentsForDeviceClassSubgroup { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementlistdeploymentsfordeviceclasssubgroup.devicemanagementlistdeploymentsfordeviceclasssubgroup + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listDeploymentsForDeviceClassSubgroup("TestGroup", + "deviceClassId1", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementlistdeploymentsfordeviceclasssubgroup.devicemanagementlistdeploymentsfordeviceclasssubgroup + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForGroup.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForGroup.java new file mode 100644 index 0000000000000..3d1438603b277 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForGroup.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListDeploymentsForGroup { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementlistdeploymentsforgroup.devicemanagementlistdeploymentsforgroup + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = deviceManagementClient.listDeploymentsForGroup("TestGroup", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementlistdeploymentsforgroup.devicemanagementlistdeploymentsforgroup + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClassSubgroupsForGroup.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClassSubgroupsForGroup.java new file mode 100644 index 0000000000000..3ad6a275e1c50 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClassSubgroupsForGroup.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListDeviceClassSubgroupsForGroup { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementlistdeviceclasssubgroupsforgroup.devicemanagementlistdeviceclasssubgroupsforgroup + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = deviceManagementClient.listDeviceClassSubgroupsForGroup("group1", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementlistdeviceclasssubgroupsforgroup.devicemanagementlistdeviceclasssubgroupsforgroup + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClasses.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClasses.java new file mode 100644 index 0000000000000..c084fe7e36cdf --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClasses.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListDeviceClasses { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementlistdeviceclasses.devicemanagementlistdeviceclasses + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listDeviceClasses(requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementlistdeviceclasses.devicemanagementlistdeviceclasses + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment.java new file mode 100644 index 0000000000000..84d11fd9a272a --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementlistdevicestatesfordeviceclasssubgroupdeployment.devicemanagementlistdevicestatesfordeviceclasssubgroupdeployment + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listDeviceStatesForDeviceClassSubgroupDeployment( + "TestGroup", "deviceClassId", "deploymentId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementlistdevicestatesfordeviceclasssubgroupdeployment.devicemanagementlistdevicestatesfordeviceclasssubgroupdeployment + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDevices.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDevices.java new file mode 100644 index 0000000000000..967a65250be89 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDevices.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListDevices { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementlistdevices.devicemanagementlistdevices + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listDevices(requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementlistdevices.devicemanagementlistdevices + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListGroups.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListGroups.java new file mode 100644 index 0000000000000..079fd839eb983 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListGroups.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListGroups { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementlistgroups.devicemanagementlistgroups + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listGroups(requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementlistgroups.devicemanagementlistgroups + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListHealthOfDevices.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListHealthOfDevices.java new file mode 100644 index 0000000000000..ae56062b754c4 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListHealthOfDevices.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListHealthOfDevices { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementlisthealthofdevices.devicemanagementlisthealthofdevices + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = deviceManagementClient.listHealthOfDevices("state eq 'unhealthy'", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementlisthealthofdevices.devicemanagementlisthealthofdevices + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListInstallableUpdatesForDeviceClass.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListInstallableUpdatesForDeviceClass.java new file mode 100644 index 0000000000000..e9b4119028e76 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListInstallableUpdatesForDeviceClass.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListInstallableUpdatesForDeviceClass { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementlistinstallableupdatesfordeviceclass.devicemanagementlistinstallableupdatesfordeviceclass + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = deviceManagementClient.listInstallableUpdatesForDeviceClass("deviceClassId", requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementlistinstallableupdatesfordeviceclass.devicemanagementlistinstallableupdatesfordeviceclass + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListLogCollections.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListLogCollections.java new file mode 100644 index 0000000000000..324b01e2f4dd4 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListLogCollections.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListLogCollections { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementlistlogcollections.devicemanagementlistlogcollections + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listLogCollections(requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementlistlogcollections.devicemanagementlistlogcollections + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListOperationStatuses.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListOperationStatuses.java new file mode 100644 index 0000000000000..c1902d2b944d4 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementListOperationStatuses.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementListOperationStatuses { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementlistoperationstatuses.devicemanagementlistoperationstatuses + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listOperationStatuses(requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementlistoperationstatuses.devicemanagementlistoperationstatuses + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementStartLogCollection.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementStartLogCollection.java new file mode 100644 index 0000000000000..f28470dabc25f --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementStartLogCollection.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementStartLogCollection { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementstartlogcollection.devicemanagementstartlogcollection + BinaryData logCollection = BinaryData.fromString( + "{\"description\":\"Log collection description\",\"deviceList\":[{\"deviceId\":\"DeviceA\"},{\"deviceId\":\"DeviceB\",\"moduleId\":\"ModuleB\"}]}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.startLogCollectionWithResponse("LogCollectionId", logCollection, requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementstartlogcollection.devicemanagementstartlogcollection + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementUpdateDeviceClass.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementUpdateDeviceClass.java new file mode 100644 index 0000000000000..40c6407ba43a9 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceManagementUpdateDeviceClass.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; + +public class DeviceManagementUpdateDeviceClass { + public static void main(String[] args) { + DeviceManagementClient deviceManagementClient + = new DeviceManagementClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.devicemanagementupdatedeviceclass.devicemanagementupdatedeviceclass + BinaryData deviceClassPatch = BinaryData.fromString("{\"friendlyName\":\"GA Webcams\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.updateDeviceClassWithResponse("deviceClassId", deviceClassPatch, requestOptions); + // END:com.azure.iot.deviceupdate.generated.devicemanagementupdatedeviceclass.devicemanagementupdatedeviceclass + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateDeleteUpdate.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateDeleteUpdate.java new file mode 100644 index 0000000000000..5f8ae08f8738a --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateDeleteUpdate.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceUpdateClient; +import com.azure.iot.deviceupdate.DeviceUpdateClientBuilder; + +public class DeviceUpdateDeleteUpdate { + public static void main(String[] args) { + DeviceUpdateClient deviceUpdateClient + = new DeviceUpdateClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.deviceupdatedeleteupdate.deviceupdatedeleteupdate + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response + = deviceUpdateClient.beginDeleteUpdate("microsoft", "adu", "1.0.0.0", requestOptions); + // END:com.azure.iot.deviceupdate.generated.deviceupdatedeleteupdate.deviceupdatedeleteupdate + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetFile.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetFile.java new file mode 100644 index 0000000000000..2eb0dd8bc3269 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetFile.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceUpdateClient; +import com.azure.iot.deviceupdate.DeviceUpdateClientBuilder; + +public class DeviceUpdateGetFile { + public static void main(String[] args) { + DeviceUpdateClient deviceUpdateClient + = new DeviceUpdateClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.deviceupdategetfile.deviceupdategetfile + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceUpdateClient.getFileWithResponse("microsoft", "adu", "1.0.0.0", "abc123", requestOptions); + // END:com.azure.iot.deviceupdate.generated.deviceupdategetfile.deviceupdategetfile + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetOperationStatus.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetOperationStatus.java new file mode 100644 index 0000000000000..06ab4be4ad21f --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetOperationStatus.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceUpdateClient; +import com.azure.iot.deviceupdate.DeviceUpdateClientBuilder; + +public class DeviceUpdateGetOperationStatus { + public static void main(String[] args) { + DeviceUpdateClient deviceUpdateClient + = new DeviceUpdateClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.deviceupdategetoperationstatus.deviceupdategetoperationstatus + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceUpdateClient.getOperationStatusWithResponse("e4491c54-916f-443d-9094-bcca546ace2f", requestOptions); + // END:com.azure.iot.deviceupdate.generated.deviceupdategetoperationstatus.deviceupdategetoperationstatus + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetUpdate.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetUpdate.java new file mode 100644 index 0000000000000..d2f6e048a53fe --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetUpdate.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceUpdateClient; +import com.azure.iot.deviceupdate.DeviceUpdateClientBuilder; + +public class DeviceUpdateGetUpdate { + public static void main(String[] args) { + DeviceUpdateClient deviceUpdateClient + = new DeviceUpdateClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.deviceupdategetupdate.deviceupdategetupdate + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceUpdateClient.getUpdateWithResponse("microsoft", "adu", "1.0.0.0", requestOptions); + // END:com.azure.iot.deviceupdate.generated.deviceupdategetupdate.deviceupdategetupdate + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateImportUpdate.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateImportUpdate.java new file mode 100644 index 0000000000000..53d72d419638b --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateImportUpdate.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceUpdateClient; +import com.azure.iot.deviceupdate.DeviceUpdateClientBuilder; + +public class DeviceUpdateImportUpdate { + public static void main(String[] args) { + DeviceUpdateClient deviceUpdateClient + = new DeviceUpdateClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.deviceupdateimportupdate.deviceupdateimportupdate + BinaryData updateToImport = BinaryData.fromString( + "[{\"files\":[{\"filename\":\"file1.bin\",\"url\":\"http://test.blob.core.windows.net/test/upload1v5uww1q\"},{\"filename\":\"file2.bin\",\"url\":\"http://test.blob.core.windows.net/test/uploadkrmn5yw0\"},{\"filename\":\"file3.bin\",\"url\":\"http://test.blob.core.windows.net/test/uploaddq52ky5m\"}],\"importManifest\":{\"hashes\":{\"sha256\":\"O19LyyncPe1AGstOdkcmozLV8pSbBdqrE18HdYVohRc=\"},\"sizeInBytes\":816,\"url\":\"http://test.blob.core.windows.net/test/uploadimportMan.json\"}}]"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response + = deviceUpdateClient.beginImportUpdate(updateToImport, requestOptions); + // END:com.azure.iot.deviceupdate.generated.deviceupdateimportupdate.deviceupdateimportupdate + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListFiles.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListFiles.java new file mode 100644 index 0000000000000..e123c66af083b --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListFiles.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceUpdateClient; +import com.azure.iot.deviceupdate.DeviceUpdateClientBuilder; + +public class DeviceUpdateListFiles { + public static void main(String[] args) { + DeviceUpdateClient deviceUpdateClient + = new DeviceUpdateClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.deviceupdatelistfiles.deviceupdatelistfiles + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = deviceUpdateClient.listFiles("microsoft", "adu", "1.0.0.0", requestOptions); + // END:com.azure.iot.deviceupdate.generated.deviceupdatelistfiles.deviceupdatelistfiles + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListNames.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListNames.java new file mode 100644 index 0000000000000..ffc52b6105dbb --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListNames.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceUpdateClient; +import com.azure.iot.deviceupdate.DeviceUpdateClientBuilder; + +public class DeviceUpdateListNames { + public static void main(String[] args) { + DeviceUpdateClient deviceUpdateClient + = new DeviceUpdateClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.deviceupdatelistnames.deviceupdatelistnames + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceUpdateClient.listNames("microsoft", requestOptions); + // END:com.azure.iot.deviceupdate.generated.deviceupdatelistnames.deviceupdatelistnames + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListOperationStatuses.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListOperationStatuses.java new file mode 100644 index 0000000000000..70a24a7dd56fa --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListOperationStatuses.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceUpdateClient; +import com.azure.iot.deviceupdate.DeviceUpdateClientBuilder; + +public class DeviceUpdateListOperationStatuses { + public static void main(String[] args) { + DeviceUpdateClient deviceUpdateClient + = new DeviceUpdateClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.deviceupdatelistoperationstatuses.deviceupdatelistoperationstatuses + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceUpdateClient.listOperationStatuses(requestOptions); + // END:com.azure.iot.deviceupdate.generated.deviceupdatelistoperationstatuses.deviceupdatelistoperationstatuses + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListProviders.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListProviders.java new file mode 100644 index 0000000000000..b73d2917c7e6b --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListProviders.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceUpdateClient; +import com.azure.iot.deviceupdate.DeviceUpdateClientBuilder; + +public class DeviceUpdateListProviders { + public static void main(String[] args) { + DeviceUpdateClient deviceUpdateClient + = new DeviceUpdateClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.deviceupdatelistproviders.deviceupdatelistproviders + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceUpdateClient.listProviders(requestOptions); + // END:com.azure.iot.deviceupdate.generated.deviceupdatelistproviders.deviceupdatelistproviders + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListUpdates.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListUpdates.java new file mode 100644 index 0000000000000..275df0a8f7b83 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListUpdates.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceUpdateClient; +import com.azure.iot.deviceupdate.DeviceUpdateClientBuilder; + +public class DeviceUpdateListUpdates { + public static void main(String[] args) { + DeviceUpdateClient deviceUpdateClient + = new DeviceUpdateClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.deviceupdatelistupdates.deviceupdatelistupdates + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceUpdateClient.listUpdates(requestOptions); + // END:com.azure.iot.deviceupdate.generated.deviceupdatelistupdates.deviceupdatelistupdates + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListVersions.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListVersions.java new file mode 100644 index 0000000000000..6e37c3664d7f8 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/samples/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListVersions.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceUpdateClient; +import com.azure.iot.deviceupdate.DeviceUpdateClientBuilder; + +public class DeviceUpdateListVersions { + public static void main(String[] args) { + DeviceUpdateClient deviceUpdateClient + = new DeviceUpdateClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("contoso.api.adu.microsoft.com") + .instanceId("blue") + .buildClient(); + // BEGIN:com.azure.iot.deviceupdate.generated.deviceupdatelistversions.deviceupdatelistversions + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceUpdateClient.listVersions("microsoft", "adu", requestOptions); + // END:com.azure.iot.deviceupdate.generated.deviceupdatelistversions.deviceupdatelistversions + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementCancelOrRetryDeploymentTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementCancelOrRetryDeploymentTests.java new file mode 100644 index 0000000000000..4948033b557b8 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementCancelOrRetryDeploymentTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementCancelOrRetryDeploymentTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementCancelOrRetryDeploymentTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.stopDeploymentWithResponse("TestGroup", "deviceClassId", + "deploymentId", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deploymentId\":\"deploymentId\",\"groupId\":\"TestGroup\",\"isCanceled\":true,\"isRetried\":false,\"startDateTime\":\"2020-04-22T12:12:12.0000000+00:00\",\"update\":{\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.2.3.4\"}}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementCreateOrUpdateDeploymentTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementCreateOrUpdateDeploymentTests.java new file mode 100644 index 0000000000000..30cc991e8bf24 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementCreateOrUpdateDeploymentTests.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementCreateOrUpdateDeploymentTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementCreateOrUpdateDeploymentTests() { + BinaryData deployment = BinaryData.fromString( + "{\"deploymentId\":\"deploymentId\",\"groupId\":\"TestGroup\",\"rollbackPolicy\":{\"failure\":{\"devicesFailedCount\":100,\"devicesFailedPercentage\":50},\"update\":{\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.2.3.3\"}}},\"startDateTime\":\"2020-04-22T12:12:12.0000000+00:00\",\"update\":{\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.2.3.4\"}}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.createOrUpdateDeploymentWithResponse("TestGroup", + "deploymentId", deployment, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deploymentId\":\"deploymentId\",\"deviceClassSubgroups\":[\"deviceClassId1\",\"deviceClassId2\"],\"groupId\":\"TestGroup\",\"rollbackPolicy\":{\"failure\":{\"devicesFailedCount\":100,\"devicesFailedPercentage\":50},\"update\":{\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.2.3.3\"}}},\"startDateTime\":\"2020-04-22T12:12:12.0000000+00:00\",\"update\":{\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.2.3.4\"}}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeploymentForDeviceClassSubgroupTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeploymentForDeviceClassSubgroupTests.java new file mode 100644 index 0000000000000..118fa5df8bbff --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeploymentForDeviceClassSubgroupTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementDeleteDeploymentForDeviceClassSubgroupTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementDeleteDeploymentForDeviceClassSubgroupTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.deleteDeploymentForDeviceClassSubgroupWithResponse("TestGroup", + "deviceClassId", "deploymentId", requestOptions); + Assertions.assertEquals(204, response.getStatusCode()); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeploymentTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeploymentTests.java new file mode 100644 index 0000000000000..0b8d619f2134a --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeploymentTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementDeleteDeploymentTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementDeleteDeploymentTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.deleteDeploymentWithResponse("TestGroup", "deploymentId", requestOptions); + Assertions.assertEquals(204, response.getStatusCode()); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClassSubgroupTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClassSubgroupTests.java new file mode 100644 index 0000000000000..623a670144ea7 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClassSubgroupTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementDeleteDeviceClassSubgroupTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementDeleteDeviceClassSubgroupTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.deleteDeviceClassSubgroupWithResponse("group1", "deviceClassId", requestOptions); + Assertions.assertEquals(204, response.getStatusCode()); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClassTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClassTests.java new file mode 100644 index 0000000000000..6ab04a03d73ca --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteDeviceClassTests.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementDeleteDeviceClassTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementDeleteDeviceClassTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.deleteDeviceClassWithResponse("deviceClass1", requestOptions); + Assertions.assertEquals(204, response.getStatusCode()); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteGroupTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteGroupTests.java new file mode 100644 index 0000000000000..29bef64f10101 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementDeleteGroupTests.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementDeleteGroupTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementDeleteGroupTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.deleteGroupWithResponse("group1", requestOptions); + Assertions.assertEquals(204, response.getStatusCode()); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentForDeviceClassSubgroupTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentForDeviceClassSubgroupTests.java new file mode 100644 index 0000000000000..698a6f172738c --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentForDeviceClassSubgroupTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetDeploymentForDeviceClassSubgroupTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetDeploymentForDeviceClassSubgroupTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.getDeploymentForDeviceClassSubgroupWithResponse( + "TestGroup", "deviceClassId", "deploymentId", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deploymentId\":\"deploymentId\",\"groupId\":\"TestGroup\",\"isCanceled\":false,\"isCloudInitiatedRollback\":false,\"isRetried\":false,\"rollbackPolicy\":{\"failure\":{\"devicesFailedCount\":100,\"devicesFailedPercentage\":50},\"update\":{\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.2.3.3\"}}},\"startDateTime\":\"2020-04-22T12:12:12.0000000+00:00\",\"update\":{\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.2.3.4\"}}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentStatusTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentStatusTests.java new file mode 100644 index 0000000000000..06cfcbb998824 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentStatusTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetDeploymentStatusTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetDeploymentStatusTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getDeploymentStatusWithResponse("TestGroup", "deploymentId", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deploymentState\":\"ActiveWithSubgroupFailures\",\"groupId\":\"TestGroup\",\"subgroupStatus\":[{\"deploymentState\":\"Active\",\"deviceClassId\":\"deviceClassId1\",\"devicesCanceledCount\":0,\"devicesCompletedFailedCount\":0,\"devicesCompletedSucceededCount\":1,\"devicesInProgressCount\":0,\"groupId\":\"TestGroup\",\"totalDevices\":1},{\"deploymentState\":\"Failed\",\"deviceClassId\":\"deviceClassId2\",\"devicesCanceledCount\":0,\"devicesCompletedFailedCount\":1,\"devicesCompletedSucceededCount\":1,\"devicesInProgressCount\":0,\"error\":{\"code\":\"ADMConfigurationLimitExceeded\",\"message\":\"The subgroup deployment failed to be created due to hitting the ADM configuration limit\"},\"groupId\":\"TestGroup\",\"totalDevices\":2}]}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentTests.java new file mode 100644 index 0000000000000..5f2a688d38398 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeploymentTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetDeploymentTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetDeploymentTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getDeploymentWithResponse("TestGroup", "deploymentId", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deploymentId\":\"deploymentId\",\"deviceClassSubgroups\":[\"deviceClassId1\",\"deviceClassId2\"],\"groupId\":\"TestGroup\",\"isCanceled\":false,\"isCloudInitiatedRollback\":false,\"isRetried\":false,\"rollbackPolicy\":{\"failure\":{\"devicesFailedCount\":100,\"devicesFailedPercentage\":50},\"update\":{\"description\":\"This update fixes a security issue.\",\"friendlyName\":\"Contoso Toaster v1.2.3.3\",\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.2.3.3\"}}},\"startDateTime\":\"2020-04-22T12:12:12.0000000+00:00\",\"update\":{\"description\":\"This update fixes a security issue.\",\"friendlyName\":\"Contoso Toaster v1.2.3.4\",\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.2.3.4\"}}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupDeploymentStatusTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupDeploymentStatusTests.java new file mode 100644 index 0000000000000..0ad649fa38e14 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupDeploymentStatusTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetDeviceClassSubgroupDeploymentStatusTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetDeviceClassSubgroupDeploymentStatusTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.getDeviceClassSubgroupDeploymentStatusWithResponse( + "TestGroup", "deviceClassId", "deploymentId", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deploymentState\":\"Active\",\"deviceClassId\":\"deviceClassId\",\"devicesCanceledCount\":0,\"devicesCompletedFailedCount\":0,\"devicesCompletedSucceededCount\":1,\"devicesInProgressCount\":0,\"groupId\":\"TestGroup\",\"totalDevices\":1}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupUpdateComplianceTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupUpdateComplianceTests.java new file mode 100644 index 0000000000000..d8c94dc9a2ec0 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassSubgroupUpdateComplianceTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetDeviceClassSubgroupUpdateComplianceTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetDeviceClassSubgroupUpdateComplianceTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient + .getDeviceClassSubgroupUpdateComplianceWithResponse("group1", "deviceClassId", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"newUpdatesAvailableDeviceCount\":36265,\"onLatestUpdateDeviceCount\":256873,\"totalDeviceCount\":302204,\"updatesInProgressDeviceCount\":9066}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassTests.java new file mode 100644 index 0000000000000..2d5af24489ab5 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceClassTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetDeviceClassTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetDeviceClassTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getDeviceClassWithResponse("deviceClassId", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"bestCompatibleUpdate\":{\"friendlyName\":\"July 2022 Update\",\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.0.0.0\"}},\"deviceClassId\":\"deviceClassId\",\"deviceClassProperties\":{\"compatProperties\":{\"manufacturer\":\"manufacturer1\",\"model\":\"model1\"},\"contractModel\":{\"name\":\"Device Update Model V2\",\"id\":\"dtmi:azure:iot:deviceUpdateContractModel;2\"}},\"friendlyName\":\"DeviceClass2020-04-22T12:12:12.0000000+00:00\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceTests.java new file mode 100644 index 0000000000000..c1f39d11e6efb --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetDeviceTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetDeviceTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetDeviceTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.getDeviceWithResponse("deviceId", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deploymentStatus\":\"Failed\",\"deviceClassId\":\"deviceClass1\",\"deviceId\":\"device1\",\"installedUpdate\":{\"description\":\"Fixes security issue.\",\"updateId\":{\"name\":\"name1\",\"provider\":\"provider1\",\"version\":\"1.0.0.0\"}},\"lastAttemptedUpdate\":{\"description\":\"Fixes performance issue.\",\"updateId\":{\"name\":\"name1\",\"provider\":\"provider1\",\"version\":\"2.0.0.0\"}},\"lastInstallResult\":{\"extendedResultCode\":0,\"resultCode\":200,\"resultDetails\":\"\",\"stepResults\":[{\"extendedResultCode\":0,\"resultCode\":200,\"resultDetails\":\"\",\"update\":{\"friendlyName\":\"Microsoft Peripheral Camera 1.0\",\"updateId\":{\"name\":\"peripheralcamera\",\"provider\":\"microsoft\",\"version\":\"1.0\"}}},{\"extendedResultCode\":0,\"resultCode\":200,\"resultDetails\":\"\",\"update\":{\"friendlyName\":\"Microsoft Peripheral Speaker 1.0\",\"updateId\":{\"name\":\"peripheralspeaker\",\"provider\":\"microsoft\",\"version\":\"1.0\"}}}]},\"onLatestUpdate\":false}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroupTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroupTests.java new file mode 100644 index 0000000000000..0f461660977b0 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroupTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetGroupTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetGroupTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.getGroupWithResponse("group1", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"createdDateTime\":\"2020-07-01T12:13:14.0000000Z\",\"deviceCount\":149,\"groupId\":\"MyGroup\",\"groupType\":\"IoTHubTag\",\"subgroupsWithNewUpdatesAvailableCount\":3,\"subgroupsWithOnLatestUpdateCount\":1,\"subgroupsWithUpdatesInProgressCount\":0}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroupUpdateComplianceTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroupUpdateComplianceTests.java new file mode 100644 index 0000000000000..5dfd3a0192162 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetGroupUpdateComplianceTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetGroupUpdateComplianceTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetGroupUpdateComplianceTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getDeviceClassSubgroupWithResponse("group1", "deviceClassId", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"createdDateTime\":\"2020-07-01T12:13:14.0000000Z\",\"deploymentId\":\"MyDeployment\",\"deviceClassId\":\"DeviceClassId\",\"deviceCount\":149,\"groupId\":\"group1\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollectionDetailedStatusTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollectionDetailedStatusTests.java new file mode 100644 index 0000000000000..572fc0f0e1628 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollectionDetailedStatusTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetLogCollectionDetailedStatusTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetLogCollectionDetailedStatusTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getLogCollectionDetailedStatusWithResponse("LogCollectionId", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"operationId\":\"LogCollectionId\",\"description\":\"Log collection description\",\"createdDateTime\":\"2021-09-30T02:23:41.59Z\",\"deviceStatus\":[{\"deviceId\":\"DeviceA\",\"extendedResultCode\":\"0\",\"logLocation\":\"/storageAccount/deviceUpdateInstanceName/DeviceA/LogCollectionId\",\"resultCode\":\"200\",\"status\":\"NotStarted\"},{\"deviceId\":\"DeviceB\",\"extendedResultCode\":\"0\",\"logLocation\":\"/storageAccount/deviceUpdateInstanceName/DeviceB/ModuleB/LogCollectionId\",\"moduleId\":\"ModuleB\",\"resultCode\":\"200\",\"status\":\"NotStarted\"}],\"lastActionDateTime\":\"2021-09-30T02:23:41.59Z\",\"status\":\"NotStarted\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollectionTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollectionTests.java new file mode 100644 index 0000000000000..3100eeaa01e7d --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetLogCollectionTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetLogCollectionTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetLogCollectionTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getLogCollectionWithResponse("LogCollectionId", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"operationId\":\"LogCollectionId\",\"description\":\"Log collection description\",\"createdDateTime\":\"2021-09-30T02:23:41.59Z\",\"deviceList\":[{\"deviceId\":\"DeviceA\"},{\"deviceId\":\"DeviceB\",\"moduleId\":\"ModuleB\"}],\"lastActionDateTime\":\"2021-09-30T02:23:41.59Z\",\"status\":\"NotStarted\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetOperationStatusTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetOperationStatusTests.java new file mode 100644 index 0000000000000..5935e71605a37 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetOperationStatusTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetOperationStatusTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetOperationStatusTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient + .getOperationStatusWithResponse("e4491c54-916f-443d-9094-bcca546ace2f", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"operationId\":\"e4491c54-916f-443d-9094-bcca546ace2f\",\"createdDateTime\":\"2020-04-22T21:00:53.2548897+00:00\",\"etag\":\"\\\"a0f7b6f2-3f6c-4eb6-8a59-2f5411c23888\\\"\",\"lastActionDateTime\":\"2020-04-22T21:01:43.9401420+00:00\",\"status\":\"Succeeded\",\"traceId\":\"2b881ef9deaf5d45b0a716ca5b4145ec\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateComplianceForGroupTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateComplianceForGroupTests.java new file mode 100644 index 0000000000000..fa5068a92a4fa --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateComplianceForGroupTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetUpdateComplianceForGroupTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetUpdateComplianceForGroupTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.getUpdateComplianceForGroupWithResponse("group1", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"newUpdatesAvailableDeviceCount\":36265,\"onLatestUpdateDeviceCount\":256873,\"totalDeviceCount\":302204,\"updatesInProgressDeviceCount\":9066}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateComplianceTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateComplianceTests.java new file mode 100644 index 0000000000000..0aadd5edfd3bb --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementGetUpdateComplianceTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementGetUpdateComplianceTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementGetUpdateComplianceTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient.getUpdateComplianceWithResponse(requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"newUpdatesAvailableDeviceCount\":36265,\"onLatestUpdateDeviceCount\":256873,\"totalDeviceCount\":302204,\"updatesInProgressDeviceCount\":9066}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementImportDevicesTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementImportDevicesTests.java new file mode 100644 index 0000000000000..43f1f749f8da9 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementImportDevicesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementImportDevicesTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementImportDevicesTests() { + BinaryData importType = BinaryData.fromString("\"All\""); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response + = setPlaybackSyncPollerPollInterval(deviceManagementClient.beginImportDevices(importType, requestOptions)); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForDeviceClassSubgroupTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForDeviceClassSubgroupTests.java new file mode 100644 index 0000000000000..e975859161b0c --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForDeviceClassSubgroupTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListBestUpdatesForDeviceClassSubgroupTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListBestUpdatesForDeviceClassSubgroupTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = deviceManagementClient + .getBestUpdatesForDeviceClassSubgroupWithResponse("group1", "deviceClassId", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deviceClassId\":\"deviceClassId\",\"deviceCount\":100,\"groupId\":\"group1\",\"update\":{\"friendlyName\":\"July 2022 Update\",\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.0.0.0\"}}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForGroupTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForGroupTests.java new file mode 100644 index 0000000000000..02da9b1814c45 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListBestUpdatesForGroupTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListBestUpdatesForGroupTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListBestUpdatesForGroupTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listBestUpdatesForGroup("group1", requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deviceClassId\":\"deviceClassId1\",\"deviceCount\":100,\"groupId\":\"group1\",\"update\":{\"updateId\":{\"name\":\"name1\",\"provider\":\"provider1\",\"version\":\"1.0.0.0\"}}}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForDeviceClassSubgroupTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForDeviceClassSubgroupTests.java new file mode 100644 index 0000000000000..ca003c7aaada6 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForDeviceClassSubgroupTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListDeploymentsForDeviceClassSubgroupTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListDeploymentsForDeviceClassSubgroupTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listDeploymentsForDeviceClassSubgroup("TestGroup", + "deviceClassId1", requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deploymentId\":\"deploymentId1\",\"groupId\":\"TestGroup\",\"isCanceled\":false,\"isCloudInitiatedRollback\":false,\"isRetried\":false,\"rollbackPolicy\":{\"failure\":{\"devicesFailedCount\":100,\"devicesFailedPercentage\":50},\"update\":{\"updateId\":{\"name\":\"name1\",\"provider\":\"provider1\",\"version\":\"0.9.0\"}}},\"startDateTime\":\"2020-07-01T12:13:14Z\",\"update\":{\"updateId\":{\"name\":\"name1\",\"provider\":\"provider1\",\"version\":\"1.0.0.0\"}}}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForGroupTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForGroupTests.java new file mode 100644 index 0000000000000..5e32f6e7ca105 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeploymentsForGroupTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListDeploymentsForGroupTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListDeploymentsForGroupTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = deviceManagementClient.listDeploymentsForGroup("TestGroup", requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deploymentId\":\"deploymentId1\",\"deviceClassSubgroups\":[\"deviceClassId1\",\"deviceClassId2\"],\"groupId\":\"TestGroup\",\"isCanceled\":false,\"isCloudInitiatedRollback\":false,\"isRetried\":false,\"rollbackPolicy\":{\"failure\":{\"devicesFailedCount\":100,\"devicesFailedPercentage\":50},\"update\":{\"friendlyName\":\"Provider1 Name1 2022 Update\",\"updateId\":{\"name\":\"name1\",\"provider\":\"provider1\",\"version\":\"0.9.0\"}}},\"startDateTime\":\"2020-07-01T12:13:14Z\",\"update\":{\"friendlyName\":\"Provider1 Name1 2022 Update\",\"updateId\":{\"name\":\"name1\",\"provider\":\"provider1\",\"version\":\"1.0.0.0\"}}}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClassSubgroupsForGroupTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClassSubgroupsForGroupTests.java new file mode 100644 index 0000000000000..b38de574c721a --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClassSubgroupsForGroupTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListDeviceClassSubgroupsForGroupTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListDeviceClassSubgroupsForGroupTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = deviceManagementClient.listDeviceClassSubgroupsForGroup("group1", requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"createdDateTime\":\"2020-07-01T12:13:14.0000000Z\",\"deploymentId\":\"MyDeployment\",\"deviceClassId\":\"DeviceClassId\",\"deviceCount\":149,\"groupId\":\"group1\"}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClassesTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClassesTests.java new file mode 100644 index 0000000000000..42f8faab6c9d6 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceClassesTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListDeviceClassesTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListDeviceClassesTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listDeviceClasses(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"bestCompatibleUpdate\":{\"friendlyName\":\"July 2022 Update\",\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.0.0.0\"}},\"deviceClassId\":\"deviceClassId\",\"deviceClassProperties\":{\"compatProperties\":{\"manufacturer\":\"manufacturer1\",\"model\":\"model1\"},\"contractModel\":{\"name\":\"Device Update Model V2\",\"id\":\"dtmi:azure:iot:deviceUpdateContractModel;2\"}},\"friendlyName\":\"DeviceClass2020-04-22T12:12:12.0000000+00:00\"}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentTests.java new file mode 100644 index 0000000000000..01a9270541ba8 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentTests.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentTests + extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listDeviceStatesForDeviceClassSubgroupDeployment( + "TestGroup", "deviceClassId", "deploymentId", requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deviceId\":\"deviceId1\",\"deviceState\":\"Succeeded\",\"movedOnToNewDeployment\":false,\"retryCount\":1}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDevicesTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDevicesTests.java new file mode 100644 index 0000000000000..2006d8c36ab42 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListDevicesTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListDevicesTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListDevicesTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listDevices(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deploymentStatus\":\"Failed\",\"deviceClassId\":\"deviceClassId1\",\"deviceId\":\"device1\",\"installedUpdate\":{\"updateId\":{\"name\":\"name1\",\"provider\":\"provider1\",\"version\":\"1.0.0.0\"}},\"lastAttemptedUpdate\":{\"updateId\":{\"name\":\"name1\",\"provider\":\"provider1\",\"version\":\"2.0.0.0\"}},\"lastDeploymentId\":\"myDeployment123\",\"onLatestUpdate\":false}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListGroupsTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListGroupsTests.java new file mode 100644 index 0000000000000..fe055702bc095 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListGroupsTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListGroupsTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListGroupsTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listGroups(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"createdDateTime\":\"2020-07-01T12:13:14.0000000Z\",\"deployments\":[\"deployment1\",\"deployment2\"],\"deviceCount\":100,\"groupId\":\"MyGroup1\",\"groupType\":\"IoTHubTag\",\"subgroupsWithNewUpdatesAvailableCount\":2,\"subgroupsWithOnLatestUpdateCount\":1,\"subgroupsWithUpdatesInProgressCount\":0}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListHealthOfDevicesTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListHealthOfDevicesTests.java new file mode 100644 index 0000000000000..4b58c67089287 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListHealthOfDevicesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListHealthOfDevicesTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListHealthOfDevicesTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = deviceManagementClient.listHealthOfDevices("state eq 'unhealthy'", requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"deviceId\":\"device1\",\"digitalTwinModelId\":\"dtmi:foo;1\",\"healthChecks\":[{\"name\":\"check1\",\"result\":\"success\"},{\"name\":\"check2\",\"result\":\"userError\"}],\"moduleId\":\"module1\",\"state\":\"unhealthy\"}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListInstallableUpdatesForDeviceClassTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListInstallableUpdatesForDeviceClassTests.java new file mode 100644 index 0000000000000..ac2f42e7e2487 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListInstallableUpdatesForDeviceClassTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListInstallableUpdatesForDeviceClassTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListInstallableUpdatesForDeviceClassTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = deviceManagementClient.listInstallableUpdatesForDeviceClass("deviceClassId", requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"friendlyName\":\"July 2022 Update\",\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.2.3.4\"}}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListLogCollectionsTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListLogCollectionsTests.java new file mode 100644 index 0000000000000..3f9969865cc36 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListLogCollectionsTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListLogCollectionsTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListLogCollectionsTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listLogCollections(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"operationId\":\"LogCollectionId\",\"description\":\"Log collection description\",\"createdDateTime\":\"2021-09-30T02:23:41.59Z\",\"deviceList\":[{\"deviceId\":\"DeviceA\"},{\"deviceId\":\"DeviceB\",\"moduleId\":\"ModuleB\"}],\"lastActionDateTime\":\"2021-09-30T02:23:41.59Z\",\"status\":\"NotStarted\"}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListOperationStatusesTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListOperationStatusesTests.java new file mode 100644 index 0000000000000..03dd9276f7dc1 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementListOperationStatusesTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementListOperationStatusesTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementListOperationStatusesTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceManagementClient.listOperationStatuses(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"operationId\":\"e4491c54-916f-443d-9094-bcca546ace2f\",\"createdDateTime\":\"2020-04-22T21:00:53.2548897+00:00\",\"etag\":\"\\\"a0f7b6f2-3f6c-4eb6-8a59-2f5411c23888\\\"\",\"lastActionDateTime\":\"2020-04-22T21:01:43.9401420+00:00\",\"status\":\"Succeeded\",\"traceId\":\"2b881ef9deaf5d45b0a716ca5b4145ec\"}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementStartLogCollectionTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementStartLogCollectionTests.java new file mode 100644 index 0000000000000..3e9320ac4d5bd --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementStartLogCollectionTests.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementStartLogCollectionTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementStartLogCollectionTests() { + BinaryData logCollection = BinaryData.fromString( + "{\"description\":\"Log collection description\",\"deviceList\":[{\"deviceId\":\"DeviceA\"},{\"deviceId\":\"DeviceB\",\"moduleId\":\"ModuleB\"}]}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.startLogCollectionWithResponse("LogCollectionId", logCollection, requestOptions); + Assertions.assertEquals(201, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"operationId\":\"LogCollectionId\",\"description\":\"og collection description\",\"createdDateTime\":\"2021-09-30T02:23:41.59Z\",\"deviceList\":[{\"deviceId\":\"DeviceA\"},{\"deviceId\":\"DeviceB\",\"moduleId\":\"ModuleB\"}],\"lastActionDateTime\":\"2021-09-30T02:23:41.59Z\",\"status\":\"NotStarted\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementUpdateDeviceClassTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementUpdateDeviceClassTests.java new file mode 100644 index 0000000000000..b558b5b669b7c --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceManagementUpdateDeviceClassTests.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceManagementUpdateDeviceClassTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceManagementUpdateDeviceClassTests() { + BinaryData deviceClassPatch = BinaryData.fromString("{\"friendlyName\":\"GA Webcams\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceManagementClient.updateDeviceClassWithResponse("deviceClassId", deviceClassPatch, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"bestCompatibleUpdate\":{\"friendlyName\":\"July 2022 Update\",\"updateId\":{\"name\":\"name\",\"provider\":\"provider\",\"version\":\"1.0.0.0\"}},\"deviceClassId\":\"deviceClassId\",\"deviceClassProperties\":{\"compatProperties\":{\"manufacturer\":\"manufacturer1\",\"model\":\"model1\"},\"contractModel\":{\"name\":\"Device Update Model V2\",\"id\":\"dtmi:azure:iot:deviceUpdateContractModel;2\"}},\"friendlyName\":\"GA Webcams\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateClientTestBase.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateClientTestBase.java new file mode 100644 index 0000000000000..bba88b595356c --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateClientTestBase.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.iot.deviceupdate.generated; + +// The Java test files under 'generated' package are generated for your reference. +// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. +// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. + +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.iot.deviceupdate.DeviceManagementClient; +import com.azure.iot.deviceupdate.DeviceManagementClientBuilder; +import com.azure.iot.deviceupdate.DeviceUpdateClient; +import com.azure.iot.deviceupdate.DeviceUpdateClientBuilder; + +class DeviceUpdateClientTestBase extends TestProxyTestBase { + protected DeviceUpdateClient deviceUpdateClient; + + protected DeviceManagementClient deviceManagementClient; + + @Override + protected void beforeTest() { + DeviceUpdateClientBuilder deviceUpdateClientbuilder = new DeviceUpdateClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .instanceId(Configuration.getGlobalConfiguration().get("INSTANCEID", "instanceid")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + deviceUpdateClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + deviceUpdateClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + deviceUpdateClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + deviceUpdateClient = deviceUpdateClientbuilder.buildClient(); + + DeviceManagementClientBuilder deviceManagementClientbuilder = new DeviceManagementClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .instanceId(Configuration.getGlobalConfiguration().get("INSTANCEID", "instanceid")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + deviceManagementClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + deviceManagementClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + deviceManagementClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + deviceManagementClient = deviceManagementClientbuilder.buildClient(); + + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateDeleteUpdateTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateDeleteUpdateTests.java new file mode 100644 index 0000000000000..c21646a653998 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateDeleteUpdateTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceUpdateDeleteUpdateTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceUpdateDeleteUpdateTests() { + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = setPlaybackSyncPollerPollInterval( + deviceUpdateClient.beginDeleteUpdate("microsoft", "adu", "1.0.0.0", requestOptions)); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetFileTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetFileTests.java new file mode 100644 index 0000000000000..35c3dc52e1225 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetFileTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceUpdateGetFileTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceUpdateGetFileTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceUpdateClient.getFileWithResponse("microsoft", "adu", "1.0.0.0", "abc123", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"etag\":\"\\\"26bd8eba-4bb2-4960-a357-ca4d60b5fb4b\\\"\",\"fileId\":\"abc123\",\"fileName\":\"1v5uww1q.my2\",\"hashes\":{\"sha256\":\"OVokcktf61lQXs17MzJCsM98lk48H1Wu1hy7Sp6lLfI=\"},\"mimeType\":\"application/BuildAsync-s4jwikgq.44h\",\"sizeInBytes\":1862311}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetOperationStatusTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetOperationStatusTests.java new file mode 100644 index 0000000000000..13a0d39c982e6 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetOperationStatusTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceUpdateGetOperationStatusTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceUpdateGetOperationStatusTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceUpdateClient.getOperationStatusWithResponse("e4491c54-916f-443d-9094-bcca546ace2f", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"operationId\":\"e4491c54-916f-443d-9094-bcca546ace2f\",\"createdDateTime\":\"2020-04-22T21:00:53.2548897+00:00\",\"etag\":\"\\\"a0f7b6f2-3f6c-4eb6-8a59-2f5411c23888\\\"\",\"lastActionDateTime\":\"2020-04-22T21:01:43.9401420+00:00\",\"resourceLocation\":\"/deviceUpdate/blue/updates/providers/microsoft/names/adu/versions/1.0.0.0?api-version=2022-10-01\",\"status\":\"Succeeded\",\"traceId\":\"2b881ef9deaf5d45b0a716ca5b4145ec\",\"update\":{\"friendlyName\":\"Microsoft ADU v1\",\"updateId\":{\"name\":\"adu\",\"provider\":\"microsoft\",\"version\":\"1.0.0.0\"}}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetUpdateTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetUpdateTests.java new file mode 100644 index 0000000000000..ff57b53e498f8 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateGetUpdateTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceUpdateGetUpdateTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceUpdateGetUpdateTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = deviceUpdateClient.getUpdateWithResponse("microsoft", "adu", "1.0.0.0", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"description\":\"Fix for critical vulnerability\",\"compatibility\":[{\"deviceManufacturer\":\"Microsoft\",\"deviceModel\":\"Toaster\"}],\"createdDateTime\":\"2019-09-12T00:00:00.0000000+00:00\",\"etag\":\"\\\"3fed3378-0c67-47d2-b796-296962c66cbb\\\"\",\"friendlyName\":\"Lab Sensor Update v1\",\"importedDateTime\":\"2020-04-22T21:01:43.8408797+00:00\",\"instructions\":{\"steps\":[{\"description\":\"pre-install script\",\"files\":[\"configure.sh\"],\"handler\":\"microsoft/script:1\",\"handlerProperties\":{\"arguments\":\"--pre-install\"}},{\"type\":\"reference\",\"updateId\":{\"name\":\"sensor\",\"provider\":\"microsoft\",\"version\":\"1.0\"}}]},\"manifestVersion\":\"5.0\",\"updateId\":{\"name\":\"adu\",\"provider\":\"microsoft\",\"version\":\"1.0.0.0\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateImportUpdateTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateImportUpdateTests.java new file mode 100644 index 0000000000000..78d78d0409750 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateImportUpdateTests.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceUpdateImportUpdateTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceUpdateImportUpdateTests() { + BinaryData updateToImport = BinaryData.fromString( + "[{\"files\":[{\"filename\":\"file1.bin\",\"url\":\"http://test.blob.core.windows.net/test/upload1v5uww1q\"},{\"filename\":\"file2.bin\",\"url\":\"http://test.blob.core.windows.net/test/uploadkrmn5yw0\"},{\"filename\":\"file3.bin\",\"url\":\"http://test.blob.core.windows.net/test/uploaddq52ky5m\"}],\"importManifest\":{\"hashes\":{\"sha256\":\"O19LyyncPe1AGstOdkcmozLV8pSbBdqrE18HdYVohRc=\"},\"sizeInBytes\":816,\"url\":\"http://test.blob.core.windows.net/test/uploadimportMan.json\"}}]"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response + = setPlaybackSyncPollerPollInterval(deviceUpdateClient.beginImportUpdate(updateToImport, requestOptions)); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListFilesTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListFilesTests.java new file mode 100644 index 0000000000000..882b9269b37c9 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListFilesTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceUpdateListFilesTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceUpdateListFilesTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = deviceUpdateClient.listFiles("microsoft", "adu", "1.0.0.0", requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString("\"abc123\"").toObject(Object.class), + response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListNamesTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListNamesTests.java new file mode 100644 index 0000000000000..d791102c0ea21 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListNamesTests.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceUpdateListNamesTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceUpdateListNamesTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceUpdateClient.listNames("microsoft", requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString("\"adu\"").toObject(Object.class), + response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListOperationStatusesTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListOperationStatusesTests.java new file mode 100644 index 0000000000000..7d7243c6a6005 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListOperationStatusesTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceUpdateListOperationStatusesTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceUpdateListOperationStatusesTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceUpdateClient.listOperationStatuses(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"operationId\":\"e4491c54-916f-443d-9094-bcca546ace2f\",\"createdDateTime\":\"2020-04-22T21:00:53.2548897+00:00\",\"etag\":\"\\\"a0f7b6f2-3f6c-4eb6-8a59-2f5411c23888\\\"\",\"lastActionDateTime\":\"2020-04-22T21:01:43.9401420+00:00\",\"resourceLocation\":\"/deviceUpdate/blue/updates/providers/microsoft/names/adu/versions/1.0.0.0?api-version=2022-10-01\",\"status\":\"Succeeded\",\"traceId\":\"2b881ef9deaf5d45b0a716ca5b4145ec\",\"update\":{\"friendlyName\":\"Microsoft ADU v1\",\"updateId\":{\"name\":\"adu\",\"provider\":\"microsoft\",\"version\":\"1.0.0.0\"}}}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListProvidersTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListProvidersTests.java new file mode 100644 index 0000000000000..3b12ddfd458bf --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListProvidersTests.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceUpdateListProvidersTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceUpdateListProvidersTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceUpdateClient.listProviders(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString("\"microsoft\"").toObject(Object.class), + response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListUpdatesTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListUpdatesTests.java new file mode 100644 index 0000000000000..4c2b46f26dca2 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListUpdatesTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceUpdateListUpdatesTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceUpdateListUpdatesTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceUpdateClient.listUpdates(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"description\":\"Example update.\",\"compatibility\":[{\"deviceManufacturer\":\"Microsoft\",\"deviceModel\":\"Toaster\"}],\"createdDateTime\":\"2019-09-12T00:00:00.0000000+00:00\",\"etag\":\"\\\"3fed3378-0c67-47d2-b796-296962c66cbb\\\"\",\"importedDateTime\":\"2020-04-22T21:01:43.8408797+00:00\",\"instructions\":{\"steps\":[{\"description\":\"pre-install script\",\"files\":[\"configure.sh\"],\"handler\":\"microsoft/script:1\",\"handlerProperties\":{\"arguments\":\"--pre-install\"}},{\"type\":\"reference\",\"updateId\":{\"name\":\"sensor\",\"provider\":\"microsoft\",\"version\":\"1.0\"}}]},\"manifestVersion\":\"5.0\",\"updateId\":{\"name\":\"adu\",\"provider\":\"microsoft\",\"version\":\"1.0.0.0\"}}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListVersionsTests.java b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListVersionsTests.java new file mode 100644 index 0000000000000..057d33dbbee49 --- /dev/null +++ b/sdk/deviceupdate/azure-iot-deviceupdate/swagger/src/test/java/com/azure/iot/deviceupdate/generated/DeviceUpdateListVersionsTests.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.iot.deviceupdate.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class DeviceUpdateListVersionsTests extends DeviceUpdateClientTestBase { + @Test + @Disabled + public void testDeviceUpdateListVersionsTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = deviceUpdateClient.listVersions("microsoft", "adu", requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString("\"1.0.0.0\"").toObject(Object.class), + response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/AzureDigitalTwinsAPIImplBuilder.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/AzureDigitalTwinsAPIImplBuilder.java index 858405db9867b..1570257507912 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/AzureDigitalTwinsAPIImplBuilder.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/AzureDigitalTwinsAPIImplBuilder.java @@ -11,7 +11,6 @@ import com.azure.core.client.traits.TokenCredentialTrait; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; @@ -20,8 +19,8 @@ import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.AddHeadersPolicy; import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; 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; @@ -268,6 +267,7 @@ public AzureDigitalTwinsAPIImplBuilder retryPolicy(RetryPolicy retryPolicy) { */ @Generated public AzureDigitalTwinsAPIImpl buildClient() { + this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); String localHost = (host != null) ? host : "https://digitaltwins-hostname"; String localApiVersion = (apiVersion != null) ? apiVersion : "2022-05-31"; @@ -278,6 +278,12 @@ public AzureDigitalTwinsAPIImpl buildClient() { return client; } + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + } + @Generated private HttpPipeline createHttpPipeline() { Configuration buildConfiguration @@ -291,10 +297,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = new HttpHeaders(); - localClientOptions.getHeaders() - .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue())); - if (headers.getSize() > 0) { + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { policies.add(new AddHeadersPolicy(headers)); } this.pipelinePolicies.stream() diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java index 9b0613366b981..0fb6ce6618f03 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinModelsImpl.java @@ -148,19 +148,7 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> addWithResponseAsync(List models, DigitalTwinModelsAddOptions digitalTwinModelsAddOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinModelsAddOptions != null) { - traceparentInternal = digitalTwinModelsAddOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinModelsAddOptions != null) { - tracestateInternal = digitalTwinModelsAddOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.add(this.client.getHost(), traceparent, tracestate, - this.client.getApiVersion(), models, accept, context)); + return FluxUtil.withContext(context -> addWithResponseAsync(models, digitalTwinModelsAddOptions, context)); } /** @@ -355,19 +343,8 @@ public PagedFlux listAsync(List dependenciesFor, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByIdWithResponseAsync(String id, Boolean includeModelDefinition, DigitalTwinModelsGetByIdOptions digitalTwinModelsGetByIdOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinModelsGetByIdOptions != null) { - traceparentInternal = digitalTwinModelsGetByIdOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinModelsGetByIdOptions != null) { - tracestateInternal = digitalTwinModelsGetByIdOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.getById(this.client.getHost(), traceparent, tracestate, id, - includeModelDefinition, this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext( + context -> getByIdWithResponseAsync(id, includeModelDefinition, digitalTwinModelsGetByIdOptions, context)); } /** @@ -473,7 +450,8 @@ public Mono getByIdAsync(String id, Boolean includeModelD * * ModelReferencesNotDecommissioned - The model refers to models that are not decommissioned. * * @param id The id for the model. The id is globally unique and case sensitive. - * @param updateModel Array of AnyObject. + * @param updateModel An update specification described by JSON Patch. Only the decommissioned property can be + * replaced. * @param digitalTwinModelsUpdateOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -483,19 +461,8 @@ public Mono getByIdAsync(String id, Boolean includeModelD @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateWithResponseAsync(String id, JsonPatchDocument updateModel, DigitalTwinModelsUpdateOptions digitalTwinModelsUpdateOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinModelsUpdateOptions != null) { - traceparentInternal = digitalTwinModelsUpdateOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinModelsUpdateOptions != null) { - tracestateInternal = digitalTwinModelsUpdateOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.update(this.client.getHost(), traceparent, tracestate, id, - this.client.getApiVersion(), updateModel, accept, context)); + return FluxUtil + .withContext(context -> updateWithResponseAsync(id, updateModel, digitalTwinModelsUpdateOptions, context)); } /** @@ -512,7 +479,8 @@ public Mono> updateWithResponseAsync(String id, JsonPatchDocument * * ModelReferencesNotDecommissioned - The model refers to models that are not decommissioned. * * @param id The id for the model. The id is globally unique and case sensitive. - * @param updateModel Array of AnyObject. + * @param updateModel An update specification described by JSON Patch. Only the decommissioned property can be + * replaced. * @param digitalTwinModelsUpdateOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -552,7 +520,8 @@ public Mono> updateWithResponseAsync(String id, JsonPatchDocument * * ModelReferencesNotDecommissioned - The model refers to models that are not decommissioned. * * @param id The id for the model. The id is globally unique and case sensitive. - * @param updateModel Array of AnyObject. + * @param updateModel An update specification described by JSON Patch. Only the decommissioned property can be + * replaced. * @param digitalTwinModelsUpdateOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -580,7 +549,8 @@ public Mono updateAsync(String id, JsonPatchDocument updateModel, * * ModelReferencesNotDecommissioned - The model refers to models that are not decommissioned. * * @param id The id for the model. The id is globally unique and case sensitive. - * @param updateModel Array of AnyObject. + * @param updateModel An update specification described by JSON Patch. Only the decommissioned property can be + * replaced. * @param digitalTwinModelsUpdateOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -617,19 +587,7 @@ public Mono updateAsync(String id, JsonPatchDocument updateModel, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String id, DigitalTwinModelsDeleteOptions digitalTwinModelsDeleteOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinModelsDeleteOptions != null) { - traceparentInternal = digitalTwinModelsDeleteOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinModelsDeleteOptions != null) { - tracestateInternal = digitalTwinModelsDeleteOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.delete(this.client.getHost(), traceparent, tracestate, id, - this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> deleteWithResponseAsync(id, digitalTwinModelsDeleteOptions, context)); } /** @@ -723,9 +681,7 @@ public Mono deleteAsync(String id, DigitalTwinModelsDeleteOptions digitalT /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param digitalTwinModelsListOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinsImpl.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinsImpl.java index 11a53fddea1a8..7ba3fbb545688 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinsImpl.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/DigitalTwinsImpl.java @@ -325,19 +325,7 @@ Mono> listIncomingRelationshipsNext( @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByIdWithResponseAsync(String id, DigitalTwinsGetByIdOptions digitalTwinsGetByIdOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsGetByIdOptions != null) { - traceparentInternal = digitalTwinsGetByIdOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsGetByIdOptions != null) { - tracestateInternal = digitalTwinsGetByIdOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.getById(this.client.getHost(), traceparent, tracestate, id, - this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> getByIdWithResponseAsync(id, digitalTwinsGetByIdOptions, context)); } /** @@ -440,19 +428,8 @@ public Mono getByIdAsync(String id, DigitalTwinsGetByIdOptions digitalTw @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByIdNoCustomHeadersWithResponseAsync(String id, DigitalTwinsGetByIdOptions digitalTwinsGetByIdOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsGetByIdOptions != null) { - traceparentInternal = digitalTwinsGetByIdOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsGetByIdOptions != null) { - tracestateInternal = digitalTwinsGetByIdOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.getByIdNoCustomHeaders(this.client.getHost(), traceparent, - tracestate, id, this.client.getApiVersion(), accept, context)); + return FluxUtil + .withContext(context -> getByIdNoCustomHeadersWithResponseAsync(id, digitalTwinsGetByIdOptions, context)); } /** @@ -513,24 +490,7 @@ public Mono> getByIdNoCustomHeadersWithResponseAsync(String id, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> addWithResponseAsync(String id, Object twin, DigitalTwinsAddOptions digitalTwinsAddOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsAddOptions != null) { - traceparentInternal = digitalTwinsAddOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsAddOptions != null) { - tracestateInternal = digitalTwinsAddOptions.getTracestate(); - } - String tracestate = tracestateInternal; - String ifNoneMatchInternal = null; - if (digitalTwinsAddOptions != null) { - ifNoneMatchInternal = digitalTwinsAddOptions.getIfNoneMatch(); - } - String ifNoneMatch = ifNoneMatchInternal; - return FluxUtil.withContext(context -> service.add(this.client.getHost(), traceparent, tracestate, id, - ifNoneMatch, this.client.getApiVersion(), twin, accept, context)); + return FluxUtil.withContext(context -> addWithResponseAsync(id, twin, digitalTwinsAddOptions, context)); } /** @@ -653,24 +613,8 @@ public Mono addAsync(String id, Object twin, DigitalTwinsAddOptions digi @ServiceMethod(returns = ReturnType.SINGLE) public Mono> addNoCustomHeadersWithResponseAsync(String id, Object twin, DigitalTwinsAddOptions digitalTwinsAddOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsAddOptions != null) { - traceparentInternal = digitalTwinsAddOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsAddOptions != null) { - tracestateInternal = digitalTwinsAddOptions.getTracestate(); - } - String tracestate = tracestateInternal; - String ifNoneMatchInternal = null; - if (digitalTwinsAddOptions != null) { - ifNoneMatchInternal = digitalTwinsAddOptions.getIfNoneMatch(); - } - String ifNoneMatch = ifNoneMatchInternal; - return FluxUtil.withContext(context -> service.addNoCustomHeaders(this.client.getHost(), traceparent, - tracestate, id, ifNoneMatch, this.client.getApiVersion(), twin, accept, context)); + return FluxUtil + .withContext(context -> addNoCustomHeadersWithResponseAsync(id, twin, digitalTwinsAddOptions, context)); } /** @@ -739,24 +683,7 @@ public Mono> addNoCustomHeadersWithResponseAsync(String id, Obj @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String id, DigitalTwinsDeleteOptions digitalTwinsDeleteOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsDeleteOptions != null) { - traceparentInternal = digitalTwinsDeleteOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsDeleteOptions != null) { - tracestateInternal = digitalTwinsDeleteOptions.getTracestate(); - } - String tracestate = tracestateInternal; - String ifMatchInternal = null; - if (digitalTwinsDeleteOptions != null) { - ifMatchInternal = digitalTwinsDeleteOptions.getIfMatch(); - } - String ifMatch = ifMatchInternal; - return FluxUtil.withContext(context -> service.delete(this.client.getHost(), traceparent, tracestate, id, - ifMatch, this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> deleteWithResponseAsync(id, digitalTwinsDeleteOptions, context)); } /** @@ -865,7 +792,8 @@ public Mono deleteAsync(String id, DigitalTwinsDeleteOptions digitalTwinsD * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed. * * @param id The id of the digital twin. The id is unique within the service and case sensitive. - * @param patchDocument Array of AnyObject. + * @param patchDocument An update specification described by JSON Patch. Updates to property values and $model + * elements may happen in the same request. Operations are limited to add, replace and remove. * @param digitalTwinsUpdateOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -875,24 +803,8 @@ public Mono deleteAsync(String id, DigitalTwinsDeleteOptions digitalTwinsD @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateWithResponseAsync(String id, JsonPatchDocument patchDocument, DigitalTwinsUpdateOptions digitalTwinsUpdateOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsUpdateOptions != null) { - traceparentInternal = digitalTwinsUpdateOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsUpdateOptions != null) { - tracestateInternal = digitalTwinsUpdateOptions.getTracestate(); - } - String tracestate = tracestateInternal; - String ifMatchInternal = null; - if (digitalTwinsUpdateOptions != null) { - ifMatchInternal = digitalTwinsUpdateOptions.getIfMatch(); - } - String ifMatch = ifMatchInternal; - return FluxUtil.withContext(context -> service.update(this.client.getHost(), traceparent, tracestate, id, - ifMatch, this.client.getApiVersion(), patchDocument, accept, context)); + return FluxUtil + .withContext(context -> updateWithResponseAsync(id, patchDocument, digitalTwinsUpdateOptions, context)); } /** @@ -909,7 +821,8 @@ public Mono> updateWithResponseAsy * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed. * * @param id The id of the digital twin. The id is unique within the service and case sensitive. - * @param patchDocument Array of AnyObject. + * @param patchDocument An update specification described by JSON Patch. Updates to property values and $model + * elements may happen in the same request. Operations are limited to add, replace and remove. * @param digitalTwinsUpdateOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -954,7 +867,8 @@ public Mono> updateWithResponseAsy * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed. * * @param id The id of the digital twin. The id is unique within the service and case sensitive. - * @param patchDocument Array of AnyObject. + * @param patchDocument An update specification described by JSON Patch. Updates to property values and $model + * elements may happen in the same request. Operations are limited to add, replace and remove. * @param digitalTwinsUpdateOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -981,7 +895,8 @@ public Mono updateAsync(String id, JsonPatchDocument patchDocument, * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed. * * @param id The id of the digital twin. The id is unique within the service and case sensitive. - * @param patchDocument Array of AnyObject. + * @param patchDocument An update specification described by JSON Patch. Updates to property values and $model + * elements may happen in the same request. Operations are limited to add, replace and remove. * @param digitalTwinsUpdateOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1010,7 +925,8 @@ public Mono updateAsync(String id, JsonPatchDocument patchDocument, * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed. * * @param id The id of the digital twin. The id is unique within the service and case sensitive. - * @param patchDocument Array of AnyObject. + * @param patchDocument An update specification described by JSON Patch. Updates to property values and $model + * elements may happen in the same request. Operations are limited to add, replace and remove. * @param digitalTwinsUpdateOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -1020,24 +936,8 @@ public Mono updateAsync(String id, JsonPatchDocument patchDocument, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateNoCustomHeadersWithResponseAsync(String id, JsonPatchDocument patchDocument, DigitalTwinsUpdateOptions digitalTwinsUpdateOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsUpdateOptions != null) { - traceparentInternal = digitalTwinsUpdateOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsUpdateOptions != null) { - tracestateInternal = digitalTwinsUpdateOptions.getTracestate(); - } - String tracestate = tracestateInternal; - String ifMatchInternal = null; - if (digitalTwinsUpdateOptions != null) { - ifMatchInternal = digitalTwinsUpdateOptions.getIfMatch(); - } - String ifMatch = ifMatchInternal; - return FluxUtil.withContext(context -> service.updateNoCustomHeaders(this.client.getHost(), traceparent, - tracestate, id, ifMatch, this.client.getApiVersion(), patchDocument, accept, context)); + return FluxUtil.withContext( + context -> updateNoCustomHeadersWithResponseAsync(id, patchDocument, digitalTwinsUpdateOptions, context)); } /** @@ -1054,7 +954,8 @@ public Mono> updateNoCustomHeadersWithResponseAsync(String id, Js * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed. * * @param id The id of the digital twin. The id is unique within the service and case sensitive. - * @param patchDocument Array of AnyObject. + * @param patchDocument An update specification described by JSON Patch. Updates to property values and $model + * elements may happen in the same request. Operations are limited to add, replace and remove. * @param digitalTwinsUpdateOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1107,19 +1008,8 @@ public Mono> updateNoCustomHeadersWithResponseAsync(String id, Js public Mono> getRelationshipByIdWithResponseAsync( String id, String relationshipId, DigitalTwinsGetRelationshipByIdOptions digitalTwinsGetRelationshipByIdOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsGetRelationshipByIdOptions != null) { - traceparentInternal = digitalTwinsGetRelationshipByIdOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsGetRelationshipByIdOptions != null) { - tracestateInternal = digitalTwinsGetRelationshipByIdOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.getRelationshipById(this.client.getHost(), traceparent, - tracestate, id, relationshipId, this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> getRelationshipByIdWithResponseAsync(id, relationshipId, + digitalTwinsGetRelationshipByIdOptions, context)); } /** @@ -1232,19 +1122,8 @@ public Mono getRelationshipByIdAsync(String id, String relationshipId, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getRelationshipByIdNoCustomHeadersWithResponseAsync(String id, String relationshipId, DigitalTwinsGetRelationshipByIdOptions digitalTwinsGetRelationshipByIdOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsGetRelationshipByIdOptions != null) { - traceparentInternal = digitalTwinsGetRelationshipByIdOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsGetRelationshipByIdOptions != null) { - tracestateInternal = digitalTwinsGetRelationshipByIdOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.getRelationshipByIdNoCustomHeaders(this.client.getHost(), - traceparent, tracestate, id, relationshipId, this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> getRelationshipByIdNoCustomHeadersWithResponseAsync(id, relationshipId, + digitalTwinsGetRelationshipByIdOptions, context)); } /** @@ -1312,24 +1191,8 @@ public Mono> getRelationshipByIdNoCustomHeadersWithResponseAsyn public Mono> addRelationshipWithResponseAsync(String id, String relationshipId, Object relationship, DigitalTwinsAddRelationshipOptions digitalTwinsAddRelationshipOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsAddRelationshipOptions != null) { - traceparentInternal = digitalTwinsAddRelationshipOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsAddRelationshipOptions != null) { - tracestateInternal = digitalTwinsAddRelationshipOptions.getTracestate(); - } - String tracestate = tracestateInternal; - String ifNoneMatchInternal = null; - if (digitalTwinsAddRelationshipOptions != null) { - ifNoneMatchInternal = digitalTwinsAddRelationshipOptions.getIfNoneMatch(); - } - String ifNoneMatch = ifNoneMatchInternal; - return FluxUtil.withContext(context -> service.addRelationship(this.client.getHost(), traceparent, tracestate, - id, relationshipId, ifNoneMatch, this.client.getApiVersion(), relationship, accept, context)); + return FluxUtil.withContext(context -> addRelationshipWithResponseAsync(id, relationshipId, relationship, + digitalTwinsAddRelationshipOptions, context)); } /** @@ -1471,25 +1334,8 @@ public Mono addRelationshipAsync(String id, String relationshipId, Objec @ServiceMethod(returns = ReturnType.SINGLE) public Mono> addRelationshipNoCustomHeadersWithResponseAsync(String id, String relationshipId, Object relationship, DigitalTwinsAddRelationshipOptions digitalTwinsAddRelationshipOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsAddRelationshipOptions != null) { - traceparentInternal = digitalTwinsAddRelationshipOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsAddRelationshipOptions != null) { - tracestateInternal = digitalTwinsAddRelationshipOptions.getTracestate(); - } - String tracestate = tracestateInternal; - String ifNoneMatchInternal = null; - if (digitalTwinsAddRelationshipOptions != null) { - ifNoneMatchInternal = digitalTwinsAddRelationshipOptions.getIfNoneMatch(); - } - String ifNoneMatch = ifNoneMatchInternal; - return FluxUtil.withContext( - context -> service.addRelationshipNoCustomHeaders(this.client.getHost(), traceparent, tracestate, id, - relationshipId, ifNoneMatch, this.client.getApiVersion(), relationship, accept, context)); + return FluxUtil.withContext(context -> addRelationshipNoCustomHeadersWithResponseAsync(id, relationshipId, + relationship, digitalTwinsAddRelationshipOptions, context)); } /** @@ -1563,24 +1409,8 @@ public Mono> addRelationshipNoCustomHeadersWithResponseAsync(St @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteRelationshipWithResponseAsync(String id, String relationshipId, DigitalTwinsDeleteRelationshipOptions digitalTwinsDeleteRelationshipOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsDeleteRelationshipOptions != null) { - traceparentInternal = digitalTwinsDeleteRelationshipOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsDeleteRelationshipOptions != null) { - tracestateInternal = digitalTwinsDeleteRelationshipOptions.getTracestate(); - } - String tracestate = tracestateInternal; - String ifMatchInternal = null; - if (digitalTwinsDeleteRelationshipOptions != null) { - ifMatchInternal = digitalTwinsDeleteRelationshipOptions.getIfMatch(); - } - String ifMatch = ifMatchInternal; - return FluxUtil.withContext(context -> service.deleteRelationship(this.client.getHost(), traceparent, - tracestate, id, relationshipId, ifMatch, this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> deleteRelationshipWithResponseAsync(id, relationshipId, + digitalTwinsDeleteRelationshipOptions, context)); } /** @@ -1701,7 +1531,7 @@ public Mono deleteRelationshipAsync(String id, String relationshipId, * * @param id The id of the digital twin. The id is unique within the service and case sensitive. * @param relationshipId The id of the relationship. The id is unique within the digital twin and case sensitive. - * @param patchDocument Array of AnyObject. + * @param patchDocument JSON Patch description of the update to the relationship properties. * @param digitalTwinsUpdateRelationshipOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -1712,24 +1542,8 @@ public Mono deleteRelationshipAsync(String id, String relationshipId, public Mono> updateRelationshipWithResponseAsync( String id, String relationshipId, JsonPatchDocument patchDocument, DigitalTwinsUpdateRelationshipOptions digitalTwinsUpdateRelationshipOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsUpdateRelationshipOptions != null) { - traceparentInternal = digitalTwinsUpdateRelationshipOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsUpdateRelationshipOptions != null) { - tracestateInternal = digitalTwinsUpdateRelationshipOptions.getTracestate(); - } - String tracestate = tracestateInternal; - String ifMatchInternal = null; - if (digitalTwinsUpdateRelationshipOptions != null) { - ifMatchInternal = digitalTwinsUpdateRelationshipOptions.getIfMatch(); - } - String ifMatch = ifMatchInternal; - return FluxUtil.withContext(context -> service.updateRelationship(this.client.getHost(), traceparent, - tracestate, id, relationshipId, ifMatch, this.client.getApiVersion(), patchDocument, accept, context)); + return FluxUtil.withContext(context -> updateRelationshipWithResponseAsync(id, relationshipId, patchDocument, + digitalTwinsUpdateRelationshipOptions, context)); } /** @@ -1751,7 +1565,7 @@ public Mono> updateRel * * @param id The id of the digital twin. The id is unique within the service and case sensitive. * @param relationshipId The id of the relationship. The id is unique within the digital twin and case sensitive. - * @param patchDocument Array of AnyObject. + * @param patchDocument JSON Patch description of the update to the relationship properties. * @param digitalTwinsUpdateRelationshipOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1802,7 +1616,7 @@ public Mono> updateRel * * @param id The id of the digital twin. The id is unique within the service and case sensitive. * @param relationshipId The id of the relationship. The id is unique within the digital twin and case sensitive. - * @param patchDocument Array of AnyObject. + * @param patchDocument JSON Patch description of the update to the relationship properties. * @param digitalTwinsUpdateRelationshipOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -1835,7 +1649,7 @@ public Mono updateRelationshipAsync(String id, String relationshipId, Json * * @param id The id of the digital twin. The id is unique within the service and case sensitive. * @param relationshipId The id of the relationship. The id is unique within the digital twin and case sensitive. - * @param patchDocument Array of AnyObject. + * @param patchDocument JSON Patch description of the update to the relationship properties. * @param digitalTwinsUpdateRelationshipOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1869,7 +1683,7 @@ public Mono updateRelationshipAsync(String id, String relationshipId, Json * * @param id The id of the digital twin. The id is unique within the service and case sensitive. * @param relationshipId The id of the relationship. The id is unique within the digital twin and case sensitive. - * @param patchDocument Array of AnyObject. + * @param patchDocument JSON Patch description of the update to the relationship properties. * @param digitalTwinsUpdateRelationshipOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -1879,25 +1693,8 @@ public Mono updateRelationshipAsync(String id, String relationshipId, Json @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateRelationshipNoCustomHeadersWithResponseAsync(String id, String relationshipId, JsonPatchDocument patchDocument, DigitalTwinsUpdateRelationshipOptions digitalTwinsUpdateRelationshipOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsUpdateRelationshipOptions != null) { - traceparentInternal = digitalTwinsUpdateRelationshipOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsUpdateRelationshipOptions != null) { - tracestateInternal = digitalTwinsUpdateRelationshipOptions.getTracestate(); - } - String tracestate = tracestateInternal; - String ifMatchInternal = null; - if (digitalTwinsUpdateRelationshipOptions != null) { - ifMatchInternal = digitalTwinsUpdateRelationshipOptions.getIfMatch(); - } - String ifMatch = ifMatchInternal; - return FluxUtil - .withContext(context -> service.updateRelationshipNoCustomHeaders(this.client.getHost(), traceparent, - tracestate, id, relationshipId, ifMatch, this.client.getApiVersion(), patchDocument, accept, context)); + return FluxUtil.withContext(context -> updateRelationshipNoCustomHeadersWithResponseAsync(id, relationshipId, + patchDocument, digitalTwinsUpdateRelationshipOptions, context)); } /** @@ -1919,7 +1716,7 @@ public Mono> updateRelationshipNoCustomHeadersWithResponseAsync(S * * @param id The id of the digital twin. The id is unique within the service and case sensitive. * @param relationshipId The id of the relationship. The id is unique within the digital twin and case sensitive. - * @param patchDocument Array of AnyObject. + * @param patchDocument JSON Patch description of the update to the relationship properties. * @param digitalTwinsUpdateRelationshipOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2108,19 +1905,8 @@ public PagedFlux listIncomingRelationshipsAsync(String id, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> sendTelemetryWithResponseAsync(String id, String messageId, Object telemetry, String telemetrySourceTime, DigitalTwinsSendTelemetryOptions digitalTwinsSendTelemetryOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsSendTelemetryOptions != null) { - traceparentInternal = digitalTwinsSendTelemetryOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsSendTelemetryOptions != null) { - tracestateInternal = digitalTwinsSendTelemetryOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.sendTelemetry(this.client.getHost(), traceparent, tracestate, id, - messageId, telemetrySourceTime, this.client.getApiVersion(), telemetry, accept, context)); + return FluxUtil.withContext(context -> sendTelemetryWithResponseAsync(id, messageId, telemetry, + telemetrySourceTime, digitalTwinsSendTelemetryOptions, context)); } /** @@ -2248,20 +2034,8 @@ public Mono sendTelemetryAsync(String id, String messageId, Object telemet public Mono> sendComponentTelemetryWithResponseAsync(String id, String componentPath, String messageId, Object telemetry, String telemetrySourceTime, DigitalTwinsSendComponentTelemetryOptions digitalTwinsSendComponentTelemetryOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsSendComponentTelemetryOptions != null) { - traceparentInternal = digitalTwinsSendComponentTelemetryOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsSendComponentTelemetryOptions != null) { - tracestateInternal = digitalTwinsSendComponentTelemetryOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext( - context -> service.sendComponentTelemetry(this.client.getHost(), traceparent, tracestate, id, componentPath, - messageId, telemetrySourceTime, this.client.getApiVersion(), telemetry, accept, context)); + return FluxUtil.withContext(context -> sendComponentTelemetryWithResponseAsync(id, componentPath, messageId, + telemetry, telemetrySourceTime, digitalTwinsSendComponentTelemetryOptions, context)); } /** @@ -2391,19 +2165,8 @@ public Mono sendComponentTelemetryAsync(String id, String componentPath, S @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComponentWithResponseAsync(String id, String componentPath, DigitalTwinsGetComponentOptions digitalTwinsGetComponentOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsGetComponentOptions != null) { - traceparentInternal = digitalTwinsGetComponentOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsGetComponentOptions != null) { - tracestateInternal = digitalTwinsGetComponentOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.getComponent(this.client.getHost(), traceparent, tracestate, id, - componentPath, this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext( + context -> getComponentWithResponseAsync(id, componentPath, digitalTwinsGetComponentOptions, context)); } /** @@ -2515,19 +2278,8 @@ public Mono getComponentAsync(String id, String componentPath, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComponentNoCustomHeadersWithResponseAsync(String id, String componentPath, DigitalTwinsGetComponentOptions digitalTwinsGetComponentOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsGetComponentOptions != null) { - traceparentInternal = digitalTwinsGetComponentOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsGetComponentOptions != null) { - tracestateInternal = digitalTwinsGetComponentOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.getComponentNoCustomHeaders(this.client.getHost(), traceparent, - tracestate, id, componentPath, this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> getComponentNoCustomHeadersWithResponseAsync(id, componentPath, + digitalTwinsGetComponentOptions, context)); } /** @@ -2582,7 +2334,8 @@ public Mono> getComponentNoCustomHeadersWithResponseAsync(Strin * * @param id The id of the digital twin. The id is unique within the service and case sensitive. * @param componentPath The name of the DTDL component. - * @param patchDocument Array of AnyObject. + * @param patchDocument An update specification described by JSON Patch. Updates to property values and $model + * elements may happen in the same request. Operations are limited to add, replace and remove. * @param digitalTwinsUpdateComponentOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -2593,24 +2346,8 @@ public Mono> getComponentNoCustomHeadersWithResponseAsync(Strin public Mono> updateComponentWithResponseAsync(String id, String componentPath, JsonPatchDocument patchDocument, DigitalTwinsUpdateComponentOptions digitalTwinsUpdateComponentOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsUpdateComponentOptions != null) { - traceparentInternal = digitalTwinsUpdateComponentOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsUpdateComponentOptions != null) { - tracestateInternal = digitalTwinsUpdateComponentOptions.getTracestate(); - } - String tracestate = tracestateInternal; - String ifMatchInternal = null; - if (digitalTwinsUpdateComponentOptions != null) { - ifMatchInternal = digitalTwinsUpdateComponentOptions.getIfMatch(); - } - String ifMatch = ifMatchInternal; - return FluxUtil.withContext(context -> service.updateComponent(this.client.getHost(), traceparent, tracestate, - id, componentPath, ifMatch, this.client.getApiVersion(), patchDocument, accept, context)); + return FluxUtil.withContext(context -> updateComponentWithResponseAsync(id, componentPath, patchDocument, + digitalTwinsUpdateComponentOptions, context)); } /** @@ -2628,7 +2365,8 @@ public Mono> updateCompon * * @param id The id of the digital twin. The id is unique within the service and case sensitive. * @param componentPath The name of the DTDL component. - * @param patchDocument Array of AnyObject. + * @param patchDocument An update specification described by JSON Patch. Updates to property values and $model + * elements may happen in the same request. Operations are limited to add, replace and remove. * @param digitalTwinsUpdateComponentOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2675,7 +2413,8 @@ public Mono> updateCompon * * @param id The id of the digital twin. The id is unique within the service and case sensitive. * @param componentPath The name of the DTDL component. - * @param patchDocument Array of AnyObject. + * @param patchDocument An update specification described by JSON Patch. Updates to property values and $model + * elements may happen in the same request. Operations are limited to add, replace and remove. * @param digitalTwinsUpdateComponentOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -2704,7 +2443,8 @@ public Mono updateComponentAsync(String id, String componentPath, JsonPatc * * @param id The id of the digital twin. The id is unique within the service and case sensitive. * @param componentPath The name of the DTDL component. - * @param patchDocument Array of AnyObject. + * @param patchDocument An update specification described by JSON Patch. Updates to property values and $model + * elements may happen in the same request. Operations are limited to add, replace and remove. * @param digitalTwinsUpdateComponentOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2734,7 +2474,8 @@ public Mono updateComponentAsync(String id, String componentPath, JsonPatc * * @param id The id of the digital twin. The id is unique within the service and case sensitive. * @param componentPath The name of the DTDL component. - * @param patchDocument Array of AnyObject. + * @param patchDocument An update specification described by JSON Patch. Updates to property values and $model + * elements may happen in the same request. Operations are limited to add, replace and remove. * @param digitalTwinsUpdateComponentOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -2744,25 +2485,8 @@ public Mono updateComponentAsync(String id, String componentPath, JsonPatc @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateComponentNoCustomHeadersWithResponseAsync(String id, String componentPath, JsonPatchDocument patchDocument, DigitalTwinsUpdateComponentOptions digitalTwinsUpdateComponentOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (digitalTwinsUpdateComponentOptions != null) { - traceparentInternal = digitalTwinsUpdateComponentOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (digitalTwinsUpdateComponentOptions != null) { - tracestateInternal = digitalTwinsUpdateComponentOptions.getTracestate(); - } - String tracestate = tracestateInternal; - String ifMatchInternal = null; - if (digitalTwinsUpdateComponentOptions != null) { - ifMatchInternal = digitalTwinsUpdateComponentOptions.getIfMatch(); - } - String ifMatch = ifMatchInternal; - return FluxUtil - .withContext(context -> service.updateComponentNoCustomHeaders(this.client.getHost(), traceparent, - tracestate, id, componentPath, ifMatch, this.client.getApiVersion(), patchDocument, accept, context)); + return FluxUtil.withContext(context -> updateComponentNoCustomHeadersWithResponseAsync(id, componentPath, + patchDocument, digitalTwinsUpdateComponentOptions, context)); } /** @@ -2780,7 +2504,8 @@ public Mono> updateComponentNoCustomHeadersWithResponseAsync(Stri * * @param id The id of the digital twin. The id is unique within the service and case sensitive. * @param componentPath The name of the DTDL component. - * @param patchDocument Array of AnyObject. + * @param patchDocument An update specification described by JSON Patch. Updates to property values and $model + * elements may happen in the same request. Operations are limited to add, replace and remove. * @param digitalTwinsUpdateComponentOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2815,9 +2540,7 @@ public Mono> updateComponentNoCustomHeadersWithResponseAsync(Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param digitalTwinsListRelationshipsOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2848,9 +2571,7 @@ public Mono> listRelationshipsNextSinglePageAsync(String n /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param digitalTwinsListIncomingRelationshipsOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/EventRoutesImpl.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/EventRoutesImpl.java index d9cea4c206116..35f51d190e3f9 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/EventRoutesImpl.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/EventRoutesImpl.java @@ -181,19 +181,7 @@ public PagedFlux listAsync(EventRoutesListOptions eventRoutesListOpt @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByIdWithResponseAsync(String id, EventRoutesGetByIdOptions eventRoutesGetByIdOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (eventRoutesGetByIdOptions != null) { - traceparentInternal = eventRoutesGetByIdOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (eventRoutesGetByIdOptions != null) { - tracestateInternal = eventRoutesGetByIdOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.getById(this.client.getHost(), traceparent, tracestate, id, - this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> getByIdWithResponseAsync(id, eventRoutesGetByIdOptions, context)); } /** @@ -294,19 +282,7 @@ public Mono getByIdAsync(String id, EventRoutesGetByIdOptions eventR @ServiceMethod(returns = ReturnType.SINGLE) public Mono> addWithResponseAsync(String id, EventRoute eventRoute, EventRoutesAddOptions eventRoutesAddOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (eventRoutesAddOptions != null) { - traceparentInternal = eventRoutesAddOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (eventRoutesAddOptions != null) { - tracestateInternal = eventRoutesAddOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.add(this.client.getHost(), traceparent, tracestate, id, - this.client.getApiVersion(), eventRoute, accept, context)); + return FluxUtil.withContext(context -> addWithResponseAsync(id, eventRoute, eventRoutesAddOptions, context)); } /** @@ -410,19 +386,7 @@ public Mono addAsync(String id, EventRoute eventRoute, EventRoutesAddOptio */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String id, EventRoutesDeleteOptions eventRoutesDeleteOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (eventRoutesDeleteOptions != null) { - traceparentInternal = eventRoutesDeleteOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (eventRoutesDeleteOptions != null) { - tracestateInternal = eventRoutesDeleteOptions.getTracestate(); - } - String tracestate = tracestateInternal; - return FluxUtil.withContext(context -> service.delete(this.client.getHost(), traceparent, tracestate, id, - this.client.getApiVersion(), accept, context)); + return FluxUtil.withContext(context -> deleteWithResponseAsync(id, eventRoutesDeleteOptions, context)); } /** @@ -500,9 +464,7 @@ public Mono deleteAsync(String id, EventRoutesDeleteOptions eventRoutesDel /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param eventRoutesListOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/QueriesImpl.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/QueriesImpl.java index 5cd4ad92985bd..9a189f70e623d 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/QueriesImpl.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/QueriesImpl.java @@ -100,24 +100,8 @@ Mono> queryTwinsNoCustomHeaders(@HostParam("$host") String @ServiceMethod(returns = ReturnType.SINGLE) public Mono> queryTwinsWithResponseAsync(QuerySpecification querySpecification, QueryTwinsOptions queryTwinsOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (queryTwinsOptions != null) { - traceparentInternal = queryTwinsOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (queryTwinsOptions != null) { - tracestateInternal = queryTwinsOptions.getTracestate(); - } - String tracestate = tracestateInternal; - Integer maxItemsPerPageInternal = null; - if (queryTwinsOptions != null) { - maxItemsPerPageInternal = queryTwinsOptions.getMaxItemsPerPage(); - } - Integer maxItemsPerPage = maxItemsPerPageInternal; - return FluxUtil.withContext(context -> service.queryTwins(this.client.getHost(), traceparent, tracestate, - maxItemsPerPage, this.client.getApiVersion(), querySpecification, accept, context)); + return FluxUtil + .withContext(context -> queryTwinsWithResponseAsync(querySpecification, queryTwinsOptions, context)); } /** @@ -242,24 +226,8 @@ public Mono queryTwinsAsync(QuerySpecification querySpecification, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> queryTwinsNoCustomHeadersWithResponseAsync(QuerySpecification querySpecification, QueryTwinsOptions queryTwinsOptions) { - final String accept = "application/json"; - String traceparentInternal = null; - if (queryTwinsOptions != null) { - traceparentInternal = queryTwinsOptions.getTraceparent(); - } - String traceparent = traceparentInternal; - String tracestateInternal = null; - if (queryTwinsOptions != null) { - tracestateInternal = queryTwinsOptions.getTracestate(); - } - String tracestate = tracestateInternal; - Integer maxItemsPerPageInternal = null; - if (queryTwinsOptions != null) { - maxItemsPerPageInternal = queryTwinsOptions.getMaxItemsPerPage(); - } - Integer maxItemsPerPage = maxItemsPerPageInternal; - return FluxUtil.withContext(context -> service.queryTwinsNoCustomHeaders(this.client.getHost(), traceparent, - tracestate, maxItemsPerPage, this.client.getApiVersion(), querySpecification, accept, context)); + return FluxUtil.withContext( + context -> queryTwinsNoCustomHeadersWithResponseAsync(querySpecification, queryTwinsOptions, context)); } /** diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinModelsListOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinModelsListOptions.java index 29a54d0a5e65a..036edbd737b12 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinModelsListOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinModelsListOptions.java @@ -22,7 +22,8 @@ public final class DigitalTwinModelsListOptions { private String tracestate; /* - * The maximum number of items to retrieve per request. The server may choose to return less than the requested number. + * The maximum number of items to retrieve per request. The server may choose to return less than the requested + * number. */ private Integer maxItemsPerPage; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsModelData.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsModelData.java index 2ad7b3441d63b..2df35bf496080 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsModelData.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/DigitalTwinsModelData.java @@ -5,6 +5,7 @@ package com.azure.digitaltwins.core.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -40,7 +41,8 @@ public final class DigitalTwinsModelData implements JsonSerializable reader1.getString()); } else if ("uploadTime".equals(fieldName)) { - uploadTime = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + uploadTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("decommissioned".equals(fieldName)) { decommissioned = reader.getNullable(JsonReader::getBoolean); } else if ("model".equals(fieldName)) { diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoutesListOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoutesListOptions.java index c62396ab1b9e1..b4ace0d154d76 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoutesListOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/EventRoutesListOptions.java @@ -22,7 +22,8 @@ public final class EventRoutesListOptions { private String tracestate; /* - * The maximum number of items to retrieve per request. The server may choose to return less than the requested number. + * The maximum number of items to retrieve per request. The server may choose to return less than the requested + * number. */ private Integer maxItemsPerPage; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationship.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationship.java index 3878dbb1b7bbe..5fa984b9e6eed 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationship.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/IncomingRelationship.java @@ -17,7 +17,8 @@ @Fluent public final class IncomingRelationship implements JsonSerializable { /* - * A user-provided string representing the id of this relationship, unique in the context of the source digital twin, i.e. sourceId + relationshipId is unique in the context of the service. + * A user-provided string representing the id of this relationship, unique in the context of the source digital + * twin, i.e. sourceId + relationshipId is unique in the context of the service. */ private String relationshipId; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QueryTwinsOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QueryTwinsOptions.java index daea112f92667..b837a21248028 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QueryTwinsOptions.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/implementation/models/QueryTwinsOptions.java @@ -22,7 +22,8 @@ public final class QueryTwinsOptions { private String tracestate; /* - * The maximum number of items to retrieve per request. The server may choose to return less than the requested number. + * The maximum number of items to retrieve per request. The server may choose to return less than the requested + * number. */ private Integer maxItemsPerPage; diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/autorest.md b/sdk/digitaltwins/azure-digitaltwins-core/swagger/autorest.md index 97640f1bcfe9e..9e5e59a23a873 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/autorest.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/autorest.md @@ -37,7 +37,7 @@ input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/e79e929 output-folder: ../ license-header: MICROSOFT_MIT_SMALL -use: '@autorest/java@4.1.29' +use: '@autorest/java@4.1.39' java: true add-context-parameter: true namespace: com.azure.digitaltwins.core diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/generate.ps1 b/sdk/digitaltwins/azure-digitaltwins-core/swagger/generate.ps1 deleted file mode 100644 index cd52c2216da9c..0000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/generate.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -npm i -g autorest -autorest autorest.md diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImpl.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImpl.java index 7d8187188c864..14d6e6eb2db7b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImpl.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImpl.java @@ -181,8 +181,7 @@ Response publishCustomEventEventsSync(@HostParam("topicHostname") String t @ServiceMethod(returns = ReturnType.SINGLE) public Mono> publishEventGridEventsWithResponseAsync(String topicHostname, List events) { - return FluxUtil.withContext( - context -> service.publishEventGridEvents(topicHostname, this.getApiVersion(), events, context)); + return FluxUtil.withContext(context -> publishEventGridEventsWithResponseAsync(topicHostname, events, context)); } /** @@ -279,8 +278,8 @@ public void publishEventGridEvents(String topicHostname, List ev @ServiceMethod(returns = ReturnType.SINGLE) public Mono> publishCloudEventEventsWithResponseAsync(String topicHostname, List events, String aegChannelName) { - return FluxUtil.withContext(context -> service.publishCloudEventEvents(topicHostname, this.getApiVersion(), - aegChannelName, events, context)); + return FluxUtil.withContext( + context -> publishCloudEventEventsWithResponseAsync(topicHostname, events, aegChannelName, context)); } /** @@ -389,8 +388,8 @@ public void publishCloudEventEvents(String topicHostname, List event */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> publishCustomEventEventsWithResponseAsync(String topicHostname, List events) { - return FluxUtil.withContext( - context -> service.publishCustomEventEvents(topicHostname, this.getApiVersion(), events, context)); + return FluxUtil + .withContext(context -> publishCustomEventEventsWithResponseAsync(topicHostname, events, context)); } /** diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImplBuilder.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImplBuilder.java index e96006b136131..c3a2e77a710c5 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImplBuilder.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/EventGridPublisherClientImplBuilder.java @@ -9,7 +9,6 @@ import com.azure.core.client.traits.ConfigurationTrait; import com.azure.core.client.traits.HttpTrait; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; @@ -231,6 +230,7 @@ public EventGridPublisherClientImplBuilder retryPolicy(RetryPolicy retryPolicy) */ @Generated public EventGridPublisherClientImpl buildClient() { + this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); String localApiVersion = (apiVersion != null) ? apiVersion : "2018-01-01"; SerializerAdapter localSerializerAdapter @@ -240,6 +240,12 @@ public EventGridPublisherClientImpl buildClient() { return client; } + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + } + @Generated private HttpPipeline createHttpPipeline() { Configuration buildConfiguration @@ -253,10 +259,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = new HttpHeaders(); - localClientOptions.getHeaders() - .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue())); - if (headers.getSize() > 0) { + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { policies.add(new AddHeadersPolicy(headers)); } this.pipelinePolicies.stream() @@ -269,7 +273,7 @@ private HttpPipeline createHttpPipeline() { .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .forEach(p -> policies.add(p)); HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .clientOptions(localClientOptions) diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/AcsMessageChannelEventError.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/AcsMessageChannelEventError.java index 53728c9b64382..92f78a7eb54cf 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/AcsMessageChannelEventError.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/AcsMessageChannelEventError.java @@ -72,6 +72,9 @@ public AcsMessageChannelEventError setChannelMessage(String channelMessage) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/AcsRouterCommunicationError.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/AcsRouterCommunicationError.java index 942b825c8fcb9..541d530a7b972 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/AcsRouterCommunicationError.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/AcsRouterCommunicationError.java @@ -148,6 +148,9 @@ public AcsRouterCommunicationError setDetails(List return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/CloudEvent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/CloudEvent.java index 6b065d5f6fd28..926a0a0a0f170 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/CloudEvent.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/CloudEvent.java @@ -106,8 +106,8 @@ public CloudEvent setId(String id) { } /** - * Get the source property: Identifies the context in which an event happened. The combination of id and source - * must be unique for each distinct event. + * Get the source property: Identifies the context in which an event happened. The combination of id and source must + * be unique for each distinct event. * * @return the source value. */ @@ -116,8 +116,8 @@ public String getSource() { } /** - * Set the source property: Identifies the context in which an event happened. The combination of id and source - * must be unique for each distinct event. + * Set the source property: Identifies the context in which an event happened. The combination of id and source must + * be unique for each distinct event. * * @param source the source value to set. * @return the CloudEvent object itself. @@ -311,6 +311,9 @@ public CloudEvent setAdditionalProperties(Map additionalProperti return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -363,8 +366,8 @@ public static CloudEvent fromJson(JsonReader jsonReader) throws IOException { } else if ("data_base64".equals(fieldName)) { deserializedCloudEvent.dataBase64 = reader.getBinary(); } else if ("time".equals(fieldName)) { - deserializedCloudEvent.time - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedCloudEvent.time = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("dataschema".equals(fieldName)) { deserializedCloudEvent.dataschema = reader.getString(); } else if ("datacontenttype".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/EventGridEvent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/EventGridEvent.java index b117a4ddf83dc..01453b06dcf91 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/EventGridEvent.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/models/EventGridEvent.java @@ -4,6 +4,7 @@ package com.azure.messaging.eventgrid.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -218,6 +219,9 @@ public EventGridEvent setDataVersion(String dataVersion) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -256,8 +260,8 @@ public static EventGridEvent fromJson(JsonReader jsonReader) throws IOException } else if ("eventType".equals(fieldName)) { deserializedEventGridEvent.eventType = reader.getString(); } else if ("eventTime".equals(fieldName)) { - deserializedEventGridEvent.eventTime - = reader.getNullable(nonNullReader -> parseOffsetDateTimeBest(nonNullReader.getString())); + deserializedEventGridEvent.eventTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("dataVersion".equals(fieldName)) { deserializedEventGridEvent.dataVersion = reader.getString(); } else if ("topic".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatEventBaseProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatEventBaseProperties.java index a987ea97ebaaa..d3139faa3094b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatEventBaseProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatEventBaseProperties.java @@ -98,6 +98,9 @@ public AcsChatEventBaseProperties setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatEventInThreadBaseProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatEventInThreadBaseProperties.java index 6d7032db7c91e..484b8d96395d8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatEventInThreadBaseProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatEventInThreadBaseProperties.java @@ -72,6 +72,9 @@ public AcsChatEventInThreadBaseProperties setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageDeletedEventData.java index 2c2a0fd002c1d..a9eccda1686f2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageDeletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -131,6 +132,9 @@ public AcsChatMessageDeletedEventData setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -180,15 +184,15 @@ public static AcsChatMessageDeletedEventData fromJson(JsonReader jsonReader) thr } else if ("senderDisplayName".equals(fieldName)) { deserializedAcsChatMessageDeletedEventData.setSenderDisplayName(reader.getString()); } else if ("composeTime".equals(fieldName)) { - deserializedAcsChatMessageDeletedEventData.setComposeTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatMessageDeletedEventData.setComposeTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { deserializedAcsChatMessageDeletedEventData.setType(reader.getString()); } else if ("version".equals(fieldName)) { deserializedAcsChatMessageDeletedEventData.setVersion(reader.getNullable(JsonReader::getLong)); } else if ("deleteTime".equals(fieldName)) { - deserializedAcsChatMessageDeletedEventData.deleteTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatMessageDeletedEventData.deleteTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageDeletedInThreadEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageDeletedInThreadEventData.java index 2e0492ac8489e..4e363da8b1ecd 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageDeletedInThreadEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageDeletedInThreadEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -121,6 +122,9 @@ public AcsChatMessageDeletedInThreadEventData setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -166,16 +170,16 @@ public static AcsChatMessageDeletedInThreadEventData fromJson(JsonReader jsonRea } else if ("senderDisplayName".equals(fieldName)) { deserializedAcsChatMessageDeletedInThreadEventData.setSenderDisplayName(reader.getString()); } else if ("composeTime".equals(fieldName)) { - deserializedAcsChatMessageDeletedInThreadEventData.setComposeTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatMessageDeletedInThreadEventData.setComposeTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { deserializedAcsChatMessageDeletedInThreadEventData.setType(reader.getString()); } else if ("version".equals(fieldName)) { deserializedAcsChatMessageDeletedInThreadEventData .setVersion(reader.getNullable(JsonReader::getLong)); } else if ("deleteTime".equals(fieldName)) { - deserializedAcsChatMessageDeletedInThreadEventData.deleteTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatMessageDeletedInThreadEventData.deleteTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEditedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEditedEventData.java index 30f906fd5a171..55533cc3e9932 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEditedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEditedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -182,6 +183,9 @@ public AcsChatMessageEditedEventData setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -233,8 +237,8 @@ public static AcsChatMessageEditedEventData fromJson(JsonReader jsonReader) thro } else if ("senderDisplayName".equals(fieldName)) { deserializedAcsChatMessageEditedEventData.setSenderDisplayName(reader.getString()); } else if ("composeTime".equals(fieldName)) { - deserializedAcsChatMessageEditedEventData.setComposeTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatMessageEditedEventData.setComposeTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { deserializedAcsChatMessageEditedEventData.setType(reader.getString()); } else if ("version".equals(fieldName)) { @@ -245,8 +249,8 @@ public static AcsChatMessageEditedEventData fromJson(JsonReader jsonReader) thro Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedAcsChatMessageEditedEventData.metadata = metadata; } else if ("editTime".equals(fieldName)) { - deserializedAcsChatMessageEditedEventData.editTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatMessageEditedEventData.editTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEditedInThreadEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEditedInThreadEventData.java index 5cb3fb56047ad..916f86bd154ea 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEditedInThreadEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEditedInThreadEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -172,6 +173,9 @@ public AcsChatMessageEditedInThreadEventData setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -219,8 +223,8 @@ public static AcsChatMessageEditedInThreadEventData fromJson(JsonReader jsonRead } else if ("senderDisplayName".equals(fieldName)) { deserializedAcsChatMessageEditedInThreadEventData.setSenderDisplayName(reader.getString()); } else if ("composeTime".equals(fieldName)) { - deserializedAcsChatMessageEditedInThreadEventData.setComposeTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatMessageEditedInThreadEventData.setComposeTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { deserializedAcsChatMessageEditedInThreadEventData.setType(reader.getString()); } else if ("version".equals(fieldName)) { @@ -232,8 +236,8 @@ public static AcsChatMessageEditedInThreadEventData fromJson(JsonReader jsonRead Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedAcsChatMessageEditedInThreadEventData.metadata = metadata; } else if ("editTime".equals(fieldName)) { - deserializedAcsChatMessageEditedInThreadEventData.editTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatMessageEditedInThreadEventData.editTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEventBaseProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEventBaseProperties.java index 59153828e5acd..21f513b04e74c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEventBaseProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEventBaseProperties.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -202,6 +203,9 @@ public AcsChatMessageEventBaseProperties setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -249,8 +253,8 @@ public static AcsChatMessageEventBaseProperties fromJson(JsonReader jsonReader) } else if ("senderDisplayName".equals(fieldName)) { deserializedAcsChatMessageEventBaseProperties.senderDisplayName = reader.getString(); } else if ("composeTime".equals(fieldName)) { - deserializedAcsChatMessageEventBaseProperties.composeTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatMessageEventBaseProperties.composeTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("type".equals(fieldName)) { deserializedAcsChatMessageEventBaseProperties.type = reader.getString(); } else if ("version".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEventInThreadBaseProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEventInThreadBaseProperties.java index 7060f48da73b5..26350bf02211c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEventInThreadBaseProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEventInThreadBaseProperties.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -192,6 +193,9 @@ public AcsChatMessageEventInThreadBaseProperties setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -235,8 +239,8 @@ public static AcsChatMessageEventInThreadBaseProperties fromJson(JsonReader json } else if ("senderDisplayName".equals(fieldName)) { deserializedAcsChatMessageEventInThreadBaseProperties.senderDisplayName = reader.getString(); } else if ("composeTime".equals(fieldName)) { - deserializedAcsChatMessageEventInThreadBaseProperties.composeTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatMessageEventInThreadBaseProperties.composeTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("type".equals(fieldName)) { deserializedAcsChatMessageEventInThreadBaseProperties.type = reader.getString(); } else if ("version".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageReceivedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageReceivedEventData.java index 504a44ba65bfc..86809d27ccb04 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageReceivedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageReceivedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -157,6 +158,9 @@ public AcsChatMessageReceivedEventData setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -206,8 +210,8 @@ public static AcsChatMessageReceivedEventData fromJson(JsonReader jsonReader) th } else if ("senderDisplayName".equals(fieldName)) { deserializedAcsChatMessageReceivedEventData.setSenderDisplayName(reader.getString()); } else if ("composeTime".equals(fieldName)) { - deserializedAcsChatMessageReceivedEventData.setComposeTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatMessageReceivedEventData.setComposeTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { deserializedAcsChatMessageReceivedEventData.setType(reader.getString()); } else if ("version".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageReceivedInThreadEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageReceivedInThreadEventData.java index 6889110a19950..987d8eb7d15f9 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageReceivedInThreadEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageReceivedInThreadEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -147,6 +148,9 @@ public AcsChatMessageReceivedInThreadEventData setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -192,8 +196,8 @@ public static AcsChatMessageReceivedInThreadEventData fromJson(JsonReader jsonRe } else if ("senderDisplayName".equals(fieldName)) { deserializedAcsChatMessageReceivedInThreadEventData.setSenderDisplayName(reader.getString()); } else if ("composeTime".equals(fieldName)) { - deserializedAcsChatMessageReceivedInThreadEventData.setComposeTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatMessageReceivedInThreadEventData.setComposeTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { deserializedAcsChatMessageReceivedInThreadEventData.setType(reader.getString()); } else if ("version".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantAddedToThreadEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantAddedToThreadEventData.java index 2345d5f808b34..b4e740a0ab868 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantAddedToThreadEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantAddedToThreadEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -143,6 +144,9 @@ public AcsChatParticipantAddedToThreadEventData setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -177,8 +181,8 @@ public static AcsChatParticipantAddedToThreadEventData fromJson(JsonReader jsonR } else if ("threadId".equals(fieldName)) { deserializedAcsChatParticipantAddedToThreadEventData.setThreadId(reader.getString()); } else if ("time".equals(fieldName)) { - deserializedAcsChatParticipantAddedToThreadEventData.time - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatParticipantAddedToThreadEventData.time = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("addedByCommunicationIdentifier".equals(fieldName)) { deserializedAcsChatParticipantAddedToThreadEventData.addedByCommunicationIdentifier = CommunicationIdentifierModel.fromJson(reader); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantAddedToThreadWithUserEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantAddedToThreadWithUserEventData.java index 73d516abdf3d2..111b978c26b0e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantAddedToThreadWithUserEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantAddedToThreadWithUserEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -147,6 +148,9 @@ public AcsChatParticipantAddedToThreadWithUserEventData setThreadId(String threa return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -187,14 +191,14 @@ public static AcsChatParticipantAddedToThreadWithUserEventData fromJson(JsonRead } else if ("threadId".equals(fieldName)) { deserializedAcsChatParticipantAddedToThreadWithUserEventData.setThreadId(reader.getString()); } else if ("createTime".equals(fieldName)) { - deserializedAcsChatParticipantAddedToThreadWithUserEventData.setCreateTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatParticipantAddedToThreadWithUserEventData.setCreateTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("version".equals(fieldName)) { deserializedAcsChatParticipantAddedToThreadWithUserEventData .setVersion(reader.getNullable(JsonReader::getLong)); } else if ("time".equals(fieldName)) { - deserializedAcsChatParticipantAddedToThreadWithUserEventData.time - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatParticipantAddedToThreadWithUserEventData.time = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("addedByCommunicationIdentifier".equals(fieldName)) { deserializedAcsChatParticipantAddedToThreadWithUserEventData.addedByCommunicationIdentifier = CommunicationIdentifierModel.fromJson(reader); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantRemovedFromThreadEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantRemovedFromThreadEventData.java index adcbf21f8226b..c4c8a9e47eb44 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantRemovedFromThreadEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantRemovedFromThreadEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -64,8 +65,7 @@ public AcsChatParticipantRemovedFromThreadEventData setTime(OffsetDateTime time) } /** - * Get the removedByCommunicationIdentifier property: The communication identifier of the user who removed the - * user. + * Get the removedByCommunicationIdentifier property: The communication identifier of the user who removed the user. * * @return the removedByCommunicationIdentifier value. */ @@ -74,8 +74,7 @@ public CommunicationIdentifierModel getRemovedByCommunicationIdentifier() { } /** - * Set the removedByCommunicationIdentifier property: The communication identifier of the user who removed the - * user. + * Set the removedByCommunicationIdentifier property: The communication identifier of the user who removed the user. * * @param removedByCommunicationIdentifier the removedByCommunicationIdentifier value to set. * @return the AcsChatParticipantRemovedFromThreadEventData object itself. @@ -145,6 +144,9 @@ public AcsChatParticipantRemovedFromThreadEventData setThreadId(String threadId) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -179,8 +181,8 @@ public static AcsChatParticipantRemovedFromThreadEventData fromJson(JsonReader j } else if ("threadId".equals(fieldName)) { deserializedAcsChatParticipantRemovedFromThreadEventData.setThreadId(reader.getString()); } else if ("time".equals(fieldName)) { - deserializedAcsChatParticipantRemovedFromThreadEventData.time - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatParticipantRemovedFromThreadEventData.time = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("removedByCommunicationIdentifier".equals(fieldName)) { deserializedAcsChatParticipantRemovedFromThreadEventData.removedByCommunicationIdentifier = CommunicationIdentifierModel.fromJson(reader); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantRemovedFromThreadWithUserEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantRemovedFromThreadWithUserEventData.java index c1d796b731998..9f3a0ca38762b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantRemovedFromThreadWithUserEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatParticipantRemovedFromThreadWithUserEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -60,8 +61,7 @@ public AcsChatParticipantRemovedFromThreadWithUserEventData setTime(OffsetDateTi } /** - * Get the removedByCommunicationIdentifier property: The communication identifier of the user who removed the - * user. + * Get the removedByCommunicationIdentifier property: The communication identifier of the user who removed the user. * * @return the removedByCommunicationIdentifier value. */ @@ -70,8 +70,7 @@ public CommunicationIdentifierModel getRemovedByCommunicationIdentifier() { } /** - * Set the removedByCommunicationIdentifier property: The communication identifier of the user who removed the - * user. + * Set the removedByCommunicationIdentifier property: The communication identifier of the user who removed the user. * * @param removedByCommunicationIdentifier the removedByCommunicationIdentifier value to set. * @return the AcsChatParticipantRemovedFromThreadWithUserEventData object itself. @@ -149,6 +148,9 @@ public AcsChatParticipantRemovedFromThreadWithUserEventData setThreadId(String t return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -191,14 +193,14 @@ public static AcsChatParticipantRemovedFromThreadWithUserEventData fromJson(Json } else if ("threadId".equals(fieldName)) { deserializedAcsChatParticipantRemovedFromThreadWithUserEventData.setThreadId(reader.getString()); } else if ("createTime".equals(fieldName)) { - deserializedAcsChatParticipantRemovedFromThreadWithUserEventData.setCreateTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatParticipantRemovedFromThreadWithUserEventData.setCreateTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("version".equals(fieldName)) { deserializedAcsChatParticipantRemovedFromThreadWithUserEventData .setVersion(reader.getNullable(JsonReader::getLong)); } else if ("time".equals(fieldName)) { - deserializedAcsChatParticipantRemovedFromThreadWithUserEventData.time - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatParticipantRemovedFromThreadWithUserEventData.time = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("removedByCommunicationIdentifier".equals(fieldName)) { deserializedAcsChatParticipantRemovedFromThreadWithUserEventData.removedByCommunicationIdentifier = CommunicationIdentifierModel.fromJson(reader); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadCreatedEventData.java index e072a94a93980..09b2e5431734c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadCreatedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -164,6 +165,9 @@ public AcsChatThreadCreatedEventData setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -200,8 +204,8 @@ public static AcsChatThreadCreatedEventData fromJson(JsonReader jsonReader) thro } else if ("threadId".equals(fieldName)) { deserializedAcsChatThreadCreatedEventData.setThreadId(reader.getString()); } else if ("createTime".equals(fieldName)) { - deserializedAcsChatThreadCreatedEventData.setCreateTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatThreadCreatedEventData.setCreateTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("version".equals(fieldName)) { deserializedAcsChatThreadCreatedEventData.setVersion(reader.getNullable(JsonReader::getLong)); } else if ("createdByCommunicationIdentifier".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadCreatedWithUserEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadCreatedWithUserEventData.java index 08b73f53e5793..e8f0330006eb9 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadCreatedWithUserEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadCreatedWithUserEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -175,6 +176,9 @@ public AcsChatThreadCreatedWithUserEventData setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -215,8 +219,8 @@ public static AcsChatThreadCreatedWithUserEventData fromJson(JsonReader jsonRead } else if ("threadId".equals(fieldName)) { deserializedAcsChatThreadCreatedWithUserEventData.setThreadId(reader.getString()); } else if ("createTime".equals(fieldName)) { - deserializedAcsChatThreadCreatedWithUserEventData.setCreateTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatThreadCreatedWithUserEventData.setCreateTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("version".equals(fieldName)) { deserializedAcsChatThreadCreatedWithUserEventData .setVersion(reader.getNullable(JsonReader::getLong)); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadDeletedEventData.java index 1c204e01d9f9b..467d7e677d0e6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadDeletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -112,6 +113,9 @@ public AcsChatThreadDeletedEventData setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -147,16 +151,16 @@ public static AcsChatThreadDeletedEventData fromJson(JsonReader jsonReader) thro } else if ("threadId".equals(fieldName)) { deserializedAcsChatThreadDeletedEventData.setThreadId(reader.getString()); } else if ("createTime".equals(fieldName)) { - deserializedAcsChatThreadDeletedEventData.setCreateTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatThreadDeletedEventData.setCreateTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("version".equals(fieldName)) { deserializedAcsChatThreadDeletedEventData.setVersion(reader.getNullable(JsonReader::getLong)); } else if ("deletedByCommunicationIdentifier".equals(fieldName)) { deserializedAcsChatThreadDeletedEventData.deletedByCommunicationIdentifier = CommunicationIdentifierModel.fromJson(reader); } else if ("deleteTime".equals(fieldName)) { - deserializedAcsChatThreadDeletedEventData.deleteTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatThreadDeletedEventData.deleteTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadEventBaseProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadEventBaseProperties.java index 44285c1df7c5d..6ffaaa958dd09 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadEventBaseProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadEventBaseProperties.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -101,6 +102,9 @@ public AcsChatThreadEventBaseProperties setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -137,8 +141,8 @@ public static AcsChatThreadEventBaseProperties fromJson(JsonReader jsonReader) t } else if ("threadId".equals(fieldName)) { deserializedAcsChatThreadEventBaseProperties.setThreadId(reader.getString()); } else if ("createTime".equals(fieldName)) { - deserializedAcsChatThreadEventBaseProperties.createTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatThreadEventBaseProperties.createTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("version".equals(fieldName)) { deserializedAcsChatThreadEventBaseProperties.version = reader.getNullable(JsonReader::getLong); } else { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadEventInThreadBaseProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadEventInThreadBaseProperties.java index e02cf0a88913f..bc892040aa2ce 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadEventInThreadBaseProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadEventInThreadBaseProperties.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -91,6 +92,9 @@ public AcsChatThreadEventInThreadBaseProperties setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -123,8 +127,8 @@ public static AcsChatThreadEventInThreadBaseProperties fromJson(JsonReader jsonR } else if ("threadId".equals(fieldName)) { deserializedAcsChatThreadEventInThreadBaseProperties.setThreadId(reader.getString()); } else if ("createTime".equals(fieldName)) { - deserializedAcsChatThreadEventInThreadBaseProperties.createTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatThreadEventInThreadBaseProperties.createTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("version".equals(fieldName)) { deserializedAcsChatThreadEventInThreadBaseProperties.version = reader.getNullable(JsonReader::getLong); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadParticipantProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadParticipantProperties.java index 53c3cf6a23505..0f080c4a1ce54 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadParticipantProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadParticipantProperties.java @@ -99,6 +99,9 @@ public AcsChatThreadParticipantProperties setMetadata(Map metada return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadPropertiesUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadPropertiesUpdatedEventData.java index 62b4db08da345..441fc7d76d796 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadPropertiesUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadPropertiesUpdatedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -45,8 +46,8 @@ public AcsChatThreadPropertiesUpdatedEventData() { } /** - * Get the editedByCommunicationIdentifier property: The communication identifier of the user who updated the - * thread properties. + * Get the editedByCommunicationIdentifier property: The communication identifier of the user who updated the thread + * properties. * * @return the editedByCommunicationIdentifier value. */ @@ -55,8 +56,8 @@ public CommunicationIdentifierModel getEditedByCommunicationIdentifier() { } /** - * Set the editedByCommunicationIdentifier property: The communication identifier of the user who updated the - * thread properties. + * Set the editedByCommunicationIdentifier property: The communication identifier of the user who updated the thread + * properties. * * @param editedByCommunicationIdentifier the editedByCommunicationIdentifier value to set. * @return the AcsChatThreadPropertiesUpdatedEventData object itself. @@ -163,6 +164,9 @@ public AcsChatThreadPropertiesUpdatedEventData setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -200,8 +204,8 @@ public static AcsChatThreadPropertiesUpdatedEventData fromJson(JsonReader jsonRe } else if ("threadId".equals(fieldName)) { deserializedAcsChatThreadPropertiesUpdatedEventData.setThreadId(reader.getString()); } else if ("createTime".equals(fieldName)) { - deserializedAcsChatThreadPropertiesUpdatedEventData.setCreateTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatThreadPropertiesUpdatedEventData.setCreateTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("version".equals(fieldName)) { deserializedAcsChatThreadPropertiesUpdatedEventData .setVersion(reader.getNullable(JsonReader::getLong)); @@ -209,8 +213,8 @@ public static AcsChatThreadPropertiesUpdatedEventData fromJson(JsonReader jsonRe deserializedAcsChatThreadPropertiesUpdatedEventData.editedByCommunicationIdentifier = CommunicationIdentifierModel.fromJson(reader); } else if ("editTime".equals(fieldName)) { - deserializedAcsChatThreadPropertiesUpdatedEventData.editTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatThreadPropertiesUpdatedEventData.editTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.readUntyped()); deserializedAcsChatThreadPropertiesUpdatedEventData.properties = properties; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadPropertiesUpdatedPerUserEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadPropertiesUpdatedPerUserEventData.java index f2225c7f6a8b5..e87c7a9d43410 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadPropertiesUpdatedPerUserEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadPropertiesUpdatedPerUserEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -46,8 +47,8 @@ public AcsChatThreadPropertiesUpdatedPerUserEventData() { } /** - * Get the editedByCommunicationIdentifier property: The communication identifier of the user who updated the - * thread properties. + * Get the editedByCommunicationIdentifier property: The communication identifier of the user who updated the thread + * properties. * * @return the editedByCommunicationIdentifier value. */ @@ -56,8 +57,8 @@ public CommunicationIdentifierModel getEditedByCommunicationIdentifier() { } /** - * Set the editedByCommunicationIdentifier property: The communication identifier of the user who updated the - * thread properties. + * Set the editedByCommunicationIdentifier property: The communication identifier of the user who updated the thread + * properties. * * @param editedByCommunicationIdentifier the editedByCommunicationIdentifier value to set. * @return the AcsChatThreadPropertiesUpdatedPerUserEventData object itself. @@ -174,6 +175,9 @@ public AcsChatThreadPropertiesUpdatedPerUserEventData setThreadId(String threadI return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -215,8 +219,8 @@ public static AcsChatThreadPropertiesUpdatedPerUserEventData fromJson(JsonReader } else if ("threadId".equals(fieldName)) { deserializedAcsChatThreadPropertiesUpdatedPerUserEventData.setThreadId(reader.getString()); } else if ("createTime".equals(fieldName)) { - deserializedAcsChatThreadPropertiesUpdatedPerUserEventData.setCreateTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatThreadPropertiesUpdatedPerUserEventData.setCreateTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("version".equals(fieldName)) { deserializedAcsChatThreadPropertiesUpdatedPerUserEventData .setVersion(reader.getNullable(JsonReader::getLong)); @@ -224,8 +228,8 @@ public static AcsChatThreadPropertiesUpdatedPerUserEventData fromJson(JsonReader deserializedAcsChatThreadPropertiesUpdatedPerUserEventData.editedByCommunicationIdentifier = CommunicationIdentifierModel.fromJson(reader); } else if ("editTime".equals(fieldName)) { - deserializedAcsChatThreadPropertiesUpdatedPerUserEventData.editTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatThreadPropertiesUpdatedPerUserEventData.editTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedAcsChatThreadPropertiesUpdatedPerUserEventData.metadata = metadata; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadWithUserDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadWithUserDeletedEventData.java index 97726b6e12115..c45ca3c1f5a40 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadWithUserDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatThreadWithUserDeletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -122,6 +123,9 @@ public AcsChatThreadWithUserDeletedEventData setThreadId(String threadId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -161,8 +165,8 @@ public static AcsChatThreadWithUserDeletedEventData fromJson(JsonReader jsonRead } else if ("threadId".equals(fieldName)) { deserializedAcsChatThreadWithUserDeletedEventData.setThreadId(reader.getString()); } else if ("createTime".equals(fieldName)) { - deserializedAcsChatThreadWithUserDeletedEventData.setCreateTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsChatThreadWithUserDeletedEventData.setCreateTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("version".equals(fieldName)) { deserializedAcsChatThreadWithUserDeletedEventData .setVersion(reader.getNullable(JsonReader::getLong)); @@ -170,8 +174,8 @@ public static AcsChatThreadWithUserDeletedEventData fromJson(JsonReader jsonRead deserializedAcsChatThreadWithUserDeletedEventData.deletedByCommunicationIdentifier = CommunicationIdentifierModel.fromJson(reader); } else if ("deleteTime".equals(fieldName)) { - deserializedAcsChatThreadWithUserDeletedEventData.deleteTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsChatThreadWithUserDeletedEventData.deleteTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsEmailDeliveryReportReceivedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsEmailDeliveryReportReceivedEventData.java index 9a1ada5b293c8..8a60251b0252b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsEmailDeliveryReportReceivedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsEmailDeliveryReportReceivedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -177,6 +178,9 @@ public OffsetDateTime getDeliveryAttemptTimestamp() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -221,8 +225,8 @@ public static AcsEmailDeliveryReportReceivedEventData fromJson(JsonReader jsonRe deserializedAcsEmailDeliveryReportReceivedEventData.deliveryStatusDetails = AcsEmailDeliveryReportStatusDetails.fromJson(reader); } else if ("deliveryAttemptTimestamp".equals(fieldName)) { - deserializedAcsEmailDeliveryReportReceivedEventData.deliveryAttemptTimestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsEmailDeliveryReportReceivedEventData.deliveryAttemptTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsEmailDeliveryReportStatusDetails.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsEmailDeliveryReportStatusDetails.java index a3efc7e0f4420..68dbf588b5dba 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsEmailDeliveryReportStatusDetails.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsEmailDeliveryReportStatusDetails.java @@ -48,6 +48,9 @@ public AcsEmailDeliveryReportStatusDetails setStatusMessage(String statusMessage return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsEmailEngagementTrackingReportReceivedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsEmailEngagementTrackingReportReceivedEventData.java index fc664e33e4460..8764833ebcb6f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsEmailEngagementTrackingReportReceivedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsEmailEngagementTrackingReportReceivedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -202,6 +203,9 @@ public AcsEmailEngagementTrackingReportReceivedEventData setEngagement(AcsUserEn return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -241,8 +245,8 @@ public static AcsEmailEngagementTrackingReportReceivedEventData fromJson(JsonRea } else if ("messageId".equals(fieldName)) { deserializedAcsEmailEngagementTrackingReportReceivedEventData.messageId = reader.getString(); } else if ("userActionTimestamp".equals(fieldName)) { - deserializedAcsEmailEngagementTrackingReportReceivedEventData.userActionTimestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsEmailEngagementTrackingReportReceivedEventData.userActionTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("engagementContext".equals(fieldName)) { deserializedAcsEmailEngagementTrackingReportReceivedEventData.engagementContext = reader.getString(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsIncomingCallCustomContext.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsIncomingCallCustomContext.java index 63263e6bfb0e4..e79cafc8b6e87 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsIncomingCallCustomContext.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsIncomingCallCustomContext.java @@ -73,6 +73,9 @@ public AcsIncomingCallCustomContext setVoipHeaders(Map voipHeade return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsIncomingCallEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsIncomingCallEventData.java index 54d12962fe95c..822871b37cf65 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsIncomingCallEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsIncomingCallEventData.java @@ -227,6 +227,9 @@ public CommunicationIdentifierModel getOnBehalfOfCommunicationIdentifier() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageButtonContent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageButtonContent.java index 46a90a476bd03..a32489c2e6f78 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageButtonContent.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageButtonContent.java @@ -72,6 +72,9 @@ public AcsMessageButtonContent setPayload(String payload) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageContext.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageContext.java index d9c4297c69ca9..6848be364bb3a 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageContext.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageContext.java @@ -72,6 +72,9 @@ public AcsMessageContext setMessageId(String messageId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageDeliveryStatusUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageDeliveryStatusUpdatedEventData.java index 2286381096705..0553ba9fdaf2c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageDeliveryStatusUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageDeliveryStatusUpdatedEventData.java @@ -5,6 +5,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.models.ResponseError; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -128,6 +129,9 @@ public AcsMessageDeliveryStatusUpdatedEventData setReceivedTimestamp(OffsetDateT return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -164,8 +168,8 @@ public static AcsMessageDeliveryStatusUpdatedEventData fromJson(JsonReader jsonR } else if ("to".equals(fieldName)) { deserializedAcsMessageDeliveryStatusUpdatedEventData.setTo(reader.getString()); } else if ("receivedTimestamp".equals(fieldName)) { - deserializedAcsMessageDeliveryStatusUpdatedEventData.setReceivedTimestamp( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsMessageDeliveryStatusUpdatedEventData.setReceivedTimestamp(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("error".equals(fieldName)) { deserializedAcsMessageDeliveryStatusUpdatedEventData .setError(AcsMessageChannelEventError.fromJson(reader)); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageEventData.java index 70f1e330a0985..1a34295186b17 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageEventData.java @@ -5,6 +5,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.models.ResponseError; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -124,6 +125,9 @@ void setError(AcsMessageChannelEventError error) { this.error = error; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -156,8 +160,8 @@ public static AcsMessageEventData fromJson(JsonReader jsonReader) throws IOExcep } else if ("to".equals(fieldName)) { deserializedAcsMessageEventData.to = reader.getString(); } else if ("receivedTimestamp".equals(fieldName)) { - deserializedAcsMessageEventData.receivedTimestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsMessageEventData.receivedTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("error".equals(fieldName)) { deserializedAcsMessageEventData.error = AcsMessageChannelEventError.fromJson(reader); } else { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageInteractiveButtonReplyContent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageInteractiveButtonReplyContent.java index 705450fb594ad..0da78319040b3 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageInteractiveButtonReplyContent.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageInteractiveButtonReplyContent.java @@ -73,6 +73,9 @@ public AcsMessageInteractiveButtonReplyContent setTitle(String title) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageInteractiveContent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageInteractiveContent.java index 0575abf074336..4ffd44704357b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageInteractiveContent.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageInteractiveContent.java @@ -97,6 +97,9 @@ public AcsMessageInteractiveContent setListReply(AcsMessageInteractiveListReplyC return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageInteractiveListReplyContent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageInteractiveListReplyContent.java index 80f8201d043d4..9b635d7c79891 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageInteractiveListReplyContent.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageInteractiveListReplyContent.java @@ -98,6 +98,9 @@ public AcsMessageInteractiveListReplyContent setDescription(String description) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageMediaContent.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageMediaContent.java index cc565f78b9060..6e4207ca48b48 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageMediaContent.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageMediaContent.java @@ -122,6 +122,9 @@ public AcsMessageMediaContent setCaption(String caption) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageReceivedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageReceivedEventData.java index dd4847466dff9..4fb368f8b3cc6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageReceivedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMessageReceivedEventData.java @@ -5,6 +5,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.models.ResponseError; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -202,6 +203,9 @@ public AcsMessageReceivedEventData setReceivedTimestamp(OffsetDateTime receivedT return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -240,8 +244,8 @@ public static AcsMessageReceivedEventData fromJson(JsonReader jsonReader) throws } else if ("to".equals(fieldName)) { deserializedAcsMessageReceivedEventData.setTo(reader.getString()); } else if ("receivedTimestamp".equals(fieldName)) { - deserializedAcsMessageReceivedEventData.setReceivedTimestamp( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAcsMessageReceivedEventData.setReceivedTimestamp(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("error".equals(fieldName)) { deserializedAcsMessageReceivedEventData.setError(AcsMessageChannelEventError.fromJson(reader)); } else if ("content".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMicrosoftTeamsAppIdentifier.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMicrosoftTeamsAppIdentifier.java index c658c111926fb..f7656cff033f4 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMicrosoftTeamsAppIdentifier.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsMicrosoftTeamsAppIdentifier.java @@ -74,6 +74,9 @@ public AcsMicrosoftTeamsAppIdentifier setCloud(CommunicationCloudEnvironmentMode return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingChunkInfoProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingChunkInfoProperties.java index 83643f630bf50..8e0a3169c246f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingChunkInfoProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingChunkInfoProperties.java @@ -172,6 +172,9 @@ public AcsRecordingChunkInfoProperties setDeleteLocation(String deleteLocation) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingFileStatusUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingFileStatusUpdatedEventData.java index 085419cf7116f..e57f0e96361a7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingFileStatusUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingFileStatusUpdatedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -209,6 +210,9 @@ public AcsRecordingFileStatusUpdatedEventData setSessionEndReason(String session return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -248,8 +252,8 @@ public static AcsRecordingFileStatusUpdatedEventData fromJson(JsonReader jsonRea deserializedAcsRecordingFileStatusUpdatedEventData.recordingStorageInfo = AcsRecordingStorageInfoProperties.fromJson(reader); } else if ("recordingStartTime".equals(fieldName)) { - deserializedAcsRecordingFileStatusUpdatedEventData.recordingStartTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsRecordingFileStatusUpdatedEventData.recordingStartTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("recordingDurationMs".equals(fieldName)) { deserializedAcsRecordingFileStatusUpdatedEventData.recordingDurationMs = reader.getNullable(JsonReader::getLong); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingStorageInfoProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingStorageInfoProperties.java index 35ab666fd30fd..b4385bd73dd6c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingStorageInfoProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingStorageInfoProperties.java @@ -48,6 +48,9 @@ public AcsRecordingStorageInfoProperties setRecordingChunks(List AcsRouterWorkerSelector.fromJson(reader1)); deserializedAcsRouterJobReceivedEventData.requestedWorkerSelectors = requestedWorkerSelectors; } else if ("scheduledOn".equals(fieldName)) { - deserializedAcsRouterJobReceivedEventData.scheduledOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsRouterJobReceivedEventData.scheduledOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobSchedulingFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobSchedulingFailedEventData.java index 1b3926f3ce70d..e1728b86fb860 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobSchedulingFailedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobSchedulingFailedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -92,8 +93,7 @@ public List getExpiredAttachedWorkerSelectors() { } /** - * Get the expiredRequestedWorkerSelectors property: Router Job Scheduling Failed Requested Worker Selector - * Expired. + * Get the expiredRequestedWorkerSelectors property: Router Job Scheduling Failed Requested Worker Selector Expired. * * @return the expiredRequestedWorkerSelectors value. */ @@ -102,8 +102,7 @@ public List getExpiredRequestedWorkerSelectors() { } /** - * Set the expiredRequestedWorkerSelectors property: Router Job Scheduling Failed Requested Worker Selector - * Expired. + * Set the expiredRequestedWorkerSelectors property: Router Job Scheduling Failed Requested Worker Selector Expired. * * @param expiredRequestedWorkerSelectors the expiredRequestedWorkerSelectors value to set. * @return the AcsRouterJobSchedulingFailedEventData object itself. @@ -208,6 +207,9 @@ public AcsRouterJobSchedulingFailedEventData setChannelId(String channelId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -271,8 +273,8 @@ public static AcsRouterJobSchedulingFailedEventData fromJson(JsonReader jsonRead deserializedAcsRouterJobSchedulingFailedEventData.expiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors; } else if ("scheduledOn".equals(fieldName)) { - deserializedAcsRouterJobSchedulingFailedEventData.scheduledOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsRouterJobSchedulingFailedEventData.scheduledOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("failureReason".equals(fieldName)) { deserializedAcsRouterJobSchedulingFailedEventData.failureReason = reader.getString(); } else { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobUnassignedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobUnassignedEventData.java index f80bbd1431e7b..6725af620a17a 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobUnassignedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobUnassignedEventData.java @@ -126,6 +126,9 @@ public AcsRouterJobUnassignedEventData setChannelId(String channelId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobWaitingForActivationEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobWaitingForActivationEventData.java index 2d15fc5e9cebb..32b856320a25e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobWaitingForActivationEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobWaitingForActivationEventData.java @@ -4,6 +4,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -208,6 +209,9 @@ public AcsRouterJobWaitingForActivationEventData setChannelId(String channelId) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -274,8 +278,8 @@ public static AcsRouterJobWaitingForActivationEventData fromJson(JsonReader json deserializedAcsRouterJobWaitingForActivationEventData.expiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors; } else if ("scheduledOn".equals(fieldName)) { - deserializedAcsRouterJobWaitingForActivationEventData.scheduledOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsRouterJobWaitingForActivationEventData.scheduledOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobWorkerSelectorsExpiredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobWorkerSelectorsExpiredEventData.java index 6782d0a0519c9..6b124fa3dd0c1 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobWorkerSelectorsExpiredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterJobWorkerSelectorsExpiredEventData.java @@ -13,8 +13,7 @@ import java.util.Map; /** - * Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobWorkerSelectorsExpired - * event. + * Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobWorkerSelectorsExpired event. */ @Fluent public final class AcsRouterJobWorkerSelectorsExpiredEventData extends AcsRouterJobEventData { @@ -35,8 +34,7 @@ public AcsRouterJobWorkerSelectorsExpiredEventData() { } /** - * Get the expiredRequestedWorkerSelectors property: Router Job Worker Selectors Expired Requested Worker - * Selectors. + * Get the expiredRequestedWorkerSelectors property: Router Job Worker Selectors Expired Requested Worker Selectors. * * @return the expiredRequestedWorkerSelectors value. */ @@ -45,8 +43,7 @@ public List getExpiredRequestedWorkerSelectors() { } /** - * Set the expiredRequestedWorkerSelectors property: Router Job Worker Selectors Expired Requested Worker - * Selectors. + * Set the expiredRequestedWorkerSelectors property: Router Job Worker Selectors Expired Requested Worker Selectors. * * @param expiredRequestedWorkerSelectors the expiredRequestedWorkerSelectors value to set. * @return the AcsRouterJobWorkerSelectorsExpiredEventData object itself. @@ -132,6 +129,9 @@ public AcsRouterJobWorkerSelectorsExpiredEventData setChannelId(String channelId return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterQueueDetails.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterQueueDetails.java index a198e7bf309d3..456f0daf40eb4 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterQueueDetails.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterQueueDetails.java @@ -98,6 +98,9 @@ public AcsRouterQueueDetails setLabels(Map labels) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerDeletedEventData.java index 6e904c0e96151..c717e305cbeba 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerDeletedEventData.java @@ -57,6 +57,9 @@ public AcsRouterWorkerDeletedEventData setChannelId(String channelId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerDeregisteredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerDeregisteredEventData.java index 0e65fb83da63f..ffd1261b81a73 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerDeregisteredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerDeregisteredEventData.java @@ -48,6 +48,9 @@ public AcsRouterWorkerDeregisteredEventData setWorkerId(String workerId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerEventData.java index 0d8b198fbf668..0f395bdf78555 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerEventData.java @@ -73,6 +73,9 @@ public AcsRouterWorkerEventData setChannelId(String channelId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferAcceptedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferAcceptedEventData.java index 2cf4115cd9626..04b410507463d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferAcceptedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferAcceptedEventData.java @@ -258,6 +258,9 @@ public AcsRouterWorkerOfferAcceptedEventData setChannelId(String channelId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferDeclinedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferDeclinedEventData.java index 37509a0436568..3f9a753bac806 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferDeclinedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferDeclinedEventData.java @@ -107,6 +107,9 @@ public AcsRouterWorkerOfferDeclinedEventData setChannelId(String channelId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferExpiredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferExpiredEventData.java index 35071eb639d13..961b2e8c8a382 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferExpiredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferExpiredEventData.java @@ -107,6 +107,9 @@ public AcsRouterWorkerOfferExpiredEventData setChannelId(String channelId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferIssuedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferIssuedEventData.java index b03c8b5d85d8d..e952eb34f33b8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferIssuedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferIssuedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -285,6 +286,9 @@ public AcsRouterWorkerOfferIssuedEventData setChannelId(String channelId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -341,11 +345,11 @@ public static AcsRouterWorkerOfferIssuedEventData fromJson(JsonReader jsonReader Map workerLabels = reader.readMap(reader1 -> reader1.getString()); deserializedAcsRouterWorkerOfferIssuedEventData.workerLabels = workerLabels; } else if ("offeredOn".equals(fieldName)) { - deserializedAcsRouterWorkerOfferIssuedEventData.offeredOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsRouterWorkerOfferIssuedEventData.offeredOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("expiresOn".equals(fieldName)) { - deserializedAcsRouterWorkerOfferIssuedEventData.expiresOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsRouterWorkerOfferIssuedEventData.expiresOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("workerTags".equals(fieldName)) { Map workerTags = reader.readMap(reader1 -> reader1.getString()); deserializedAcsRouterWorkerOfferIssuedEventData.workerTags = workerTags; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferRevokedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferRevokedEventData.java index 6d34915930b00..929207ad887ed 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferRevokedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerOfferRevokedEventData.java @@ -107,6 +107,9 @@ public AcsRouterWorkerOfferRevokedEventData setChannelId(String channelId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerRegisteredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerRegisteredEventData.java index 3deb21b444939..df79eb3d86537 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerRegisteredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerRegisteredEventData.java @@ -175,6 +175,9 @@ public AcsRouterWorkerRegisteredEventData setTags(Map tags) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerSelector.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerSelector.java index 879c66aca9e94..f1380cb0ac692 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerSelector.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerSelector.java @@ -4,6 +4,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -177,6 +178,9 @@ public AcsRouterWorkerSelector setExpirationTime(OffsetDateTime expirationTime) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -217,8 +221,8 @@ public static AcsRouterWorkerSelector fromJson(JsonReader jsonReader) throws IOE deserializedAcsRouterWorkerSelector.state = AcsRouterWorkerSelectorState.fromString(reader.getString()); } else if ("expirationTime".equals(fieldName)) { - deserializedAcsRouterWorkerSelector.expirationTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsRouterWorkerSelector.expirationTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerUpdatedEventData.java index 689f35aef3bda..c31572a461d55 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRouterWorkerUpdatedEventData.java @@ -201,6 +201,9 @@ public List getUpdatedWorkerProperties() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsDeliveryAttemptProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsDeliveryAttemptProperties.java index fb0cc50ea1b5a..c47acb150fd43 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsDeliveryAttemptProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsDeliveryAttemptProperties.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -99,6 +100,9 @@ public AcsSmsDeliveryAttemptProperties setSegmentsFailed(Integer segmentsFailed) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -126,8 +130,8 @@ public static AcsSmsDeliveryAttemptProperties fromJson(JsonReader jsonReader) th reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedAcsSmsDeliveryAttemptProperties.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsSmsDeliveryAttemptProperties.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("segmentsSucceeded".equals(fieldName)) { deserializedAcsSmsDeliveryAttemptProperties.segmentsSucceeded = reader.getNullable(JsonReader::getInt); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsDeliveryReportReceivedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsDeliveryReportReceivedEventData.java index 7e846c731a57c..0cc6ccf732bca 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsDeliveryReportReceivedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsDeliveryReportReceivedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -177,6 +178,9 @@ public AcsSmsDeliveryReportReceivedEventData setTo(String to) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -226,8 +230,8 @@ public static AcsSmsDeliveryReportReceivedEventData fromJson(JsonReader jsonRead = reader.readArray(reader1 -> AcsSmsDeliveryAttemptProperties.fromJson(reader1)); deserializedAcsSmsDeliveryReportReceivedEventData.deliveryAttempts = deliveryAttempts; } else if ("receivedTimestamp".equals(fieldName)) { - deserializedAcsSmsDeliveryReportReceivedEventData.receivedTimestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsSmsDeliveryReportReceivedEventData.receivedTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("tag".equals(fieldName)) { deserializedAcsSmsDeliveryReportReceivedEventData.tag = reader.getString(); } else { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsEventBaseProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsEventBaseProperties.java index b23bb7c8edf00..ebe4d188cece6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsEventBaseProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsEventBaseProperties.java @@ -97,6 +97,9 @@ public AcsSmsEventBaseProperties setTo(String to) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsReceivedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsReceivedEventData.java index 6283997439d18..fdc29cc62d89d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsReceivedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsSmsReceivedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -100,6 +101,9 @@ public AcsSmsReceivedEventData setTo(String to) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -138,8 +142,8 @@ public static AcsSmsReceivedEventData fromJson(JsonReader jsonReader) throws IOE } else if ("message".equals(fieldName)) { deserializedAcsSmsReceivedEventData.message = reader.getString(); } else if ("receivedTimestamp".equals(fieldName)) { - deserializedAcsSmsReceivedEventData.receivedTimestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAcsSmsReceivedEventData.receivedTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsUserDisconnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsUserDisconnectedEventData.java index a710f6a9f21f1..39c9c8efe0ea2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsUserDisconnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsUserDisconnectedEventData.java @@ -48,6 +48,9 @@ public CommunicationIdentifierModel getUserCommunicationIdentifier() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiCenterApiDefinitionAddedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiCenterApiDefinitionAddedEventData.java index 792eff342eafd..57b7d7ade8ff8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiCenterApiDefinitionAddedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiCenterApiDefinitionAddedEventData.java @@ -98,6 +98,9 @@ public ApiCenterApiDefinitionAddedEventData setSpecification(ApiCenterApiSpecifi return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiCenterApiDefinitionUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiCenterApiDefinitionUpdatedEventData.java index dd4fcc9dfc221..83bc1f545286b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiCenterApiDefinitionUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiCenterApiDefinitionUpdatedEventData.java @@ -98,6 +98,9 @@ public ApiCenterApiDefinitionUpdatedEventData setSpecification(ApiCenterApiSpeci return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiCenterApiSpecification.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiCenterApiSpecification.java index eaadd45244f95..fd4ece51016e4 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiCenterApiSpecification.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiCenterApiSpecification.java @@ -72,6 +72,9 @@ public ApiCenterApiSpecification setVersion(String version) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiCreatedEventData.java index 4c2067dab00f1..77937506be5cb 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiCreatedEventData.java @@ -54,6 +54,9 @@ public ApiManagementApiCreatedEventData setResourceUri(String resourceUri) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiDeletedEventData.java index 08bf3e1d1add2..cf2cf68d571b9 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiDeletedEventData.java @@ -54,6 +54,9 @@ public ApiManagementApiDeletedEventData setResourceUri(String resourceUri) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseCreatedEventData.java index 5e87ab4aea001..fbf12769e0013 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseCreatedEventData.java @@ -55,6 +55,9 @@ public ApiManagementApiReleaseCreatedEventData setResourceUri(String resourceUri return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseDeletedEventData.java index a4f6d61d57bd7..b10f3e438baf4 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseDeletedEventData.java @@ -55,6 +55,9 @@ public ApiManagementApiReleaseDeletedEventData setResourceUri(String resourceUri return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseUpdatedEventData.java index adcd225e8da83..165384c873af6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseUpdatedEventData.java @@ -55,6 +55,9 @@ public ApiManagementApiReleaseUpdatedEventData setResourceUri(String resourceUri return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiUpdatedEventData.java index 6370ae537dd79..c8ca9aafe49d7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiUpdatedEventData.java @@ -54,6 +54,9 @@ public ApiManagementApiUpdatedEventData setResourceUri(String resourceUri) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayApiAddedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayApiAddedEventData.java index a40c2dc6ba41c..b936acaa93be8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayApiAddedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayApiAddedEventData.java @@ -55,6 +55,9 @@ public ApiManagementGatewayApiAddedEventData setResourceUri(String resourceUri) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayApiRemovedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayApiRemovedEventData.java index 29dc8cf897a62..7f2c1223512ef 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayApiRemovedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayApiRemovedEventData.java @@ -55,6 +55,9 @@ public ApiManagementGatewayApiRemovedEventData setResourceUri(String resourceUri return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCertificateAuthorityCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCertificateAuthorityCreatedEventData.java index 77d8ee342670b..0b8d0b9fecbac 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCertificateAuthorityCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCertificateAuthorityCreatedEventData.java @@ -56,6 +56,9 @@ public ApiManagementGatewayCertificateAuthorityCreatedEventData setResourceUri(S return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCertificateAuthorityDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCertificateAuthorityDeletedEventData.java index 48ecd672e31b9..0e2402d7878db 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCertificateAuthorityDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCertificateAuthorityDeletedEventData.java @@ -56,6 +56,9 @@ public ApiManagementGatewayCertificateAuthorityDeletedEventData setResourceUri(S return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCertificateAuthorityUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCertificateAuthorityUpdatedEventData.java index 891c91c4cbeb0..6e2de1429ca51 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCertificateAuthorityUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCertificateAuthorityUpdatedEventData.java @@ -56,6 +56,9 @@ public ApiManagementGatewayCertificateAuthorityUpdatedEventData setResourceUri(S return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCreatedEventData.java index 3a8584fcb572e..3212d2ca1f900 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayCreatedEventData.java @@ -55,6 +55,9 @@ public ApiManagementGatewayCreatedEventData setResourceUri(String resourceUri) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayDeletedEventData.java index d37794600b379..5eac3132b7d8c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayDeletedEventData.java @@ -55,6 +55,9 @@ public ApiManagementGatewayDeletedEventData setResourceUri(String resourceUri) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayHostnameConfigurationCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayHostnameConfigurationCreatedEventData.java index f475d7587ba82..ae5f74db26dd7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayHostnameConfigurationCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayHostnameConfigurationCreatedEventData.java @@ -56,6 +56,9 @@ public ApiManagementGatewayHostnameConfigurationCreatedEventData setResourceUri( return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayHostnameConfigurationDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayHostnameConfigurationDeletedEventData.java index a4822936c75a6..a980af3846375 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayHostnameConfigurationDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayHostnameConfigurationDeletedEventData.java @@ -56,6 +56,9 @@ public ApiManagementGatewayHostnameConfigurationDeletedEventData setResourceUri( return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayHostnameConfigurationUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayHostnameConfigurationUpdatedEventData.java index a211e768858d3..68eacc20578d3 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayHostnameConfigurationUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayHostnameConfigurationUpdatedEventData.java @@ -56,6 +56,9 @@ public ApiManagementGatewayHostnameConfigurationUpdatedEventData setResourceUri( return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayUpdatedEventData.java index 437b9da02c32c..eb049dbe10e8c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementGatewayUpdatedEventData.java @@ -55,6 +55,9 @@ public ApiManagementGatewayUpdatedEventData setResourceUri(String resourceUri) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductCreatedEventData.java index ed445b1d07c96..cabbc094deaf9 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductCreatedEventData.java @@ -55,6 +55,9 @@ public ApiManagementProductCreatedEventData setResourceUri(String resourceUri) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductDeletedEventData.java index 58e645525d066..1a26d86a04770 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductDeletedEventData.java @@ -55,6 +55,9 @@ public ApiManagementProductDeletedEventData setResourceUri(String resourceUri) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductUpdatedEventData.java index 6e0a8b7fc55e6..08b6c057485c3 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductUpdatedEventData.java @@ -55,6 +55,9 @@ public ApiManagementProductUpdatedEventData setResourceUri(String resourceUri) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionCreatedEventData.java index ac7b283f4c303..e87f44ded4fed 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionCreatedEventData.java @@ -55,6 +55,9 @@ public ApiManagementSubscriptionCreatedEventData setResourceUri(String resourceU return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionDeletedEventData.java index 241956959ac62..8d434a3e13dc7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionDeletedEventData.java @@ -55,6 +55,9 @@ public ApiManagementSubscriptionDeletedEventData setResourceUri(String resourceU return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionUpdatedEventData.java index c40bcc4611b9f..5f9cb633831af 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionUpdatedEventData.java @@ -55,6 +55,9 @@ public ApiManagementSubscriptionUpdatedEventData setResourceUri(String resourceU return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserCreatedEventData.java index fda14dd46f587..fc39f1ccb05a7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserCreatedEventData.java @@ -54,6 +54,9 @@ public ApiManagementUserCreatedEventData setResourceUri(String resourceUri) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserDeletedEventData.java index 78b71cee77560..58893030a72e2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserDeletedEventData.java @@ -54,6 +54,9 @@ public ApiManagementUserDeletedEventData setResourceUri(String resourceUri) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserUpdatedEventData.java index 1ef6b70ede568..b6e053412d79f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserUpdatedEventData.java @@ -54,6 +54,9 @@ public ApiManagementUserUpdatedEventData setResourceUri(String resourceUri) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueDeletedEventData.java index 72edf1b11b80b..4940ad7dbb988 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueDeletedEventData.java @@ -123,6 +123,9 @@ public AppConfigurationKeyValueDeletedEventData setSyncToken(String syncToken) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueModifiedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueModifiedEventData.java index d2cf2a61259eb..4c0fbf025c57c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueModifiedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationKeyValueModifiedEventData.java @@ -123,6 +123,9 @@ public AppConfigurationKeyValueModifiedEventData setSyncToken(String syncToken) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationSnapshotCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationSnapshotCreatedEventData.java index 32269cd573a30..7118321983ca0 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationSnapshotCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationSnapshotCreatedEventData.java @@ -48,6 +48,9 @@ public AppConfigurationSnapshotCreatedEventData setSyncToken(String syncToken) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationSnapshotEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationSnapshotEventData.java index 1211c7c3e6ab0..d613949a72a5d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationSnapshotEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationSnapshotEventData.java @@ -97,6 +97,9 @@ public AppConfigurationSnapshotEventData setSyncToken(String syncToken) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationSnapshotModifiedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationSnapshotModifiedEventData.java index 5c3af9c136160..8bc60ffe62b9c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationSnapshotModifiedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppConfigurationSnapshotModifiedEventData.java @@ -48,6 +48,9 @@ public AppConfigurationSnapshotModifiedEventData setSyncToken(String syncToken) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppEventTypeDetail.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppEventTypeDetail.java index 95d2f699f5202..01c8993080a14 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppEventTypeDetail.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppEventTypeDetail.java @@ -47,6 +47,9 @@ public AppEventTypeDetail setAction(AppAction action) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanEventTypeDetail.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanEventTypeDetail.java index aa245ca2cab55..ab3f0233e7df6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanEventTypeDetail.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AppServicePlanEventTypeDetail.java @@ -97,6 +97,9 @@ public AppServicePlanEventTypeDetail setStatus(AsyncStatus status) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterCreatedEventData.java index f9b7ced4857f4..f7cec998e729c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterCreatedEventData.java @@ -58,6 +58,9 @@ public AvsClusterCreatedEventData setInMaintenanceHostNames(List inMaint return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterDeletedEventData.java index fd77a803aa505..87b2990729e74 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterDeletedEventData.java @@ -58,6 +58,9 @@ public AvsClusterDeletedEventData setInMaintenanceHostNames(List inMaint return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterEventData.java index 4fc85d30b40b9..fae58f2822c71 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterEventData.java @@ -123,6 +123,9 @@ public AvsClusterEventData setInMaintenanceHostNames(List inMaintenanceH return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterFailedEventData.java index ce0095e2f97b8..7136cb7f95139 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterFailedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterFailedEventData.java @@ -83,6 +83,9 @@ public AvsClusterFailedEventData setInMaintenanceHostNames(List inMainte return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterUpdatedEventData.java index a1c1b1beb37dd..c4cf7999cf25d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterUpdatedEventData.java @@ -58,6 +58,9 @@ public AvsClusterUpdatedEventData setInMaintenanceHostNames(List inMaint return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterUpdatingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterUpdatingEventData.java index b77cbbe953433..ab067e70b1e89 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterUpdatingEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsClusterUpdatingEventData.java @@ -58,6 +58,9 @@ public AvsClusterUpdatingEventData setInMaintenanceHostNames(List inMain return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudEventData.java index 43bc75cf08d46..c2c8e66bc1ff1 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudEventData.java @@ -47,6 +47,9 @@ public AvsPrivateCloudEventData setOperationId(String operationId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudFailedEventData.java index 050f1fed30f7c..7d88ad3983465 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudFailedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudFailedEventData.java @@ -55,6 +55,9 @@ public AvsPrivateCloudFailedEventData setOperationId(String operationId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudUpdatedEventData.java index 51c480c33d54b..74e226bece189 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudUpdatedEventData.java @@ -30,6 +30,9 @@ public AvsPrivateCloudUpdatedEventData setOperationId(String operationId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudUpdatingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudUpdatingEventData.java index 1659d1a58f3f1..615a1c48f3197 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudUpdatingEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsPrivateCloudUpdatingEventData.java @@ -30,6 +30,9 @@ public AvsPrivateCloudUpdatingEventData setOperationId(String operationId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionCancelledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionCancelledEventData.java index 6cc3ee6332a46..ef8e531739381 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionCancelledEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionCancelledEventData.java @@ -49,6 +49,9 @@ public AvsScriptExecutionCancelledEventData setOutput(List output) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionEventData.java index a2daa9447af73..11a053d74868d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionEventData.java @@ -98,6 +98,9 @@ public AvsScriptExecutionEventData setOutput(List output) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionFailedEventData.java index 38e5b93ad2f87..aa0118e4774d2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionFailedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionFailedEventData.java @@ -74,6 +74,9 @@ public AvsScriptExecutionFailedEventData setOutput(List output) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionFinishedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionFinishedEventData.java index ea142605c5820..b44db7389f3a4 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionFinishedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionFinishedEventData.java @@ -75,6 +75,9 @@ public AvsScriptExecutionFinishedEventData setOutput(List output) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionStartedEventData.java index 3a2a78fdfabdc..cf296bdda553b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionStartedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AvsScriptExecutionStartedEventData.java @@ -49,6 +49,9 @@ public AvsScriptExecutionStartedEventData setOutput(List output) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/CommunicationIdentifierModel.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/CommunicationIdentifierModel.java index 70ca137239904..b41d0155291b1 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/CommunicationIdentifierModel.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/CommunicationIdentifierModel.java @@ -174,6 +174,9 @@ public CommunicationIdentifierModel setMicrosoftTeamsApp(AcsMicrosoftTeamsAppIde return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/CommunicationUserIdentifierModel.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/CommunicationUserIdentifierModel.java index f7a37954b0b21..561fb21ccf5ab 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/CommunicationUserIdentifierModel.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/CommunicationUserIdentifierModel.java @@ -47,6 +47,9 @@ public CommunicationUserIdentifierModel setId(String id) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventData.java index b74c054ae9e55..7eccc41a3628f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -177,6 +178,9 @@ public ContainerRegistryEventConnectedRegistry getConnectedRegistry() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -209,8 +213,8 @@ public static ContainerRegistryArtifactEventData fromJson(JsonReader jsonReader) if ("id".equals(fieldName)) { deserializedContainerRegistryArtifactEventData.id = reader.getString(); } else if ("timestamp".equals(fieldName)) { - deserializedContainerRegistryArtifactEventData.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedContainerRegistryArtifactEventData.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("action".equals(fieldName)) { deserializedContainerRegistryArtifactEventData.action = reader.getString(); } else if ("location".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventTarget.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventTarget.java index 3692733a9453a..9272e3e907a32 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventTarget.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryArtifactEventTarget.java @@ -198,6 +198,9 @@ public ContainerRegistryArtifactEventTarget setVersion(String version) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartDeletedEventData.java index 770abb5e6b72a..a0551020e1b1f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartDeletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -78,6 +79,9 @@ public ContainerRegistryChartDeletedEventData setTarget(ContainerRegistryArtifac return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -110,8 +114,8 @@ public static ContainerRegistryChartDeletedEventData fromJson(JsonReader jsonRea if ("id".equals(fieldName)) { deserializedContainerRegistryChartDeletedEventData.setId(reader.getString()); } else if ("timestamp".equals(fieldName)) { - deserializedContainerRegistryChartDeletedEventData.setTimestamp( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedContainerRegistryChartDeletedEventData.setTimestamp(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("action".equals(fieldName)) { deserializedContainerRegistryChartDeletedEventData.setAction(reader.getString()); } else if ("location".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartPushedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartPushedEventData.java index 6aeca85c0260e..bb4133c0bfaed 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartPushedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryChartPushedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -78,6 +79,9 @@ public ContainerRegistryChartPushedEventData setTarget(ContainerRegistryArtifact return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -110,8 +114,8 @@ public static ContainerRegistryChartPushedEventData fromJson(JsonReader jsonRead if ("id".equals(fieldName)) { deserializedContainerRegistryChartPushedEventData.setId(reader.getString()); } else if ("timestamp".equals(fieldName)) { - deserializedContainerRegistryChartPushedEventData.setTimestamp( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedContainerRegistryChartPushedEventData.setTimestamp(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("action".equals(fieldName)) { deserializedContainerRegistryChartPushedEventData.setAction(reader.getString()); } else if ("location".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventActor.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventActor.java index 1ea92f562614c..376f4859dd862 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventActor.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventActor.java @@ -12,8 +12,7 @@ import java.io.IOException; /** - * The agent that initiated the event. For most situations, this could be from the authorization context of the - * request. + * The agent that initiated the event. For most situations, this could be from the authorization context of the request. */ @Fluent public final class ContainerRegistryEventActor implements JsonSerializable { @@ -48,6 +47,9 @@ public ContainerRegistryEventActor setName(String name) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventConnectedRegistry.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventConnectedRegistry.java index 41755573d662e..64e1a771e6074 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventConnectedRegistry.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventConnectedRegistry.java @@ -48,6 +48,9 @@ public ContainerRegistryEventConnectedRegistry setName(String name) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventData.java index 09af1bf4ab598..d75bd65cb8a22 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -257,6 +258,9 @@ public ContainerRegistryEventData setConnectedRegistry(ContainerRegistryEventCon return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -291,8 +295,8 @@ public static ContainerRegistryEventData fromJson(JsonReader jsonReader) throws if ("id".equals(fieldName)) { deserializedContainerRegistryEventData.id = reader.getString(); } else if ("timestamp".equals(fieldName)) { - deserializedContainerRegistryEventData.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedContainerRegistryEventData.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("action".equals(fieldName)) { deserializedContainerRegistryEventData.action = reader.getString(); } else if ("location".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventRequest.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventRequest.java index fca5192b999ec..f515811b49c96 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventRequest.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventRequest.java @@ -92,8 +92,8 @@ public ContainerRegistryEventRequest setAddr(String addr) { } /** - * Get the host property: The externally accessible hostname of the registry instance, as specified by the http - * host header on incoming requests. + * Get the host property: The externally accessible hostname of the registry instance, as specified by the http host + * header on incoming requests. * * @return the host value. */ @@ -102,8 +102,8 @@ public String getHost() { } /** - * Set the host property: The externally accessible hostname of the registry instance, as specified by the http - * host header on incoming requests. + * Set the host property: The externally accessible hostname of the registry instance, as specified by the http host + * header on incoming requests. * * @param host the host value to set. * @return the ContainerRegistryEventRequest object itself. @@ -153,6 +153,9 @@ public ContainerRegistryEventRequest setUseragent(String useragent) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventSource.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventSource.java index 2fd78426973ad..5fdaeea36cda8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventSource.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventSource.java @@ -76,6 +76,9 @@ public ContainerRegistryEventSource setInstanceID(String instanceID) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventTarget.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventTarget.java index ef7ea3c7d9fd4..ff0996ac0d2d6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventTarget.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryEventTarget.java @@ -197,6 +197,9 @@ public ContainerRegistryEventTarget setTag(String tag) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImageDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImageDeletedEventData.java index 3bee314971141..42b109ab0745e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImageDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImageDeletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -105,6 +106,9 @@ public ContainerRegistryImageDeletedEventData setSource(ContainerRegistryEventSo return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -140,8 +144,8 @@ public static ContainerRegistryImageDeletedEventData fromJson(JsonReader jsonRea if ("id".equals(fieldName)) { deserializedContainerRegistryImageDeletedEventData.setId(reader.getString()); } else if ("timestamp".equals(fieldName)) { - deserializedContainerRegistryImageDeletedEventData.setTimestamp( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedContainerRegistryImageDeletedEventData.setTimestamp(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("action".equals(fieldName)) { deserializedContainerRegistryImageDeletedEventData.setAction(reader.getString()); } else if ("location".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImagePushedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImagePushedEventData.java index f7147e71d0773..7e63985629557 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImagePushedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerRegistryImagePushedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -105,6 +106,9 @@ public ContainerRegistryImagePushedEventData setSource(ContainerRegistryEventSou return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -140,8 +144,8 @@ public static ContainerRegistryImagePushedEventData fromJson(JsonReader jsonRead if ("id".equals(fieldName)) { deserializedContainerRegistryImagePushedEventData.setId(reader.getString()); } else if ("timestamp".equals(fieldName)) { - deserializedContainerRegistryImagePushedEventData.setTimestamp( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedContainerRegistryImagePushedEventData.setTimestamp(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("action".equals(fieldName)) { deserializedContainerRegistryImagePushedEventData.setAction(reader.getString()); } else if ("location".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceClusterSupportEndedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceClusterSupportEndedEventData.java index 763f477a0439e..560183023802c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceClusterSupportEndedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceClusterSupportEndedEventData.java @@ -30,6 +30,9 @@ public ContainerServiceClusterSupportEndedEventData setKubernetesVersion(String return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceClusterSupportEndingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceClusterSupportEndingEventData.java index 972a91e9bd730..3c82b0dce9416 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceClusterSupportEndingEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceClusterSupportEndingEventData.java @@ -30,6 +30,9 @@ public ContainerServiceClusterSupportEndingEventData setKubernetesVersion(String return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceClusterSupportEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceClusterSupportEventData.java index c128038a2b099..5173cf8386bd0 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceClusterSupportEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceClusterSupportEventData.java @@ -48,6 +48,9 @@ public ContainerServiceClusterSupportEventData setKubernetesVersion(String kuber return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNewKubernetesVersionAvailableEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNewKubernetesVersionAvailableEventData.java index f4d613b66f657..45818b9f37c23 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNewKubernetesVersionAvailableEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNewKubernetesVersionAvailableEventData.java @@ -138,6 +138,9 @@ public String getLatestPreviewKubernetesVersion() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingEventData.java index 305aac77cf085..af8bab2f2bf93 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingEventData.java @@ -48,6 +48,9 @@ public ContainerServiceNodePoolRollingEventData setNodePoolName(String nodePoolN return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingFailedEventData.java index 9fab8514d4c14..85b1429840a57 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingFailedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingFailedEventData.java @@ -30,6 +30,9 @@ public ContainerServiceNodePoolRollingFailedEventData setNodePoolName(String nod return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingStartedEventData.java index 46b99c8016739..f71cd0edbdba1 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingStartedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingStartedEventData.java @@ -30,6 +30,9 @@ public ContainerServiceNodePoolRollingStartedEventData setNodePoolName(String no return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingSucceededEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingSucceededEventData.java index a6753ab121231..a41fd85e9675c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingSucceededEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ContainerServiceNodePoolRollingSucceededEventData.java @@ -30,6 +30,9 @@ public ContainerServiceNodePoolRollingSucceededEventData setNodePoolName(String return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DataBoxCopyCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DataBoxCopyCompletedEventData.java index 7e3e2d79cbc75..10c7dd91a5689 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DataBoxCopyCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DataBoxCopyCompletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,8 +20,8 @@ @Fluent public final class DataBoxCopyCompletedEventData implements JsonSerializable { /* - * Serial Number of the device associated with the event. The list is comma separated if more than one serial - * number is associated. + * Serial Number of the device associated with the event. The list is comma separated if more than one serial number + * is associated. */ private String serialNumber; @@ -41,8 +42,8 @@ public DataBoxCopyCompletedEventData() { } /** - * Get the serialNumber property: Serial Number of the device associated with the event. The list is comma - * separated if more than one serial number is associated. + * Get the serialNumber property: Serial Number of the device associated with the event. The list is comma separated + * if more than one serial number is associated. * * @return the serialNumber value. */ @@ -51,8 +52,8 @@ public String getSerialNumber() { } /** - * Set the serialNumber property: Serial Number of the device associated with the event. The list is comma - * separated if more than one serial number is associated. + * Set the serialNumber property: Serial Number of the device associated with the event. The list is comma separated + * if more than one serial number is associated. * * @param serialNumber the serialNumber value to set. * @return the DataBoxCopyCompletedEventData object itself. @@ -102,6 +103,9 @@ public DataBoxCopyCompletedEventData setStageTime(OffsetDateTime stageTime) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -134,8 +138,8 @@ public static DataBoxCopyCompletedEventData fromJson(JsonReader jsonReader) thro deserializedDataBoxCopyCompletedEventData.stageName = DataBoxStageName.fromString(reader.getString()); } else if ("stageTime".equals(fieldName)) { - deserializedDataBoxCopyCompletedEventData.stageTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDataBoxCopyCompletedEventData.stageTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DataBoxCopyStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DataBoxCopyStartedEventData.java index 9eba18f173c5c..4177a9fa99f4f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DataBoxCopyStartedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DataBoxCopyStartedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,8 +20,8 @@ @Fluent public final class DataBoxCopyStartedEventData implements JsonSerializable { /* - * Serial Number of the device associated with the event. The list is comma separated if more than one serial - * number is associated. + * Serial Number of the device associated with the event. The list is comma separated if more than one serial number + * is associated. */ private String serialNumber; @@ -41,8 +42,8 @@ public DataBoxCopyStartedEventData() { } /** - * Get the serialNumber property: Serial Number of the device associated with the event. The list is comma - * separated if more than one serial number is associated. + * Get the serialNumber property: Serial Number of the device associated with the event. The list is comma separated + * if more than one serial number is associated. * * @return the serialNumber value. */ @@ -51,8 +52,8 @@ public String getSerialNumber() { } /** - * Set the serialNumber property: Serial Number of the device associated with the event. The list is comma - * separated if more than one serial number is associated. + * Set the serialNumber property: Serial Number of the device associated with the event. The list is comma separated + * if more than one serial number is associated. * * @param serialNumber the serialNumber value to set. * @return the DataBoxCopyStartedEventData object itself. @@ -102,6 +103,9 @@ public DataBoxCopyStartedEventData setStageTime(OffsetDateTime stageTime) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -132,8 +136,8 @@ public static DataBoxCopyStartedEventData fromJson(JsonReader jsonReader) throws } else if ("stageName".equals(fieldName)) { deserializedDataBoxCopyStartedEventData.stageName = DataBoxStageName.fromString(reader.getString()); } else if ("stageTime".equals(fieldName)) { - deserializedDataBoxCopyStartedEventData.stageTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDataBoxCopyStartedEventData.stageTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DataBoxOrderCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DataBoxOrderCompletedEventData.java index fbd0871e802f8..11ef05d294caa 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DataBoxOrderCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DataBoxOrderCompletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,8 +20,8 @@ @Fluent public final class DataBoxOrderCompletedEventData implements JsonSerializable { /* - * Serial Number of the device associated with the event. The list is comma separated if more than one serial - * number is associated. + * Serial Number of the device associated with the event. The list is comma separated if more than one serial number + * is associated. */ private String serialNumber; @@ -41,8 +42,8 @@ public DataBoxOrderCompletedEventData() { } /** - * Get the serialNumber property: Serial Number of the device associated with the event. The list is comma - * separated if more than one serial number is associated. + * Get the serialNumber property: Serial Number of the device associated with the event. The list is comma separated + * if more than one serial number is associated. * * @return the serialNumber value. */ @@ -51,8 +52,8 @@ public String getSerialNumber() { } /** - * Set the serialNumber property: Serial Number of the device associated with the event. The list is comma - * separated if more than one serial number is associated. + * Set the serialNumber property: Serial Number of the device associated with the event. The list is comma separated + * if more than one serial number is associated. * * @param serialNumber the serialNumber value to set. * @return the DataBoxOrderCompletedEventData object itself. @@ -102,6 +103,9 @@ public DataBoxOrderCompletedEventData setStageTime(OffsetDateTime stageTime) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -134,8 +138,8 @@ public static DataBoxOrderCompletedEventData fromJson(JsonReader jsonReader) thr deserializedDataBoxOrderCompletedEventData.stageName = DataBoxStageName.fromString(reader.getString()); } else if ("stageTime".equals(fieldName)) { - deserializedDataBoxOrderCompletedEventData.stageTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDataBoxOrderCompletedEventData.stageTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventInfo.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventInfo.java index 1310294d0d3f1..963eb5547c1d6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventInfo.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventInfo.java @@ -30,9 +30,9 @@ public DeviceConnectionStateEventInfo() { } /** - * Get the sequenceNumber property: Sequence number is string representation of a hexadecimal number. string - * compare can be used to identify the larger number because both in ASCII and HEX numbers come after alphabets. If - * you are converting the string to hex, then the number is a 256 bit number. + * Get the sequenceNumber property: Sequence number is string representation of a hexadecimal number. string compare + * can be used to identify the larger number because both in ASCII and HEX numbers come after alphabets. If you are + * converting the string to hex, then the number is a 256 bit number. * * @return the sequenceNumber value. */ @@ -41,9 +41,9 @@ public String getSequenceNumber() { } /** - * Set the sequenceNumber property: Sequence number is string representation of a hexadecimal number. string - * compare can be used to identify the larger number because both in ASCII and HEX numbers come after alphabets. If - * you are converting the string to hex, then the number is a 256 bit number. + * Set the sequenceNumber property: Sequence number is string representation of a hexadecimal number. string compare + * can be used to identify the larger number because both in ASCII and HEX numbers come after alphabets. If you are + * converting the string to hex, then the number is a 256 bit number. * * @param sequenceNumber the sequenceNumber value to set. * @return the DeviceConnectionStateEventInfo object itself. @@ -53,6 +53,9 @@ public DeviceConnectionStateEventInfo setSequenceNumber(String sequenceNumber) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventProperties.java index 47b0312ff95dd..ad79e475e5d69 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceConnectionStateEventProperties.java @@ -50,7 +50,7 @@ public DeviceConnectionStateEventProperties() { /** * Get the deviceId property: The unique identifier of the device. This case-sensitive string can be up to 128 * characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + - * % _ &#35; * ? ! ( ) , = @ ; $ '. + * % _ &#35; * ? ! ( ) , = @ ; $ '. * * @return the deviceId value. */ @@ -61,7 +61,7 @@ public String getDeviceId() { /** * Set the deviceId property: The unique identifier of the device. This case-sensitive string can be up to 128 * characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + - * % _ &#35; * ? ! ( ) , = @ ; $ '. + * % _ &#35; * ? ! ( ) , = @ ; $ '. * * @param deviceId the deviceId value to set. * @return the DeviceConnectionStateEventProperties object itself. @@ -74,7 +74,7 @@ public DeviceConnectionStateEventProperties setDeviceId(String deviceId) { /** * Get the moduleId property: The unique identifier of the module. This case-sensitive string can be up to 128 * characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + - * % _ &#35; * ? ! ( ) , = @ ; $ '. + * % _ &#35; * ? ! ( ) , = @ ; $ '. * * @return the moduleId value. */ @@ -85,7 +85,7 @@ public String getModuleId() { /** * Set the moduleId property: The unique identifier of the module. This case-sensitive string can be up to 128 * characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + - * % _ &#35; * ? ! ( ) , = @ ; $ '. + * % _ &#35; * ? ! ( ) , = @ ; $ '. * * @param moduleId the moduleId value to set. * @return the DeviceConnectionStateEventProperties object itself. @@ -136,6 +136,9 @@ public DeviceConnectionStateEventInfo getDeviceConnectionStateEventInfo() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceLifeCycleEventProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceLifeCycleEventProperties.java index 3eda35856b1f2..9e903b94f2823 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceLifeCycleEventProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceLifeCycleEventProperties.java @@ -42,7 +42,7 @@ public DeviceLifeCycleEventProperties() { /** * Get the deviceId property: The unique identifier of the device. This case-sensitive string can be up to 128 * characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + - * % _ &#35; * ? ! ( ) , = @ ; $ '. + * % _ &#35; * ? ! ( ) , = @ ; $ '. * * @return the deviceId value. */ @@ -53,7 +53,7 @@ public String getDeviceId() { /** * Set the deviceId property: The unique identifier of the device. This case-sensitive string can be up to 128 * characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + - * % _ &#35; * ? ! ( ) , = @ ; $ '. + * % _ &#35; * ? ! ( ) , = @ ; $ '. * * @param deviceId the deviceId value to set. * @return the DeviceLifeCycleEventProperties object itself. @@ -84,8 +84,8 @@ public DeviceLifeCycleEventProperties setHubName(String hubName) { } /** - * Get the twin property: Information about the device twin, which is the cloud representation of application - * device metadata. + * Get the twin property: Information about the device twin, which is the cloud representation of application device + * metadata. * * @return the twin value. */ @@ -94,8 +94,8 @@ public DeviceTwinInfo getTwin() { } /** - * Set the twin property: Information about the device twin, which is the cloud representation of application - * device metadata. + * Set the twin property: Information about the device twin, which is the cloud representation of application device + * metadata. * * @param twin the twin value to set. * @return the DeviceLifeCycleEventProperties object itself. @@ -105,6 +105,9 @@ public DeviceLifeCycleEventProperties setTwin(DeviceTwinInfo twin) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTelemetryEventProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTelemetryEventProperties.java index f407f101b69e0..79f63cf567874 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTelemetryEventProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTelemetryEventProperties.java @@ -100,6 +100,9 @@ public DeviceTelemetryEventProperties setSystemProperties(Map sy return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfo.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfo.java index 4a76395ab086f..cd6ed0dafd8df 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfo.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfo.java @@ -285,8 +285,8 @@ public DeviceTwinInfo setVersion(Float version) { } /** - * Get the x509Thumbprint property: The thumbprint is a unique value for the x509 certificate, commonly used to - * find a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 + * Get the x509Thumbprint property: The thumbprint is a unique value for the x509 certificate, commonly used to find + * a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 * algorithm, and does not physically exist in the certificate. * * @return the x509Thumbprint value. @@ -296,8 +296,8 @@ public DeviceTwinInfoX509Thumbprint getX509Thumbprint() { } /** - * Set the x509Thumbprint property: The thumbprint is a unique value for the x509 certificate, commonly used to - * find a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 + * Set the x509Thumbprint property: The thumbprint is a unique value for the x509 certificate, commonly used to find + * a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 * algorithm, and does not physically exist in the certificate. * * @param x509Thumbprint the x509Thumbprint value to set. @@ -308,6 +308,9 @@ public DeviceTwinInfo setX509Thumbprint(DeviceTwinInfoX509Thumbprint x509Thumbpr return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoProperties.java index e0588f6df4f12..85a734c0a4c9d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoProperties.java @@ -76,6 +76,9 @@ public DeviceTwinInfoProperties setReported(DeviceTwinProperties reported) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoX509Thumbprint.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoX509Thumbprint.java index 21b6a4346bf09..4f89d6d1d560b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoX509Thumbprint.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinInfoX509Thumbprint.java @@ -13,8 +13,8 @@ /** * The thumbprint is a unique value for the x509 certificate, commonly used to find a particular certificate in a - * certificate store. The thumbprint is dynamically generated using the SHA1 algorithm, and does not physically exist - * in the certificate. + * certificate store. The thumbprint is dynamically generated using the SHA1 algorithm, and does not physically exist in + * the certificate. */ @Fluent public final class DeviceTwinInfoX509Thumbprint implements JsonSerializable { @@ -74,6 +74,9 @@ public DeviceTwinInfoX509Thumbprint setSecondaryThumbprint(String secondaryThumb return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinMetadata.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinMetadata.java index b90292b834939..80ba72346973c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinMetadata.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinMetadata.java @@ -47,6 +47,9 @@ public DeviceTwinMetadata setLastUpdated(String lastUpdated) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinProperties.java index 4ecd9c0d2d1c6..a24244ed1879c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/DeviceTwinProperties.java @@ -72,6 +72,9 @@ public DeviceTwinProperties setVersion(Float version) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientCreatedOrUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientCreatedOrUpdatedEventData.java index 2a043be778998..1a90ec9b12569 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientCreatedOrUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientCreatedOrUpdatedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -154,6 +155,9 @@ public EventGridMqttClientCreatedOrUpdatedEventData setNamespaceName(String name return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -196,11 +200,11 @@ public static EventGridMqttClientCreatedOrUpdatedEventData fromJson(JsonReader j deserializedEventGridMqttClientCreatedOrUpdatedEventData.state = EventGridMqttClientState.fromString(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedEventGridMqttClientCreatedOrUpdatedEventData.createdOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedEventGridMqttClientCreatedOrUpdatedEventData.createdOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("updatedOn".equals(fieldName)) { - deserializedEventGridMqttClientCreatedOrUpdatedEventData.updatedOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedEventGridMqttClientCreatedOrUpdatedEventData.updatedOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("attributes".equals(fieldName)) { Map attributes = reader.readMap(reader1 -> reader1.getString()); deserializedEventGridMqttClientCreatedOrUpdatedEventData.attributes = attributes; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientDeletedEventData.java index 9a6fd4fa21a17..18777ed046d3a 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientDeletedEventData.java @@ -48,6 +48,9 @@ public EventGridMqttClientDeletedEventData setNamespaceName(String namespaceName return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientEventData.java index a01d659549c5a..fa7ece70bb5f2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientEventData.java @@ -102,6 +102,9 @@ public EventGridMqttClientEventData setNamespaceName(String namespaceName) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientSessionConnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientSessionConnectedEventData.java index 22ee3b7ec495e..d54cd43188af0 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientSessionConnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientSessionConnectedEventData.java @@ -16,8 +16,8 @@ @Fluent public final class EventGridMqttClientSessionConnectedEventData extends EventGridMqttClientEventData { /* - * Unique identifier for the MQTT client's session. This case-sensitive string can be up to 128 characters long, - * and supports UTF-8 characters. + * Unique identifier for the MQTT client's session. This case-sensitive string can be up to 128 characters long, and + * supports UTF-8 characters. */ private String clientSessionName; @@ -104,6 +104,9 @@ public EventGridMqttClientSessionConnectedEventData setNamespaceName(String name return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientSessionDisconnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientSessionDisconnectedEventData.java index 072ba43f00fdc..516682766a0da 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientSessionDisconnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventGridMqttClientSessionDisconnectedEventData.java @@ -16,8 +16,8 @@ @Fluent public final class EventGridMqttClientSessionDisconnectedEventData extends EventGridMqttClientEventData { /* - * Unique identifier for the MQTT client's session. This case-sensitive string can be up to 128 characters long, - * and supports UTF-8 characters. + * Unique identifier for the MQTT client's session. This case-sensitive string can be up to 128 characters long, and + * supports UTF-8 characters. */ private String clientSessionName; @@ -134,6 +134,9 @@ public EventGridMqttClientSessionDisconnectedEventData setNamespaceName(String n return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventHubCaptureFileCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventHubCaptureFileCreatedEventData.java index b02b6d7adc38a..1153c55ffa22d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventHubCaptureFileCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/EventHubCaptureFileCreatedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -250,6 +251,9 @@ public EventHubCaptureFileCreatedEventData setLastEnqueueTime(OffsetDateTime las return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -303,11 +307,11 @@ public static EventHubCaptureFileCreatedEventData fromJson(JsonReader jsonReader deserializedEventHubCaptureFileCreatedEventData.lastSequenceNumber = reader.getNullable(JsonReader::getInt); } else if ("firstEnqueueTime".equals(fieldName)) { - deserializedEventHubCaptureFileCreatedEventData.firstEnqueueTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedEventHubCaptureFileCreatedEventData.firstEnqueueTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastEnqueueTime".equals(fieldName)) { - deserializedEventHubCaptureFileCreatedEventData.lastEnqueueTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedEventHubCaptureFileCreatedEventData.lastEnqueueTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareDicomImageCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareDicomImageCreatedEventData.java index 0d8f55f5c74d9..a8041c157d82b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareDicomImageCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareDicomImageCreatedEventData.java @@ -43,8 +43,8 @@ public final class HealthcareDicomImageCreatedEventData private String serviceHostName; /* - * Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation - * and deletion within the service. + * Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation and + * deletion within the service. */ private Long sequenceNumber; @@ -176,6 +176,9 @@ public HealthcareDicomImageCreatedEventData setSequenceNumber(Long sequenceNumbe return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareDicomImageDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareDicomImageDeletedEventData.java index 2896939da3545..a844dbc53df01 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareDicomImageDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareDicomImageDeletedEventData.java @@ -43,8 +43,8 @@ public final class HealthcareDicomImageDeletedEventData private String serviceHostName; /* - * Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation - * and deletion within the service. + * Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation and + * deletion within the service. */ private Long sequenceNumber; @@ -176,6 +176,9 @@ public HealthcareDicomImageDeletedEventData setSequenceNumber(Long sequenceNumbe return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareDicomImageUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareDicomImageUpdatedEventData.java index 4fe0c9a291e7d..1d0667c5ba6fb 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareDicomImageUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareDicomImageUpdatedEventData.java @@ -176,6 +176,9 @@ public HealthcareDicomImageUpdatedEventData setSequenceNumber(Long sequenceNumbe return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareFhirResourceCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareFhirResourceCreatedEventData.java index 4e65239ed9256..199b2f7a40dc3 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareFhirResourceCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareFhirResourceCreatedEventData.java @@ -125,6 +125,9 @@ public HealthcareFhirResourceCreatedEventData setFhirResourceVersionId(Long fhir return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareFhirResourceDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareFhirResourceDeletedEventData.java index 837e3c817fa9c..290af42f44a3b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareFhirResourceDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareFhirResourceDeletedEventData.java @@ -125,6 +125,9 @@ public HealthcareFhirResourceDeletedEventData setFhirResourceVersionId(Long fhir return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareFhirResourceUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareFhirResourceUpdatedEventData.java index eb529cada5b81..d5369eeb2f577 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareFhirResourceUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/HealthcareFhirResourceUpdatedEventData.java @@ -125,6 +125,9 @@ public HealthcareFhirResourceUpdatedEventData setFhirResourceVersionId(Long fhir return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceConnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceConnectedEventData.java index 8837ebb92b782..41bf09de81240 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceConnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceConnectedEventData.java @@ -58,6 +58,9 @@ public IotHubDeviceConnectedEventData setHubName(String hubName) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceCreatedEventData.java index bec948dae7281..fcb18e74397c9 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceCreatedEventData.java @@ -48,6 +48,9 @@ public IotHubDeviceCreatedEventData setTwin(DeviceTwinInfo twin) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDeletedEventData.java index d0ab5d8f33a0d..943f2dcd91f65 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDeletedEventData.java @@ -48,6 +48,9 @@ public IotHubDeviceDeletedEventData setTwin(DeviceTwinInfo twin) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDisconnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDisconnectedEventData.java index 8da06792c80fc..fc3f766798619 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDisconnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceDisconnectedEventData.java @@ -58,6 +58,9 @@ public IotHubDeviceDisconnectedEventData setHubName(String hubName) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceTelemetryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceTelemetryEventData.java index 6035f0e93c2db..88a02ca022908 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceTelemetryEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/IotHubDeviceTelemetryEventData.java @@ -49,6 +49,9 @@ public IotHubDeviceTelemetryEventData setSystemProperties(Map sy return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultAccessPolicyChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultAccessPolicyChangedEventData.java index 04845b23bbabe..09fc98d3e62e7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultAccessPolicyChangedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultAccessPolicyChangedEventData.java @@ -198,6 +198,9 @@ public KeyVaultAccessPolicyChangedEventData setExp(Float exp) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateExpiredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateExpiredEventData.java index 973678c3d0ac3..6f169a430661b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateExpiredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateExpiredEventData.java @@ -198,6 +198,9 @@ public KeyVaultCertificateExpiredEventData setExp(Float exp) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNearExpiryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNearExpiryEventData.java index 9e025e5de705a..66f80cde32f66 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNearExpiryEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNearExpiryEventData.java @@ -198,6 +198,9 @@ public KeyVaultCertificateNearExpiryEventData setExp(Float exp) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNewVersionCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNewVersionCreatedEventData.java index f940e446a3a2b..c1d3ace74d3b4 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNewVersionCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultCertificateNewVersionCreatedEventData.java @@ -198,6 +198,9 @@ public KeyVaultCertificateNewVersionCreatedEventData setExp(Float exp) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyExpiredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyExpiredEventData.java index 2d0ef16aa8e3f..f8963590528f4 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyExpiredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyExpiredEventData.java @@ -197,6 +197,9 @@ public KeyVaultKeyExpiredEventData setExp(Float exp) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNearExpiryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNearExpiryEventData.java index 037608685966c..1f6f16889c9ee 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNearExpiryEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNearExpiryEventData.java @@ -197,6 +197,9 @@ public KeyVaultKeyNearExpiryEventData setExp(Float exp) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNewVersionCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNewVersionCreatedEventData.java index 027fc8c802c12..c553e8dc95d27 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNewVersionCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultKeyNewVersionCreatedEventData.java @@ -198,6 +198,9 @@ public KeyVaultKeyNewVersionCreatedEventData setExp(Float exp) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretExpiredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretExpiredEventData.java index 926e50fe609e8..12e5eb049d45e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretExpiredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretExpiredEventData.java @@ -197,6 +197,9 @@ public KeyVaultSecretExpiredEventData setExp(Float exp) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNearExpiryEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNearExpiryEventData.java index 4c04863f76ae0..0254709d613a3 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNearExpiryEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNearExpiryEventData.java @@ -197,6 +197,9 @@ public KeyVaultSecretNearExpiryEventData setExp(Float exp) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNewVersionCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNewVersionCreatedEventData.java index 2436a3cc03062..26b3cb543d1b1 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNewVersionCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/KeyVaultSecretNewVersionCreatedEventData.java @@ -198,6 +198,9 @@ public KeyVaultSecretNewVersionCreatedEventData setExp(Float exp) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java index 4a7f98c079605..db196ac5a6afa 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -225,6 +226,9 @@ public MachineLearningServicesDatasetDriftDetectedEventData setEndTime(OffsetDat return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -273,11 +277,11 @@ public static MachineLearningServicesDatasetDriftDetectedEventData fromJson(Json deserializedMachineLearningServicesDatasetDriftDetectedEventData.driftCoefficient = reader.getNullable(JsonReader::getDouble); } else if ("startTime".equals(fieldName)) { - deserializedMachineLearningServicesDatasetDriftDetectedEventData.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedMachineLearningServicesDatasetDriftDetectedEventData.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedMachineLearningServicesDatasetDriftDetectedEventData.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedMachineLearningServicesDatasetDriftDetectedEventData.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelDeployedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelDeployedEventData.java index 4f7c55c6bfd7a..4035feefb310a 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelDeployedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelDeployedEventData.java @@ -148,6 +148,9 @@ public MachineLearningServicesModelDeployedEventData setServiceProperties(Object return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelRegisteredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelRegisteredEventData.java index 282e4cd20d255..468e3d8a2a91f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelRegisteredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesModelRegisteredEventData.java @@ -123,6 +123,9 @@ public MachineLearningServicesModelRegisteredEventData setModelProperties(Object return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunCompletedEventData.java index 0c943fb5c0ab0..ed680fb174d2e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunCompletedEventData.java @@ -173,6 +173,9 @@ public MachineLearningServicesRunCompletedEventData setRunProperties(Object runP return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunStatusChangedEventData.java index 3f4f6c406a6d4..b048fc966cbc7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunStatusChangedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesRunStatusChangedEventData.java @@ -198,6 +198,9 @@ public MachineLearningServicesRunStatusChangedEventData setRunStatus(String runS return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEnteredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEnteredEventData.java index 40ba7adf38e77..86694fa8eac51 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEnteredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEnteredEventData.java @@ -59,6 +59,9 @@ public MapsGeofenceEnteredEventData setIsEventPublished(Boolean isEventPublished return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEventProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEventProperties.java index ac90d7562c313..e01db99c1ebcf 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEventProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceEventProperties.java @@ -35,8 +35,8 @@ public class MapsGeofenceEventProperties implements JsonSerializable invalidPeriodGeofenceGeometryId; /* - * True if at least one event is published to the Azure Maps event subscriber, false if no event is published to - * the Azure Maps event subscriber. + * True if at least one event is published to the Azure Maps event subscriber, false if no event is published to the + * Azure Maps event subscriber. */ private Boolean isEventPublished; @@ -47,8 +47,8 @@ public MapsGeofenceEventProperties() { } /** - * Get the expiredGeofenceGeometryId property: Lists of the geometry ID of the geofence which is expired relative - * to the user time in the request. + * Get the expiredGeofenceGeometryId property: Lists of the geometry ID of the geofence which is expired relative to + * the user time in the request. * * @return the expiredGeofenceGeometryId value. */ @@ -57,8 +57,8 @@ public List getExpiredGeofenceGeometryId() { } /** - * Set the expiredGeofenceGeometryId property: Lists of the geometry ID of the geofence which is expired relative - * to the user time in the request. + * Set the expiredGeofenceGeometryId property: Lists of the geometry ID of the geofence which is expired relative to + * the user time in the request. * * @param expiredGeofenceGeometryId the expiredGeofenceGeometryId value to set. * @return the MapsGeofenceEventProperties object itself. @@ -69,8 +69,8 @@ public MapsGeofenceEventProperties setExpiredGeofenceGeometryId(List exp } /** - * Get the geometries property: Lists the fence geometries that either fully contain the coordinate position or - * have an overlap with the searchBuffer around the fence. + * Get the geometries property: Lists the fence geometries that either fully contain the coordinate position or have + * an overlap with the searchBuffer around the fence. * * @return the geometries value. */ @@ -79,8 +79,8 @@ public List getGeometries() { } /** - * Set the geometries property: Lists the fence geometries that either fully contain the coordinate position or - * have an overlap with the searchBuffer around the fence. + * Set the geometries property: Lists the fence geometries that either fully contain the coordinate position or have + * an overlap with the searchBuffer around the fence. * * @param geometries the geometries value to set. * @return the MapsGeofenceEventProperties object itself. @@ -135,6 +135,9 @@ public MapsGeofenceEventProperties setIsEventPublished(Boolean isEventPublished) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceExitedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceExitedEventData.java index e553823fa030c..9aaf6ea5f155c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceExitedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceExitedEventData.java @@ -59,6 +59,9 @@ public MapsGeofenceExitedEventData setIsEventPublished(Boolean isEventPublished) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceGeometry.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceGeometry.java index 0a3644e1542a5..be89ec2b2ea3c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceGeometry.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MapsGeofenceGeometry.java @@ -23,12 +23,11 @@ public final class MapsGeofenceGeometry implements JsonSerializable outputs; + /* + * The new state of the Job. + */ + private MediaJobState state; + + /* + * The previous state of the Job. + */ + private MediaJobState previousState; + /** * Creates an instance of MediaJobCanceledEventData class. */ @@ -48,6 +58,26 @@ public MediaJobCanceledEventData setOutputs(List outputs) { return this; } + /** + * Get the state property: The new state of the Job. + * + * @return the state value. + */ + @Override + public MediaJobState getState() { + return this.state; + } + + /** + * Get the previousState property: The previous state of the Job. + * + * @return the previousState value. + */ + @Override + public MediaJobState getPreviousState() { + return this.previousState; + } + /** * {@inheritDoc} */ @@ -57,6 +87,9 @@ public MediaJobCanceledEventData setCorrelationData(Map correlat return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -82,10 +115,9 @@ public static MediaJobCanceledEventData fromJson(JsonReader jsonReader) throws I reader.nextToken(); if ("previousState".equals(fieldName)) { - deserializedMediaJobCanceledEventData - .setPreviousState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobCanceledEventData.previousState = MediaJobState.fromString(reader.getString()); } else if ("state".equals(fieldName)) { - deserializedMediaJobCanceledEventData.setState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobCanceledEventData.state = MediaJobState.fromString(reader.getString()); } else if ("correlationData".equals(fieldName)) { Map correlationData = reader.readMap(reader1 -> reader1.getString()); deserializedMediaJobCanceledEventData.setCorrelationData(correlationData); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCancelingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCancelingEventData.java index e6eecc0d6d876..833f42592bc07 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCancelingEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobCancelingEventData.java @@ -16,12 +16,42 @@ */ @Fluent public final class MediaJobCancelingEventData extends MediaJobStateChangeEventData { + /* + * The new state of the Job. + */ + private MediaJobState state; + + /* + * The previous state of the Job. + */ + private MediaJobState previousState; + /** * Creates an instance of MediaJobCancelingEventData class. */ public MediaJobCancelingEventData() { } + /** + * Get the state property: The new state of the Job. + * + * @return the state value. + */ + @Override + public MediaJobState getState() { + return this.state; + } + + /** + * Get the previousState property: The previous state of the Job. + * + * @return the previousState value. + */ + @Override + public MediaJobState getPreviousState() { + return this.previousState; + } + /** * {@inheritDoc} */ @@ -31,6 +61,9 @@ public MediaJobCancelingEventData setCorrelationData(Map correla return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -55,10 +88,9 @@ public static MediaJobCancelingEventData fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("previousState".equals(fieldName)) { - deserializedMediaJobCancelingEventData - .setPreviousState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobCancelingEventData.previousState = MediaJobState.fromString(reader.getString()); } else if ("state".equals(fieldName)) { - deserializedMediaJobCancelingEventData.setState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobCancelingEventData.state = MediaJobState.fromString(reader.getString()); } else if ("correlationData".equals(fieldName)) { Map correlationData = reader.readMap(reader1 -> reader1.getString()); deserializedMediaJobCancelingEventData.setCorrelationData(correlationData); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobError.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobError.java index dc6a02555dd2d..86a140cf0d450 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobError.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobError.java @@ -95,6 +95,9 @@ public List getDetails() { return this.details; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorDetail.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorDetail.java index fc3461de06ce0..6fa15a5a30342 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorDetail.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErrorDetail.java @@ -50,6 +50,9 @@ public String getMessage() { return this.message; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErroredEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErroredEventData.java index 537c288b72156..da238b4a00eba 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErroredEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobErroredEventData.java @@ -22,6 +22,16 @@ public final class MediaJobErroredEventData extends MediaJobStateChangeEventData */ private List outputs; + /* + * The new state of the Job. + */ + private MediaJobState state; + + /* + * The previous state of the Job. + */ + private MediaJobState previousState; + /** * Creates an instance of MediaJobErroredEventData class. */ @@ -48,6 +58,26 @@ public MediaJobErroredEventData setOutputs(List outputs) { return this; } + /** + * Get the state property: The new state of the Job. + * + * @return the state value. + */ + @Override + public MediaJobState getState() { + return this.state; + } + + /** + * Get the previousState property: The previous state of the Job. + * + * @return the previousState value. + */ + @Override + public MediaJobState getPreviousState() { + return this.previousState; + } + /** * {@inheritDoc} */ @@ -57,6 +87,9 @@ public MediaJobErroredEventData setCorrelationData(Map correlati return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -82,9 +115,9 @@ public static MediaJobErroredEventData fromJson(JsonReader jsonReader) throws IO reader.nextToken(); if ("previousState".equals(fieldName)) { - deserializedMediaJobErroredEventData.setPreviousState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobErroredEventData.previousState = MediaJobState.fromString(reader.getString()); } else if ("state".equals(fieldName)) { - deserializedMediaJobErroredEventData.setState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobErroredEventData.state = MediaJobState.fromString(reader.getString()); } else if ("correlationData".equals(fieldName)) { Map correlationData = reader.readMap(reader1 -> reader1.getString()); deserializedMediaJobErroredEventData.setCorrelationData(correlationData); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobFinishedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobFinishedEventData.java index 59f8ff7442c0a..d828edd8b05ab 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobFinishedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobFinishedEventData.java @@ -22,6 +22,16 @@ public final class MediaJobFinishedEventData extends MediaJobStateChangeEventDat */ private List outputs; + /* + * The new state of the Job. + */ + private MediaJobState state; + + /* + * The previous state of the Job. + */ + private MediaJobState previousState; + /** * Creates an instance of MediaJobFinishedEventData class. */ @@ -48,6 +58,26 @@ public MediaJobFinishedEventData setOutputs(List outputs) { return this; } + /** + * Get the state property: The new state of the Job. + * + * @return the state value. + */ + @Override + public MediaJobState getState() { + return this.state; + } + + /** + * Get the previousState property: The previous state of the Job. + * + * @return the previousState value. + */ + @Override + public MediaJobState getPreviousState() { + return this.previousState; + } + /** * {@inheritDoc} */ @@ -57,6 +87,9 @@ public MediaJobFinishedEventData setCorrelationData(Map correlat return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -82,10 +115,9 @@ public static MediaJobFinishedEventData fromJson(JsonReader jsonReader) throws I reader.nextToken(); if ("previousState".equals(fieldName)) { - deserializedMediaJobFinishedEventData - .setPreviousState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobFinishedEventData.previousState = MediaJobState.fromString(reader.getString()); } else if ("state".equals(fieldName)) { - deserializedMediaJobFinishedEventData.setState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobFinishedEventData.state = MediaJobState.fromString(reader.getString()); } else if ("correlationData".equals(fieldName)) { Map correlationData = reader.readMap(reader1 -> reader1.getString()); deserializedMediaJobFinishedEventData.setCorrelationData(correlationData); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutput.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutput.java index 279d8ebae2d60..df2d7935ec46f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutput.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutput.java @@ -16,6 +16,11 @@ */ @Fluent public class MediaJobOutput implements JsonSerializable { + /* + * The discriminator for derived types. + */ + private String odataType = "MediaJobOutput"; + /* * Gets the Job output error. */ @@ -42,6 +47,15 @@ public class MediaJobOutput implements JsonSerializable { public MediaJobOutput() { } + /** + * Get the odataType property: The discriminator for derived types. + * + * @return the odataType value. + */ + public String getOdataType() { + return this.odataType; + } + /** * Get the error property: Gets the Job output error. * @@ -122,11 +136,15 @@ public MediaJobOutput setState(MediaJobState state) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeLongField("progress", this.progress); jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeStringField("@odata.type", this.odataType); jsonWriter.writeJsonField("error", this.error); jsonWriter.writeStringField("label", this.label); return jsonWriter.writeEndObject(); @@ -138,32 +156,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MediaJobOutput if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the MediaJobOutput. */ public static MediaJobOutput fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String discriminatorValue = null; - JsonReader readerToUse = reader.bufferObject(); - - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@odata.type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("@odata.type".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("#Microsoft.Media.JobOutputAsset".equals(discriminatorValue)) { + return MediaJobOutputAsset.fromJson(readerToUse.reset()); } else { - readerToUse.skipChildren(); + return fromJsonKnownDiscriminator(readerToUse.reset()); } } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.Media.JobOutputAsset".equals(discriminatorValue)) { - return MediaJobOutputAsset.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } }); } @@ -178,6 +195,8 @@ static MediaJobOutput fromJsonKnownDiscriminator(JsonReader jsonReader) throws I deserializedMediaJobOutput.progress = reader.getLong(); } else if ("state".equals(fieldName)) { deserializedMediaJobOutput.state = MediaJobState.fromString(reader.getString()); + } else if ("@odata.type".equals(fieldName)) { + deserializedMediaJobOutput.odataType = reader.getString(); } else if ("error".equals(fieldName)) { deserializedMediaJobOutput.error = MediaJobError.fromJson(reader); } else if ("label".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputAsset.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputAsset.java index dfca5a6436f32..33b0b9f922456 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputAsset.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputAsset.java @@ -15,6 +15,11 @@ */ @Fluent public final class MediaJobOutputAsset extends MediaJobOutput { + /* + * The discriminator for derived types. + */ + private String odataType = "#Microsoft.Media.JobOutputAsset"; + /* * Gets the Job output asset name. */ @@ -26,6 +31,16 @@ public final class MediaJobOutputAsset extends MediaJobOutput { public MediaJobOutputAsset() { } + /** + * Get the odataType property: The discriminator for derived types. + * + * @return the odataType value. + */ + @Override + public String getOdataType() { + return this.odataType; + } + /** * Get the assetName property: Gets the Job output asset name. * @@ -82,14 +97,17 @@ public MediaJobOutputAsset setState(MediaJobState state) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@odata.type", "#Microsoft.Media.JobOutputAsset"); jsonWriter.writeLongField("progress", getProgress()); jsonWriter.writeStringField("state", getState() == null ? null : getState().toString()); jsonWriter.writeJsonField("error", getError()); jsonWriter.writeStringField("label", getLabel()); + jsonWriter.writeStringField("@odata.type", this.odataType); jsonWriter.writeStringField("assetName", this.assetName); return jsonWriter.writeEndObject(); } @@ -100,8 +118,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MediaJobOutputAsset if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the MediaJobOutputAsset. */ public static MediaJobOutputAsset fromJson(JsonReader jsonReader) throws IOException { @@ -111,14 +128,7 @@ public static MediaJobOutputAsset fromJson(JsonReader jsonReader) throws IOExcep String fieldName = reader.getFieldName(); reader.nextToken(); - if ("@odata.type".equals(fieldName)) { - String odataType = reader.getString(); - if (!"#Microsoft.Media.JobOutputAsset".equals(odataType)) { - throw new IllegalStateException( - "'@odata.type' was expected to be non-null and equal to '#Microsoft.Media.JobOutputAsset'. The found '@odata.type' was '" - + odataType + "'."); - } - } else if ("progress".equals(fieldName)) { + if ("progress".equals(fieldName)) { deserializedMediaJobOutputAsset.setProgress(reader.getLong()); } else if ("state".equals(fieldName)) { deserializedMediaJobOutputAsset.setState(MediaJobState.fromString(reader.getString())); @@ -126,6 +136,8 @@ public static MediaJobOutputAsset fromJson(JsonReader jsonReader) throws IOExcep deserializedMediaJobOutputAsset.setError(MediaJobError.fromJson(reader)); } else if ("label".equals(fieldName)) { deserializedMediaJobOutputAsset.setLabel(reader.getString()); + } else if ("@odata.type".equals(fieldName)) { + deserializedMediaJobOutputAsset.odataType = reader.getString(); } else if ("assetName".equals(fieldName)) { deserializedMediaJobOutputAsset.assetName = reader.getString(); } else { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCanceledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCanceledEventData.java index fc59d91533ffd..efd821eb2bb36 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCanceledEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCanceledEventData.java @@ -17,12 +17,27 @@ */ @Fluent public final class MediaJobOutputCanceledEventData extends MediaJobOutputStateChangeEventData { + /* + * The previous state of the Job. + */ + private MediaJobState previousState; + /** * Creates an instance of MediaJobOutputCanceledEventData class. */ public MediaJobOutputCanceledEventData() { } + /** + * Get the previousState property: The previous state of the Job. + * + * @return the previousState value. + */ + @Override + public MediaJobState getPreviousState() { + return this.previousState; + } + /** * {@inheritDoc} */ @@ -41,6 +56,9 @@ public MediaJobOutputCanceledEventData setJobCorrelationData(Map return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -67,8 +85,8 @@ public static MediaJobOutputCanceledEventData fromJson(JsonReader jsonReader) th reader.nextToken(); if ("previousState".equals(fieldName)) { - deserializedMediaJobOutputCanceledEventData - .setPreviousState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobOutputCanceledEventData.previousState + = MediaJobState.fromString(reader.getString()); } else if ("output".equals(fieldName)) { deserializedMediaJobOutputCanceledEventData.setOutput(MediaJobOutput.fromJson(reader)); } else if ("jobCorrelationData".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCancelingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCancelingEventData.java index 649bded22d990..6e3de33772904 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCancelingEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputCancelingEventData.java @@ -17,12 +17,27 @@ */ @Fluent public final class MediaJobOutputCancelingEventData extends MediaJobOutputStateChangeEventData { + /* + * The previous state of the Job. + */ + private MediaJobState previousState; + /** * Creates an instance of MediaJobOutputCancelingEventData class. */ public MediaJobOutputCancelingEventData() { } + /** + * Get the previousState property: The previous state of the Job. + * + * @return the previousState value. + */ + @Override + public MediaJobState getPreviousState() { + return this.previousState; + } + /** * {@inheritDoc} */ @@ -41,6 +56,9 @@ public MediaJobOutputCancelingEventData setJobCorrelationData(Map return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -67,8 +85,8 @@ public static MediaJobOutputErroredEventData fromJson(JsonReader jsonReader) thr reader.nextToken(); if ("previousState".equals(fieldName)) { - deserializedMediaJobOutputErroredEventData - .setPreviousState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobOutputErroredEventData.previousState + = MediaJobState.fromString(reader.getString()); } else if ("output".equals(fieldName)) { deserializedMediaJobOutputErroredEventData.setOutput(MediaJobOutput.fromJson(reader)); } else if ("jobCorrelationData".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputFinishedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputFinishedEventData.java index 8ad299ec8c23a..656ed854337b2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputFinishedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputFinishedEventData.java @@ -17,12 +17,27 @@ */ @Fluent public final class MediaJobOutputFinishedEventData extends MediaJobOutputStateChangeEventData { + /* + * The previous state of the Job. + */ + private MediaJobState previousState; + /** * Creates an instance of MediaJobOutputFinishedEventData class. */ public MediaJobOutputFinishedEventData() { } + /** + * Get the previousState property: The previous state of the Job. + * + * @return the previousState value. + */ + @Override + public MediaJobState getPreviousState() { + return this.previousState; + } + /** * {@inheritDoc} */ @@ -41,6 +56,9 @@ public MediaJobOutputFinishedEventData setJobCorrelationData(Map return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -67,8 +85,8 @@ public static MediaJobOutputFinishedEventData fromJson(JsonReader jsonReader) th reader.nextToken(); if ("previousState".equals(fieldName)) { - deserializedMediaJobOutputFinishedEventData - .setPreviousState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobOutputFinishedEventData.previousState + = MediaJobState.fromString(reader.getString()); } else if ("output".equals(fieldName)) { deserializedMediaJobOutputFinishedEventData.setOutput(MediaJobOutput.fromJson(reader)); } else if ("jobCorrelationData".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProcessingEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProcessingEventData.java index c3c2ff7c659a8..edaf2ea37cc06 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProcessingEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputProcessingEventData.java @@ -17,12 +17,27 @@ */ @Fluent public final class MediaJobOutputProcessingEventData extends MediaJobOutputStateChangeEventData { + /* + * The previous state of the Job. + */ + private MediaJobState previousState; + /** * Creates an instance of MediaJobOutputProcessingEventData class. */ public MediaJobOutputProcessingEventData() { } + /** + * Get the previousState property: The previous state of the Job. + * + * @return the previousState value. + */ + @Override + public MediaJobState getPreviousState() { + return this.previousState; + } + /** * {@inheritDoc} */ @@ -41,6 +56,9 @@ public MediaJobOutputProcessingEventData setJobCorrelationData(Map return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputScheduledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputScheduledEventData.java index 2f527ba98aaff..19b5f557ff136 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputScheduledEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobOutputScheduledEventData.java @@ -17,12 +17,27 @@ */ @Fluent public final class MediaJobOutputScheduledEventData extends MediaJobOutputStateChangeEventData { + /* + * The previous state of the Job. + */ + private MediaJobState previousState; + /** * Creates an instance of MediaJobOutputScheduledEventData class. */ public MediaJobOutputScheduledEventData() { } + /** + * Get the previousState property: The previous state of the Job. + * + * @return the previousState value. + */ + @Override + public MediaJobState getPreviousState() { + return this.previousState; + } + /** * {@inheritDoc} */ @@ -41,6 +56,9 @@ public MediaJobOutputScheduledEventData setJobCorrelationData(Map correl return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -56,10 +89,10 @@ public static MediaJobProcessingEventData fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("previousState".equals(fieldName)) { - deserializedMediaJobProcessingEventData - .setPreviousState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobProcessingEventData.previousState + = MediaJobState.fromString(reader.getString()); } else if ("state".equals(fieldName)) { - deserializedMediaJobProcessingEventData.setState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobProcessingEventData.state = MediaJobState.fromString(reader.getString()); } else if ("correlationData".equals(fieldName)) { Map correlationData = reader.readMap(reader1 -> reader1.getString()); deserializedMediaJobProcessingEventData.setCorrelationData(correlationData); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobScheduledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobScheduledEventData.java index 4460eff1a9b38..b8a5877a6c40b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobScheduledEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobScheduledEventData.java @@ -16,12 +16,42 @@ */ @Fluent public final class MediaJobScheduledEventData extends MediaJobStateChangeEventData { + /* + * The new state of the Job. + */ + private MediaJobState state; + + /* + * The previous state of the Job. + */ + private MediaJobState previousState; + /** * Creates an instance of MediaJobScheduledEventData class. */ public MediaJobScheduledEventData() { } + /** + * Get the state property: The new state of the Job. + * + * @return the state value. + */ + @Override + public MediaJobState getState() { + return this.state; + } + + /** + * Get the previousState property: The previous state of the Job. + * + * @return the previousState value. + */ + @Override + public MediaJobState getPreviousState() { + return this.previousState; + } + /** * {@inheritDoc} */ @@ -31,6 +61,9 @@ public MediaJobScheduledEventData setCorrelationData(Map correla return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -55,10 +88,9 @@ public static MediaJobScheduledEventData fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("previousState".equals(fieldName)) { - deserializedMediaJobScheduledEventData - .setPreviousState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobScheduledEventData.previousState = MediaJobState.fromString(reader.getString()); } else if ("state".equals(fieldName)) { - deserializedMediaJobScheduledEventData.setState(MediaJobState.fromString(reader.getString())); + deserializedMediaJobScheduledEventData.state = MediaJobState.fromString(reader.getString()); } else if ("correlationData".equals(fieldName)) { Map correlationData = reader.readMap(reader1 -> reader1.getString()); deserializedMediaJobScheduledEventData.setCorrelationData(correlationData); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobStateChangeEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobStateChangeEventData.java index 9dab539d736d2..4a9c139eeb8da 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobStateChangeEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaJobStateChangeEventData.java @@ -98,6 +98,9 @@ public MediaJobStateChangeEventData setCorrelationData(Map corre return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventChannelArchiveHeartbeatEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventChannelArchiveHeartbeatEventData.java index 216a1fe995b59..308e400f4197f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventChannelArchiveHeartbeatEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventChannelArchiveHeartbeatEventData.java @@ -65,6 +65,9 @@ public String getLatencyResultCode() { return this.latencyResultCode; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventConnectionRejectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventConnectionRejectedEventData.java index fb797549ffc27..71375a1cd3920 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventConnectionRejectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventConnectionRejectedEventData.java @@ -94,6 +94,9 @@ public String getResultCode() { return this.resultCode; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderConnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderConnectedEventData.java index 94442d58ce06f..c00b56b7d6cb5 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderConnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderConnectedEventData.java @@ -80,6 +80,9 @@ public String getEncoderPort() { return this.encoderPort; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderDisconnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderDisconnectedEventData.java index cb6e821249c39..7155c38d39d7d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderDisconnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventEncoderDisconnectedEventData.java @@ -94,6 +94,9 @@ public String getResultCode() { return this.resultCode; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingDataChunkDroppedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingDataChunkDroppedEventData.java index f32f21efc2544..55649b782a7a1 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingDataChunkDroppedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingDataChunkDroppedEventData.java @@ -108,6 +108,9 @@ public String getTrackName() { return this.trackName; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamReceivedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamReceivedEventData.java index 7b99436df9796..c00b648888cb3 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamReceivedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamReceivedEventData.java @@ -150,6 +150,9 @@ public String getTimescale() { return this.timescale; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamsOutOfSyncEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamsOutOfSyncEventData.java index 3f313ad64a34c..d53352ddc6c5a 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamsOutOfSyncEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingStreamsOutOfSyncEventData.java @@ -108,6 +108,9 @@ public String getTimescaleOfMaxLastTimestamp() { return this.timescaleOfMaxLastTimestamp; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java index c6a7f882af715..b63b7bebf8530 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java @@ -94,6 +94,9 @@ public String getTimescale() { return this.timescale; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java index 4e36e9b8d7629..d1914273f3700 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java @@ -259,6 +259,9 @@ public Boolean isHealthy() { return this.healthy; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventTrackDiscontinuityDetectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventTrackDiscontinuityDetectedEventData.java index 6a374c8375fc8..8964b545c84c7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventTrackDiscontinuityDetectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventTrackDiscontinuityDetectedEventData.java @@ -122,6 +122,9 @@ public String getDiscontinuityGap() { return this.discontinuityGap; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MicrosoftTeamsUserIdentifierModel.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MicrosoftTeamsUserIdentifierModel.java index 5c43a4a154b9b..b924619969fc3 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MicrosoftTeamsUserIdentifierModel.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MicrosoftTeamsUserIdentifierModel.java @@ -99,6 +99,9 @@ public MicrosoftTeamsUserIdentifierModel setCloud(CommunicationCloudEnvironmentM return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PhoneNumberIdentifierModel.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PhoneNumberIdentifierModel.java index 78e64fcc944ca..741e8fff9f1b7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PhoneNumberIdentifierModel.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PhoneNumberIdentifierModel.java @@ -47,6 +47,9 @@ public PhoneNumberIdentifierModel setValue(String value) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PolicyInsightsPolicyStateChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PolicyInsightsPolicyStateChangedEventData.java index 9384f94cdd6dc..56fbdc90695ff 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PolicyInsightsPolicyStateChangedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PolicyInsightsPolicyStateChangedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -207,6 +208,9 @@ public PolicyInsightsPolicyStateChangedEventData setComplianceReasonCode(String return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -238,8 +242,8 @@ public static PolicyInsightsPolicyStateChangedEventData fromJson(JsonReader json reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedPolicyInsightsPolicyStateChangedEventData.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedPolicyInsightsPolicyStateChangedEventData.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("policyAssignmentId".equals(fieldName)) { deserializedPolicyInsightsPolicyStateChangedEventData.policyAssignmentId = reader.getString(); } else if ("policyDefinitionId".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PolicyInsightsPolicyStateCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PolicyInsightsPolicyStateCreatedEventData.java index bb7027dfa1e84..d292557d4595c 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PolicyInsightsPolicyStateCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PolicyInsightsPolicyStateCreatedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -207,6 +208,9 @@ public PolicyInsightsPolicyStateCreatedEventData setComplianceReasonCode(String return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -238,8 +242,8 @@ public static PolicyInsightsPolicyStateCreatedEventData fromJson(JsonReader json reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedPolicyInsightsPolicyStateCreatedEventData.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedPolicyInsightsPolicyStateCreatedEventData.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("policyAssignmentId".equals(fieldName)) { deserializedPolicyInsightsPolicyStateCreatedEventData.policyAssignmentId = reader.getString(); } else if ("policyDefinitionId".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PolicyInsightsPolicyStateDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PolicyInsightsPolicyStateDeletedEventData.java index 6f42999930080..832cfe7c66681 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PolicyInsightsPolicyStateDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/PolicyInsightsPolicyStateDeletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -207,6 +208,9 @@ public PolicyInsightsPolicyStateDeletedEventData setComplianceReasonCode(String return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -238,8 +242,8 @@ public static PolicyInsightsPolicyStateDeletedEventData fromJson(JsonReader json reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedPolicyInsightsPolicyStateDeletedEventData.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedPolicyInsightsPolicyStateDeletedEventData.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("policyAssignmentId".equals(fieldName)) { deserializedPolicyInsightsPolicyStateDeletedEventData.policyAssignmentId = reader.getString(); } else if ("policyDefinitionId".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisExportRdbCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisExportRdbCompletedEventData.java index 727b89853f670..6f65dd9e96623 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisExportRdbCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisExportRdbCompletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -99,6 +100,9 @@ public RedisExportRdbCompletedEventData setStatus(String status) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -126,8 +130,8 @@ public static RedisExportRdbCompletedEventData fromJson(JsonReader jsonReader) t reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedRedisExportRdbCompletedEventData.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedRedisExportRdbCompletedEventData.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("name".equals(fieldName)) { deserializedRedisExportRdbCompletedEventData.name = reader.getString(); } else if ("status".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisImportRdbCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisImportRdbCompletedEventData.java index 3fd3768aba280..ca5cf548500f2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisImportRdbCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisImportRdbCompletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -99,6 +100,9 @@ public RedisImportRdbCompletedEventData setStatus(String status) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -126,8 +130,8 @@ public static RedisImportRdbCompletedEventData fromJson(JsonReader jsonReader) t reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedRedisImportRdbCompletedEventData.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedRedisImportRdbCompletedEventData.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("name".equals(fieldName)) { deserializedRedisImportRdbCompletedEventData.name = reader.getString(); } else if ("status".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisPatchingCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisPatchingCompletedEventData.java index 818087570a0e6..8d2d5cf3434c7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisPatchingCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisPatchingCompletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -99,6 +100,9 @@ public RedisPatchingCompletedEventData setStatus(String status) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -126,8 +130,8 @@ public static RedisPatchingCompletedEventData fromJson(JsonReader jsonReader) th reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedRedisPatchingCompletedEventData.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedRedisPatchingCompletedEventData.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("name".equals(fieldName)) { deserializedRedisPatchingCompletedEventData.name = reader.getString(); } else if ("status".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisScalingCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisScalingCompletedEventData.java index f1a947c93a098..64220f11c8fd9 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisScalingCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/RedisScalingCompletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -99,6 +100,9 @@ public RedisScalingCompletedEventData setStatus(String status) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -126,8 +130,8 @@ public static RedisScalingCompletedEventData fromJson(JsonReader jsonReader) thr reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedRedisScalingCompletedEventData.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedRedisScalingCompletedEventData.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("name".equals(fieldName)) { deserializedRedisScalingCompletedEventData.name = reader.getString(); } else if ("status".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionCancelEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionCancelEventData.java index 78fbabb49f1eb..7a3c7cb9321a2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionCancelEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionCancelEventData.java @@ -17,8 +17,8 @@ import java.util.Map; /** - * Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionCancel event. This is - * raised when a resource action operation is canceled. + * Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionCancel event. This is raised + * when a resource action operation is canceled. */ @Fluent public final class ResourceActionCancelEventData implements JsonSerializable { @@ -304,6 +304,9 @@ public ResourceActionCancelEventData setResourceHttpRequest(ResourceHttpRequest return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -375,9 +378,8 @@ public static ResourceActionCancelEventData fromJson(JsonReader jsonReader) thro * Get the claims property: The properties of the claims. * * @return the claims value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionCancelEventData#getResourceClaims()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionCancelEventData#getResourceClaims()} instead. */ @Deprecated public String getClaims() { @@ -397,9 +399,8 @@ public String getClaims() { * * @param claims the claims value to set. * @return the ResourceActionCancelEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionCancelEventData#setResourceClaims(Map)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionCancelEventData#setResourceClaims(Map)} instead. */ @Deprecated public ResourceActionCancelEventData setClaims(String claims) { @@ -415,9 +416,8 @@ public ResourceActionCancelEventData setClaims(String claims) { * Get the httpRequest property: The details of the operation. * * @return the httpRequest value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionCancelEventData#getResourceHttpRequest()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionCancelEventData#getResourceHttpRequest()} instead. */ @Deprecated public String getHttpRequest() { @@ -434,9 +434,8 @@ public String getHttpRequest() { * * @param httpRequest the httpRequest value to set. * @return the ResourceActionCancelEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionCancelEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionCancelEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. */ @Deprecated public ResourceActionCancelEventData setHttpRequest(String httpRequest) { @@ -453,9 +452,8 @@ public ResourceActionCancelEventData setHttpRequest(String httpRequest) { * Get the authorization property: The requested authorization for the operation. * * @return the authorization value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionCancelEventData#getResourceAuthorization()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionCancelEventData#getResourceAuthorization()} instead. */ @Deprecated public String getAuthorization() { @@ -472,9 +470,8 @@ public String getAuthorization() { * * @param authorization the authorization value to set. * @return the ResourceActionCancelEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionCancelEventData#setResourceAuthorization(ResourceAuthorization)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionCancelEventData#setResourceAuthorization(ResourceAuthorization)} instead. */ @Deprecated public ResourceActionCancelEventData setAuthorization(String authorization) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionFailureEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionFailureEventData.java index 23249d3573423..4b65e6f78fe1b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionFailureEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionFailureEventData.java @@ -304,6 +304,9 @@ public ResourceActionFailureEventData setResourceHttpRequest(ResourceHttpRequest return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -375,9 +378,8 @@ public static ResourceActionFailureEventData fromJson(JsonReader jsonReader) thr * Get the claims property: The properties of the claims. * * @return the claims value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionFailureEventData#getResourceClaims()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionFailureEventData#getResourceClaims()} instead. */ @Deprecated public String getClaims() { @@ -397,9 +399,8 @@ public String getClaims() { * * @param claims the claims value to set. * @return the ResourceActionFailureEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionFailureEventData#setResourceClaims(Map)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionFailureEventData#setResourceClaims(Map)} instead. */ @Deprecated public ResourceActionFailureEventData setClaims(String claims) { @@ -415,9 +416,8 @@ public ResourceActionFailureEventData setClaims(String claims) { * Get the httpRequest property: The details of the operation. * * @return the httpRequest value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionFailureEventData#getResourceHttpRequest()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionFailureEventData#getResourceHttpRequest()} instead. */ @Deprecated public String getHttpRequest() { @@ -434,9 +434,8 @@ public String getHttpRequest() { * * @param httpRequest the httpRequest value to set. * @return the ResourceActionFailureEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionFailureEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionFailureEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. */ @Deprecated public ResourceActionFailureEventData setHttpRequest(String httpRequest) { @@ -453,9 +452,8 @@ public ResourceActionFailureEventData setHttpRequest(String httpRequest) { * Get the authorization property: The requested authorization for the operation. * * @return the authorization value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionFailureEventData#getResourceAuthorization()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionFailureEventData#getResourceAuthorization()} instead. */ @Deprecated public String getAuthorization() { @@ -472,9 +470,8 @@ public String getAuthorization() { * * @param authorization the authorization value to set. * @return the ResourceActionFailureEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionFailureEventData#setResourceAuthorization(ResourceAuthorization)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionFailureEventData#setResourceAuthorization(ResourceAuthorization)} instead. */ @Deprecated public ResourceActionFailureEventData setAuthorization(String authorization) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionSuccessEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionSuccessEventData.java index 6818aa882af89..3da811152b573 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionSuccessEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceActionSuccessEventData.java @@ -304,6 +304,9 @@ public ResourceActionSuccessEventData setResourceHttpRequest(ResourceHttpRequest return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -375,9 +378,8 @@ public static ResourceActionSuccessEventData fromJson(JsonReader jsonReader) thr * Get the claims property: The properties of the claims. * * @return the claims value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionSuccessEventData#getResourceClaims()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionSuccessEventData#getResourceClaims()} instead. */ @Deprecated public String getClaims() { @@ -397,9 +399,8 @@ public String getClaims() { * * @param claims the claims value to set. * @return the ResourceActionSuccessEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionSuccessEventData#setResourceClaims(Map)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionSuccessEventData#setResourceClaims(Map)} instead. */ @Deprecated public ResourceActionSuccessEventData setClaims(String claims) { @@ -415,9 +416,8 @@ public ResourceActionSuccessEventData setClaims(String claims) { * Get the httpRequest property: The details of the operation. * * @return the httpRequest value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionSuccessEventData#getResourceHttpRequest()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionSuccessEventData#getResourceHttpRequest()} instead. */ @Deprecated public String getHttpRequest() { @@ -434,9 +434,8 @@ public String getHttpRequest() { * * @param httpRequest the httpRequest value to set. * @return the ResourceActionSuccessEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionSuccessEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionSuccessEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. */ @Deprecated public ResourceActionSuccessEventData setHttpRequest(String httpRequest) { @@ -453,9 +452,8 @@ public ResourceActionSuccessEventData setHttpRequest(String httpRequest) { * Get the authorization property: The requested authorization for the operation. * * @return the authorization value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionSuccessEventData#getResourceAuthorization()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionSuccessEventData#getResourceAuthorization()} instead. */ @Deprecated public String getAuthorization() { @@ -472,9 +470,8 @@ public String getAuthorization() { * * @param authorization the authorization value to set. * @return the ResourceActionSuccessEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceActionSuccessEventData#setResourceAuthorization(ResourceAuthorization)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceActionSuccessEventData#setResourceAuthorization(ResourceAuthorization)} instead. */ @Deprecated public ResourceActionSuccessEventData setAuthorization(String authorization) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceAuthorization.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceAuthorization.java index ead670c6082f9..6a87958ab2ca1 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceAuthorization.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceAuthorization.java @@ -98,6 +98,9 @@ public ResourceAuthorization setEvidence(Map evidence) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteCancelEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteCancelEventData.java index 115de8f57d020..4977b99e9993f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteCancelEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteCancelEventData.java @@ -17,8 +17,8 @@ import java.util.Map; /** - * Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteCancel event. This is - * raised when a resource delete operation is canceled. + * Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteCancel event. This is raised + * when a resource delete operation is canceled. */ @Fluent public final class ResourceDeleteCancelEventData implements JsonSerializable { @@ -304,6 +304,9 @@ public ResourceDeleteCancelEventData setResourceHttpRequest(ResourceHttpRequest return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -375,9 +378,8 @@ public static ResourceDeleteCancelEventData fromJson(JsonReader jsonReader) thro * Get the claims property: The properties of the claims. * * @return the claims value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteCancelEventData#getResourceClaims()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteCancelEventData#getResourceClaims()} instead. */ @Deprecated public String getClaims() { @@ -397,9 +399,8 @@ public String getClaims() { * * @param claims the claims value to set. * @return the ResourceDeleteCancelEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteCancelEventData#setResourceClaims(Map)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteCancelEventData#setResourceClaims(Map)} instead. */ @Deprecated public ResourceDeleteCancelEventData setClaims(String claims) { @@ -415,9 +416,8 @@ public ResourceDeleteCancelEventData setClaims(String claims) { * Get the httpRequest property: The details of the operation. * * @return the httpRequest value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteCancelEventData#getResourceHttpRequest()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteCancelEventData#getResourceHttpRequest()} instead. */ @Deprecated public String getHttpRequest() { @@ -434,9 +434,8 @@ public String getHttpRequest() { * * @param httpRequest the httpRequest value to set. * @return the ResourceDeleteCancelEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteCancelEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteCancelEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. */ @Deprecated public ResourceDeleteCancelEventData setHttpRequest(String httpRequest) { @@ -453,9 +452,8 @@ public ResourceDeleteCancelEventData setHttpRequest(String httpRequest) { * Get the authorization property: The requested authorization for the operation. * * @return the authorization value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteCancelEventData#getResourceAuthorization()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteCancelEventData#getResourceAuthorization()} instead. */ @Deprecated public String getAuthorization() { @@ -472,9 +470,8 @@ public String getAuthorization() { * * @param authorization the authorization value to set. * @return the ResourceDeleteCancelEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteCancelEventData#setResourceAuthorization(ResourceAuthorization)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteCancelEventData#setResourceAuthorization(ResourceAuthorization)} instead. */ @Deprecated public ResourceDeleteCancelEventData setAuthorization(String authorization) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteFailureEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteFailureEventData.java index 7b9ecf4e553f9..b817a4df1d976 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteFailureEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteFailureEventData.java @@ -304,6 +304,9 @@ public ResourceDeleteFailureEventData setResourceHttpRequest(ResourceHttpRequest return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -375,9 +378,8 @@ public static ResourceDeleteFailureEventData fromJson(JsonReader jsonReader) thr * Get the claims property: The properties of the claims. * * @return the claims value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteFailureEventData#getResourceClaims()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteFailureEventData#getResourceClaims()} instead. */ @Deprecated public String getClaims() { @@ -397,9 +399,8 @@ public String getClaims() { * * @param claims the claims value to set. * @return the ResourceDeleteFailureEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteFailureEventData#setResourceClaims(Map)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteFailureEventData#setResourceClaims(Map)} instead. */ @Deprecated public ResourceDeleteFailureEventData setClaims(String claims) { @@ -415,9 +416,8 @@ public ResourceDeleteFailureEventData setClaims(String claims) { * Get the httpRequest property: The details of the operation. * * @return the httpRequest value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteFailureEventData#getResourceHttpRequest()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteFailureEventData#getResourceHttpRequest()} instead. */ @Deprecated public String getHttpRequest() { @@ -434,9 +434,8 @@ public String getHttpRequest() { * * @param httpRequest the httpRequest value to set. * @return the ResourceDeleteFailureEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteFailureEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteFailureEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. */ @Deprecated public ResourceDeleteFailureEventData setHttpRequest(String httpRequest) { @@ -453,9 +452,8 @@ public ResourceDeleteFailureEventData setHttpRequest(String httpRequest) { * Get the authorization property: The requested authorization for the operation. * * @return the authorization value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteFailureEventData#getResourceAuthorization()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteFailureEventData#getResourceAuthorization()} instead. */ @Deprecated public String getAuthorization() { @@ -472,9 +470,8 @@ public String getAuthorization() { * * @param authorization the authorization value to set. * @return the ResourceDeleteFailureEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteFailureEventData#setResourceAuthorization(ResourceAuthorization)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteFailureEventData#setResourceAuthorization(ResourceAuthorization)} instead. */ @Deprecated public ResourceDeleteFailureEventData setAuthorization(String authorization) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteSuccessEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteSuccessEventData.java index 0f18eacac4efb..bebfc613e3eb8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteSuccessEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceDeleteSuccessEventData.java @@ -304,6 +304,9 @@ public ResourceDeleteSuccessEventData setResourceHttpRequest(ResourceHttpRequest return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -375,9 +378,8 @@ public static ResourceDeleteSuccessEventData fromJson(JsonReader jsonReader) thr * Get the claims property: The properties of the claims. * * @return the claims value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteSuccessEventData#getResourceClaims()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteSuccessEventData#getResourceClaims()} instead. */ @Deprecated public String getClaims() { @@ -397,9 +399,8 @@ public String getClaims() { * * @param claims the claims value to set. * @return the ResourceDeleteSuccessEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteSuccessEventData#setResourceClaims(Map)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteSuccessEventData#setResourceClaims(Map)} instead. */ @Deprecated public ResourceDeleteSuccessEventData setClaims(String claims) { @@ -415,9 +416,8 @@ public ResourceDeleteSuccessEventData setClaims(String claims) { * Get the httpRequest property: The details of the operation. * * @return the httpRequest value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteSuccessEventData#getResourceHttpRequest()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteSuccessEventData#getResourceHttpRequest()} instead. */ @Deprecated public String getHttpRequest() { @@ -434,9 +434,8 @@ public String getHttpRequest() { * * @param httpRequest the httpRequest value to set. * @return the ResourceDeleteSuccessEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteSuccessEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteSuccessEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. */ @Deprecated public ResourceDeleteSuccessEventData setHttpRequest(String httpRequest) { @@ -453,9 +452,8 @@ public ResourceDeleteSuccessEventData setHttpRequest(String httpRequest) { * Get the authorization property: The requested authorization for the operation. * * @return the authorization value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteSuccessEventData#getResourceAuthorization()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteSuccessEventData#getResourceAuthorization()} instead. */ @Deprecated public String getAuthorization() { @@ -472,9 +470,8 @@ public String getAuthorization() { * * @param authorization the authorization value to set. * @return the ResourceDeleteSuccessEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceDeleteSuccessEventData#setResourceAuthorization(ResourceAuthorization)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceDeleteSuccessEventData#setResourceAuthorization(ResourceAuthorization)} instead. */ @Deprecated public ResourceDeleteSuccessEventData setAuthorization(String authorization) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceHttpRequest.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceHttpRequest.java index feb9604db0e10..ebe5ea3862b79 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceHttpRequest.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceHttpRequest.java @@ -122,6 +122,9 @@ public ResourceHttpRequest setUrl(String url) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsHealthResourcesAnnotatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsHealthResourcesAnnotatedEventData.java index 5052f02e58dd2..4dab44acdbd0e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsHealthResourcesAnnotatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsHealthResourcesAnnotatedEventData.java @@ -52,6 +52,9 @@ public ResourceNotificationsHealthResourcesAnnotatedEventData setApiVersion(Stri return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.java index 06f10902b8e2c..3311c0640525f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.java @@ -52,6 +52,9 @@ public ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData se return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsOperationalDetails.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsOperationalDetails.java index 29bed7c9b5713..ae6a02e780a57 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsOperationalDetails.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsOperationalDetails.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -50,6 +51,9 @@ public ResourceNotificationsOperationalDetails setResourceEventTime(OffsetDateTi return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -77,8 +81,8 @@ public static ResourceNotificationsOperationalDetails fromJson(JsonReader jsonRe reader.nextToken(); if ("resourceEventTime".equals(fieldName)) { - deserializedResourceNotificationsOperationalDetails.resourceEventTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedResourceNotificationsOperationalDetails.resourceEventTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceDeletedDetails.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceDeletedDetails.java index 335023569f150..7fe52149cd79a 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceDeletedDetails.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceDeletedDetails.java @@ -99,6 +99,9 @@ public ResourceNotificationsResourceDeletedDetails setType(String type) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceDeletedEventData.java index 11f4588a57072..f82486e55030f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceDeletedEventData.java @@ -75,6 +75,9 @@ public ResourceNotificationsOperationalDetails getOperationalDetails() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.java index fffd66cc954c4..2802a3bf8b5a5 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.java @@ -52,6 +52,9 @@ public ResourceNotificationsResourceManagementCreatedOrUpdatedEventData setApiVe return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceManagementDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceManagementDeletedEventData.java index ec6f6fe99beeb..59f22196f07ab 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceManagementDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceManagementDeletedEventData.java @@ -42,6 +42,9 @@ public ResourceNotificationsResourceManagementDeletedEventData() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceUpdatedDetails.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceUpdatedDetails.java index fab5804295a4b..9babd652dcba2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceUpdatedDetails.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceNotificationsResourceUpdatedDetails.java @@ -176,6 +176,9 @@ public ResourceNotificationsResourceUpdatedDetails setProperties(Map - * Use {@link ResourceWriteCancelEventData#getResourceClaims()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteCancelEventData#getResourceClaims()} instead. */ @Deprecated public String getClaims() { @@ -396,9 +398,8 @@ public String getClaims() { * * @param claims the claims value to set. * @return the ResourceWriteCancelEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteCancelEventData#setResourceClaims(Map)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteCancelEventData#setResourceClaims(Map)} instead. */ @Deprecated public ResourceWriteCancelEventData setClaims(String claims) { @@ -414,9 +415,8 @@ public ResourceWriteCancelEventData setClaims(String claims) { * Get the httpRequest property: The details of the operation. * * @return the httpRequest value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteCancelEventData#getResourceHttpRequest()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteCancelEventData#getResourceHttpRequest()} instead. */ @Deprecated public String getHttpRequest() { @@ -433,9 +433,8 @@ public String getHttpRequest() { * * @param httpRequest the httpRequest value to set. * @return the ResourceWriteCancelEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteCancelEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteCancelEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. */ @Deprecated public ResourceWriteCancelEventData setHttpRequest(String httpRequest) { @@ -452,9 +451,8 @@ public ResourceWriteCancelEventData setHttpRequest(String httpRequest) { * Get the authorization property: The requested authorization for the operation. * * @return the authorization value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteCancelEventData#getResourceAuthorization()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteCancelEventData#getResourceAuthorization()} instead. */ @Deprecated public String getAuthorization() { @@ -471,9 +469,8 @@ public String getAuthorization() { * * @param authorization the authorization value to set. * @return the ResourceWriteCancelEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteCancelEventData#setResourceAuthorization(ResourceAuthorization)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteCancelEventData#setResourceAuthorization(ResourceAuthorization)} instead. */ @Deprecated public ResourceWriteCancelEventData setAuthorization(String authorization) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteFailureEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteFailureEventData.java index 8bec680ac58e8..2bfc11d81b361 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteFailureEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteFailureEventData.java @@ -17,8 +17,8 @@ import java.util.Map; /** - * Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteFailure event. This is - * raised when a resource create or update operation fails. + * Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteFailure event. This is raised + * when a resource create or update operation fails. */ @Fluent public final class ResourceWriteFailureEventData implements JsonSerializable { @@ -304,6 +304,9 @@ public ResourceWriteFailureEventData setResourceHttpRequest(ResourceHttpRequest return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -375,9 +378,8 @@ public static ResourceWriteFailureEventData fromJson(JsonReader jsonReader) thro * Get the claims property: The properties of the claims. * * @return the claims value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteFailureEventData#getResourceClaims()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteFailureEventData#getResourceClaims()} instead. */ @Deprecated public String getClaims() { @@ -397,9 +399,8 @@ public String getClaims() { * * @param claims the claims value to set. * @return the ResourceWriteFailureEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteFailureEventData#setResourceClaims(Map)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteFailureEventData#setResourceClaims(Map)} instead. */ @Deprecated public ResourceWriteFailureEventData setClaims(String claims) { @@ -415,9 +416,8 @@ public ResourceWriteFailureEventData setClaims(String claims) { * Get the httpRequest property: The details of the operation. * * @return the httpRequest value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteFailureEventData#getResourceHttpRequest()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteFailureEventData#getResourceHttpRequest()} instead. */ @Deprecated public String getHttpRequest() { @@ -434,9 +434,8 @@ public String getHttpRequest() { * * @param httpRequest the httpRequest value to set. * @return the ResourceWriteFailureEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteFailureEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteFailureEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. */ @Deprecated public ResourceWriteFailureEventData setHttpRequest(String httpRequest) { @@ -453,9 +452,8 @@ public ResourceWriteFailureEventData setHttpRequest(String httpRequest) { * Get the authorization property: The requested authorization for the operation. * * @return the authorization value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteFailureEventData#getResourceAuthorization()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteFailureEventData#getResourceAuthorization()} instead. */ @Deprecated public String getAuthorization() { @@ -472,9 +470,8 @@ public String getAuthorization() { * * @param authorization the authorization value to set. * @return the ResourceWriteFailureEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteFailureEventData#setResourceAuthorization(ResourceAuthorization)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteFailureEventData#setResourceAuthorization(ResourceAuthorization)} instead. */ @Deprecated public ResourceWriteFailureEventData setAuthorization(String authorization) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteSuccessEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteSuccessEventData.java index 38137c4a63d50..76d4685cf281a 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteSuccessEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ResourceWriteSuccessEventData.java @@ -17,8 +17,8 @@ import java.util.Map; /** - * Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteSuccess event. This is - * raised when a resource create or update operation succeeds. + * Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteSuccess event. This is raised + * when a resource create or update operation succeeds. */ @Fluent public final class ResourceWriteSuccessEventData implements JsonSerializable { @@ -304,6 +304,9 @@ public ResourceWriteSuccessEventData setResourceHttpRequest(ResourceHttpRequest return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -375,9 +378,8 @@ public static ResourceWriteSuccessEventData fromJson(JsonReader jsonReader) thro * Get the claims property: The properties of the claims. * * @return the claims value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteSuccessEventData#getResourceClaims()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteSuccessEventData#getResourceClaims()} instead. */ @Deprecated public String getClaims() { @@ -397,9 +399,8 @@ public String getClaims() { * * @param claims the claims value to set. * @return the ResourceWriteSuccessEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteSuccessEventData#setResourceClaims(Map)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteSuccessEventData#setResourceClaims(Map)} instead. */ @Deprecated public ResourceWriteSuccessEventData setClaims(String claims) { @@ -415,9 +416,8 @@ public ResourceWriteSuccessEventData setClaims(String claims) { * Get the httpRequest property: The details of the operation. * * @return the httpRequest value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteSuccessEventData#getResourceHttpRequest()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteSuccessEventData#getResourceHttpRequest()} instead. */ @Deprecated public String getHttpRequest() { @@ -434,9 +434,8 @@ public String getHttpRequest() { * * @param httpRequest the httpRequest value to set. * @return the ResourceWriteSuccessEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteSuccessEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteSuccessEventData#setResourceHttpRequest(ResourceHttpRequest)} instead. */ @Deprecated public ResourceWriteSuccessEventData setHttpRequest(String httpRequest) { @@ -453,9 +452,8 @@ public ResourceWriteSuccessEventData setHttpRequest(String httpRequest) { * Get the authorization property: The requested authorization for the operation. * * @return the authorization value. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteSuccessEventData#getResourceAuthorization()} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteSuccessEventData#getResourceAuthorization()} instead. */ @Deprecated public String getAuthorization() { @@ -472,9 +470,8 @@ public String getAuthorization() { * * @param authorization the authorization value to set. * @return the ResourceWriteSuccessEventData object itself. - * @deprecated This method is no longer supported since v4.9.0. - *

- * Use {@link ResourceWriteSuccessEventData#setResourceAuthorization(ResourceAuthorization)} instead. + * @deprecated This method is no longer supported since v4.9.0.

Use + * {@link ResourceWriteSuccessEventData#setResourceAuthorization(ResourceAuthorization)} instead. */ @Deprecated public ResourceWriteSuccessEventData setAuthorization(String authorization) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.java index 49e5278bdb21d..b341d8255a74e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.java @@ -45,8 +45,8 @@ public final class ServiceBusActiveMessagesAvailablePeriodicNotificationsEventDa private String topicName; /* - * The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this - * value will be null. + * The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value + * will be null. */ private String subscriptionName; @@ -185,6 +185,9 @@ public String getSubscriptionName() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailableWithNoListenersEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailableWithNoListenersEventData.java index e0495ab6d8438..acf215acf6519 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailableWithNoListenersEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusActiveMessagesAvailableWithNoListenersEventData.java @@ -45,8 +45,8 @@ public final class ServiceBusActiveMessagesAvailableWithNoListenersEventData private String topicName; /* - * The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this - * value will be null. + * The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value + * will be null. */ private String subscriptionName; @@ -184,6 +184,9 @@ public ServiceBusActiveMessagesAvailableWithNoListenersEventData setSubscription return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.java index 354e4af190b6f..dbb85c5009b38 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.java @@ -45,8 +45,8 @@ public final class ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEve private String topicName; /* - * The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this - * value will be null. + * The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value + * will be null. */ private String subscriptionName; @@ -185,6 +185,9 @@ public String getSubscriptionName() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.java index 0c0e8e3abaa5c..1dabc5b2f2b49 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.java @@ -45,8 +45,8 @@ public final class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData private String topicName; /* - * The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this - * value will be null. + * The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value + * will be null. */ private String subscriptionName; @@ -184,6 +184,9 @@ public ServiceBusDeadletterMessagesAvailableWithNoListenersEventData setSubscrip return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionConnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionConnectedEventData.java index 7baa02db88b56..4d6527f4dbbaf 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionConnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionConnectedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -125,6 +126,9 @@ public SignalRServiceClientConnectionConnectedEventData setUserId(String userId) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -153,8 +157,8 @@ public static SignalRServiceClientConnectionConnectedEventData fromJson(JsonRead reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedSignalRServiceClientConnectionConnectedEventData.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedSignalRServiceClientConnectionConnectedEventData.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("hubName".equals(fieldName)) { deserializedSignalRServiceClientConnectionConnectedEventData.hubName = reader.getString(); } else if ("connectionId".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionDisconnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionDisconnectedEventData.java index d24e7ec44597a..23165c94f6f09 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionDisconnectedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SignalRServiceClientConnectionDisconnectedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -150,6 +151,9 @@ public SignalRServiceClientConnectionDisconnectedEventData setErrorMessage(Strin return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -180,8 +184,8 @@ public static SignalRServiceClientConnectionDisconnectedEventData fromJson(JsonR reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedSignalRServiceClientConnectionDisconnectedEventData.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedSignalRServiceClientConnectionDisconnectedEventData.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("hubName".equals(fieldName)) { deserializedSignalRServiceClientConnectionDisconnectedEventData.hubName = reader.getString(); } else if ("connectionId".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageAsyncOperationInitiatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageAsyncOperationInitiatedEventData.java index 895a4f186af27..54743a1391917 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageAsyncOperationInitiatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageAsyncOperationInitiatedEventData.java @@ -66,8 +66,8 @@ public final class StorageAsyncOperationInitiatedEventData private String identity; /* - * For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should - * be ignored by event consumers. + * For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be + * ignored by event consumers. */ private Object storageDiagnostics; @@ -98,8 +98,8 @@ public StorageAsyncOperationInitiatedEventData setApi(String api) { } /** - * Get the clientRequestId property: A request id provided by the client of the storage API operation that - * triggered this event. + * Get the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. * * @return the clientRequestId value. */ @@ -108,8 +108,8 @@ public String getClientRequestId() { } /** - * Set the clientRequestId property: A request id provided by the client of the storage API operation that - * triggered this event. + * Set the clientRequestId property: A request id provided by the client of the storage API operation that triggered + * this event. * * @param clientRequestId the clientRequestId value to set. * @return the StorageAsyncOperationInitiatedEventData object itself. @@ -226,9 +226,9 @@ public StorageAsyncOperationInitiatedEventData setUrl(String url) { } /** - * Get the sequencer property: An opaque string value representing the logical sequence of events for any - * particular blob name. Users can use standard string comparison to understand the relative sequence of two events - * on the same blob name. + * Get the sequencer property: An opaque string value representing the logical sequence of events for any particular + * blob name. Users can use standard string comparison to understand the relative sequence of two events on the same + * blob name. * * @return the sequencer value. */ @@ -237,9 +237,9 @@ public String getSequencer() { } /** - * Set the sequencer property: An opaque string value representing the logical sequence of events for any - * particular blob name. Users can use standard string comparison to understand the relative sequence of two events - * on the same blob name. + * Set the sequencer property: An opaque string value representing the logical sequence of events for any particular + * blob name. Users can use standard string comparison to understand the relative sequence of two events on the same + * blob name. * * @param sequencer the sequencer value to set. * @return the StorageAsyncOperationInitiatedEventData object itself. @@ -291,6 +291,9 @@ public StorageAsyncOperationInitiatedEventData setStorageDiagnostics(Object stor return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobCreatedEventData.java index b461a6f3048e2..43d66bd0e648e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobCreatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobCreatedEventData.java @@ -80,8 +80,8 @@ public final class StorageBlobCreatedEventData implements JsonSerializable OffsetDateTime.parse(nonNullReader.getString())); + deserializedStorageBlobInventoryPolicyCompletedEventData.scheduleDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("accountName".equals(fieldName)) { deserializedStorageBlobInventoryPolicyCompletedEventData.accountName = reader.getString(); } else if ("ruleName".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobRenamedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobRenamedEventData.java index 300adf7605d64..9061595ce210d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobRenamedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobRenamedEventData.java @@ -53,8 +53,8 @@ public final class StorageBlobRenamedEventData implements JsonSerializable OffsetDateTime.parse(nonNullReader.getString())); + deserializedStorageTaskAssignmentCompletedEventData.completedOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("taskExecutionId".equals(fieldName)) { deserializedStorageTaskAssignmentCompletedEventData.taskExecutionId = reader.getString(); } else if ("taskName".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageTaskAssignmentQueuedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageTaskAssignmentQueuedEventData.java index fda46bb170937..d508fcb39aeaa 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageTaskAssignmentQueuedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageTaskAssignmentQueuedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -75,6 +76,9 @@ public StorageTaskAssignmentQueuedEventData setTaskExecutionId(String taskExecut return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -101,8 +105,8 @@ public static StorageTaskAssignmentQueuedEventData fromJson(JsonReader jsonReade reader.nextToken(); if ("queuedDateTime".equals(fieldName)) { - deserializedStorageTaskAssignmentQueuedEventData.queuedOn - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedStorageTaskAssignmentQueuedEventData.queuedOn = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("taskExecutionId".equals(fieldName)) { deserializedStorageTaskAssignmentQueuedEventData.taskExecutionId = reader.getString(); } else { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageTaskCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageTaskCompletedEventData.java index 61433c63d2b69..059ce1859b393 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageTaskCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageTaskCompletedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -149,6 +150,9 @@ public StorageTaskCompletedEventData setSummaryReportBlobUrl(String summaryRepor return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -183,8 +187,8 @@ public static StorageTaskCompletedEventData fromJson(JsonReader jsonReader) thro deserializedStorageTaskCompletedEventData.status = StorageTaskCompletedStatus.fromString(reader.getString()); } else if ("completedDateTime".equals(fieldName)) { - deserializedStorageTaskCompletedEventData.completedDateTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedStorageTaskCompletedEventData.completedDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("taskExecutionId".equals(fieldName)) { deserializedStorageTaskCompletedEventData.taskExecutionId = reader.getString(); } else if ("taskName".equals(fieldName)) { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageTaskQueuedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageTaskQueuedEventData.java index ec33190802126..4430c0aaa010e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageTaskQueuedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageTaskQueuedEventData.java @@ -5,6 +5,7 @@ package com.azure.messaging.eventgrid.systemevents; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -74,6 +75,9 @@ public StorageTaskQueuedEventData setTaskExecutionId(String taskExecutionId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -99,8 +103,8 @@ public static StorageTaskQueuedEventData fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("queuedDateTime".equals(fieldName)) { - deserializedStorageTaskQueuedEventData.queuedDateTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedStorageTaskQueuedEventData.queuedDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("taskExecutionId".equals(fieldName)) { deserializedStorageTaskQueuedEventData.taskExecutionId = reader.getString(); } else { diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionDeletedEventData.java index a19fb6857d547..bc6904e0fcf83 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionDeletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionDeletedEventData.java @@ -36,6 +36,9 @@ public String getEventSubscriptionId() { return this.eventSubscriptionId; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationEventData.java index 66a3824d93dac..dcbfaf3676562 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationEventData.java @@ -38,8 +38,8 @@ public SubscriptionValidationEventData() { /** * Get the validationCode property: The validation code sent by Azure Event Grid to validate an event subscription. - * To complete the validation handshake, the subscriber must either respond with this validation code as part of - * the validation response, or perform a GET request on the validationUrl (available starting version + * To complete the validation handshake, the subscriber must either respond with this validation code as part of the + * validation response, or perform a GET request on the validationUrl (available starting version * 2018-05-01-preview). * * @return the validationCode value. @@ -60,6 +60,9 @@ public String getValidationUrl() { return this.validationUrl; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationResponse.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationResponse.java index 7a9a4b7b3fcdf..2c3e82a2b542e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationResponse.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/SubscriptionValidationResponse.java @@ -52,6 +52,9 @@ public SubscriptionValidationResponse setValidationResponse(String validationRes return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventData.java index 210826b035793..8cea5f8c4bc6e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventData.java @@ -126,8 +126,8 @@ public WebAppServicePlanUpdatedEventData setName(String name) { } /** - * Get the clientRequestId property: The client request id generated by the app service for the app service plan - * API operation that triggered this event. + * Get the clientRequestId property: The client request id generated by the app service for the app service plan API + * operation that triggered this event. * * @return the clientRequestId value. */ @@ -136,8 +136,8 @@ public String getClientRequestId() { } /** - * Set the clientRequestId property: The client request id generated by the app service for the app service plan - * API operation that triggered this event. + * Set the clientRequestId property: The client request id generated by the app service for the app service plan API + * operation that triggered this event. * * @param clientRequestId the clientRequestId value to set. * @return the WebAppServicePlanUpdatedEventData object itself. @@ -231,6 +231,9 @@ public WebAppServicePlanUpdatedEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventDataSku.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventDataSku.java index b185195b3429a..16fc722161121 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventDataSku.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppServicePlanUpdatedEventDataSku.java @@ -148,6 +148,9 @@ public WebAppServicePlanUpdatedEventDataSku setCapacity(String capacity) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppUpdatedEventData.java index 3e413a23decdd..111ac2cea3147 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppUpdatedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebAppUpdatedEventData.java @@ -142,8 +142,8 @@ public WebAppUpdatedEventData setCorrelationRequestId(String correlationRequestI } /** - * Get the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @return the requestId value. */ @@ -152,8 +152,8 @@ public String getRequestId() { } /** - * Set the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @param requestId the requestId value to set. * @return the WebAppUpdatedEventData object itself. @@ -203,6 +203,9 @@ public WebAppUpdatedEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationCompletedEventData.java index 21ad34cb426dc..86398abcc592f 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationCompletedEventData.java @@ -143,8 +143,8 @@ public WebBackupOperationCompletedEventData setCorrelationRequestId(String corre } /** - * Get the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @return the requestId value. */ @@ -153,8 +153,8 @@ public String getRequestId() { } /** - * Set the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @param requestId the requestId value to set. * @return the WebBackupOperationCompletedEventData object itself. @@ -204,6 +204,9 @@ public WebBackupOperationCompletedEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationFailedEventData.java index b04f7433561a9..463131d8bccb9 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationFailedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationFailedEventData.java @@ -142,8 +142,8 @@ public WebBackupOperationFailedEventData setCorrelationRequestId(String correlat } /** - * Get the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @return the requestId value. */ @@ -152,8 +152,8 @@ public String getRequestId() { } /** - * Set the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @param requestId the requestId value to set. * @return the WebBackupOperationFailedEventData object itself. @@ -203,6 +203,9 @@ public WebBackupOperationFailedEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationStartedEventData.java index b6a32bb9261a0..d014d03ee0426 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationStartedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebBackupOperationStartedEventData.java @@ -142,8 +142,8 @@ public WebBackupOperationStartedEventData setCorrelationRequestId(String correla } /** - * Get the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @return the requestId value. */ @@ -152,8 +152,8 @@ public String getRequestId() { } /** - * Set the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @param requestId the requestId value to set. * @return the WebBackupOperationStartedEventData object itself. @@ -203,6 +203,9 @@ public WebBackupOperationStartedEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationCompletedEventData.java index 467837d90f682..18af7d0c81f3e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationCompletedEventData.java @@ -143,8 +143,8 @@ public WebRestoreOperationCompletedEventData setCorrelationRequestId(String corr } /** - * Get the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @return the requestId value. */ @@ -153,8 +153,8 @@ public String getRequestId() { } /** - * Set the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @param requestId the requestId value to set. * @return the WebRestoreOperationCompletedEventData object itself. @@ -204,6 +204,9 @@ public WebRestoreOperationCompletedEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationFailedEventData.java index d134676660a19..97f45eac8d145 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationFailedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationFailedEventData.java @@ -142,8 +142,8 @@ public WebRestoreOperationFailedEventData setCorrelationRequestId(String correla } /** - * Get the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @return the requestId value. */ @@ -152,8 +152,8 @@ public String getRequestId() { } /** - * Set the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @param requestId the requestId value to set. * @return the WebRestoreOperationFailedEventData object itself. @@ -203,6 +203,9 @@ public WebRestoreOperationFailedEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationStartedEventData.java index 5a5a4cd9dfc82..d492b2710d9c7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationStartedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebRestoreOperationStartedEventData.java @@ -143,8 +143,8 @@ public WebRestoreOperationStartedEventData setCorrelationRequestId(String correl } /** - * Get the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @return the requestId value. */ @@ -153,8 +153,8 @@ public String getRequestId() { } /** - * Set the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @param requestId the requestId value to set. * @return the WebRestoreOperationStartedEventData object itself. @@ -204,6 +204,9 @@ public WebRestoreOperationStartedEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapCompletedEventData.java index 02e8e6fd2fa3d..73dd641092a2d 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapCompletedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapCompletedEventData.java @@ -142,8 +142,8 @@ public WebSlotSwapCompletedEventData setCorrelationRequestId(String correlationR } /** - * Get the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @return the requestId value. */ @@ -152,8 +152,8 @@ public String getRequestId() { } /** - * Set the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @param requestId the requestId value to set. * @return the WebSlotSwapCompletedEventData object itself. @@ -203,6 +203,9 @@ public WebSlotSwapCompletedEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapFailedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapFailedEventData.java index 7f00315836bb5..972aeb33886a2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapFailedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapFailedEventData.java @@ -142,8 +142,8 @@ public WebSlotSwapFailedEventData setCorrelationRequestId(String correlationRequ } /** - * Get the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @return the requestId value. */ @@ -152,8 +152,8 @@ public String getRequestId() { } /** - * Set the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @param requestId the requestId value to set. * @return the WebSlotSwapFailedEventData object itself. @@ -203,6 +203,9 @@ public WebSlotSwapFailedEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapStartedEventData.java index 2ff357efa7382..e003a193a2ddd 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapStartedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapStartedEventData.java @@ -142,8 +142,8 @@ public WebSlotSwapStartedEventData setCorrelationRequestId(String correlationReq } /** - * Get the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @return the requestId value. */ @@ -152,8 +152,8 @@ public String getRequestId() { } /** - * Set the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @param requestId the requestId value to set. * @return the WebSlotSwapStartedEventData object itself. @@ -203,6 +203,9 @@ public WebSlotSwapStartedEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewCancelledEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewCancelledEventData.java index 56fa13c3dd70e..c3ac7067e56d2 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewCancelledEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewCancelledEventData.java @@ -143,8 +143,8 @@ public WebSlotSwapWithPreviewCancelledEventData setCorrelationRequestId(String c } /** - * Get the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @return the requestId value. */ @@ -153,8 +153,8 @@ public String getRequestId() { } /** - * Set the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @param requestId the requestId value to set. * @return the WebSlotSwapWithPreviewCancelledEventData object itself. @@ -204,6 +204,9 @@ public WebSlotSwapWithPreviewCancelledEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewStartedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewStartedEventData.java index 29ee00003e9ce..d53b16457d289 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewStartedEventData.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/WebSlotSwapWithPreviewStartedEventData.java @@ -143,8 +143,8 @@ public WebSlotSwapWithPreviewStartedEventData setCorrelationRequestId(String cor } /** - * Get the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Get the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @return the requestId value. */ @@ -153,8 +153,8 @@ public String getRequestId() { } /** - * Set the requestId property: The request id generated by the app service for the site API operation that - * triggered this event. + * Set the requestId property: The request id generated by the app service for the site API operation that triggered + * this event. * * @param requestId the requestId value to set. * @return the WebSlotSwapWithPreviewStartedEventData object itself. @@ -204,6 +204,9 @@ public WebSlotSwapWithPreviewStartedEventData setVerb(String verb) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md index 93559841cea34..83a3f28f966c8 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md +++ b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md @@ -1,28 +1,33 @@ -# Instructions for Generation -This file is used to generate the OpenAPI files for track 2 EventGrid -## Requirements/Installation -You need the following to start generating code -> NodeJS v10.x - v13.x -> -> Java 8+ -> -> Maven 3.x +# Azure Event Grid for Java -Install Autorest beta with NPM: +> see https://aka.ms/autorest -`npm i -g @autorest/autorest` +This is the AutoRest configuration file for Event Grid. -## Using +--- +## Getting Started +To build the SDK for Event Grid, simply [Install AutoRest](https://aka.ms/autorest) and +in this folder, run: -run `autorest readme.md` +> `autorest` -If you are adding or updating swagger files, please make sure that they are included -in the input file list. Also, if you are adding an additional service event, make sure that -its `eventType` string is added as a constant and a mapping to the event data model in the -`SystemEventMappings` file. +To see additional help and options, run: + +> `autorest --help` + +### Setup +```ps +npm install -g autorest +``` + +### Generation +```ps +cd +autorest +``` ```yaml -use: '@autorest/java@4.1.25' +use: '@autorest/java@4.1.39' java: true title: EventGridPublisherClient description: EventGrid Publisher Client diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/swagger/README.md b/sdk/formrecognizer/azure-ai-formrecognizer/swagger/README.md index d15549e2e3779..bf43d3b170ddb 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/swagger/README.md +++ b/sdk/formrecognizer/azure-ai-formrecognizer/swagger/README.md @@ -1,21 +1,40 @@ -# Azure Cognitive Service - Form Recognizer for Java +# Azure Document Intelligence for Java > see https://aka.ms/autorest +This is the Autorest configuration file for Document Intelligence. + +--- +## Getting Started +To build the SDK for Document Intelligence, simply [Install Autorest](https://aka.ms/autorest) and +in this folder, run: + +> `autorest --tag={swagger specification}` + +To see additional help and options, run: + +> `autorest --help` + ### Setup ```ps -Fork and clone https://github.com/Azure/autorest.java -git checkout v4 -git submodule update --init --recursive -mvn package -Dlocal -npm install npm install -g autorest ``` ### Generation + +There are two swagger specifications for Document Intelligence: `formrecognizer-v2.1` and `formrecognizer-documentanalysis`. +They use the following tags respectively: `--tag=formrecognizer-v2.1`, `--tag=formrecognizer-documentanalysis`. + +```ps +cd +autorest --tag={swagger specification} +``` + +e.g. ```ps cd -autorest --java --use=C:/work/autorest.java +autorest --tag=formrecognizer-v2.1 +autorest --tag=formrecognizer-documentanalysis ``` ## Form Recognizer Service V2.1 diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationAsyncClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationAsyncClient.java index bef95473c046c..7a6f4d47dc965 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationAsyncClient.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationAsyncClient.java @@ -19,15 +19,15 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.developer.loadtesting.implementation.LoadTestAdministrationsImpl; -import reactor.core.publisher.Mono; - import java.time.Duration; +import reactor.core.publisher.Mono; /** * Initializes a new instance of the asynchronous LoadTestingClient type. */ @ServiceClient(builder = LoadTestAdministrationClientBuilder.class, isAsync = true) public final class LoadTestAdministrationAsyncClient { + private static final ClientLogger LOGGER = new ClientLogger(LoadTestAdministrationAsyncClient.class); @Generated @@ -45,10 +45,10 @@ public final class LoadTestAdministrationAsyncClient { /** * Configure server metrics for a test. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     testId: String (Optional)
      *     metrics (Optional): {
@@ -68,11 +68,13 @@ public final class LoadTestAdministrationAsyncClient {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testId: String (Optional)
      *     metrics (Optional): {
@@ -92,7 +94,8 @@ public final class LoadTestAdministrationAsyncClient {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -145,10 +148,10 @@ public PollerFlux beginUploadTestFile(String testId, Str /** * Get all test files. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -157,7 +160,8 @@ public PollerFlux beginUploadTestFile(String testId, Str
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -176,10 +180,10 @@ public PagedFlux listTestFiles(String testId, RequestOptions request /** * Create a new test or update an existing test. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -247,11 +251,13 @@ public PagedFlux listTestFiles(String testId, RequestOptions request
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -319,7 +325,8 @@ public PagedFlux listTestFiles(String testId, RequestOptions request
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -358,10 +365,10 @@ public Mono> deleteTestWithResponse(String testId, RequestOptions /** * Get load test details by test name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -429,7 +436,8 @@ public Mono> deleteTestWithResponse(String testId, RequestOptions
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -449,55 +457,26 @@ public Mono> getTestWithResponse(String testId, RequestOpti /** * Get all load tests by the fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - - * lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - displayName, createdBy. For example, to search for - * a test, with display name is Login Test, the search parameter can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: + * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - + * displayName, createdBy. For example, to search for a test, with display name is Login Test, the search parameter + * can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) + * of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of + * the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -565,7 +544,8 @@ public Mono> getTestWithResponse(String testId, RequestOpti
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -610,14 +590,17 @@ public PagedFlux listTests(RequestOptions requestOptions) { *

* Request Body Schema * - *

{@code
+     * 
+     * {@code
      * BinaryData
-     * }
+ * } + *
* *

* Response Body Schema * - *

{@code
+     * 
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -626,7 +609,8 @@ public PagedFlux listTests(RequestOptions requestOptions) {
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -647,10 +631,10 @@ Mono> uploadTestFileWithResponse(String testId, String file /** * Get test file by the file name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -659,7 +643,8 @@ Mono> uploadTestFileWithResponse(String testId, String file
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -700,10 +685,10 @@ public Mono> deleteTestFileWithResponse(String testId, String fil /** * Associate an app component (collection of azure resources) to a test. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -722,11 +707,13 @@ public Mono> deleteTestFileWithResponse(String testId, String fil
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -745,7 +732,8 @@ public Mono> deleteTestFileWithResponse(String testId, String fil
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -766,10 +754,10 @@ public Mono> createOrUpdateAppComponentsWithResponse(String /** * Get associated app component (collection of azure resources) for the given test. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -788,7 +776,8 @@ public Mono> createOrUpdateAppComponentsWithResponse(String
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -808,10 +797,10 @@ public Mono> getAppComponentsWithResponse(String testId, Re /** * List server metrics configuration for the given test. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testId: String (Optional)
      *     metrics (Optional): {
@@ -831,7 +820,8 @@ public Mono> getAppComponentsWithResponse(String testId, Re
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClient.java index eab46f87d4453..55fdab103fbd3 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClient.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClient.java @@ -18,7 +18,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.SyncPoller; import com.azure.developer.loadtesting.implementation.LoadTestAdministrationsImpl; - import java.time.Duration; /** @@ -26,6 +25,7 @@ */ @ServiceClient(builder = LoadTestAdministrationClientBuilder.class) public final class LoadTestAdministrationClient { + private static final ClientLogger LOGGER = new ClientLogger(LoadTestAdministrationClient.class); @Generated @@ -43,10 +43,10 @@ public final class LoadTestAdministrationClient { /** * Configure server metrics for a test. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     testId: String (Optional)
      *     metrics (Optional): {
@@ -66,11 +66,13 @@ public final class LoadTestAdministrationClient {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testId: String (Optional)
      *     metrics (Optional): {
@@ -90,7 +92,8 @@ public final class LoadTestAdministrationClient {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -139,10 +142,10 @@ public SyncPoller beginUploadTestFile(String testId, Str /** * Get all test files. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -151,7 +154,8 @@ public SyncPoller beginUploadTestFile(String testId, Str
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -170,10 +174,10 @@ public PagedIterable listTestFiles(String testId, RequestOptions req /** * Create a new test or update an existing test. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -241,11 +245,13 @@ public PagedIterable listTestFiles(String testId, RequestOptions req
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -313,7 +319,8 @@ public PagedIterable listTestFiles(String testId, RequestOptions req
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -352,10 +359,10 @@ public Response deleteTestWithResponse(String testId, RequestOptions reque /** * Get load test details by test name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -423,7 +430,8 @@ public Response deleteTestWithResponse(String testId, RequestOptions reque
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -443,55 +451,26 @@ public Response getTestWithResponse(String testId, RequestOptions re /** * Get all load tests by the fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - - * lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - displayName, createdBy. For example, to search for - * a test, with display name is Login Test, the search parameter can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: + * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - + * displayName, createdBy. For example, to search for a test, with display name is Login Test, the search parameter + * can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) + * of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of + * the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -559,7 +538,8 @@ public Response getTestWithResponse(String testId, RequestOptions re
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -604,14 +584,17 @@ public PagedIterable listTests(RequestOptions requestOptions) { *

* Request Body Schema * - *

{@code
+     * 
+     * {@code
      * BinaryData
-     * }
+ * } + *
* *

* Response Body Schema * - *

{@code
+     * 
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -620,7 +603,8 @@ public PagedIterable listTests(RequestOptions requestOptions) {
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -641,10 +625,10 @@ Response uploadTestFileWithResponse(String testId, String fileName, /** * Get test file by the file name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -653,7 +637,8 @@ Response uploadTestFileWithResponse(String testId, String fileName,
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -692,10 +677,10 @@ public Response deleteTestFileWithResponse(String testId, String fileName, /** * Associate an app component (collection of azure resources) to a test. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -714,11 +699,13 @@ public Response deleteTestFileWithResponse(String testId, String fileName,
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -737,7 +724,8 @@ public Response deleteTestFileWithResponse(String testId, String fileName,
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -758,10 +746,10 @@ public Response createOrUpdateAppComponentsWithResponse(String testI /** * Get associated app component (collection of azure resources) for the given test. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -780,7 +768,8 @@ public Response createOrUpdateAppComponentsWithResponse(String testI
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -799,10 +788,10 @@ public Response getAppComponentsWithResponse(String testId, RequestO /** * List server metrics configuration for the given test. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testId: String (Optional)
      *     metrics (Optional): {
@@ -822,7 +811,8 @@ public Response getAppComponentsWithResponse(String testId, RequestO
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClientBuilder.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClientBuilder.java index 3ba00249d425a..03c74af38b25b 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClientBuilder.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClientBuilder.java @@ -11,7 +11,6 @@ import com.azure.core.client.traits.TokenCredentialTrait; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; @@ -81,7 +80,7 @@ public LoadTestAdministrationClientBuilder() { @Override public LoadTestAdministrationClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; @@ -253,6 +252,7 @@ public LoadTestAdministrationClientBuilder retryPolicy(RetryPolicy retryPolicy) */ @Generated private LoadTestingClientImpl buildInnerClient() { + this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); LoadTestingServiceVersion localServiceVersion = (serviceVersion != null) ? serviceVersion : LoadTestingServiceVersion.getLatest(); @@ -274,10 +274,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = new HttpHeaders(); - localClientOptions.getHeaders() - .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue())); - if (headers.getSize() > 0) { + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { policies.add(new AddHeadersPolicy(headers)); } this.pipelinePolicies.stream() @@ -326,4 +324,11 @@ public LoadTestAdministrationClient buildClient() { = CoreUtils.getProperties("azure-developer-loadtesting.properties"); private static final ClientLogger LOGGER = new ClientLogger(LoadTestAdministrationClientBuilder.class); + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java index 4c6ba65fd8def..bfafcd59881bd 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java @@ -19,15 +19,15 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.developer.loadtesting.implementation.LoadTestRunsImpl; -import reactor.core.publisher.Mono; - import java.time.Duration; +import reactor.core.publisher.Mono; /** * Initializes a new instance of the asynchronous LoadTestingClient type. */ @ServiceClient(builder = LoadTestRunClientBuilder.class, isAsync = true) public final class LoadTestRunAsyncClient { + @Generated private final LoadTestRunsImpl serviceClient; @@ -43,10 +43,10 @@ public final class LoadTestRunAsyncClient { /** * Configure server metrics for a test run. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     testRunId: String (Optional)
      *     metrics (Optional): {
@@ -66,11 +66,13 @@ public final class LoadTestRunAsyncClient {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testRunId: String (Optional)
      *     metrics (Optional): {
@@ -90,7 +92,8 @@ public final class LoadTestRunAsyncClient {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -141,10 +144,10 @@ public PollerFlux beginTestRun(String testRunId, BinaryD /** * Associate an app component (collection of azure resources) to a test run. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -163,11 +166,13 @@ public PollerFlux beginTestRun(String testRunId, BinaryD
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -186,7 +191,8 @@ public PollerFlux beginTestRun(String testRunId, BinaryD
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -238,7 +244,8 @@ public Mono> createOrUpdateAppComponentsWithResponse(String *

* Request Body Schema * - *

{@code
+     * 
+     * {@code
      * {
      *     filters (Optional): [
      *          (Optional){
@@ -249,12 +256,14 @@ public Mono> createOrUpdateAppComponentsWithResponse(String
      *         }
      *     ]
      * }
-     * }
+ * } + *
* *

* Response Body Schema * - *

{@code
+     * 
+     * {@code
      * {
      *     value (Optional): [
      *          (Optional){
@@ -274,7 +283,8 @@ public Mono> createOrUpdateAppComponentsWithResponse(String
      *     ]
      *     nextLink: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -302,31 +312,21 @@ public PagedFlux listMetrics(String testRunId, String metricName, St /** * List the dimension values for the given metric dimension name. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Query Parameters
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: + * "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * String
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -352,10 +352,10 @@ public PagedFlux listMetricDimensionValues(String testRunId, String /** * Get associated app component (collection of azure resources) for the given test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -374,7 +374,8 @@ public PagedFlux listMetricDimensionValues(String testRunId, String
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -394,10 +395,10 @@ public Mono> getAppComponentsWithResponse(String testRunId, /** * List server metrics configuration for the given test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testRunId: String (Optional)
      *     metrics (Optional): {
@@ -417,7 +418,8 @@ public Mono> getAppComponentsWithResponse(String testRunId,
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -465,7 +467,8 @@ public Mono> getServerMetricsConfigWithResponse(String test *

* Request Body Schema * - *

{@code
+     * 
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -569,12 +572,14 @@ public Mono> getServerMetricsConfigWithResponse(String test
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* *

* Response Body Schema * - *

{@code
+     * 
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -678,7 +683,8 @@ public Mono> getServerMetricsConfigWithResponse(String test
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -698,10 +704,10 @@ Mono> createOrUpdateTestRunWithResponse(String testRunId, B /** * Get test run details by name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -805,7 +811,8 @@ Mono> createOrUpdateTestRunWithResponse(String testRunId, B
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -842,10 +849,10 @@ public Mono> deleteTestRunWithResponse(String testRunId, RequestO /** * Get test run file by file name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -854,7 +861,8 @@ public Mono> deleteTestRunWithResponse(String testRunId, RequestO
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -875,67 +883,28 @@ public Mono> getTestRunFileWithResponse(String testRunId, S /** * Get all test runs with given filters. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - - * executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - description, executedUser. For example, to search - * for a test run, with description 500 VUs, the search parameter can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: + * executedDateTime asc. Supported fields - executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - + * description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter + * can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of + * test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run + * execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1039,7 +1008,8 @@ public Mono> getTestRunFileWithResponse(String testRunId, S
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1056,10 +1026,10 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) { /** * Stop test run by name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1163,7 +1133,8 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -1182,10 +1153,10 @@ public Mono> stopTestRunWithResponse(String testRunId, Requ /** * List the metric namespaces for a load test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     value (Required): [
      *          (Required){
@@ -1194,7 +1165,8 @@ public Mono> stopTestRunWithResponse(String testRunId, Requ
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -1214,10 +1186,10 @@ public Mono> getMetricNamespacesWithResponse(String testRun /** * List the metric definitions for a load test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     value (Required): [
      *          (Required){
@@ -1243,7 +1215,8 @@ public Mono> getMetricNamespacesWithResponse(String testRun
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java index 205525905ef11..037b7ea9c607b 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java @@ -18,7 +18,6 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.polling.SyncPoller; import com.azure.developer.loadtesting.implementation.LoadTestRunsImpl; - import java.time.Duration; /** @@ -26,6 +25,7 @@ */ @ServiceClient(builder = LoadTestRunClientBuilder.class) public final class LoadTestRunClient { + @Generated private final LoadTestRunsImpl serviceClient; @@ -41,10 +41,10 @@ public final class LoadTestRunClient { /** * Configure server metrics for a test run. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     testRunId: String (Optional)
      *     metrics (Optional): {
@@ -64,11 +64,13 @@ public final class LoadTestRunClient {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testRunId: String (Optional)
      *     metrics (Optional): {
@@ -88,7 +90,8 @@ public final class LoadTestRunClient {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -136,10 +139,10 @@ public SyncPoller beginTestRun(String testRunId, BinaryD /** * Associate an app component (collection of azure resources) to a test run. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -158,11 +161,13 @@ public SyncPoller beginTestRun(String testRunId, BinaryD
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -181,7 +186,8 @@ public SyncPoller beginTestRun(String testRunId, BinaryD
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -249,7 +255,9 @@ public Response createOrUpdateAppComponentsWithResponse(String testR *

* Request Body Schema *

- *
{@code
+     * 
+     * 
+     * {@code
      * {
      *     filters (Optional): [
      *          (Optional){
@@ -260,11 +268,15 @@ public Response createOrUpdateAppComponentsWithResponse(String testR
      *         }
      *     ]
      * }
-     * }
+ * } + *
+ * *

* Response Body Schema *

- *
{@code
+     * 
+     * 
+     * {@code
      * {
      *     data (Optional): [
      *          (Optional){
@@ -279,7 +291,8 @@ public Response createOrUpdateAppComponentsWithResponse(String testR
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -307,31 +320,21 @@ public PagedIterable listMetrics(String testRunId, String metricName /** * List the dimension values for the given metric dimension name. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Query Parameters
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: + * "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * String
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -357,10 +360,10 @@ public PagedIterable listMetricDimensionValues(String testRunId, Str /** * Get associated app component (collection of azure resources) for the given test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -379,7 +382,8 @@ public PagedIterable listMetricDimensionValues(String testRunId, Str
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -399,10 +403,10 @@ public Response getAppComponentsWithResponse(String testRunId, Reque /** * List server metrics configuration for the given test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testRunId: String (Optional)
      *     metrics (Optional): {
@@ -422,7 +426,8 @@ public Response getAppComponentsWithResponse(String testRunId, Reque
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -468,7 +473,8 @@ public Response getServerMetricsConfigWithResponse(String testRunId, *

* Request Body Schema * - *

{@code
+     * 
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -572,12 +578,14 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* *

* Response Body Schema * - *

{@code
+     * 
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -681,7 +689,8 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -701,10 +710,10 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD /** * Get test run details by name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -808,7 +817,8 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -845,10 +855,10 @@ public Response deleteTestRunWithResponse(String testRunId, RequestOptions /** * Get test run file by file name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -857,7 +867,8 @@ public Response deleteTestRunWithResponse(String testRunId, RequestOptions
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -878,67 +889,28 @@ public Response getTestRunFileWithResponse(String testRunId, String /** * Get all test runs with given filters. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - - * executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - description, executedUser. For example, to search - * for a test run, with description 500 VUs, the search parameter can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: + * executedDateTime asc. Supported fields - executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - + * description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter + * can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of + * test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run + * execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1042,7 +1014,8 @@ public Response getTestRunFileWithResponse(String testRunId, String
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1059,10 +1032,10 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { /** * Stop test run by name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1166,7 +1139,8 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -1185,10 +1159,10 @@ public Response stopTestRunWithResponse(String testRunId, RequestOpt /** * List the metric namespaces for a load test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     value (Required): [
      *          (Required){
@@ -1197,7 +1171,8 @@ public Response stopTestRunWithResponse(String testRunId, RequestOpt
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -1216,10 +1191,10 @@ public Response getMetricNamespacesWithResponse(String testRunId, Re /** * List the metric definitions for a load test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     value (Required): [
      *          (Required){
@@ -1245,7 +1220,8 @@ public Response getMetricNamespacesWithResponse(String testRunId, Re
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java index afb9cc19afb91..8eef8080f17f7 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java @@ -11,7 +11,6 @@ import com.azure.core.client.traits.TokenCredentialTrait; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; @@ -81,7 +80,7 @@ public LoadTestRunClientBuilder() { @Override public LoadTestRunClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; @@ -253,6 +252,7 @@ public LoadTestRunClientBuilder retryPolicy(RetryPolicy retryPolicy) { */ @Generated private LoadTestingClientImpl buildInnerClient() { + this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); LoadTestingServiceVersion localServiceVersion = (serviceVersion != null) ? serviceVersion : LoadTestingServiceVersion.getLatest(); @@ -274,10 +274,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = new HttpHeaders(); - localClientOptions.getHeaders() - .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue())); - if (headers.getSize() > 0) { + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { policies.add(new AddHeadersPolicy(headers)); } this.pipelinePolicies.stream() @@ -326,4 +324,11 @@ public LoadTestRunClient buildClient() { = CoreUtils.getProperties("azure-developer-loadtesting.properties"); private static final ClientLogger LOGGER = new ClientLogger(LoadTestRunClientBuilder.class); + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationsImpl.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationsImpl.java index ca69e8a0d0388..66fecbd197921 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationsImpl.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationsImpl.java @@ -373,10 +373,10 @@ Response listTestFilesNextSync(@PathParam(value = "nextLink", encode /** * Create a new test or update an existing test. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -444,11 +444,13 @@ Response listTestFilesNextSync(@PathParam(value = "nextLink", encode
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -516,7 +518,8 @@ Response listTestFilesNextSync(@PathParam(value = "nextLink", encode
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -538,10 +541,10 @@ public Mono> createOrUpdateTestWithResponseAsync(String tes /** * Create a new test or update an existing test. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -609,11 +612,13 @@ public Mono> createOrUpdateTestWithResponseAsync(String tes
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -681,7 +686,8 @@ public Mono> createOrUpdateTestWithResponseAsync(String tes
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -741,10 +747,10 @@ public Response deleteTestWithResponse(String testId, RequestOptions reque /** * Get load test details by test name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -812,7 +818,8 @@ public Response deleteTestWithResponse(String testId, RequestOptions reque
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -832,10 +839,10 @@ public Mono> getTestWithResponseAsync(String testId, Reques /** * Get load test details by test name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -903,7 +910,8 @@ public Mono> getTestWithResponseAsync(String testId, Reques
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -924,55 +932,26 @@ public Response getTestWithResponse(String testId, RequestOptions re /** * Get all load tests by the fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - - * lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - displayName, createdBy. For example, to search for - * a test, with display name is Login Test, the search parameter can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: + * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - + * displayName, createdBy. For example, to search for a test, with display name is Login Test, the search parameter + * can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) + * of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of + * the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1040,7 +1019,8 @@ public Response getTestWithResponse(String testId, RequestOptions re
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1064,55 +1044,26 @@ private Mono> listTestsSinglePageAsync(RequestOptions /** * Get all load tests by the fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - - * lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - displayName, createdBy. For example, to search for - * a test, with display name is Login Test, the search parameter can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: + * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - + * displayName, createdBy. For example, to search for a test, with display name is Login Test, the search parameter + * can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) + * of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of + * the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1180,7 +1131,8 @@ private Mono> listTestsSinglePageAsync(RequestOptions
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1223,55 +1175,26 @@ public PagedFlux listTestsAsync(RequestOptions requestOptions) { /** * Get all load tests by the fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - - * lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - displayName, createdBy. For example, to search for - * a test, with display name is Login Test, the search parameter can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: + * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - + * displayName, createdBy. For example, to search for a test, with display name is Login Test, the search parameter + * can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) + * of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of + * the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1339,7 +1262,8 @@ public PagedFlux listTestsAsync(RequestOptions requestOptions) {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1362,55 +1286,26 @@ private PagedResponse listTestsSinglePage(RequestOptions requestOpti /** * Get all load tests by the fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - - * lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - displayName, createdBy. For example, to search for - * a test, with display name is Login Test, the search parameter can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: + * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - + * displayName, createdBy. For example, to search for a test, with display name is Login Test, the search parameter + * can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) + * of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of + * the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1478,7 +1373,8 @@ private PagedResponse listTestsSinglePage(RequestOptions requestOpti
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1521,35 +1417,26 @@ public PagedIterable listTests(RequestOptions requestOptions) { /** * Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the * given test will be overwritten. File should be provided in the request body as application/octet-stream. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Query Parameters
NameTypeRequiredDescription
fileTypeStringNoFile type. Allowed values: "JMX_FILE", "USER_PROPERTIES", "ADDITIONAL_ARTIFACTS".
NameTypeRequiredDescription
fileTypeStringNoFile type. Allowed values: "JMX_FILE", "USER_PROPERTIES", + * "ADDITIONAL_ARTIFACTS".
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * BinaryData
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -1558,7 +1445,8 @@ public PagedIterable listTests(RequestOptions requestOptions) {
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -1582,35 +1470,26 @@ public Mono> uploadTestFileWithResponseAsync(String testId, /** * Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the * given test will be overwritten. File should be provided in the request body as application/octet-stream. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Query Parameters
NameTypeRequiredDescription
fileTypeStringNoFile type. Allowed values: "JMX_FILE", "USER_PROPERTIES", "ADDITIONAL_ARTIFACTS".
NameTypeRequiredDescription
fileTypeStringNoFile type. Allowed values: "JMX_FILE", "USER_PROPERTIES", + * "ADDITIONAL_ARTIFACTS".
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * BinaryData
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -1619,7 +1498,8 @@ public Mono> uploadTestFileWithResponseAsync(String testId,
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -1642,10 +1522,10 @@ public Response uploadTestFileWithResponse(String testId, String fil /** * Get test file by the file name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -1654,7 +1534,8 @@ public Response uploadTestFileWithResponse(String testId, String fil
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -1676,10 +1557,10 @@ public Mono> getTestFileWithResponseAsync(String testId, St /** * Get test file by the file name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -1688,7 +1569,8 @@ public Mono> getTestFileWithResponseAsync(String testId, St
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -1750,10 +1632,10 @@ public Response deleteTestFileWithResponse(String testId, String fileName, /** * Get all test files. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -1762,7 +1644,8 @@ public Response deleteTestFileWithResponse(String testId, String fileName,
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -1785,10 +1668,10 @@ private Mono> listTestFilesSinglePageAsync(String test /** * Get all test files. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -1797,7 +1680,8 @@ private Mono> listTestFilesSinglePageAsync(String test
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -1819,10 +1703,10 @@ public PagedFlux listTestFilesAsync(String testId, RequestOptions re /** * Get all test files. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -1831,7 +1715,8 @@ public PagedFlux listTestFilesAsync(String testId, RequestOptions re
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -1853,10 +1738,10 @@ private PagedResponse listTestFilesSinglePage(String testId, Request /** * Get all test files. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -1865,7 +1750,8 @@ private PagedResponse listTestFilesSinglePage(String testId, Request
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -1887,10 +1773,10 @@ public PagedIterable listTestFiles(String testId, RequestOptions req /** * Associate an app component (collection of azure resources) to a test. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -1909,11 +1795,13 @@ public PagedIterable listTestFiles(String testId, RequestOptions req
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -1932,7 +1820,8 @@ public PagedIterable listTestFiles(String testId, RequestOptions req
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -1954,10 +1843,10 @@ public Mono> createOrUpdateAppComponentsWithResponseAsync(S /** * Associate an app component (collection of azure resources) to a test. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -1976,11 +1865,13 @@ public Mono> createOrUpdateAppComponentsWithResponseAsync(S
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -1999,7 +1890,8 @@ public Mono> createOrUpdateAppComponentsWithResponseAsync(S
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -2021,10 +1913,10 @@ public Response createOrUpdateAppComponentsWithResponse(String testI /** * Get associated app component (collection of azure resources) for the given test. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -2043,7 +1935,8 @@ public Response createOrUpdateAppComponentsWithResponse(String testI
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -2064,10 +1957,10 @@ public Mono> getAppComponentsWithResponseAsync(String testI /** * Get associated app component (collection of azure resources) for the given test. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -2086,7 +1979,8 @@ public Mono> getAppComponentsWithResponseAsync(String testI
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -2106,10 +2000,10 @@ public Response getAppComponentsWithResponse(String testId, RequestO /** * Configure server metrics for a test. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     testId: String (Optional)
      *     metrics (Optional): {
@@ -2129,11 +2023,13 @@ public Response getAppComponentsWithResponse(String testId, RequestO
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testId: String (Optional)
      *     metrics (Optional): {
@@ -2153,7 +2049,8 @@ public Response getAppComponentsWithResponse(String testId, RequestO
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -2175,10 +2072,10 @@ public Mono> createOrUpdateServerMetricsConfigWithResponseA /** * Configure server metrics for a test. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     testId: String (Optional)
      *     metrics (Optional): {
@@ -2198,11 +2095,13 @@ public Mono> createOrUpdateServerMetricsConfigWithResponseA
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testId: String (Optional)
      *     metrics (Optional): {
@@ -2222,7 +2121,8 @@ public Mono> createOrUpdateServerMetricsConfigWithResponseA
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -2244,10 +2144,10 @@ public Response createOrUpdateServerMetricsConfigWithResponse(String /** * List server metrics configuration for the given test. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testId: String (Optional)
      *     metrics (Optional): {
@@ -2267,7 +2167,8 @@ public Response createOrUpdateServerMetricsConfigWithResponse(String
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -2288,10 +2189,10 @@ public Mono> getServerMetricsConfigWithResponseAsync(String /** * List server metrics configuration for the given test. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testId: String (Optional)
      *     metrics (Optional): {
@@ -2311,7 +2212,8 @@ public Mono> getServerMetricsConfigWithResponseAsync(String
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -2331,10 +2233,10 @@ public Response getServerMetricsConfigWithResponse(String testId, Re /** * Get the next page of items. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -2402,11 +2304,10 @@ public Response getServerMetricsConfigWithResponse(String testId, Re
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- * - * @param nextLink The URL to get the next list of items + * } + *
* - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -2427,10 +2328,10 @@ private Mono> listTestsNextSinglePageAsync(String next /** * Get the next page of items. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -2498,11 +2399,10 @@ private Mono> listTestsNextSinglePageAsync(String next
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- * - * @param nextLink The URL to get the next list of items + * } + *
* - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -2521,10 +2421,10 @@ private PagedResponse listTestsNextSinglePage(String nextLink, Reque /** * Get the next page of items. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -2533,11 +2433,10 @@ private PagedResponse listTestsNextSinglePage(String nextLink, Reque
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
- * - * @param nextLink The URL to get the next list of items + * } + *
* - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -2557,10 +2456,10 @@ private Mono> listTestFilesNextSinglePageAsync(String /** * Get the next page of items. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -2569,11 +2468,10 @@ private Mono> listTestFilesNextSinglePageAsync(String
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
- * - * @param nextLink The URL to get the next list of items + * } + *
* - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunsImpl.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunsImpl.java index 3964844777f85..f585a0d8af1f6 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunsImpl.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunsImpl.java @@ -443,31 +443,19 @@ Response listMetricDimensionValuesNextSync( /** * Create and start a new test run with the given name. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Query Parameters
NameTypeRequiredDescription
oldTestRunIdStringNoExisting test run identifier that should be rerun, if this is provided, the test will run with the JMX file, - * configuration and app components from the existing test run. You can override the configuration values for new - * test run in the request body.
NameTypeRequiredDescription
oldTestRunIdStringNoExisting test run identifier that should be rerun, if this + * is provided, the test will run with the JMX file, configuration and app components from the existing test run. + * You can override the configuration values for new test run in the request body.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -571,11 +559,13 @@ Response listMetricDimensionValuesNextSync(
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -679,7 +669,8 @@ Response listMetricDimensionValuesNextSync(
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -701,31 +692,19 @@ public Mono> createOrUpdateTestRunWithResponseAsync(String /** * Create and start a new test run with the given name. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Query Parameters
NameTypeRequiredDescription
oldTestRunIdStringNoExisting test run identifier that should be rerun, if this is provided, the test will run with the JMX file, - * configuration and app components from the existing test run. You can override the configuration values for new - * test run in the request body.
NameTypeRequiredDescription
oldTestRunIdStringNoExisting test run identifier that should be rerun, if this + * is provided, the test will run with the JMX file, configuration and app components from the existing test run. + * You can override the configuration values for new test run in the request body.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -829,11 +808,13 @@ public Mono> createOrUpdateTestRunWithResponseAsync(String
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -937,7 +918,8 @@ public Mono> createOrUpdateTestRunWithResponseAsync(String
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -959,10 +941,10 @@ public Response createOrUpdateTestRunWithResponse(String testRunId, /** * Get test run details by name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1066,7 +1048,8 @@ public Response createOrUpdateTestRunWithResponse(String testRunId,
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -1086,10 +1069,10 @@ public Mono> getTestRunWithResponseAsync(String testRunId, /** * Get test run details by name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1193,7 +1176,8 @@ public Mono> getTestRunWithResponseAsync(String testRunId,
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -1251,10 +1235,10 @@ public Response deleteTestRunWithResponse(String testRunId, RequestOptions /** * Get test run file by file name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -1263,7 +1247,8 @@ public Response deleteTestRunWithResponse(String testRunId, RequestOptions
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -1285,10 +1270,10 @@ public Mono> getTestRunFileWithResponseAsync(String testRun /** * Get test run file by file name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     url: String (Optional)
      *     fileName: String (Optional)
@@ -1297,7 +1282,8 @@ public Mono> getTestRunFileWithResponseAsync(String testRun
      *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *     validationFailureDetails: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -1319,67 +1305,28 @@ public Response getTestRunFileWithResponse(String testRunId, String /** * Get all test runs with given filters. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - - * executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - description, executedUser. For example, to search - * for a test run, with description 500 VUs, the search parameter can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: + * executedDateTime asc. Supported fields - executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - + * description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter + * can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of + * test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run + * execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1483,7 +1430,8 @@ public Response getTestRunFileWithResponse(String testRunId, String
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1505,67 +1453,28 @@ private Mono> listTestRunsSinglePageAsync(RequestOptio /** * Get all test runs with given filters. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - - * executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - description, executedUser. For example, to search - * for a test run, with description 500 VUs, the search parameter can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: + * executedDateTime asc. Supported fields - executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - + * description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter + * can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of + * test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run + * execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1669,7 +1578,8 @@ private Mono> listTestRunsSinglePageAsync(RequestOptio
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1709,67 +1619,28 @@ public PagedFlux listTestRunsAsync(RequestOptions requestOptions) { /** * Get all test runs with given filters. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - - * executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - description, executedUser. For example, to search - * for a test run, with description 500 VUs, the search parameter can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: + * executedDateTime asc. Supported fields - executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - + * description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter + * can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of + * test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run + * execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -1873,7 +1744,8 @@ public PagedFlux listTestRunsAsync(RequestOptions requestOptions) {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1893,67 +1765,28 @@ private PagedResponse listTestRunsSinglePage(RequestOptions requestO /** * Get all test runs with given filters. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - - * executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - description, executedUser. For example, to search - * for a test run, with description 500 VUs, the search parameter can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: + * executedDateTime asc. Supported fields - executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - + * description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter + * can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of + * test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run + * execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -2057,7 +1890,8 @@ private PagedResponse listTestRunsSinglePage(RequestOptions requestO
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -2097,10 +1931,10 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { /** * Stop test run by name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -2204,7 +2038,8 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) {
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -2224,10 +2059,10 @@ public Mono> stopTestRunWithResponseAsync(String testRunId, /** * Stop test run by name. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -2331,7 +2166,8 @@ public Mono> stopTestRunWithResponseAsync(String testRunId,
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -2351,10 +2187,10 @@ public Response stopTestRunWithResponse(String testRunId, RequestOpt /** * List the metric namespaces for a load test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     value (Required): [
      *          (Required){
@@ -2363,7 +2199,8 @@ public Response stopTestRunWithResponse(String testRunId, RequestOpt
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -2385,10 +2222,10 @@ public Mono> getMetricNamespacesWithResponseAsync(String te /** * List the metric namespaces for a load test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     value (Required): [
      *          (Required){
@@ -2397,7 +2234,8 @@ public Mono> getMetricNamespacesWithResponseAsync(String te
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -2417,10 +2255,10 @@ public Response getMetricNamespacesWithResponse(String testRunId, Re /** * List the metric definitions for a load test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     value (Required): [
      *          (Required){
@@ -2446,7 +2284,8 @@ public Response getMetricNamespacesWithResponse(String testRunId, Re
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -2469,10 +2308,10 @@ public Mono> getMetricDefinitionsWithResponseAsync(String t /** * List the metric definitions for a load test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     value (Required): [
      *          (Required){
@@ -2498,7 +2337,8 @@ public Mono> getMetricDefinitionsWithResponseAsync(String t
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -2520,54 +2360,27 @@ public Response getMetricDefinitionsWithResponse(String testRunId, S /** * List the metric values for a load test run. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * *
Query Parameters
NameTypeRequiredDescription
aggregationStringNoThe aggregation
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
NameTypeRequiredDescription
aggregationStringNoThe aggregation
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: + * "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Header Parameters - *

+ *

Header Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: "application/json".
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
* You can add these to a request with {@link RequestOptions#addHeader} - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     filters (Optional): [
      *          (Optional){
@@ -2578,11 +2391,13 @@ public Response getMetricDefinitionsWithResponse(String testRunId, S
      *         }
      *     ]
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     data (Optional): [
      *          (Optional){
@@ -2597,7 +2412,8 @@ public Response getMetricDefinitionsWithResponse(String testRunId, S
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -2633,54 +2449,27 @@ private Mono> listMetricsSinglePageAsync(String testRu /** * List the metric values for a load test run. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * *
Query Parameters
NameTypeRequiredDescription
aggregationStringNoThe aggregation
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
NameTypeRequiredDescription
aggregationStringNoThe aggregation
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: + * "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Header Parameters - *

+ *

Header Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: "application/json".
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
* You can add these to a request with {@link RequestOptions#addHeader} - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     filters (Optional): [
      *          (Optional){
@@ -2691,11 +2480,13 @@ private Mono> listMetricsSinglePageAsync(String testRu
      *         }
      *     ]
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     data (Optional): [
      *          (Optional){
@@ -2710,7 +2501,8 @@ private Mono> listMetricsSinglePageAsync(String testRu
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -2738,54 +2530,27 @@ public PagedFlux listMetricsAsync(String testRunId, String metricNam /** * List the metric values for a load test run. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * *
Query Parameters
NameTypeRequiredDescription
aggregationStringNoThe aggregation
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
NameTypeRequiredDescription
aggregationStringNoThe aggregation
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: + * "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Header Parameters - *

+ *

Header Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: "application/json".
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
* You can add these to a request with {@link RequestOptions#addHeader} - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     filters (Optional): [
      *          (Optional){
@@ -2796,11 +2561,13 @@ public PagedFlux listMetricsAsync(String testRunId, String metricNam
      *         }
      *     ]
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     data (Optional): [
      *          (Optional){
@@ -2815,7 +2582,8 @@ public PagedFlux listMetricsAsync(String testRunId, String metricNam
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -2849,54 +2617,27 @@ private PagedResponse listMetricsSinglePage(String testRunId, String /** * List the metric values for a load test run. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * *
Query Parameters
NameTypeRequiredDescription
aggregationStringNoThe aggregation
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
NameTypeRequiredDescription
aggregationStringNoThe aggregation
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: + * "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Header Parameters - *

+ *

Header Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: "application/json".
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
* You can add these to a request with {@link RequestOptions#addHeader} - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     filters (Optional): [
      *          (Optional){
@@ -2907,11 +2648,13 @@ private PagedResponse listMetricsSinglePage(String testRunId, String
      *         }
      *     ]
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     data (Optional): [
      *          (Optional){
@@ -2926,7 +2669,8 @@ private PagedResponse listMetricsSinglePage(String testRunId, String
      *         }
      *     ]
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -2954,31 +2698,21 @@ public PagedIterable listMetrics(String testRunId, String metricName /** * List the dimension values for the given metric dimension name. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Query Parameters
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: + * "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * String
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -3008,31 +2742,21 @@ private Mono> listMetricDimensionValuesSinglePageAsync /** * List the dimension values for the given metric dimension name. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Query Parameters
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: + * "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * String
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -3062,31 +2786,21 @@ public PagedFlux listMetricDimensionValuesAsync(String testRunId, St /** * List the dimension values for the given metric dimension name. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Query Parameters
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: + * "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * String
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -3115,31 +2829,21 @@ private PagedResponse listMetricDimensionValuesSinglePage(String tes /** * List the dimension values for the given metric dimension name. - *

- * Query Parameters - *

+ *

Query Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * + * + * *
Query Parameters
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: + * "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
* You can add these to a request with {@link RequestOptions#addQueryParam} - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * String
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -3169,10 +2873,10 @@ public PagedIterable listMetricDimensionValues(String testRunId, Str /** * Associate an app component (collection of azure resources) to a test run. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -3191,11 +2895,13 @@ public PagedIterable listMetricDimensionValues(String testRunId, Str
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -3214,7 +2920,8 @@ public PagedIterable listMetricDimensionValues(String testRunId, Str
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -3236,10 +2943,10 @@ public Mono> createOrUpdateAppComponentsWithResponseAsync(S /** * Associate an app component (collection of azure resources) to a test run. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -3258,11 +2965,13 @@ public Mono> createOrUpdateAppComponentsWithResponseAsync(S
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -3281,7 +2990,8 @@ public Mono> createOrUpdateAppComponentsWithResponseAsync(S
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -3303,10 +3013,10 @@ public Response createOrUpdateAppComponentsWithResponse(String testR /** * Get associated app component (collection of azure resources) for the given test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -3325,7 +3035,8 @@ public Response createOrUpdateAppComponentsWithResponse(String testR
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -3347,10 +3058,10 @@ public Mono> getAppComponentsWithResponseAsync(String testR /** * Get associated app component (collection of azure resources) for the given test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     components (Required): {
      *         String (Required): {
@@ -3369,7 +3080,8 @@ public Mono> getAppComponentsWithResponseAsync(String testR
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -3390,10 +3102,10 @@ public Response getAppComponentsWithResponse(String testRunId, Reque /** * Configure server metrics for a test run. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     testRunId: String (Optional)
      *     metrics (Optional): {
@@ -3413,11 +3125,13 @@ public Response getAppComponentsWithResponse(String testRunId, Reque
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testRunId: String (Optional)
      *     metrics (Optional): {
@@ -3437,7 +3151,8 @@ public Response getAppComponentsWithResponse(String testRunId, Reque
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -3460,10 +3175,10 @@ public Mono> createOrUpdateServerMetricsConfigWithResponseA /** * Configure server metrics for a test run. - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * {
      *     testRunId: String (Optional)
      *     metrics (Optional): {
@@ -3483,11 +3198,13 @@ public Mono> createOrUpdateServerMetricsConfigWithResponseA
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- *

- * Response Body Schema - *

- *
{@code
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testRunId: String (Optional)
      *     metrics (Optional): {
@@ -3507,7 +3224,8 @@ public Mono> createOrUpdateServerMetricsConfigWithResponseA
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -3529,10 +3247,10 @@ public Response createOrUpdateServerMetricsConfigWithResponse(String /** * List server metrics configuration for the given test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testRunId: String (Optional)
      *     metrics (Optional): {
@@ -3552,7 +3270,8 @@ public Response createOrUpdateServerMetricsConfigWithResponse(String
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -3574,10 +3293,10 @@ public Mono> getServerMetricsConfigWithResponseAsync(String /** * List server metrics configuration for the given test run. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     testRunId: String (Optional)
      *     metrics (Optional): {
@@ -3597,7 +3316,8 @@ public Mono> getServerMetricsConfigWithResponseAsync(String
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
+ * } + *
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. @@ -3617,10 +3337,10 @@ public Response getServerMetricsConfigWithResponse(String testRunId, /** * Get the next page of items. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -3724,11 +3444,10 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- * - * @param nextLink The URL to get the next list of items + * } + *
* - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3748,10 +3467,10 @@ private Mono> listTestRunsNextSinglePageAsync(String n /** * Get the next page of items. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
@@ -3855,11 +3574,10 @@ private Mono> listTestRunsNextSinglePageAsync(String n
      *     lastModifiedDateTime: OffsetDateTime (Optional)
      *     lastModifiedBy: String (Optional)
      * }
-     * }
- * - * @param nextLink The URL to get the next list of items + * } + *
* - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3878,10 +3596,10 @@ private PagedResponse listTestRunsNextSinglePage(String nextLink, Re /** * Get the next page of items. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     data (Optional): [
      *          (Optional){
@@ -3896,11 +3614,10 @@ private PagedResponse listTestRunsNextSinglePage(String nextLink, Re
      *         }
      *     ]
      * }
-     * }
- * - * @param nextLink The URL to get the next list of items + * } + *
* - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3921,10 +3638,10 @@ private Mono> listMetricsNextSinglePageAsync(String ne /** * Get the next page of items. - *

- * Response Body Schema - *

- *
{@code
+     * 

Response Body Schema

+ * + *
+     * {@code
      * {
      *     data (Optional): [
      *          (Optional){
@@ -3939,11 +3656,10 @@ private Mono> listMetricsNextSinglePageAsync(String ne
      *         }
      *     ]
      * }
-     * }
- * - * @param nextLink The URL to get the next list of items + * } + *
* - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3962,16 +3678,15 @@ private PagedResponse listMetricsNextSinglePage(String nextLink, Req /** * Get the next page of items. - *

- * Response Body Schema - *

- *
{@code
-     * String
-     * }
+ *

Response Body Schema

* - * @param nextLink The URL to get the next list of items + *
+     * {@code
+     * String
+     * }
+     * 
* - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3992,16 +3707,15 @@ private Mono> listMetricDimensionValuesNextSinglePageA /** * Get the next page of items. - *

- * Response Body Schema - *

- *
{@code
-     * String
-     * }
+ *

Response Body Schema

* - * @param nextLink The URL to get the next list of items + *
+     * {@code
+     * String
+     * }
+     * 
* - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. diff --git a/sdk/loadtesting/azure-developer-loadtesting/swagger/autorest.md b/sdk/loadtesting/azure-developer-loadtesting/swagger/autorest.md index 42a36534b9793..4ee7b662c5b0d 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/swagger/autorest.md +++ b/sdk/loadtesting/azure-developer-loadtesting/swagger/autorest.md @@ -29,7 +29,7 @@ autorest ### Configuration ```yaml -use: '@autorest/java@4.1.26' +use: '@autorest/java@4.1.39' output-folder: ../ java: true input-file: https://github.com/Azure/azure-rest-api-specs/blob/3e27c70e7c02c07b458bc0e94716c3d82d3fdd19/specification/loadtestservice/data-plane/Microsoft.LoadTestService/stable/2022-11-01/loadtestservice.json diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/MetricsAdvisorClient.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/MetricsAdvisorClient.java index d7a608679d49b..15619e6b1fbf6 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/MetricsAdvisorClient.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/MetricsAdvisorClient.java @@ -14,7 +14,7 @@ import com.azure.ai.metricsadvisor.implementation.models.ChangePointFeedbackValue; import com.azure.ai.metricsadvisor.implementation.models.CommentFeedback; import com.azure.ai.metricsadvisor.implementation.models.CommentFeedbackValue; -import com.azure.ai.metricsadvisor.implementation.models.CreateMetricFeedbackResponse; +import com.azure.ai.metricsadvisor.implementation.models.CreateMetricFeedbackHeaders; import com.azure.ai.metricsadvisor.implementation.models.DetectionAnomalyResultQuery; import com.azure.ai.metricsadvisor.implementation.models.DetectionIncidentResultQuery; import com.azure.ai.metricsadvisor.implementation.models.DetectionSeriesQuery; @@ -74,6 +74,7 @@ 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.ResponseBase; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; @@ -1706,7 +1707,7 @@ private Response addFeedbackWithResponseSync(String metricId, Me } else { throw logger.logExceptionAsError(new IllegalArgumentException("Unknown feedback type.")); } - CreateMetricFeedbackResponse createdMetricFeedbackResponse + ResponseBase createdMetricFeedbackResponse = service.createMetricFeedbackWithResponse(innerMetricFeedback, context); return getFeedbackWithResponse( parseOperationId(createdMetricFeedbackResponse.getDeserializedHeaders().getLocation()), context); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClient.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClient.java index 3f0ef303cba8b..d5f77cadc2baa 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClient.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClient.java @@ -28,11 +28,11 @@ import com.azure.ai.metricsadvisor.implementation.models.AnomalyAlertingConfiguration; import com.azure.ai.metricsadvisor.implementation.models.AnomalyAlertingConfigurationPatch; import com.azure.ai.metricsadvisor.implementation.models.AnomalyDetectionConfigurationPatch; -import com.azure.ai.metricsadvisor.implementation.models.CreateAnomalyAlertingConfigurationResponse; -import com.azure.ai.metricsadvisor.implementation.models.CreateAnomalyDetectionConfigurationResponse; -import com.azure.ai.metricsadvisor.implementation.models.CreateCredentialResponse; -import com.azure.ai.metricsadvisor.implementation.models.CreateDataFeedResponse; -import com.azure.ai.metricsadvisor.implementation.models.CreateHookResponse; +import com.azure.ai.metricsadvisor.implementation.models.CreateAnomalyAlertingConfigurationHeaders; +import com.azure.ai.metricsadvisor.implementation.models.CreateAnomalyDetectionConfigurationHeaders; +import com.azure.ai.metricsadvisor.implementation.models.CreateCredentialHeaders; +import com.azure.ai.metricsadvisor.implementation.models.CreateDataFeedHeaders; +import com.azure.ai.metricsadvisor.implementation.models.CreateHookHeaders; import com.azure.ai.metricsadvisor.implementation.models.DataFeedDetail; import com.azure.ai.metricsadvisor.implementation.models.DataSourceCredential; import com.azure.ai.metricsadvisor.implementation.models.DataSourceCredentialPatch; @@ -293,46 +293,47 @@ Response createDataFeedWithResponseSync(DataFeed dataFeed, Context con ? new DataFeedMissingDataPointFillSettings() : finalDataFeedOptions.getMissingDataPointFillSettings(); - CreateDataFeedResponse createDataFeedResponse = service.createDataFeedWithResponse(DataFeedTransforms - .toDataFeedDetailSource(dataFeed.getSource()) - .setDataFeedName(dataFeed.getName()) - .setDataFeedDescription(finalDataFeedOptions.getDescription()) - .setGranularityName(Granularity.fromString(dataFeedGranularity.getGranularityType() == null - ? null - : dataFeedGranularity.getGranularityType().toString())) - .setGranularityAmount(dataFeedGranularity.getCustomGranularityValue()) - .setDimension(DataFeedTransforms.toInnerDimensionsListForCreate(dataFeedSchema.getDimensions())) - .setMetrics(DataFeedTransforms.toInnerMetricsListForCreate(dataFeedSchema.getMetrics())) - .setTimestampColumn(dataFeedSchema.getTimestampColumn()) - .setDataStartFrom(dataFeedIngestionSettings.getIngestionStartTime()) - .setStartOffsetInSeconds(dataFeedIngestionSettings.getIngestionStartOffset() == null - ? null - : dataFeedIngestionSettings.getIngestionStartOffset().getSeconds()) - .setMaxConcurrency(dataFeedIngestionSettings.getDataSourceRequestConcurrency()) - .setStopRetryAfterInSeconds(dataFeedIngestionSettings.getStopRetryAfter() == null - ? null - : dataFeedIngestionSettings.getStopRetryAfter().getSeconds()) - .setMinRetryIntervalInSeconds(dataFeedIngestionSettings.getIngestionRetryDelay() == null - ? null - : dataFeedIngestionSettings.getIngestionRetryDelay().getSeconds()) - .setRollUpColumns(dataFeedRollupSettings.getAutoRollupGroupByColumnNames()) - .setRollUpMethod(RollUpMethod.fromString(dataFeedRollupSettings.getDataFeedAutoRollUpMethod() == null - ? null - : dataFeedRollupSettings.getDataFeedAutoRollUpMethod().toString())) - .setNeedRollup(NeedRollupEnum.fromString(dataFeedRollupSettings.getRollupType() == null - ? null - : dataFeedRollupSettings.getRollupType().toString())) - .setAllUpIdentification(dataFeedRollupSettings.getRollupIdentificationValue()) - .setFillMissingPointType( - FillMissingPointType.fromString(dataFeedMissingDataPointFillSettings.getFillType() == null + ResponseBase createDataFeedResponse + = service.createDataFeedWithResponse(DataFeedTransforms.toDataFeedDetailSource(dataFeed.getSource()) + .setDataFeedName(dataFeed.getName()) + .setDataFeedDescription(finalDataFeedOptions.getDescription()) + .setGranularityName(Granularity.fromString(dataFeedGranularity.getGranularityType() == null + ? null + : dataFeedGranularity.getGranularityType().toString())) + .setGranularityAmount(dataFeedGranularity.getCustomGranularityValue()) + .setDimension(DataFeedTransforms.toInnerDimensionsListForCreate(dataFeedSchema.getDimensions())) + .setMetrics(DataFeedTransforms.toInnerMetricsListForCreate(dataFeedSchema.getMetrics())) + .setTimestampColumn(dataFeedSchema.getTimestampColumn()) + .setDataStartFrom(dataFeedIngestionSettings.getIngestionStartTime()) + .setStartOffsetInSeconds(dataFeedIngestionSettings.getIngestionStartOffset() == null + ? null + : dataFeedIngestionSettings.getIngestionStartOffset().getSeconds()) + .setMaxConcurrency(dataFeedIngestionSettings.getDataSourceRequestConcurrency()) + .setStopRetryAfterInSeconds(dataFeedIngestionSettings.getStopRetryAfter() == null + ? null + : dataFeedIngestionSettings.getStopRetryAfter().getSeconds()) + .setMinRetryIntervalInSeconds(dataFeedIngestionSettings.getIngestionRetryDelay() == null + ? null + : dataFeedIngestionSettings.getIngestionRetryDelay().getSeconds()) + .setRollUpColumns(dataFeedRollupSettings.getAutoRollupGroupByColumnNames()) + .setRollUpMethod(RollUpMethod.fromString(dataFeedRollupSettings.getDataFeedAutoRollUpMethod() == null + ? null + : dataFeedRollupSettings.getDataFeedAutoRollUpMethod().toString())) + .setNeedRollup(NeedRollupEnum.fromString(dataFeedRollupSettings.getRollupType() == null + ? null + : dataFeedRollupSettings.getRollupType().toString())) + .setAllUpIdentification(dataFeedRollupSettings.getRollupIdentificationValue()) + .setFillMissingPointType( + FillMissingPointType.fromString(dataFeedMissingDataPointFillSettings.getFillType() == null + ? null + : dataFeedMissingDataPointFillSettings.getFillType().toString())) + .setFillMissingPointValue(dataFeedMissingDataPointFillSettings.getCustomFillValue()) + .setViewMode(ViewMode.fromString(finalDataFeedOptions.getAccessMode() == null ? null - : dataFeedMissingDataPointFillSettings.getFillType().toString())) - .setFillMissingPointValue(dataFeedMissingDataPointFillSettings.getCustomFillValue()) - .setViewMode(ViewMode.fromString( - finalDataFeedOptions.getAccessMode() == null ? null : finalDataFeedOptions.getAccessMode().toString())) - .setViewers(finalDataFeedOptions.getViewers()) - .setAdmins(finalDataFeedOptions.getAdmins()) - .setActionLinkTemplate(finalDataFeedOptions.getActionLinkTemplate()), context); + : finalDataFeedOptions.getAccessMode().toString())) + .setViewers(finalDataFeedOptions.getViewers()) + .setAdmins(finalDataFeedOptions.getAdmins()) + .setActionLinkTemplate(finalDataFeedOptions.getActionLinkTemplate()), context); final String dataFeedId = parseOperationId(createDataFeedResponse.getDeserializedHeaders().getLocation()); return getDataFeedWithResponse(dataFeedId, context); @@ -1034,7 +1035,7 @@ Response createDetectionConfigWithResponseSync(St final com.azure.ai.metricsadvisor.implementation.models.AnomalyDetectionConfiguration innerDetectionConfiguration = DetectionConfigurationTransforms.toInnerForCreate(logger, metricId, detectionConfiguration); - CreateAnomalyDetectionConfigurationResponse response + ResponseBase response = service.createAnomalyDetectionConfigurationWithResponse(innerDetectionConfiguration, context); final String configurationId = Utility.parseOperationId(response.getDeserializedHeaders().getLocation()); Response configurationResponse @@ -1760,7 +1761,7 @@ public Response createHookWithResponse(NotificationHook notifi Response createHookWithResponseSync(NotificationHook notificationHook, Context context) { Objects.requireNonNull(notificationHook, "'notificationHook' cannot be null."); - CreateHookResponse response + ResponseBase response = service.createHookWithResponse(HookTransforms.toInnerForCreate(logger, notificationHook), context); final String hookUri = response.getDeserializedHeaders().getLocation(); final String hookId = parseOperationId(hookUri); @@ -2202,7 +2203,7 @@ Response createAlertConfigWithResponseSync(AnomalyAle final AnomalyAlertingConfiguration innerAlertConfiguration = AlertConfigurationTransforms.toInnerForCreate(alertConfiguration); - CreateAnomalyAlertingConfigurationResponse response + ResponseBase response = service.createAnomalyAlertingConfigurationWithResponse(innerAlertConfiguration, context); final String configurationId = parseOperationId(response.getDeserializedHeaders().getLocation()); Response getResponse = getAlertConfigWithResponse(configurationId, context); @@ -2653,7 +2654,8 @@ public DataSourceCredentialEntity createDataSourceCredential(DataSourceCredentia final DataSourceCredential innerDataSourceCredential = DataSourceCredentialEntityTransforms.toInnerForCreate(dataSourceCredential); - CreateCredentialResponse response = service.createCredentialWithResponse(innerDataSourceCredential, context); + ResponseBase response + = service.createCredentialWithResponse(innerDataSourceCredential, context); final String credentialId = Utility.parseOperationId(response.getDeserializedHeaders().getLocation()); Response configurationResponse diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java index 01e386d6f0514..6b8c3b883c46b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java @@ -16,12 +16,12 @@ import com.azure.ai.metricsadvisor.implementation.models.AnomalyDimensionQuery; import com.azure.ai.metricsadvisor.implementation.models.AnomalyResult; import com.azure.ai.metricsadvisor.implementation.models.AnomalyResultList; -import com.azure.ai.metricsadvisor.implementation.models.CreateAnomalyAlertingConfigurationResponse; -import com.azure.ai.metricsadvisor.implementation.models.CreateAnomalyDetectionConfigurationResponse; -import com.azure.ai.metricsadvisor.implementation.models.CreateCredentialResponse; -import com.azure.ai.metricsadvisor.implementation.models.CreateDataFeedResponse; -import com.azure.ai.metricsadvisor.implementation.models.CreateHookResponse; -import com.azure.ai.metricsadvisor.implementation.models.CreateMetricFeedbackResponse; +import com.azure.ai.metricsadvisor.implementation.models.CreateAnomalyAlertingConfigurationHeaders; +import com.azure.ai.metricsadvisor.implementation.models.CreateAnomalyDetectionConfigurationHeaders; +import com.azure.ai.metricsadvisor.implementation.models.CreateCredentialHeaders; +import com.azure.ai.metricsadvisor.implementation.models.CreateDataFeedHeaders; +import com.azure.ai.metricsadvisor.implementation.models.CreateHookHeaders; +import com.azure.ai.metricsadvisor.implementation.models.CreateMetricFeedbackHeaders; import com.azure.ai.metricsadvisor.implementation.models.DataFeedDetail; import com.azure.ai.metricsadvisor.implementation.models.DataFeedDetailPatch; import com.azure.ai.metricsadvisor.implementation.models.DataFeedIngestionProgress; @@ -86,6 +86,7 @@ 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.ResponseBase; import com.azure.core.http.rest.RestProxy; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; @@ -185,8 +186,7 @@ public SerializerAdapter getSerializerAdapter() { } /** - * The interface defining all the services for MetricsAdvisor to be used by the proxy service to perform REST - * calls. + * The interface defining all the services for MetricsAdvisor to be used by the proxy service to perform REST calls. */ @Host("{endpoint}/metricsadvisor/v1.0") @ServiceInterface(name = "MetricsAdvisor") @@ -248,17 +248,31 @@ Response deleteAnomalyAlertingConfigurationSync(@HostParam("endpoint") Str @Post("/alert/anomaly/configurations") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) - Mono createAnomalyAlertingConfiguration( + Mono> createAnomalyAlertingConfiguration( @HostParam("endpoint") String endpoint, @BodyParam("application/json") AnomalyAlertingConfiguration body, @HeaderParam("Accept") String accept, Context context); @Post("/alert/anomaly/configurations") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) - CreateAnomalyAlertingConfigurationResponse createAnomalyAlertingConfigurationSync( + Mono> createAnomalyAlertingConfigurationNoCustomHeaders(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") AnomalyAlertingConfiguration body, @HeaderParam("Accept") String accept, + Context context); + + @Post("/alert/anomaly/configurations") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) + ResponseBase createAnomalyAlertingConfigurationSync( @HostParam("endpoint") String endpoint, @BodyParam("application/json") AnomalyAlertingConfiguration body, @HeaderParam("Accept") String accept, Context context); + @Post("/alert/anomaly/configurations") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) + Response createAnomalyAlertingConfigurationNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") AnomalyAlertingConfiguration body, @HeaderParam("Accept") String accept, + Context context); + @Post("/alert/anomaly/configurations/{configurationId}/alerts/query") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) @@ -352,17 +366,31 @@ Response deleteAnomalyDetectionConfigurationSync(@HostParam("endpoint") St @Post("/enrichment/anomalyDetection/configurations") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) - Mono createAnomalyDetectionConfiguration( + Mono> createAnomalyDetectionConfiguration( @HostParam("endpoint") String endpoint, @BodyParam("application/json") AnomalyDetectionConfiguration body, @HeaderParam("Accept") String accept, Context context); @Post("/enrichment/anomalyDetection/configurations") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) - CreateAnomalyDetectionConfigurationResponse createAnomalyDetectionConfigurationSync( + Mono> createAnomalyDetectionConfigurationNoCustomHeaders(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") AnomalyDetectionConfiguration body, @HeaderParam("Accept") String accept, + Context context); + + @Post("/enrichment/anomalyDetection/configurations") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) + ResponseBase createAnomalyDetectionConfigurationSync( @HostParam("endpoint") String endpoint, @BodyParam("application/json") AnomalyDetectionConfiguration body, @HeaderParam("Accept") String accept, Context context); + @Post("/enrichment/anomalyDetection/configurations") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) + Response createAnomalyDetectionConfigurationNoCustomHeadersSync(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") AnomalyDetectionConfiguration body, @HeaderParam("Accept") String accept, + Context context); + @Get("/enrichment/anomalyDetection/configurations/{configurationId}/alert/anomaly/configurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) @@ -482,14 +510,28 @@ Response getRootCauseOfIncidentByAnomalyDetectionConfigurationSyn @Post("/credentials") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) - Mono createCredential(@HostParam("endpoint") String endpoint, + Mono> createCredential(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") DataSourceCredential body, @HeaderParam("Accept") String accept, + Context context); + + @Post("/credentials") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) + Mono> createCredentialNoCustomHeaders(@HostParam("endpoint") String endpoint, @BodyParam("application/json") DataSourceCredential body, @HeaderParam("Accept") String accept, Context context); @Post("/credentials") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) - CreateCredentialResponse createCredentialSync(@HostParam("endpoint") String endpoint, + ResponseBase createCredentialSync(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") DataSourceCredential body, @HeaderParam("Accept") String accept, + Context context); + + @Post("/credentials") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) + Response createCredentialNoCustomHeadersSync(@HostParam("endpoint") String endpoint, @BodyParam("application/json") DataSourceCredential body, @HeaderParam("Accept") String accept, Context context); @@ -570,13 +612,25 @@ Response listDataFeedsSync(@HostParam("endpoint") String endpoint, @Post("/dataFeeds") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) - Mono createDataFeed(@HostParam("endpoint") String endpoint, + Mono> createDataFeed(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") DataFeedDetail body, @HeaderParam("Accept") String accept, Context context); + + @Post("/dataFeeds") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) + Mono> createDataFeedNoCustomHeaders(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") DataFeedDetail body, @HeaderParam("Accept") String accept, Context context); + + @Post("/dataFeeds") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) + ResponseBase createDataFeedSync(@HostParam("endpoint") String endpoint, @BodyParam("application/json") DataFeedDetail body, @HeaderParam("Accept") String accept, Context context); @Post("/dataFeeds") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) - CreateDataFeedResponse createDataFeedSync(@HostParam("endpoint") String endpoint, + Response createDataFeedNoCustomHeadersSync(@HostParam("endpoint") String endpoint, @BodyParam("application/json") DataFeedDetail body, @HeaderParam("Accept") String accept, Context context); @Get("/dataFeeds/{dataFeedId}") @@ -650,13 +704,26 @@ Response listMetricFeedbacksSync(@HostParam("endpoint") Stri @Post("/feedback/metric") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) - Mono createMetricFeedback(@HostParam("endpoint") String endpoint, + Mono> createMetricFeedback( + @HostParam("endpoint") String endpoint, @BodyParam("application/json") MetricFeedback body, + @HeaderParam("Accept") String accept, Context context); + + @Post("/feedback/metric") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) + Mono> createMetricFeedbackNoCustomHeaders(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") MetricFeedback body, @HeaderParam("Accept") String accept, Context context); + + @Post("/feedback/metric") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) + ResponseBase createMetricFeedbackSync(@HostParam("endpoint") String endpoint, @BodyParam("application/json") MetricFeedback body, @HeaderParam("Accept") String accept, Context context); @Post("/feedback/metric") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) - CreateMetricFeedbackResponse createMetricFeedbackSync(@HostParam("endpoint") String endpoint, + Response createMetricFeedbackNoCustomHeadersSync(@HostParam("endpoint") String endpoint, @BodyParam("application/json") MetricFeedback body, @HeaderParam("Accept") String accept, Context context); @Get("/hooks") @@ -676,13 +743,25 @@ Response listHooksSync(@HostParam("endpoint") String endpoint, @Post("/hooks") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) - Mono createHook(@HostParam("endpoint") String endpoint, + Mono> createHook(@HostParam("endpoint") String endpoint, @BodyParam("application/json") HookInfo body, @HeaderParam("Accept") String accept, Context context); @Post("/hooks") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) - CreateHookResponse createHookSync(@HostParam("endpoint") String endpoint, + Mono> createHookNoCustomHeaders(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") HookInfo body, @HeaderParam("Accept") String accept, Context context); + + @Post("/hooks") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) + ResponseBase createHookSync(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") HookInfo body, @HeaderParam("Accept") String accept, Context context); + + @Post("/hooks") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) + Response createHookNoCustomHeadersSync(@HostParam("endpoint") String endpoint, @BodyParam("application/json") HookInfo body, @HeaderParam("Accept") String accept, Context context); @Get("/hooks/{hookId}") @@ -1113,8 +1192,7 @@ Response getAnomalyDetectionConfigurationsByM */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getActiveSeriesCountWithResponseAsync() { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getActiveSeriesCount(this.getEndpoint(), accept, context)); + return FluxUtil.withContext(context -> getActiveSeriesCountWithResponseAsync(context)); } /** @@ -1197,9 +1275,8 @@ public UsageStats getActiveSeriesCount() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomalyAlertingConfigurationWithResponseAsync(UUID configurationId) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.getAnomalyAlertingConfiguration(this.getEndpoint(), configurationId, accept, context)); + return FluxUtil + .withContext(context -> getAnomalyAlertingConfigurationWithResponseAsync(configurationId, context)); } /** @@ -1295,9 +1372,8 @@ public AnomalyAlertingConfiguration getAnomalyAlertingConfiguration(UUID configu @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateAnomalyAlertingConfigurationWithResponseAsync( UUID configurationId, AnomalyAlertingConfigurationPatch body) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.updateAnomalyAlertingConfiguration(this.getEndpoint(), - configurationId, body, accept, context)); + return FluxUtil.withContext( + context -> updateAnomalyAlertingConfigurationWithResponseAsync(configurationId, body, context)); } /** @@ -1399,9 +1475,8 @@ public AnomalyAlertingConfiguration updateAnomalyAlertingConfiguration(UUID conf */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteAnomalyAlertingConfigurationWithResponseAsync(UUID configurationId) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.deleteAnomalyAlertingConfiguration(this.getEndpoint(), - configurationId, accept, context)); + return FluxUtil + .withContext(context -> deleteAnomalyAlertingConfigurationWithResponseAsync(configurationId, context)); } /** @@ -1487,14 +1562,12 @@ public void deleteAnomalyAlertingConfiguration(UUID configurationId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono + public Mono> createAnomalyAlertingConfigurationWithResponseAsync(AnomalyAlertingConfiguration body) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.createAnomalyAlertingConfiguration(this.getEndpoint(), body, accept, context)); + return FluxUtil.withContext(context -> createAnomalyAlertingConfigurationWithResponseAsync(body, context)); } /** @@ -1505,10 +1578,10 @@ public void deleteAnomalyAlertingConfiguration(UUID configurationId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono + public Mono> createAnomalyAlertingConfigurationWithResponseAsync(AnomalyAlertingConfiguration body, Context context) { final String accept = "application/json"; return service.createAnomalyAlertingConfiguration(this.getEndpoint(), body, accept, context); @@ -1543,6 +1616,22 @@ public Mono createAnomalyAlertingConfigurationAsync(AnomalyAlertingConfigu return createAnomalyAlertingConfigurationWithResponseAsync(body, context).flatMap(ignored -> Mono.empty()); } + /** + * Create anomaly alerting configuration. + * + * @param body anomaly alerting configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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) + public Mono> + createAnomalyAlertingConfigurationNoCustomHeadersWithResponseAsync(AnomalyAlertingConfiguration body) { + return FluxUtil + .withContext(context -> createAnomalyAlertingConfigurationNoCustomHeadersWithResponseAsync(body, context)); + } + /** * Create anomaly alerting configuration. * @@ -1551,10 +1640,27 @@ public Mono createAnomalyAlertingConfigurationAsync(AnomalyAlertingConfigu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createAnomalyAlertingConfigurationNoCustomHeadersWithResponseAsync( + AnomalyAlertingConfiguration body, Context context) { + final String accept = "application/json"; + return service.createAnomalyAlertingConfigurationNoCustomHeaders(this.getEndpoint(), body, accept, context); + } + + /** + * Create anomaly alerting configuration. + * + * @param body anomaly alerting configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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 ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CreateAnomalyAlertingConfigurationResponse + public ResponseBase createAnomalyAlertingConfigurationWithResponse(AnomalyAlertingConfiguration body, Context context) { final String accept = "application/json"; return service.createAnomalyAlertingConfigurationSync(this.getEndpoint(), body, accept, context); @@ -1573,6 +1679,23 @@ public void createAnomalyAlertingConfiguration(AnomalyAlertingConfiguration body createAnomalyAlertingConfigurationWithResponse(body, Context.NONE); } + /** + * Create anomaly alerting configuration. + * + * @param body anomaly alerting configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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 createAnomalyAlertingConfigurationNoCustomHeadersWithResponse( + AnomalyAlertingConfiguration body, Context context) { + final String accept = "application/json"; + return service.createAnomalyAlertingConfigurationNoCustomHeadersSync(this.getEndpoint(), body, accept, context); + } + /** * Query alerts under anomaly alerting configuration. * @@ -2116,9 +2239,8 @@ public PagedIterable getIncidentsFromAlertByAnomalyAlertingConfi @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomalyDetectionConfigurationWithResponseAsync(UUID configurationId) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.getAnomalyDetectionConfiguration(this.getEndpoint(), configurationId, accept, context)); + return FluxUtil + .withContext(context -> getAnomalyDetectionConfigurationWithResponseAsync(configurationId, context)); } /** @@ -2214,9 +2336,8 @@ public AnomalyDetectionConfiguration getAnomalyDetectionConfiguration(UUID confi @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateAnomalyDetectionConfigurationWithResponseAsync( UUID configurationId, AnomalyDetectionConfigurationPatch body) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.updateAnomalyDetectionConfiguration(this.getEndpoint(), - configurationId, body, accept, context)); + return FluxUtil.withContext( + context -> updateAnomalyDetectionConfigurationWithResponseAsync(configurationId, body, context)); } /** @@ -2318,9 +2439,8 @@ public AnomalyDetectionConfiguration updateAnomalyDetectionConfiguration(UUID co */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteAnomalyDetectionConfigurationWithResponseAsync(UUID configurationId) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.deleteAnomalyDetectionConfiguration(this.getEndpoint(), - configurationId, accept, context)); + return FluxUtil + .withContext(context -> deleteAnomalyDetectionConfigurationWithResponseAsync(configurationId, context)); } /** @@ -2406,14 +2526,12 @@ public void deleteAnomalyDetectionConfiguration(UUID configurationId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono + public Mono> createAnomalyDetectionConfigurationWithResponseAsync(AnomalyDetectionConfiguration body) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.createAnomalyDetectionConfiguration(this.getEndpoint(), body, accept, context)); + return FluxUtil.withContext(context -> createAnomalyDetectionConfigurationWithResponseAsync(body, context)); } /** @@ -2424,10 +2542,10 @@ public void deleteAnomalyDetectionConfiguration(UUID configurationId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono + public Mono> createAnomalyDetectionConfigurationWithResponseAsync(AnomalyDetectionConfiguration body, Context context) { final String accept = "application/json"; return service.createAnomalyDetectionConfiguration(this.getEndpoint(), body, accept, context); @@ -2462,6 +2580,22 @@ public Mono createAnomalyDetectionConfigurationAsync(AnomalyDetectionConfi return createAnomalyDetectionConfigurationWithResponseAsync(body, context).flatMap(ignored -> Mono.empty()); } + /** + * Create anomaly detection configuration. + * + * @param body anomaly detection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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) + public Mono> + createAnomalyDetectionConfigurationNoCustomHeadersWithResponseAsync(AnomalyDetectionConfiguration body) { + return FluxUtil + .withContext(context -> createAnomalyDetectionConfigurationNoCustomHeadersWithResponseAsync(body, context)); + } + /** * Create anomaly detection configuration. * @@ -2470,10 +2604,27 @@ public Mono createAnomalyDetectionConfigurationAsync(AnomalyDetectionConfi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createAnomalyDetectionConfigurationNoCustomHeadersWithResponseAsync( + AnomalyDetectionConfiguration body, Context context) { + final String accept = "application/json"; + return service.createAnomalyDetectionConfigurationNoCustomHeaders(this.getEndpoint(), body, accept, context); + } + + /** + * Create anomaly detection configuration. + * + * @param body anomaly detection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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 ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CreateAnomalyDetectionConfigurationResponse + public ResponseBase createAnomalyDetectionConfigurationWithResponse(AnomalyDetectionConfiguration body, Context context) { final String accept = "application/json"; return service.createAnomalyDetectionConfigurationSync(this.getEndpoint(), body, accept, context); @@ -2492,6 +2643,24 @@ public void createAnomalyDetectionConfiguration(AnomalyDetectionConfiguration bo createAnomalyDetectionConfigurationWithResponse(body, Context.NONE); } + /** + * Create anomaly detection configuration. + * + * @param body anomaly detection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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 createAnomalyDetectionConfigurationNoCustomHeadersWithResponse( + AnomalyDetectionConfiguration body, Context context) { + final String accept = "application/json"; + return service.createAnomalyDetectionConfigurationNoCustomHeadersSync(this.getEndpoint(), body, accept, + context); + } + /** * List all anomaly alerting configurations for specific anomaly detection configuration. * @@ -2683,9 +2852,8 @@ public PagedIterable getAnomalyAlertingConfigurati @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getSeriesByAnomalyDetectionConfigurationWithResponseAsync(UUID configurationId, DetectionSeriesQuery body) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getSeriesByAnomalyDetectionConfiguration(this.getEndpoint(), - configurationId, body, accept, context)); + return FluxUtil.withContext( + context -> getSeriesByAnomalyDetectionConfigurationWithResponseAsync(configurationId, body, context)); } /** @@ -3481,10 +3649,8 @@ public PagedIterable getIncidentsByAnomalyDetectionConfiguration @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getRootCauseOfIncidentByAnomalyDetectionConfigurationWithResponseAsync( UUID configurationId, String incidentId) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getRootCauseOfIncidentByAnomalyDetectionConfiguration(this.getEndpoint(), - configurationId, incidentId, accept, context)); + return FluxUtil.withContext(context -> getRootCauseOfIncidentByAnomalyDetectionConfigurationWithResponseAsync( + configurationId, incidentId, context)); } /** @@ -3584,12 +3750,12 @@ public RootCauseList getRootCauseOfIncidentByAnomalyDetectionConfiguration(UUID * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createCredentialWithResponseAsync(DataSourceCredential body) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createCredential(this.getEndpoint(), body, accept, context)); + public Mono> + createCredentialWithResponseAsync(DataSourceCredential body) { + return FluxUtil.withContext(context -> createCredentialWithResponseAsync(body, context)); } /** @@ -3600,11 +3766,11 @@ public Mono createCredentialWithResponseAsync(DataSour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createCredentialWithResponseAsync(DataSourceCredential body, - Context context) { + public Mono> + createCredentialWithResponseAsync(DataSourceCredential body, Context context) { final String accept = "application/json"; return service.createCredential(this.getEndpoint(), body, accept, context); } @@ -3638,6 +3804,20 @@ public Mono createCredentialAsync(DataSourceCredential body, Context conte return createCredentialWithResponseAsync(body, context).flatMap(ignored -> Mono.empty()); } + /** + * Create a new data source credential. + * + * @param body Create data source credential request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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) + public Mono> createCredentialNoCustomHeadersWithResponseAsync(DataSourceCredential body) { + return FluxUtil.withContext(context -> createCredentialNoCustomHeadersWithResponseAsync(body, context)); + } + /** * Create a new data source credential. * @@ -3646,10 +3826,28 @@ public Mono createCredentialAsync(DataSourceCredential body, Context conte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createCredentialNoCustomHeadersWithResponseAsync(DataSourceCredential body, + Context context) { + final String accept = "application/json"; + return service.createCredentialNoCustomHeaders(this.getEndpoint(), body, accept, context); + } + + /** + * Create a new data source credential. + * + * @param body Create data source credential request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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 ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CreateCredentialResponse createCredentialWithResponse(DataSourceCredential body, Context context) { + public ResponseBase createCredentialWithResponse(DataSourceCredential body, + Context context) { final String accept = "application/json"; return service.createCredentialSync(this.getEndpoint(), body, accept, context); } @@ -3667,6 +3865,22 @@ public void createCredential(DataSourceCredential body) { createCredentialWithResponse(body, Context.NONE); } + /** + * Create a new data source credential. + * + * @param body Create data source credential request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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 createCredentialNoCustomHeadersWithResponse(DataSourceCredential body, Context context) { + final String accept = "application/json"; + return service.createCredentialNoCustomHeadersSync(this.getEndpoint(), body, accept, context); + } + /** * List all credentials. * @@ -3825,9 +4039,7 @@ public PagedIterable listCredentials(Integer skip, Integer @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateCredentialWithResponseAsync(UUID credentialId, DataSourceCredentialPatch body) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.updateCredential(this.getEndpoint(), credentialId, body, accept, context)); + return FluxUtil.withContext(context -> updateCredentialWithResponseAsync(credentialId, body, context)); } /** @@ -3925,9 +4137,7 @@ public DataSourceCredential updateCredential(UUID credentialId, DataSourceCreden */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteCredentialWithResponseAsync(UUID credentialId) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.deleteCredential(this.getEndpoint(), credentialId, accept, context)); + return FluxUtil.withContext(context -> deleteCredentialWithResponseAsync(credentialId, context)); } /** @@ -4015,9 +4225,7 @@ public void deleteCredential(UUID credentialId) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getCredentialWithResponseAsync(UUID credentialId) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getCredential(this.getEndpoint(), credentialId, accept, context)); + return FluxUtil.withContext(context -> getCredentialWithResponseAsync(credentialId, context)); } /** @@ -4301,12 +4509,11 @@ public PagedIterable listDataFeeds(String dataFeedName, DataSour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createDataFeedWithResponseAsync(DataFeedDetail body) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createDataFeed(this.getEndpoint(), body, accept, context)); + public Mono> createDataFeedWithResponseAsync(DataFeedDetail body) { + return FluxUtil.withContext(context -> createDataFeedWithResponseAsync(body, context)); } /** @@ -4317,10 +4524,11 @@ public Mono createDataFeedWithResponseAsync(DataFeedDeta * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createDataFeedWithResponseAsync(DataFeedDetail body, Context context) { + public Mono> createDataFeedWithResponseAsync(DataFeedDetail body, + Context context) { final String accept = "application/json"; return service.createDataFeed(this.getEndpoint(), body, accept, context); } @@ -4354,6 +4562,20 @@ public Mono createDataFeedAsync(DataFeedDetail body, Context context) { return createDataFeedWithResponseAsync(body, context).flatMap(ignored -> Mono.empty()); } + /** + * Create a new data feed. + * + * @param body parameters to create a data feed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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) + public Mono> createDataFeedNoCustomHeadersWithResponseAsync(DataFeedDetail body) { + return FluxUtil.withContext(context -> createDataFeedNoCustomHeadersWithResponseAsync(body, context)); + } + /** * Create a new data feed. * @@ -4362,10 +4584,26 @@ public Mono createDataFeedAsync(DataFeedDetail body, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createDataFeedNoCustomHeadersWithResponseAsync(DataFeedDetail body, Context context) { + final String accept = "application/json"; + return service.createDataFeedNoCustomHeaders(this.getEndpoint(), body, accept, context); + } + + /** + * Create a new data feed. + * + * @param body parameters to create a data feed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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 ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CreateDataFeedResponse createDataFeedWithResponse(DataFeedDetail body, Context context) { + public ResponseBase createDataFeedWithResponse(DataFeedDetail body, Context context) { final String accept = "application/json"; return service.createDataFeedSync(this.getEndpoint(), body, accept, context); } @@ -4383,6 +4621,22 @@ public void createDataFeed(DataFeedDetail body) { createDataFeedWithResponse(body, Context.NONE); } + /** + * Create a new data feed. + * + * @param body parameters to create a data feed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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 createDataFeedNoCustomHeadersWithResponse(DataFeedDetail body, Context context) { + final String accept = "application/json"; + return service.createDataFeedNoCustomHeadersSync(this.getEndpoint(), body, accept, context); + } + /** * Get a data feed by its id. * @@ -4394,9 +4648,7 @@ public void createDataFeed(DataFeedDetail body) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDataFeedByIdWithResponseAsync(UUID dataFeedId) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getDataFeedById(this.getEndpoint(), dataFeedId, accept, context)); + return FluxUtil.withContext(context -> getDataFeedByIdWithResponseAsync(dataFeedId, context)); } /** @@ -4486,9 +4738,7 @@ public DataFeedDetail getDataFeedById(UUID dataFeedId) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateDataFeedWithResponseAsync(UUID dataFeedId, DataFeedDetailPatch body) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.updateDataFeed(this.getEndpoint(), dataFeedId, body, accept, context)); + return FluxUtil.withContext(context -> updateDataFeedWithResponseAsync(dataFeedId, body, context)); } /** @@ -4585,8 +4835,7 @@ public DataFeedDetail updateDataFeed(UUID dataFeedId, DataFeedDetailPatch body) */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteDataFeedWithResponseAsync(UUID dataFeedId) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.deleteDataFeed(this.getEndpoint(), dataFeedId, accept, context)); + return FluxUtil.withContext(context -> deleteDataFeedWithResponseAsync(dataFeedId, context)); } /** @@ -4674,9 +4923,7 @@ public void deleteDataFeed(UUID dataFeedId) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricFeedbackWithResponseAsync(UUID feedbackId) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getMetricFeedback(this.getEndpoint(), feedbackId, accept, context)); + return FluxUtil.withContext(context -> getMetricFeedbackWithResponseAsync(feedbackId, context)); } /** @@ -4921,12 +5168,12 @@ public PagedIterable listMetricFeedbacks(MetricFeedbackFilter bo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createMetricFeedbackWithResponseAsync(MetricFeedback body) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createMetricFeedback(this.getEndpoint(), body, accept, context)); + public Mono> + createMetricFeedbackWithResponseAsync(MetricFeedback body) { + return FluxUtil.withContext(context -> createMetricFeedbackWithResponseAsync(body, context)); } /** @@ -4937,11 +5184,11 @@ public Mono createMetricFeedbackWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createMetricFeedbackWithResponseAsync(MetricFeedback body, - Context context) { + public Mono> + createMetricFeedbackWithResponseAsync(MetricFeedback body, Context context) { final String accept = "application/json"; return service.createMetricFeedback(this.getEndpoint(), body, accept, context); } @@ -4975,6 +5222,20 @@ public Mono createMetricFeedbackAsync(MetricFeedback body, Context context return createMetricFeedbackWithResponseAsync(body, context).flatMap(ignored -> Mono.empty()); } + /** + * Create a new metric feedback. + * + * @param body metric feedback. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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) + public Mono> createMetricFeedbackNoCustomHeadersWithResponseAsync(MetricFeedback body) { + return FluxUtil.withContext(context -> createMetricFeedbackNoCustomHeadersWithResponseAsync(body, context)); + } + /** * Create a new metric feedback. * @@ -4983,10 +5244,28 @@ public Mono createMetricFeedbackAsync(MetricFeedback body, Context context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createMetricFeedbackNoCustomHeadersWithResponseAsync(MetricFeedback body, + Context context) { + final String accept = "application/json"; + return service.createMetricFeedbackNoCustomHeaders(this.getEndpoint(), body, accept, context); + } + + /** + * Create a new metric feedback. + * + * @param body metric feedback. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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 ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CreateMetricFeedbackResponse createMetricFeedbackWithResponse(MetricFeedback body, Context context) { + public ResponseBase createMetricFeedbackWithResponse(MetricFeedback body, + Context context) { final String accept = "application/json"; return service.createMetricFeedbackSync(this.getEndpoint(), body, accept, context); } @@ -5004,6 +5283,22 @@ public void createMetricFeedback(MetricFeedback body) { createMetricFeedbackWithResponse(body, Context.NONE); } + /** + * Create a new metric feedback. + * + * @param body metric feedback. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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 createMetricFeedbackNoCustomHeadersWithResponse(MetricFeedback body, Context context) { + final String accept = "application/json"; + return service.createMetricFeedbackNoCustomHeadersSync(this.getEndpoint(), body, accept, context); + } + /** * List all hooks. * @@ -5164,12 +5459,11 @@ public PagedIterable listHooks(String hookName, Integer skip, Integer * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createHookWithResponseAsync(HookInfo body) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createHook(this.getEndpoint(), body, accept, context)); + public Mono> createHookWithResponseAsync(HookInfo body) { + return FluxUtil.withContext(context -> createHookWithResponseAsync(body, context)); } /** @@ -5180,10 +5474,10 @@ public Mono createHookWithResponseAsync(HookInfo body) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createHookWithResponseAsync(HookInfo body, Context context) { + public Mono> createHookWithResponseAsync(HookInfo body, Context context) { final String accept = "application/json"; return service.createHook(this.getEndpoint(), body, accept, context); } @@ -5217,6 +5511,20 @@ public Mono createHookAsync(HookInfo body, Context context) { return createHookWithResponseAsync(body, context).flatMap(ignored -> Mono.empty()); } + /** + * Create a new hook. + * + * @param body Create hook request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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) + public Mono> createHookNoCustomHeadersWithResponseAsync(HookInfo body) { + return FluxUtil.withContext(context -> createHookNoCustomHeadersWithResponseAsync(body, context)); + } + /** * Create a new hook. * @@ -5225,10 +5533,26 @@ public Mono createHookAsync(HookInfo body, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException 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. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createHookNoCustomHeadersWithResponseAsync(HookInfo body, Context context) { + final String accept = "application/json"; + return service.createHookNoCustomHeaders(this.getEndpoint(), body, accept, context); + } + + /** + * Create a new hook. + * + * @param body Create hook request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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 ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CreateHookResponse createHookWithResponse(HookInfo body, Context context) { + public ResponseBase createHookWithResponse(HookInfo body, Context context) { final String accept = "application/json"; return service.createHookSync(this.getEndpoint(), body, accept, context); } @@ -5246,6 +5570,22 @@ public void createHook(HookInfo body) { createHookWithResponse(body, Context.NONE); } + /** + * Create a new hook. + * + * @param body Create hook request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException 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 createHookNoCustomHeadersWithResponse(HookInfo body, Context context) { + final String accept = "application/json"; + return service.createHookNoCustomHeadersSync(this.getEndpoint(), body, accept, context); + } + /** * Get a hook by its id. * @@ -5257,8 +5597,7 @@ public void createHook(HookInfo body) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getHookWithResponseAsync(UUID hookId) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getHook(this.getEndpoint(), hookId, accept, context)); + return FluxUtil.withContext(context -> getHookWithResponseAsync(hookId, context)); } /** @@ -5348,8 +5687,7 @@ public HookInfo getHook(UUID hookId) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateHookWithResponseAsync(UUID hookId, HookInfoPatch body) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.updateHook(this.getEndpoint(), hookId, body, accept, context)); + return FluxUtil.withContext(context -> updateHookWithResponseAsync(hookId, body, context)); } /** @@ -5443,8 +5781,7 @@ public HookInfo updateHook(UUID hookId, HookInfoPatch body) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteHookWithResponseAsync(UUID hookId) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.deleteHook(this.getEndpoint(), hookId, accept, context)); + return FluxUtil.withContext(context -> deleteHookWithResponseAsync(hookId, context)); } /** @@ -5708,9 +6045,8 @@ public PagedIterable getDataFeedIngestionStatus(UUID da @ServiceMethod(returns = ReturnType.SINGLE) public Mono> resetDataFeedIngestionStatusWithResponseAsync(UUID dataFeedId, IngestionProgressResetOptions body) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.resetDataFeedIngestionStatus(this.getEndpoint(), dataFeedId, body, accept, context)); + return FluxUtil + .withContext(context -> resetDataFeedIngestionStatusWithResponseAsync(dataFeedId, body, context)); } /** @@ -5808,9 +6144,7 @@ public void resetDataFeedIngestionStatus(UUID dataFeedId, IngestionProgressReset */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIngestionProgressWithResponseAsync(UUID dataFeedId) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getIngestionProgress(this.getEndpoint(), dataFeedId, accept, context)); + return FluxUtil.withContext(context -> getIngestionProgressWithResponseAsync(dataFeedId, context)); } /** @@ -5903,9 +6237,7 @@ public DataFeedIngestionProgress getIngestionProgress(UUID dataFeedId) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricDataWithResponseAsync(UUID metricId, MetricDataQueryOptions body) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getMetricData(this.getEndpoint(), metricId, body, accept, context)); + return FluxUtil.withContext(context -> getMetricDataWithResponseAsync(metricId, body, context)); } /** @@ -7322,9 +7654,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7344,9 +7674,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7366,9 +7694,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7387,9 +7713,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7409,9 +7733,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7431,9 +7753,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7453,9 +7773,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7474,9 +7792,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7496,9 +7812,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7518,9 +7832,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7542,9 +7854,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7564,9 +7874,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7588,9 +7896,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7610,9 +7916,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7631,9 +7935,7 @@ public PagedResponse getEnrichmentStatusByMetricNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7651,9 +7953,7 @@ public PagedResponse getIncidentsByAnomalyDetectionConfiguration /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7673,9 +7973,7 @@ public PagedResponse getIncidentsByAnomalyDetectionConfiguration /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7695,9 +7993,7 @@ public PagedResponse getIncidentsByAnomalyDetectionConfiguration /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7717,9 +8013,7 @@ public PagedResponse getIncidentsByAnomalyDetectionConfiguration /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7738,9 +8032,7 @@ public PagedResponse getIncidentsByAnomalyDetectionConfiguration /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7760,9 +8052,7 @@ public PagedResponse getIncidentsByAnomalyDetectionConfiguration /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7780,9 +8070,7 @@ public Mono> listCredentialsNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7801,9 +8089,7 @@ public Mono> listCredentialsNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7821,9 +8107,7 @@ public PagedResponse listCredentialsNextSinglePage(String /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7842,9 +8126,7 @@ public PagedResponse listCredentialsNextSinglePage(String /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7861,9 +8143,7 @@ public Mono> listDataFeedsNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7881,9 +8161,7 @@ public Mono> listDataFeedsNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7900,9 +8178,7 @@ public PagedResponse listDataFeedsNextSinglePage(String nextLink /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7920,9 +8196,7 @@ public PagedResponse listDataFeedsNextSinglePage(String nextLink /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7939,9 +8213,7 @@ public Mono> listHooksNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7959,9 +8231,7 @@ public Mono> listHooksNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7978,9 +8248,7 @@ public PagedResponse listHooksNextSinglePage(String nextLink) { /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -7998,9 +8266,7 @@ public PagedResponse listHooksNextSinglePage(String nextLink, Context /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -8020,9 +8286,7 @@ public PagedResponse listHooksNextSinglePage(String nextLink, Context /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. @@ -8041,9 +8305,7 @@ public PagedResponse listHooksNextSinglePage(String nextLink, Context /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -8062,9 +8324,7 @@ public PagedResponse listHooksNextSinglePage(String nextLink, Context /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImplBuilder.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImplBuilder.java index 35cac323c9296..ed66bcd3f9cc5 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImplBuilder.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImplBuilder.java @@ -10,7 +10,6 @@ import com.azure.core.client.traits.EndpointTrait; import com.azure.core.client.traits.HttpTrait; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; @@ -230,6 +229,7 @@ public MetricsAdvisorImplBuilder retryPolicy(RetryPolicy retryPolicy) { */ @Generated public MetricsAdvisorImpl buildClient() { + this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter(); @@ -237,6 +237,13 @@ public MetricsAdvisorImpl buildClient() { return client; } + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + @Generated private HttpPipeline createHttpPipeline() { Configuration buildConfiguration @@ -250,10 +257,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = new HttpHeaders(); - localClientOptions.getHeaders() - .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue())); - if (headers.getSize() > 0) { + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { policies.add(new AddHeadersPolicy(headers)); } this.pipelinePolicies.stream() diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertResultList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertResultList.java index fb5b6bbe0c4a3..bfb7723adb0ed 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertResultList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertResultList.java @@ -35,7 +35,7 @@ public AlertResultList() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -63,6 +63,9 @@ public AlertResultList setValue(List value) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertingResultQuery.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertingResultQuery.java index 8c2b0cee0661d..caef57e64b721 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertingResultQuery.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertingResultQuery.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -99,6 +100,9 @@ public AlertingResultQuery setTimeMode(TimeMode timeMode) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -127,11 +131,11 @@ public static AlertingResultQuery fromJson(JsonReader jsonReader) throws IOExcep reader.nextToken(); if ("startTime".equals(fieldName)) { - deserializedAlertingResultQuery.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAlertingResultQuery.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedAlertingResultQuery.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAlertingResultQuery.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("timeMode".equals(fieldName)) { deserializedAlertingResultQuery.timeMode = TimeMode.fromString(reader.getString()); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfiguration.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfiguration.java index e0dc721a1d619..940dfc4fe6c29 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfiguration.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfiguration.java @@ -197,6 +197,9 @@ public List getMetricAlertingConfigurations() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationList.java index debaf262f6c26..39b463e9c8704 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationList.java @@ -43,7 +43,7 @@ public List getValue() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -51,6 +51,9 @@ public String getNextLink() { return this.nextLink; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationPatch.java index 3ef0f2f84d935..fa74dafb56266 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationPatch.java @@ -177,6 +177,9 @@ public List getMetricAlertingConfigurations() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfiguration.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfiguration.java index 89bb734e4f41e..8d9939ec91313 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfiguration.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfiguration.java @@ -192,6 +192,9 @@ public List getSeriesOverrideConfigurations() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationList.java index a64ed53b86aef..126ea4349ee5b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationList.java @@ -43,7 +43,7 @@ public List getValue() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -51,6 +51,9 @@ public String getNextLink() { return this.nextLink; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationPatch.java index f3bf58ce465ec..3d3501c499326 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationPatch.java @@ -151,6 +151,9 @@ public List getSeriesOverrideConfigurations() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionList.java index f07d05b2776f8..2a4b4c4c3454a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionList.java @@ -34,7 +34,7 @@ public AnomalyDimensionList() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -62,6 +62,9 @@ public AnomalyDimensionList setValue(List value) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionQuery.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionQuery.java index bb1ed481ee064..a238b8f8eb1de 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionQuery.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionQuery.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -124,6 +125,9 @@ public AnomalyDimensionQuery setDimensionFilter(DimensionGroupIdentity dimension return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -153,11 +157,11 @@ public static AnomalyDimensionQuery fromJson(JsonReader jsonReader) throws IOExc reader.nextToken(); if ("startTime".equals(fieldName)) { - deserializedAnomalyDimensionQuery.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAnomalyDimensionQuery.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedAnomalyDimensionQuery.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAnomalyDimensionQuery.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("dimensionName".equals(fieldName)) { deserializedAnomalyDimensionQuery.dimensionName = reader.getString(); } else if ("dimensionFilter".equals(fieldName)) { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedback.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedback.java index 6b48a9ed08cd2..59aede3c368f5 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedback.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedback.java @@ -6,6 +6,7 @@ import com.azure.ai.metricsadvisor.models.FeedbackType; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -20,6 +21,11 @@ */ @Fluent public final class AnomalyFeedback extends MetricFeedback { + /* + * feedback type + */ + private FeedbackType feedbackType = FeedbackType.ANOMALY; + /* * the start timestamp of feedback time range */ @@ -45,12 +51,37 @@ public final class AnomalyFeedback extends MetricFeedback { */ private AnomalyDetectionConfiguration anomalyDetectionConfigurationSnapshot; + /* + * user who gives this feedback + */ + private String userPrincipal; + + /* + * feedback created time + */ + private OffsetDateTime createdTime; + + /* + * feedback unique id + */ + private UUID feedbackId; + /** * Creates an instance of AnomalyFeedback class. */ public AnomalyFeedback() { } + /** + * Get the feedbackType property: feedback type. + * + * @return the feedbackType value. + */ + @Override + public FeedbackType getFeedbackType() { + return this.feedbackType; + } + /** * Get the startTime property: the start timestamp of feedback time range. * @@ -156,6 +187,36 @@ public AnomalyDetectionConfiguration getAnomalyDetectionConfigurationSnapshot() return this; } + /** + * Get the userPrincipal property: user who gives this feedback. + * + * @return the userPrincipal value. + */ + @Override + public String getUserPrincipal() { + return this.userPrincipal; + } + + /** + * Get the createdTime property: feedback created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the feedbackId property: feedback unique id. + * + * @return the feedbackId value. + */ + @Override + public UUID getFeedbackId() { + return this.feedbackId; + } + /** * {@inheritDoc} */ @@ -174,11 +235,12 @@ public AnomalyFeedback setDimensionFilter(FeedbackDimensionFilter dimensionFilte return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("feedbackType", - FeedbackType.ANOMALY == null ? null : FeedbackType.ANOMALY.toString()); jsonWriter.writeStringField("metricId", Objects.toString(getMetricId(), null)); jsonWriter.writeJsonField("dimensionFilter", getDimensionFilter()); jsonWriter.writeStringField("startTime", @@ -186,6 +248,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("endTime", this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); jsonWriter.writeJsonField("value", this.value); + jsonWriter.writeStringField("feedbackType", this.feedbackType == null ? null : this.feedbackType.toString()); jsonWriter.writeStringField("anomalyDetectionConfigurationId", Objects.toString(this.anomalyDetectionConfigurationId, null)); jsonWriter.writeJsonField("anomalyDetectionConfigurationSnapshot", this.anomalyDetectionConfigurationSnapshot); @@ -198,8 +261,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AnomalyFeedback if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AnomalyFeedback. */ public static AnomalyFeedback fromJson(JsonReader jsonReader) throws IOException { @@ -209,34 +271,29 @@ public static AnomalyFeedback fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("feedbackType".equals(fieldName)) { - String feedbackType = reader.getString(); - if (!"Anomaly".equals(feedbackType)) { - throw new IllegalStateException( - "'feedbackType' was expected to be non-null and equal to 'Anomaly'. The found 'feedbackType' was '" - + feedbackType + "'."); - } - } else if ("metricId".equals(fieldName)) { + if ("metricId".equals(fieldName)) { deserializedAnomalyFeedback .setMetricId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); } else if ("dimensionFilter".equals(fieldName)) { deserializedAnomalyFeedback.setDimensionFilter(FeedbackDimensionFilter.fromJson(reader)); } else if ("feedbackId".equals(fieldName)) { - deserializedAnomalyFeedback - .setFeedbackId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedAnomalyFeedback.feedbackId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("createdTime".equals(fieldName)) { - deserializedAnomalyFeedback.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAnomalyFeedback.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("userPrincipal".equals(fieldName)) { - deserializedAnomalyFeedback.setUserPrincipal(reader.getString()); + deserializedAnomalyFeedback.userPrincipal = reader.getString(); } else if ("startTime".equals(fieldName)) { - deserializedAnomalyFeedback.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAnomalyFeedback.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedAnomalyFeedback.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAnomalyFeedback.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("value".equals(fieldName)) { deserializedAnomalyFeedback.value = AnomalyFeedbackValue.fromJson(reader); + } else if ("feedbackType".equals(fieldName)) { + deserializedAnomalyFeedback.feedbackType = FeedbackType.fromString(reader.getString()); } else if ("anomalyDetectionConfigurationId".equals(fieldName)) { deserializedAnomalyFeedback.anomalyDetectionConfigurationId = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedbackValue.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedbackValue.java index b95a934b0b84d..a67e2fbf3f639 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedbackValue.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedbackValue.java @@ -48,6 +48,9 @@ public AnomalyFeedbackValue setAnomalyValue(AnomalyValue anomalyValue) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyProperty.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyProperty.java index a2ab5033ea6fb..d1c8253e0b374 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyProperty.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyProperty.java @@ -94,6 +94,9 @@ public Double getExpectedValue() { return this.expectedValue; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResult.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResult.java index 24155fd4267cf..a38d7209c5386 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResult.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResult.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -191,6 +192,9 @@ public AnomalyResult setProperty(AnomalyProperty property) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -218,8 +222,8 @@ public static AnomalyResult fromJson(JsonReader jsonReader) throws IOException { reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedAnomalyResult.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAnomalyResult.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("dimension".equals(fieldName)) { Map dimension = reader.readMap(reader1 -> reader1.getString()); deserializedAnomalyResult.dimension = dimension; @@ -235,11 +239,11 @@ public static AnomalyResult fromJson(JsonReader jsonReader) throws IOException { deserializedAnomalyResult.anomalyDetectionConfigurationId = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("createdTime".equals(fieldName)) { - deserializedAnomalyResult.createdTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAnomalyResult.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("modifiedTime".equals(fieldName)) { - deserializedAnomalyResult.modifiedTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAnomalyResult.modifiedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResultList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResultList.java index c85a454255cb3..dca06ba22b689 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResultList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResultList.java @@ -34,7 +34,7 @@ public AnomalyResultList() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -62,6 +62,9 @@ public AnomalyResultList setValue(List value) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeed.java index 3578bddb63aa4..818ceceb898c8 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class AzureApplicationInsightsDataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_APPLICATION_INSIGHTS; + /* * The dataSourceParameter property. */ private AzureApplicationInsightsParameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of AzureApplicationInsightsDataFeed class. */ public AzureApplicationInsightsDataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -51,6 +92,56 @@ public AzureApplicationInsightsParameter getDataSourceParameter() { return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -267,13 +358,12 @@ public AzureApplicationInsightsDataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_APPLICATION_INSIGHTS == null - ? null - : DataSourceType.AZURE_APPLICATION_INSIGHTS.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -304,6 +394,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -313,8 +405,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureApplicationInsightsDataFeed if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AzureApplicationInsightsDataFeed. */ public static AzureApplicationInsightsDataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -325,14 +416,7 @@ public static AzureApplicationInsightsDataFeed fromJson(JsonReader jsonReader) t String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureApplicationInsights".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureApplicationInsights'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureApplicationInsightsDataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedAzureApplicationInsightsDataFeed @@ -341,11 +425,11 @@ public static AzureApplicationInsightsDataFeed fromJson(JsonReader jsonReader) t List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedAzureApplicationInsightsDataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureApplicationInsightsDataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureApplicationInsightsDataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedAzureApplicationInsightsDataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedAzureApplicationInsightsDataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureApplicationInsightsDataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -395,14 +479,14 @@ public static AzureApplicationInsightsDataFeed fromJson(JsonReader jsonReader) t List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedAzureApplicationInsightsDataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedAzureApplicationInsightsDataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedAzureApplicationInsightsDataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedAzureApplicationInsightsDataFeed.setCreator(reader.getString()); + deserializedAzureApplicationInsightsDataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedAzureApplicationInsightsDataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedAzureApplicationInsightsDataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedAzureApplicationInsightsDataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureApplicationInsightsDataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedAzureApplicationInsightsDataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -413,6 +497,9 @@ public static AzureApplicationInsightsDataFeed fromJson(JsonReader jsonReader) t } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureApplicationInsightsDataFeed.dataSourceParameter = AzureApplicationInsightsParameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureApplicationInsightsDataFeed.dataSourceType + = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeedPatch.java index 1a1bf384ed018..79ec0892b448a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class AzureApplicationInsightsDataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_APPLICATION_INSIGHTS; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class AzureApplicationInsightsDataFeedPatch extends DataFeedDetailP public AzureApplicationInsightsDataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -239,13 +255,12 @@ public AzureApplicationInsightsDataFeedPatch setCredentialId(String credentialId return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_APPLICATION_INSIGHTS == null - ? null - : DataSourceType.AZURE_APPLICATION_INSIGHTS.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -271,6 +286,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -281,7 +298,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureApplicationInsightsDataFeedPatch if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the AzureApplicationInsightsDataFeedPatch. */ public static AzureApplicationInsightsDataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -292,22 +308,15 @@ public static AzureApplicationInsightsDataFeedPatch fromJson(JsonReader jsonRead String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureApplicationInsights".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureApplicationInsights'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureApplicationInsightsDataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureApplicationInsightsDataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedAzureApplicationInsightsDataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureApplicationInsightsDataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureApplicationInsightsDataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedAzureApplicationInsightsDataFeedPatch .setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); @@ -356,6 +365,9 @@ public static AzureApplicationInsightsDataFeedPatch fromJson(JsonReader jsonRead .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedAzureApplicationInsightsDataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureApplicationInsightsDataFeedPatch.dataSourceType + = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureApplicationInsightsDataFeedPatch.dataSourceParameter = AzureApplicationInsightsParameterPatch.fromJson(reader); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameter.java index 722efadf7e7b1..d61879757b07a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameter.java @@ -122,6 +122,9 @@ public AzureApplicationInsightsParameter setQuery(String query) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameterPatch.java index 141e9ecb576d0..3bcd061676931 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameterPatch.java @@ -123,6 +123,9 @@ public AzureApplicationInsightsParameterPatch setQuery(String query) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeed.java index 6f4efbbcb3ddf..e8ed69d6119b3 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class AzureBlobDataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_BLOB; + /* * The dataSourceParameter property. */ private AzureBlobParameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of AzureBlobDataFeed class. */ public AzureBlobDataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -50,6 +91,56 @@ public AzureBlobDataFeed setDataSourceParameter(AzureBlobParameter dataSourcePar return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -266,11 +357,12 @@ public AzureBlobDataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_BLOB == null ? null : DataSourceType.AZURE_BLOB.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -301,6 +393,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -310,8 +404,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureBlobDataFeed if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AzureBlobDataFeed. */ public static AzureBlobDataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -321,14 +414,7 @@ public static AzureBlobDataFeed fromJson(JsonReader jsonReader) throws IOExcepti String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureBlob".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureBlob'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureBlobDataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedAzureBlobDataFeed.setGranularityName(Granularity.fromString(reader.getString())); @@ -336,11 +422,11 @@ public static AzureBlobDataFeed fromJson(JsonReader jsonReader) throws IOExcepti List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedAzureBlobDataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureBlobDataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureBlobDataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedAzureBlobDataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedAzureBlobDataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureBlobDataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -382,14 +468,14 @@ public static AzureBlobDataFeed fromJson(JsonReader jsonReader) throws IOExcepti List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedAzureBlobDataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedAzureBlobDataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedAzureBlobDataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedAzureBlobDataFeed.setCreator(reader.getString()); + deserializedAzureBlobDataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedAzureBlobDataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedAzureBlobDataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedAzureBlobDataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureBlobDataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedAzureBlobDataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -399,6 +485,8 @@ public static AzureBlobDataFeed fromJson(JsonReader jsonReader) throws IOExcepti deserializedAzureBlobDataFeed.setCredentialId(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureBlobDataFeed.dataSourceParameter = AzureBlobParameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureBlobDataFeed.dataSourceType = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeedPatch.java index 526448c6d0a11..623e7bbbf243f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class AzureBlobDataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_BLOB; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class AzureBlobDataFeedPatch extends DataFeedDetailPatch { public AzureBlobDataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -238,11 +254,12 @@ public AzureBlobDataFeedPatch setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_BLOB == null ? null : DataSourceType.AZURE_BLOB.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -268,6 +285,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -278,7 +297,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureBlobDataFeedPatch if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the AzureBlobDataFeedPatch. */ public static AzureBlobDataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -288,22 +306,15 @@ public static AzureBlobDataFeedPatch fromJson(JsonReader jsonReader) throws IOEx String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureBlob".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureBlob'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureBlobDataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureBlobDataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedAzureBlobDataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureBlobDataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureBlobDataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedAzureBlobDataFeedPatch.setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); } else if ("maxConcurrency".equals(fieldName)) { @@ -346,6 +357,8 @@ public static AzureBlobDataFeedPatch fromJson(JsonReader jsonReader) throws IOEx .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedAzureBlobDataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureBlobDataFeedPatch.dataSourceType = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureBlobDataFeedPatch.dataSourceParameter = AzureBlobParameterPatch.fromJson(reader); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameter.java index 3655d311089ac..de5115dc8955d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameter.java @@ -97,6 +97,9 @@ public AzureBlobParameter setBlobTemplate(String blobTemplate) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameterPatch.java index 0bb976a5a2174..e85d17fc84219 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameterPatch.java @@ -97,6 +97,9 @@ public AzureBlobParameterPatch setBlobTemplate(String blobTemplate) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeed.java index f55fbf4ab3dfd..b28f9ce5ba4c3 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class AzureCosmosDBDataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_COSMOS_DB; + /* * The dataSourceParameter property. */ private AzureCosmosDBParameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of AzureCosmosDBDataFeed class. */ public AzureCosmosDBDataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -50,6 +91,56 @@ public AzureCosmosDBDataFeed setDataSourceParameter(AzureCosmosDBParameter dataS return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -266,11 +357,12 @@ public AzureCosmosDBDataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_COSMOS_DB == null ? null : DataSourceType.AZURE_COSMOS_DB.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -301,6 +393,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -310,8 +404,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureCosmosDBDataFeed if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AzureCosmosDBDataFeed. */ public static AzureCosmosDBDataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -321,14 +414,7 @@ public static AzureCosmosDBDataFeed fromJson(JsonReader jsonReader) throws IOExc String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureCosmosDB".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureCosmosDB'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureCosmosDBDataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedAzureCosmosDBDataFeed.setGranularityName(Granularity.fromString(reader.getString())); @@ -336,11 +422,11 @@ public static AzureCosmosDBDataFeed fromJson(JsonReader jsonReader) throws IOExc List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedAzureCosmosDBDataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureCosmosDBDataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureCosmosDBDataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedAzureCosmosDBDataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedAzureCosmosDBDataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureCosmosDBDataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -385,14 +471,14 @@ public static AzureCosmosDBDataFeed fromJson(JsonReader jsonReader) throws IOExc List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedAzureCosmosDBDataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedAzureCosmosDBDataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedAzureCosmosDBDataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedAzureCosmosDBDataFeed.setCreator(reader.getString()); + deserializedAzureCosmosDBDataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedAzureCosmosDBDataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedAzureCosmosDBDataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedAzureCosmosDBDataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureCosmosDBDataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedAzureCosmosDBDataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -402,6 +488,8 @@ public static AzureCosmosDBDataFeed fromJson(JsonReader jsonReader) throws IOExc deserializedAzureCosmosDBDataFeed.setCredentialId(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureCosmosDBDataFeed.dataSourceParameter = AzureCosmosDBParameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureCosmosDBDataFeed.dataSourceType = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeedPatch.java index 9ee14e250fc78..0c4c4de301afa 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class AzureCosmosDBDataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_COSMOS_DB; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class AzureCosmosDBDataFeedPatch extends DataFeedDetailPatch { public AzureCosmosDBDataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -238,11 +254,12 @@ public AzureCosmosDBDataFeedPatch setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_COSMOS_DB == null ? null : DataSourceType.AZURE_COSMOS_DB.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -268,6 +285,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -278,7 +297,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureCosmosDBDataFeedPatch if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the AzureCosmosDBDataFeedPatch. */ public static AzureCosmosDBDataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -288,22 +306,15 @@ public static AzureCosmosDBDataFeedPatch fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureCosmosDB".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureCosmosDB'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureCosmosDBDataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureCosmosDBDataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedAzureCosmosDBDataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureCosmosDBDataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureCosmosDBDataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedAzureCosmosDBDataFeedPatch .setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); @@ -347,6 +358,9 @@ public static AzureCosmosDBDataFeedPatch fromJson(JsonReader jsonReader) throws .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedAzureCosmosDBDataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureCosmosDBDataFeedPatch.dataSourceType + = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureCosmosDBDataFeedPatch.dataSourceParameter = AzureCosmosDBParameterPatch.fromJson(reader); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameter.java index 96c4d60e383ca..e60030f586ea9 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameter.java @@ -122,6 +122,9 @@ public AzureCosmosDBParameter setCollectionId(String collectionId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameterPatch.java index 88c2416c53a4f..ec7a6c911d9e2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameterPatch.java @@ -122,6 +122,9 @@ public AzureCosmosDBParameterPatch setCollectionId(String collectionId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeed.java index 68ad22040175e..e5ca849229633 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class AzureDataExplorerDataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_DATA_EXPLORER; + /* * The dataSourceParameter property. */ private SqlSourceParameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of AzureDataExplorerDataFeed class. */ public AzureDataExplorerDataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -50,6 +91,56 @@ public AzureDataExplorerDataFeed setDataSourceParameter(SqlSourceParameter dataS return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -266,11 +357,12 @@ public AzureDataExplorerDataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_DATA_EXPLORER == null ? null : DataSourceType.AZURE_DATA_EXPLORER.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -301,6 +393,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -310,8 +404,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureDataExplorerDataFeed if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AzureDataExplorerDataFeed. */ public static AzureDataExplorerDataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -321,14 +414,7 @@ public static AzureDataExplorerDataFeed fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureDataExplorer".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureDataExplorer'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureDataExplorerDataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedAzureDataExplorerDataFeed @@ -337,11 +423,11 @@ public static AzureDataExplorerDataFeed fromJson(JsonReader jsonReader) throws I List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedAzureDataExplorerDataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureDataExplorerDataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureDataExplorerDataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedAzureDataExplorerDataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedAzureDataExplorerDataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureDataExplorerDataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -387,14 +473,14 @@ public static AzureDataExplorerDataFeed fromJson(JsonReader jsonReader) throws I List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedAzureDataExplorerDataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedAzureDataExplorerDataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedAzureDataExplorerDataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedAzureDataExplorerDataFeed.setCreator(reader.getString()); + deserializedAzureDataExplorerDataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedAzureDataExplorerDataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedAzureDataExplorerDataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedAzureDataExplorerDataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureDataExplorerDataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedAzureDataExplorerDataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -404,6 +490,9 @@ public static AzureDataExplorerDataFeed fromJson(JsonReader jsonReader) throws I deserializedAzureDataExplorerDataFeed.setCredentialId(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureDataExplorerDataFeed.dataSourceParameter = SqlSourceParameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureDataExplorerDataFeed.dataSourceType + = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeedPatch.java index ad8129b6fce4c..3c130882d73fe 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class AzureDataExplorerDataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_DATA_EXPLORER; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class AzureDataExplorerDataFeedPatch extends DataFeedDetailPatch { public AzureDataExplorerDataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -238,11 +254,12 @@ public AzureDataExplorerDataFeedPatch setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_DATA_EXPLORER == null ? null : DataSourceType.AZURE_DATA_EXPLORER.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -268,6 +285,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -278,7 +297,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureDataExplorerDataFeedPatch if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the AzureDataExplorerDataFeedPatch. */ public static AzureDataExplorerDataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -289,22 +307,15 @@ public static AzureDataExplorerDataFeedPatch fromJson(JsonReader jsonReader) thr String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureDataExplorer".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureDataExplorer'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureDataExplorerDataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureDataExplorerDataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedAzureDataExplorerDataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureDataExplorerDataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureDataExplorerDataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedAzureDataExplorerDataFeedPatch .setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); @@ -351,6 +362,9 @@ public static AzureDataExplorerDataFeedPatch fromJson(JsonReader jsonReader) thr .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedAzureDataExplorerDataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureDataExplorerDataFeedPatch.dataSourceType + = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureDataExplorerDataFeedPatch.dataSourceParameter = SQLSourceParameterPatch.fromJson(reader); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeed.java index 33827c6566d65..0b0ec3b5f5032 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class AzureDataLakeStorageGen2DataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_DATA_LAKE_STORAGE_GEN2; + /* * The dataSourceParameter property. */ private AzureDataLakeStorageGen2Parameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of AzureDataLakeStorageGen2DataFeed class. */ public AzureDataLakeStorageGen2DataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -51,6 +92,56 @@ public AzureDataLakeStorageGen2Parameter getDataSourceParameter() { return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -267,13 +358,12 @@ public AzureDataLakeStorageGen2DataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_DATA_LAKE_STORAGE_GEN2 == null - ? null - : DataSourceType.AZURE_DATA_LAKE_STORAGE_GEN2.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -304,6 +394,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -313,8 +405,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureDataLakeStorageGen2DataFeed if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AzureDataLakeStorageGen2DataFeed. */ public static AzureDataLakeStorageGen2DataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -325,14 +416,7 @@ public static AzureDataLakeStorageGen2DataFeed fromJson(JsonReader jsonReader) t String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureDataLakeStorageGen2".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureDataLakeStorageGen2'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureDataLakeStorageGen2DataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedAzureDataLakeStorageGen2DataFeed @@ -341,11 +425,11 @@ public static AzureDataLakeStorageGen2DataFeed fromJson(JsonReader jsonReader) t List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedAzureDataLakeStorageGen2DataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureDataLakeStorageGen2DataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureDataLakeStorageGen2DataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedAzureDataLakeStorageGen2DataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedAzureDataLakeStorageGen2DataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureDataLakeStorageGen2DataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -395,14 +479,14 @@ public static AzureDataLakeStorageGen2DataFeed fromJson(JsonReader jsonReader) t List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedAzureDataLakeStorageGen2DataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedAzureDataLakeStorageGen2DataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedAzureDataLakeStorageGen2DataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedAzureDataLakeStorageGen2DataFeed.setCreator(reader.getString()); + deserializedAzureDataLakeStorageGen2DataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedAzureDataLakeStorageGen2DataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedAzureDataLakeStorageGen2DataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedAzureDataLakeStorageGen2DataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureDataLakeStorageGen2DataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedAzureDataLakeStorageGen2DataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -413,6 +497,9 @@ public static AzureDataLakeStorageGen2DataFeed fromJson(JsonReader jsonReader) t } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureDataLakeStorageGen2DataFeed.dataSourceParameter = AzureDataLakeStorageGen2Parameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureDataLakeStorageGen2DataFeed.dataSourceType + = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeedPatch.java index c24da5c9a11ed..9b3b59fd65acc 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class AzureDataLakeStorageGen2DataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_DATA_LAKE_STORAGE_GEN2; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class AzureDataLakeStorageGen2DataFeedPatch extends DataFeedDetailP public AzureDataLakeStorageGen2DataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -239,13 +255,12 @@ public AzureDataLakeStorageGen2DataFeedPatch setCredentialId(String credentialId return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_DATA_LAKE_STORAGE_GEN2 == null - ? null - : DataSourceType.AZURE_DATA_LAKE_STORAGE_GEN2.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -271,6 +286,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -281,7 +298,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureDataLakeStorageGen2DataFeedPatch if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the AzureDataLakeStorageGen2DataFeedPatch. */ public static AzureDataLakeStorageGen2DataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -292,22 +308,15 @@ public static AzureDataLakeStorageGen2DataFeedPatch fromJson(JsonReader jsonRead String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureDataLakeStorageGen2".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureDataLakeStorageGen2'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureDataLakeStorageGen2DataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureDataLakeStorageGen2DataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedAzureDataLakeStorageGen2DataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureDataLakeStorageGen2DataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureDataLakeStorageGen2DataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedAzureDataLakeStorageGen2DataFeedPatch .setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); @@ -356,6 +365,9 @@ public static AzureDataLakeStorageGen2DataFeedPatch fromJson(JsonReader jsonRead .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedAzureDataLakeStorageGen2DataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureDataLakeStorageGen2DataFeedPatch.dataSourceType + = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureDataLakeStorageGen2DataFeedPatch.dataSourceParameter = AzureDataLakeStorageGen2ParameterPatch.fromJson(reader); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2Parameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2Parameter.java index 5475fa25f1b3e..9b67a7bdcf460 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2Parameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2Parameter.java @@ -147,6 +147,9 @@ public AzureDataLakeStorageGen2Parameter setFileTemplate(String fileTemplate) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2ParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2ParameterPatch.java index 95ae2d4cdfef8..d731136a8762a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2ParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2ParameterPatch.java @@ -148,6 +148,9 @@ public AzureDataLakeStorageGen2ParameterPatch setFileTemplate(String fileTemplat return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeed.java index 8717dbfce34a8..d953dc1cb95dc 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class AzureEventHubsDataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_EVENT_HUBS; + /* * The dataSourceParameter property. */ private AzureEventHubsParameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of AzureEventHubsDataFeed class. */ public AzureEventHubsDataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -50,6 +91,56 @@ public AzureEventHubsDataFeed setDataSourceParameter(AzureEventHubsParameter dat return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -266,11 +357,12 @@ public AzureEventHubsDataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_EVENT_HUBS == null ? null : DataSourceType.AZURE_EVENT_HUBS.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -301,6 +393,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -310,8 +404,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureEventHubsDataFeed if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AzureEventHubsDataFeed. */ public static AzureEventHubsDataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -321,14 +414,7 @@ public static AzureEventHubsDataFeed fromJson(JsonReader jsonReader) throws IOEx String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureEventHubs".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureEventHubs'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureEventHubsDataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedAzureEventHubsDataFeed.setGranularityName(Granularity.fromString(reader.getString())); @@ -336,11 +422,11 @@ public static AzureEventHubsDataFeed fromJson(JsonReader jsonReader) throws IOEx List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedAzureEventHubsDataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureEventHubsDataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureEventHubsDataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedAzureEventHubsDataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedAzureEventHubsDataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureEventHubsDataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -385,14 +471,14 @@ public static AzureEventHubsDataFeed fromJson(JsonReader jsonReader) throws IOEx List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedAzureEventHubsDataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedAzureEventHubsDataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedAzureEventHubsDataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedAzureEventHubsDataFeed.setCreator(reader.getString()); + deserializedAzureEventHubsDataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedAzureEventHubsDataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedAzureEventHubsDataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedAzureEventHubsDataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureEventHubsDataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedAzureEventHubsDataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -402,6 +488,8 @@ public static AzureEventHubsDataFeed fromJson(JsonReader jsonReader) throws IOEx deserializedAzureEventHubsDataFeed.setCredentialId(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureEventHubsDataFeed.dataSourceParameter = AzureEventHubsParameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureEventHubsDataFeed.dataSourceType = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeedPatch.java index 052cde26d65a2..a42b959d7ce26 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class AzureEventHubsDataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_EVENT_HUBS; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class AzureEventHubsDataFeedPatch extends DataFeedDetailPatch { public AzureEventHubsDataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -238,11 +254,12 @@ public AzureEventHubsDataFeedPatch setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_EVENT_HUBS == null ? null : DataSourceType.AZURE_EVENT_HUBS.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -268,6 +285,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -278,7 +297,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureEventHubsDataFeedPatch if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the AzureEventHubsDataFeedPatch. */ public static AzureEventHubsDataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -288,22 +306,15 @@ public static AzureEventHubsDataFeedPatch fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureEventHubs".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureEventHubs'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureEventHubsDataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureEventHubsDataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedAzureEventHubsDataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureEventHubsDataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureEventHubsDataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedAzureEventHubsDataFeedPatch .setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); @@ -349,6 +360,9 @@ public static AzureEventHubsDataFeedPatch fromJson(JsonReader jsonReader) throws .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedAzureEventHubsDataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureEventHubsDataFeedPatch.dataSourceType + = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureEventHubsDataFeedPatch.dataSourceParameter = AzureEventHubsParameterPatch.fromJson(reader); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameter.java index 95ef58bee2f14..93ca123cea780 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameter.java @@ -72,6 +72,9 @@ public AzureEventHubsParameter setConsumerGroup(String consumerGroup) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameterPatch.java index b8cb36c5bdf1a..1cc010fd4c00f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameterPatch.java @@ -72,6 +72,9 @@ public AzureEventHubsParameterPatch setConsumerGroup(String consumerGroup) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeed.java index 5d1c1d85bbb97..ad5cd3be9f116 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class AzureLogAnalyticsDataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_LOG_ANALYTICS; + /* * The dataSourceParameter property. */ private AzureLogAnalyticsParameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of AzureLogAnalyticsDataFeed class. */ public AzureLogAnalyticsDataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -50,6 +91,56 @@ public AzureLogAnalyticsDataFeed setDataSourceParameter(AzureLogAnalyticsParamet return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -266,11 +357,12 @@ public AzureLogAnalyticsDataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_LOG_ANALYTICS == null ? null : DataSourceType.AZURE_LOG_ANALYTICS.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -301,6 +393,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -310,8 +404,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureLogAnalyticsDataFeed if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AzureLogAnalyticsDataFeed. */ public static AzureLogAnalyticsDataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -321,14 +414,7 @@ public static AzureLogAnalyticsDataFeed fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureLogAnalytics".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureLogAnalytics'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureLogAnalyticsDataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedAzureLogAnalyticsDataFeed @@ -337,11 +423,11 @@ public static AzureLogAnalyticsDataFeed fromJson(JsonReader jsonReader) throws I List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedAzureLogAnalyticsDataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureLogAnalyticsDataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureLogAnalyticsDataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedAzureLogAnalyticsDataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedAzureLogAnalyticsDataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureLogAnalyticsDataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -387,14 +473,14 @@ public static AzureLogAnalyticsDataFeed fromJson(JsonReader jsonReader) throws I List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedAzureLogAnalyticsDataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedAzureLogAnalyticsDataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedAzureLogAnalyticsDataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedAzureLogAnalyticsDataFeed.setCreator(reader.getString()); + deserializedAzureLogAnalyticsDataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedAzureLogAnalyticsDataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedAzureLogAnalyticsDataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedAzureLogAnalyticsDataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureLogAnalyticsDataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedAzureLogAnalyticsDataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -405,6 +491,9 @@ public static AzureLogAnalyticsDataFeed fromJson(JsonReader jsonReader) throws I } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureLogAnalyticsDataFeed.dataSourceParameter = AzureLogAnalyticsParameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureLogAnalyticsDataFeed.dataSourceType + = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeedPatch.java index 82f7fb4664869..fa7a5d3a55d5b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class AzureLogAnalyticsDataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_LOG_ANALYTICS; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class AzureLogAnalyticsDataFeedPatch extends DataFeedDetailPatch { public AzureLogAnalyticsDataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -238,11 +254,12 @@ public AzureLogAnalyticsDataFeedPatch setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_LOG_ANALYTICS == null ? null : DataSourceType.AZURE_LOG_ANALYTICS.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -268,6 +285,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -278,7 +297,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureLogAnalyticsDataFeedPatch if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the AzureLogAnalyticsDataFeedPatch. */ public static AzureLogAnalyticsDataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -289,22 +307,15 @@ public static AzureLogAnalyticsDataFeedPatch fromJson(JsonReader jsonReader) thr String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureLogAnalytics".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureLogAnalytics'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureLogAnalyticsDataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureLogAnalyticsDataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedAzureLogAnalyticsDataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureLogAnalyticsDataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureLogAnalyticsDataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedAzureLogAnalyticsDataFeedPatch .setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); @@ -351,6 +362,9 @@ public static AzureLogAnalyticsDataFeedPatch fromJson(JsonReader jsonReader) thr .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedAzureLogAnalyticsDataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureLogAnalyticsDataFeedPatch.dataSourceType + = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureLogAnalyticsDataFeedPatch.dataSourceParameter = AzureLogAnalyticsParameterPatch.fromJson(reader); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameter.java index e0fdb5a5e9720..7d76dba9be5e6 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameter.java @@ -147,6 +147,9 @@ public AzureLogAnalyticsParameter setQuery(String query) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameterPatch.java index 0641f46ad28a4..88311eb75774f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameterPatch.java @@ -147,6 +147,9 @@ public AzureLogAnalyticsParameterPatch setQuery(String query) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredential.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredential.java index bd1833666b4a0..a8dfde1a9864b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredential.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredential.java @@ -16,17 +16,37 @@ */ @Fluent public final class AzureSQLConnectionStringCredential extends DataSourceCredential { + /* + * Type of data source credential + */ + private DataSourceCredentialType dataSourceCredentialType = DataSourceCredentialType.AZURE_SQLCONNECTION_STRING; + /* * The parameters property. */ private AzureSQLConnectionStringParam parameters; + /* + * Unique id of data source credential + */ + private UUID dataSourceCredentialId; + /** * Creates an instance of AzureSQLConnectionStringCredential class. */ public AzureSQLConnectionStringCredential() { } + /** + * Get the dataSourceCredentialType property: Type of data source credential. + * + * @return the dataSourceCredentialType value. + */ + @Override + public DataSourceCredentialType getDataSourceCredentialType() { + return this.dataSourceCredentialType; + } + /** * Get the parameters property: The parameters property. * @@ -47,6 +67,16 @@ public AzureSQLConnectionStringCredential setParameters(AzureSQLConnectionString return this; } + /** + * Get the dataSourceCredentialId property: Unique id of data source credential. + * + * @return the dataSourceCredentialId value. + */ + @Override + public UUID getDataSourceCredentialId() { + return this.dataSourceCredentialId; + } + /** * {@inheritDoc} */ @@ -66,16 +96,17 @@ public AzureSQLConnectionStringCredential setDataSourceCredentialName(String dat return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceCredentialType", - DataSourceCredentialType.AZURE_SQLCONNECTION_STRING == null - ? null - : DataSourceCredentialType.AZURE_SQLCONNECTION_STRING.toString()); jsonWriter.writeStringField("dataSourceCredentialName", getDataSourceCredentialName()); jsonWriter.writeStringField("dataSourceCredentialDescription", getDataSourceCredentialDescription()); jsonWriter.writeJsonField("parameters", this.parameters); + jsonWriter.writeStringField("dataSourceCredentialType", + this.dataSourceCredentialType == null ? null : this.dataSourceCredentialType.toString()); return jsonWriter.writeEndObject(); } @@ -85,8 +116,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureSQLConnectionStringCredential if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AzureSQLConnectionStringCredential. */ public static AzureSQLConnectionStringCredential fromJson(JsonReader jsonReader) throws IOException { @@ -97,24 +127,20 @@ public static AzureSQLConnectionStringCredential fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceCredentialType".equals(fieldName)) { - String dataSourceCredentialType = reader.getString(); - if (!"AzureSQLConnectionString".equals(dataSourceCredentialType)) { - throw new IllegalStateException( - "'dataSourceCredentialType' was expected to be non-null and equal to 'AzureSQLConnectionString'. The found 'dataSourceCredentialType' was '" - + dataSourceCredentialType + "'."); - } - } else if ("dataSourceCredentialName".equals(fieldName)) { + if ("dataSourceCredentialName".equals(fieldName)) { deserializedAzureSQLConnectionStringCredential.setDataSourceCredentialName(reader.getString()); } else if ("dataSourceCredentialId".equals(fieldName)) { - deserializedAzureSQLConnectionStringCredential.setDataSourceCredentialId( - reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedAzureSQLConnectionStringCredential.dataSourceCredentialId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataSourceCredentialDescription".equals(fieldName)) { deserializedAzureSQLConnectionStringCredential .setDataSourceCredentialDescription(reader.getString()); } else if ("parameters".equals(fieldName)) { deserializedAzureSQLConnectionStringCredential.parameters = AzureSQLConnectionStringParam.fromJson(reader); + } else if ("dataSourceCredentialType".equals(fieldName)) { + deserializedAzureSQLConnectionStringCredential.dataSourceCredentialType + = DataSourceCredentialType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredentialPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredentialPatch.java index d4bf49e320029..e3296ab487a54 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredentialPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredentialPatch.java @@ -15,6 +15,11 @@ */ @Fluent public final class AzureSQLConnectionStringCredentialPatch extends DataSourceCredentialPatch { + /* + * Type of data source credential + */ + private DataSourceCredentialType dataSourceCredentialType = DataSourceCredentialType.AZURE_SQLCONNECTION_STRING; + /* * The parameters property. */ @@ -26,6 +31,16 @@ public final class AzureSQLConnectionStringCredentialPatch extends DataSourceCre public AzureSQLConnectionStringCredentialPatch() { } + /** + * Get the dataSourceCredentialType property: Type of data source credential. + * + * @return the dataSourceCredentialType value. + */ + @Override + public DataSourceCredentialType getDataSourceCredentialType() { + return this.dataSourceCredentialType; + } + /** * Get the parameters property: The parameters property. * @@ -65,15 +80,16 @@ public AzureSQLConnectionStringCredentialPatch setDataSourceCredentialName(Strin return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceCredentialType", - DataSourceCredentialType.AZURE_SQLCONNECTION_STRING == null - ? null - : DataSourceCredentialType.AZURE_SQLCONNECTION_STRING.toString()); jsonWriter.writeStringField("dataSourceCredentialName", getDataSourceCredentialName()); jsonWriter.writeStringField("dataSourceCredentialDescription", getDataSourceCredentialDescription()); + jsonWriter.writeStringField("dataSourceCredentialType", + this.dataSourceCredentialType == null ? null : this.dataSourceCredentialType.toString()); jsonWriter.writeJsonField("parameters", this.parameters); return jsonWriter.writeEndObject(); } @@ -84,7 +100,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureSQLConnectionStringCredentialPatch if the JsonReader was pointing to an instance of * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the AzureSQLConnectionStringCredentialPatch. */ public static AzureSQLConnectionStringCredentialPatch fromJson(JsonReader jsonReader) throws IOException { @@ -95,18 +110,14 @@ public static AzureSQLConnectionStringCredentialPatch fromJson(JsonReader jsonRe String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceCredentialType".equals(fieldName)) { - String dataSourceCredentialType = reader.getString(); - if (!"AzureSQLConnectionString".equals(dataSourceCredentialType)) { - throw new IllegalStateException( - "'dataSourceCredentialType' was expected to be non-null and equal to 'AzureSQLConnectionString'. The found 'dataSourceCredentialType' was '" - + dataSourceCredentialType + "'."); - } - } else if ("dataSourceCredentialName".equals(fieldName)) { + if ("dataSourceCredentialName".equals(fieldName)) { deserializedAzureSQLConnectionStringCredentialPatch.setDataSourceCredentialName(reader.getString()); } else if ("dataSourceCredentialDescription".equals(fieldName)) { deserializedAzureSQLConnectionStringCredentialPatch .setDataSourceCredentialDescription(reader.getString()); + } else if ("dataSourceCredentialType".equals(fieldName)) { + deserializedAzureSQLConnectionStringCredentialPatch.dataSourceCredentialType + = DataSourceCredentialType.fromString(reader.getString()); } else if ("parameters".equals(fieldName)) { deserializedAzureSQLConnectionStringCredentialPatch.parameters = AzureSQLConnectionStringParamPatch.fromJson(reader); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParam.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParam.java index 9de5a9051a3a7..552f6fa8da6c5 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParam.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParam.java @@ -47,6 +47,9 @@ public AzureSQLConnectionStringParam setConnectionString(String connectionString return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParamPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParamPatch.java index ad8481d2d1062..c77fae78b0244 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParamPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParamPatch.java @@ -47,6 +47,9 @@ public AzureSQLConnectionStringParamPatch setConnectionString(String connectionS return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeed.java index 5cfa2c3fdc995..c7d79b5ea6c2e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class AzureTableDataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_TABLE; + /* * The dataSourceParameter property. */ private AzureTableParameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of AzureTableDataFeed class. */ public AzureTableDataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -50,6 +91,56 @@ public AzureTableDataFeed setDataSourceParameter(AzureTableParameter dataSourceP return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -266,11 +357,12 @@ public AzureTableDataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_TABLE == null ? null : DataSourceType.AZURE_TABLE.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -301,6 +393,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -310,8 +404,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureTableDataFeed if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AzureTableDataFeed. */ public static AzureTableDataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -321,14 +414,7 @@ public static AzureTableDataFeed fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureTable".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureTable'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureTableDataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedAzureTableDataFeed.setGranularityName(Granularity.fromString(reader.getString())); @@ -336,11 +422,11 @@ public static AzureTableDataFeed fromJson(JsonReader jsonReader) throws IOExcept List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedAzureTableDataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureTableDataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureTableDataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedAzureTableDataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedAzureTableDataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureTableDataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -383,14 +469,14 @@ public static AzureTableDataFeed fromJson(JsonReader jsonReader) throws IOExcept List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedAzureTableDataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedAzureTableDataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedAzureTableDataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedAzureTableDataFeed.setCreator(reader.getString()); + deserializedAzureTableDataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedAzureTableDataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedAzureTableDataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedAzureTableDataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureTableDataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedAzureTableDataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -400,6 +486,8 @@ public static AzureTableDataFeed fromJson(JsonReader jsonReader) throws IOExcept deserializedAzureTableDataFeed.setCredentialId(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureTableDataFeed.dataSourceParameter = AzureTableParameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureTableDataFeed.dataSourceType = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeedPatch.java index d360532607bc3..615e2f78b36f1 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class AzureTableDataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.AZURE_TABLE; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class AzureTableDataFeedPatch extends DataFeedDetailPatch { public AzureTableDataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -238,11 +254,12 @@ public AzureTableDataFeedPatch setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.AZURE_TABLE == null ? null : DataSourceType.AZURE_TABLE.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -268,6 +285,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -278,7 +297,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AzureTableDataFeedPatch if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the AzureTableDataFeedPatch. */ public static AzureTableDataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -288,22 +306,15 @@ public static AzureTableDataFeedPatch fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"AzureTable".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'AzureTable'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedAzureTableDataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedAzureTableDataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedAzureTableDataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedAzureTableDataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedAzureTableDataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedAzureTableDataFeedPatch .setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); @@ -347,6 +358,8 @@ public static AzureTableDataFeedPatch fromJson(JsonReader jsonReader) throws IOE .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedAzureTableDataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedAzureTableDataFeedPatch.dataSourceType = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedAzureTableDataFeedPatch.dataSourceParameter = AzureTableParameterPatch.fromJson(reader); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameter.java index 929c8689da49f..4b9e3448e51da 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameter.java @@ -99,6 +99,9 @@ public AzureTableParameter setQuery(String query) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameterPatch.java index 4114e8a682b86..a1a2d11c2ea91 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameterPatch.java @@ -99,6 +99,9 @@ public AzureTableParameterPatch setQuery(String query) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedback.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedback.java index 344b616d7fd86..981d22bae6aa7 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedback.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedback.java @@ -6,6 +6,7 @@ import com.azure.ai.metricsadvisor.models.FeedbackType; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -20,6 +21,11 @@ */ @Fluent public final class ChangePointFeedback extends MetricFeedback { + /* + * feedback type + */ + private FeedbackType feedbackType = FeedbackType.CHANGE_POINT; + /* * the start timestamp of feedback time range */ @@ -35,12 +41,37 @@ public final class ChangePointFeedback extends MetricFeedback { */ private ChangePointFeedbackValue value; + /* + * user who gives this feedback + */ + private String userPrincipal; + + /* + * feedback created time + */ + private OffsetDateTime createdTime; + + /* + * feedback unique id + */ + private UUID feedbackId; + /** * Creates an instance of ChangePointFeedback class. */ public ChangePointFeedback() { } + /** + * Get the feedbackType property: feedback type. + * + * @return the feedbackType value. + */ + @Override + public FeedbackType getFeedbackType() { + return this.feedbackType; + } + /** * Get the startTime property: the start timestamp of feedback time range. * @@ -103,6 +134,36 @@ public ChangePointFeedback setValue(ChangePointFeedbackValue value) { return this; } + /** + * Get the userPrincipal property: user who gives this feedback. + * + * @return the userPrincipal value. + */ + @Override + public String getUserPrincipal() { + return this.userPrincipal; + } + + /** + * Get the createdTime property: feedback created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the feedbackId property: feedback unique id. + * + * @return the feedbackId value. + */ + @Override + public UUID getFeedbackId() { + return this.feedbackId; + } + /** * {@inheritDoc} */ @@ -121,11 +182,12 @@ public ChangePointFeedback setDimensionFilter(FeedbackDimensionFilter dimensionF return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("feedbackType", - FeedbackType.CHANGE_POINT == null ? null : FeedbackType.CHANGE_POINT.toString()); jsonWriter.writeStringField("metricId", Objects.toString(getMetricId(), null)); jsonWriter.writeJsonField("dimensionFilter", getDimensionFilter()); jsonWriter.writeStringField("startTime", @@ -133,6 +195,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("endTime", this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); jsonWriter.writeJsonField("value", this.value); + jsonWriter.writeStringField("feedbackType", this.feedbackType == null ? null : this.feedbackType.toString()); return jsonWriter.writeEndObject(); } @@ -142,8 +205,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ChangePointFeedback if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ChangePointFeedback. */ public static ChangePointFeedback fromJson(JsonReader jsonReader) throws IOException { @@ -153,34 +215,29 @@ public static ChangePointFeedback fromJson(JsonReader jsonReader) throws IOExcep String fieldName = reader.getFieldName(); reader.nextToken(); - if ("feedbackType".equals(fieldName)) { - String feedbackType = reader.getString(); - if (!"ChangePoint".equals(feedbackType)) { - throw new IllegalStateException( - "'feedbackType' was expected to be non-null and equal to 'ChangePoint'. The found 'feedbackType' was '" - + feedbackType + "'."); - } - } else if ("metricId".equals(fieldName)) { + if ("metricId".equals(fieldName)) { deserializedChangePointFeedback .setMetricId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); } else if ("dimensionFilter".equals(fieldName)) { deserializedChangePointFeedback.setDimensionFilter(FeedbackDimensionFilter.fromJson(reader)); } else if ("feedbackId".equals(fieldName)) { - deserializedChangePointFeedback - .setFeedbackId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedChangePointFeedback.feedbackId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("createdTime".equals(fieldName)) { - deserializedChangePointFeedback.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedChangePointFeedback.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("userPrincipal".equals(fieldName)) { - deserializedChangePointFeedback.setUserPrincipal(reader.getString()); + deserializedChangePointFeedback.userPrincipal = reader.getString(); } else if ("startTime".equals(fieldName)) { - deserializedChangePointFeedback.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedChangePointFeedback.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedChangePointFeedback.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedChangePointFeedback.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("value".equals(fieldName)) { deserializedChangePointFeedback.value = ChangePointFeedbackValue.fromJson(reader); + } else if ("feedbackType".equals(fieldName)) { + deserializedChangePointFeedback.feedbackType = FeedbackType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedbackValue.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedbackValue.java index 6bd3b137a60d7..3c2e717d3733f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedbackValue.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedbackValue.java @@ -48,6 +48,9 @@ public ChangePointFeedbackValue setChangePointValue(ChangePointValue changePoint return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdCondition.java index b6dd681ab766a..bb976e09ae3d0 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdCondition.java @@ -153,6 +153,9 @@ public ChangeThresholdCondition setSuppressCondition(SuppressCondition suppressC return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdConditionPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdConditionPatch.java index 386403dbb8f6f..ba7b5bfaae074 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdConditionPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdConditionPatch.java @@ -154,6 +154,9 @@ public ChangeThresholdConditionPatch setSuppressCondition(SuppressConditionPatch return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedback.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedback.java index 4566345d55b35..7545d16282da0 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedback.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedback.java @@ -6,6 +6,7 @@ import com.azure.ai.metricsadvisor.models.FeedbackType; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -20,6 +21,11 @@ */ @Fluent public final class CommentFeedback extends MetricFeedback { + /* + * feedback type + */ + private FeedbackType feedbackType = FeedbackType.COMMENT; + /* * the start timestamp of feedback time range */ @@ -35,12 +41,37 @@ public final class CommentFeedback extends MetricFeedback { */ private CommentFeedbackValue value; + /* + * user who gives this feedback + */ + private String userPrincipal; + + /* + * feedback created time + */ + private OffsetDateTime createdTime; + + /* + * feedback unique id + */ + private UUID feedbackId; + /** * Creates an instance of CommentFeedback class. */ public CommentFeedback() { } + /** + * Get the feedbackType property: feedback type. + * + * @return the feedbackType value. + */ + @Override + public FeedbackType getFeedbackType() { + return this.feedbackType; + } + /** * Get the startTime property: the start timestamp of feedback time range. * @@ -103,6 +134,36 @@ public CommentFeedback setValue(CommentFeedbackValue value) { return this; } + /** + * Get the userPrincipal property: user who gives this feedback. + * + * @return the userPrincipal value. + */ + @Override + public String getUserPrincipal() { + return this.userPrincipal; + } + + /** + * Get the createdTime property: feedback created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the feedbackId property: feedback unique id. + * + * @return the feedbackId value. + */ + @Override + public UUID getFeedbackId() { + return this.feedbackId; + } + /** * {@inheritDoc} */ @@ -121,14 +182,16 @@ public CommentFeedback setDimensionFilter(FeedbackDimensionFilter dimensionFilte return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("feedbackType", - FeedbackType.COMMENT == null ? null : FeedbackType.COMMENT.toString()); jsonWriter.writeStringField("metricId", Objects.toString(getMetricId(), null)); jsonWriter.writeJsonField("dimensionFilter", getDimensionFilter()); jsonWriter.writeJsonField("value", this.value); + jsonWriter.writeStringField("feedbackType", this.feedbackType == null ? null : this.feedbackType.toString()); jsonWriter.writeStringField("startTime", this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); jsonWriter.writeStringField("endTime", @@ -142,8 +205,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of CommentFeedback if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the CommentFeedback. */ public static CommentFeedback fromJson(JsonReader jsonReader) throws IOException { @@ -153,34 +215,29 @@ public static CommentFeedback fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("feedbackType".equals(fieldName)) { - String feedbackType = reader.getString(); - if (!"Comment".equals(feedbackType)) { - throw new IllegalStateException( - "'feedbackType' was expected to be non-null and equal to 'Comment'. The found 'feedbackType' was '" - + feedbackType + "'."); - } - } else if ("metricId".equals(fieldName)) { + if ("metricId".equals(fieldName)) { deserializedCommentFeedback .setMetricId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); } else if ("dimensionFilter".equals(fieldName)) { deserializedCommentFeedback.setDimensionFilter(FeedbackDimensionFilter.fromJson(reader)); } else if ("feedbackId".equals(fieldName)) { - deserializedCommentFeedback - .setFeedbackId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedCommentFeedback.feedbackId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("createdTime".equals(fieldName)) { - deserializedCommentFeedback.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedCommentFeedback.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("userPrincipal".equals(fieldName)) { - deserializedCommentFeedback.setUserPrincipal(reader.getString()); + deserializedCommentFeedback.userPrincipal = reader.getString(); } else if ("value".equals(fieldName)) { deserializedCommentFeedback.value = CommentFeedbackValue.fromJson(reader); + } else if ("feedbackType".equals(fieldName)) { + deserializedCommentFeedback.feedbackType = FeedbackType.fromString(reader.getString()); } else if ("startTime".equals(fieldName)) { - deserializedCommentFeedback.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedCommentFeedback.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedCommentFeedback.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedCommentFeedback.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedbackValue.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedbackValue.java index a0834f1244cd2..fbd725333de2a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedbackValue.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedbackValue.java @@ -47,6 +47,9 @@ public CommentFeedbackValue setCommentValue(String commentValue) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyAlertingConfigurationResponse.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyAlertingConfigurationResponse.java deleted file mode 100644 index c6f549da33383..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyAlertingConfigurationResponse.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** - * Contains all response data for the createAnomalyAlertingConfiguration operation. - */ -public final class CreateAnomalyAlertingConfigurationResponse - extends ResponseBase { - /** - * Creates an instance of CreateAnomalyAlertingConfigurationResponse. - * - * @param request the request which resulted in this CreateAnomalyAlertingConfigurationResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CreateAnomalyAlertingConfigurationResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - Void value, CreateAnomalyAlertingConfigurationHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyDetectionConfigurationResponse.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyDetectionConfigurationResponse.java deleted file mode 100644 index ab66e3d1753e2..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyDetectionConfigurationResponse.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** - * Contains all response data for the createAnomalyDetectionConfiguration operation. - */ -public final class CreateAnomalyDetectionConfigurationResponse - extends ResponseBase { - /** - * Creates an instance of CreateAnomalyDetectionConfigurationResponse. - * - * @param request the request which resulted in this CreateAnomalyDetectionConfigurationResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CreateAnomalyDetectionConfigurationResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - Void value, CreateAnomalyDetectionConfigurationHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateCredentialResponse.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateCredentialResponse.java deleted file mode 100644 index 4cb5b94997355..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateCredentialResponse.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** - * Contains all response data for the createCredential operation. - */ -public final class CreateCredentialResponse extends ResponseBase { - /** - * Creates an instance of CreateCredentialResponse. - * - * @param request the request which resulted in this CreateCredentialResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CreateCredentialResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, - CreateCredentialHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateDataFeedResponse.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateDataFeedResponse.java deleted file mode 100644 index df13e8a4d2050..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateDataFeedResponse.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** - * Contains all response data for the createDataFeed operation. - */ -public final class CreateDataFeedResponse extends ResponseBase { - /** - * Creates an instance of CreateDataFeedResponse. - * - * @param request the request which resulted in this CreateDataFeedResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CreateDataFeedResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, - CreateDataFeedHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateHookResponse.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateHookResponse.java deleted file mode 100644 index d58359298c9e5..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateHookResponse.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** - * Contains all response data for the createHook operation. - */ -public final class CreateHookResponse extends ResponseBase { - /** - * Creates an instance of CreateHookResponse. - * - * @param request the request which resulted in this CreateHookResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CreateHookResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, - CreateHookHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateMetricFeedbackResponse.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateMetricFeedbackResponse.java deleted file mode 100644 index c39c6e52b19bc..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateMetricFeedbackResponse.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** - * Contains all response data for the createMetricFeedback operation. - */ -public final class CreateMetricFeedbackResponse extends ResponseBase { - /** - * Creates an instance of CreateMetricFeedbackResponse. - * - * @param request the request which resulted in this CreateMetricFeedbackResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CreateMetricFeedbackResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, - CreateMetricFeedbackHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetail.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetail.java index dd47654dd2780..cd488c4f9040c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetail.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetail.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,6 +21,11 @@ */ @Fluent public class DataFeedDetail implements JsonSerializable { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.fromString("DataFeedDetail"); + /* * data feed unique id */ @@ -56,8 +62,8 @@ public class DataFeedDetail implements JsonSerializable { private List dimension; /* - * user-defined timestamp column. if timestampColumn is null, start time of every time slice will be used as - * default value. + * user-defined timestamp column. if timestampColumn is null, start time of every time slice will be used as default + * value. */ private String timestampColumn; @@ -172,6 +178,15 @@ public class DataFeedDetail implements JsonSerializable { public DataFeedDetail() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataFeedId property: data feed unique id. * @@ -760,6 +775,9 @@ public DataFeedDetail setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -769,6 +787,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("metrics", this.metrics, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("dataStartFrom", this.dataStartFrom == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.dataStartFrom)); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeStringField("dataFeedDescription", this.dataFeedDescription); jsonWriter.writeNumberField("granularityAmount", this.granularityAmount); jsonWriter.writeArrayField("dimension", this.dimension, (writer, element) -> writer.writeJson(element)); @@ -801,56 +821,55 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DataFeedDetail if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the DataFeedDetail. */ public static DataFeedDetail fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String discriminatorValue = null; - JsonReader readerToUse = reader.bufferObject(); - - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("dataSourceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("dataSourceType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("AzureApplicationInsights".equals(discriminatorValue)) { + return AzureApplicationInsightsDataFeed.fromJson(readerToUse.reset()); + } else if ("AzureBlob".equals(discriminatorValue)) { + return AzureBlobDataFeed.fromJson(readerToUse.reset()); + } else if ("AzureCosmosDB".equals(discriminatorValue)) { + return AzureCosmosDBDataFeed.fromJson(readerToUse.reset()); + } else if ("AzureDataExplorer".equals(discriminatorValue)) { + return AzureDataExplorerDataFeed.fromJson(readerToUse.reset()); + } else if ("AzureDataLakeStorageGen2".equals(discriminatorValue)) { + return AzureDataLakeStorageGen2DataFeed.fromJson(readerToUse.reset()); + } else if ("AzureEventHubs".equals(discriminatorValue)) { + return AzureEventHubsDataFeed.fromJson(readerToUse.reset()); + } else if ("AzureLogAnalytics".equals(discriminatorValue)) { + return AzureLogAnalyticsDataFeed.fromJson(readerToUse.reset()); + } else if ("AzureTable".equals(discriminatorValue)) { + return AzureTableDataFeed.fromJson(readerToUse.reset()); + } else if ("InfluxDB".equals(discriminatorValue)) { + return InfluxDBDataFeed.fromJson(readerToUse.reset()); + } else if ("MySql".equals(discriminatorValue)) { + return MySqlDataFeed.fromJson(readerToUse.reset()); + } else if ("PostgreSql".equals(discriminatorValue)) { + return PostgreSqlDataFeed.fromJson(readerToUse.reset()); + } else if ("SqlServer".equals(discriminatorValue)) { + return SQLServerDataFeed.fromJson(readerToUse.reset()); + } else if ("MongoDB".equals(discriminatorValue)) { + return MongoDBDataFeed.fromJson(readerToUse.reset()); } else { - readerToUse.skipChildren(); + return fromJsonKnownDiscriminator(readerToUse.reset()); } } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureApplicationInsights".equals(discriminatorValue)) { - return AzureApplicationInsightsDataFeed.fromJson(readerToUse.reset()); - } else if ("AzureBlob".equals(discriminatorValue)) { - return AzureBlobDataFeed.fromJson(readerToUse.reset()); - } else if ("AzureCosmosDB".equals(discriminatorValue)) { - return AzureCosmosDBDataFeed.fromJson(readerToUse.reset()); - } else if ("AzureDataExplorer".equals(discriminatorValue)) { - return AzureDataExplorerDataFeed.fromJson(readerToUse.reset()); - } else if ("AzureDataLakeStorageGen2".equals(discriminatorValue)) { - return AzureDataLakeStorageGen2DataFeed.fromJson(readerToUse.reset()); - } else if ("AzureEventHubs".equals(discriminatorValue)) { - return AzureEventHubsDataFeed.fromJson(readerToUse.reset()); - } else if ("AzureLogAnalytics".equals(discriminatorValue)) { - return AzureLogAnalyticsDataFeed.fromJson(readerToUse.reset()); - } else if ("AzureTable".equals(discriminatorValue)) { - return AzureTableDataFeed.fromJson(readerToUse.reset()); - } else if ("InfluxDB".equals(discriminatorValue)) { - return InfluxDBDataFeed.fromJson(readerToUse.reset()); - } else if ("MySql".equals(discriminatorValue)) { - return MySqlDataFeed.fromJson(readerToUse.reset()); - } else if ("PostgreSql".equals(discriminatorValue)) { - return PostgreSqlDataFeed.fromJson(readerToUse.reset()); - } else if ("SqlServer".equals(discriminatorValue)) { - return SQLServerDataFeed.fromJson(readerToUse.reset()); - } else if ("MongoDB".equals(discriminatorValue)) { - return MongoDBDataFeed.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } }); } @@ -869,8 +888,10 @@ static DataFeedDetail fromJsonKnownDiscriminator(JsonReader jsonReader) throws I List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedDataFeedDetail.metrics = metrics; } else if ("dataStartFrom".equals(fieldName)) { - deserializedDataFeedDetail.dataStartFrom - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDataFeedDetail.dataStartFrom = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("dataSourceType".equals(fieldName)) { + deserializedDataFeedDetail.dataSourceType = DataSourceType.fromString(reader.getString()); } else if ("dataFeedId".equals(fieldName)) { deserializedDataFeedDetail.dataFeedId = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); @@ -921,8 +942,8 @@ static DataFeedDetail fromJsonKnownDiscriminator(JsonReader jsonReader) throws I } else if ("status".equals(fieldName)) { deserializedDataFeedDetail.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedDataFeedDetail.createdTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDataFeedDetail.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedDataFeedDetail.actionLinkTemplate = reader.getString(); } else if ("authenticationType".equals(fieldName)) { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatch.java index 040fc2ddadf19..142802f2dd901 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,6 +20,11 @@ */ @Fluent public class DataFeedDetailPatch implements JsonSerializable { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.fromString("DataFeedDetailPatch"); + /* * data feed name */ @@ -30,8 +36,8 @@ public class DataFeedDetailPatch implements JsonSerializable { String discriminatorValue = null; - JsonReader readerToUse = reader.bufferObject(); - - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("dataSourceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("dataSourceType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("AzureApplicationInsights".equals(discriminatorValue)) { + return AzureApplicationInsightsDataFeedPatch.fromJson(readerToUse.reset()); + } else if ("AzureBlob".equals(discriminatorValue)) { + return AzureBlobDataFeedPatch.fromJson(readerToUse.reset()); + } else if ("AzureCosmosDB".equals(discriminatorValue)) { + return AzureCosmosDBDataFeedPatch.fromJson(readerToUse.reset()); + } else if ("AzureDataExplorer".equals(discriminatorValue)) { + return AzureDataExplorerDataFeedPatch.fromJson(readerToUse.reset()); + } else if ("AzureDataLakeStorageGen2".equals(discriminatorValue)) { + return AzureDataLakeStorageGen2DataFeedPatch.fromJson(readerToUse.reset()); + } else if ("AzureEventHubs".equals(discriminatorValue)) { + return AzureEventHubsDataFeedPatch.fromJson(readerToUse.reset()); + } else if ("AzureLogAnalytics".equals(discriminatorValue)) { + return AzureLogAnalyticsDataFeedPatch.fromJson(readerToUse.reset()); + } else if ("AzureTable".equals(discriminatorValue)) { + return AzureTableDataFeedPatch.fromJson(readerToUse.reset()); + } else if ("InfluxDB".equals(discriminatorValue)) { + return InfluxDBDataFeedPatch.fromJson(readerToUse.reset()); + } else if ("MySql".equals(discriminatorValue)) { + return MySqlDataFeedPatch.fromJson(readerToUse.reset()); + } else if ("PostgreSql".equals(discriminatorValue)) { + return PostgreSqlDataFeedPatch.fromJson(readerToUse.reset()); + } else if ("SqlServer".equals(discriminatorValue)) { + return SQLServerDataFeedPatch.fromJson(readerToUse.reset()); + } else if ("MongoDB".equals(discriminatorValue)) { + return MongoDBDataFeedPatch.fromJson(readerToUse.reset()); } else { - readerToUse.skipChildren(); + return fromJsonKnownDiscriminator(readerToUse.reset()); } } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureApplicationInsights".equals(discriminatorValue)) { - return AzureApplicationInsightsDataFeedPatch.fromJson(readerToUse.reset()); - } else if ("AzureBlob".equals(discriminatorValue)) { - return AzureBlobDataFeedPatch.fromJson(readerToUse.reset()); - } else if ("AzureCosmosDB".equals(discriminatorValue)) { - return AzureCosmosDBDataFeedPatch.fromJson(readerToUse.reset()); - } else if ("AzureDataExplorer".equals(discriminatorValue)) { - return AzureDataExplorerDataFeedPatch.fromJson(readerToUse.reset()); - } else if ("AzureDataLakeStorageGen2".equals(discriminatorValue)) { - return AzureDataLakeStorageGen2DataFeedPatch.fromJson(readerToUse.reset()); - } else if ("AzureEventHubs".equals(discriminatorValue)) { - return AzureEventHubsDataFeedPatch.fromJson(readerToUse.reset()); - } else if ("AzureLogAnalytics".equals(discriminatorValue)) { - return AzureLogAnalyticsDataFeedPatch.fromJson(readerToUse.reset()); - } else if ("AzureTable".equals(discriminatorValue)) { - return AzureTableDataFeedPatch.fromJson(readerToUse.reset()); - } else if ("InfluxDB".equals(discriminatorValue)) { - return InfluxDBDataFeedPatch.fromJson(readerToUse.reset()); - } else if ("MySql".equals(discriminatorValue)) { - return MySqlDataFeedPatch.fromJson(readerToUse.reset()); - } else if ("PostgreSql".equals(discriminatorValue)) { - return PostgreSqlDataFeedPatch.fromJson(readerToUse.reset()); - } else if ("SqlServer".equals(discriminatorValue)) { - return SQLServerDataFeedPatch.fromJson(readerToUse.reset()); - } else if ("MongoDB".equals(discriminatorValue)) { - return MongoDBDataFeedPatch.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } }); } @@ -655,15 +674,17 @@ static DataFeedDetailPatch fromJsonKnownDiscriminator(JsonReader jsonReader) thr String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataFeedName".equals(fieldName)) { + if ("dataSourceType".equals(fieldName)) { + deserializedDataFeedDetailPatch.dataSourceType = DataSourceType.fromString(reader.getString()); + } else if ("dataFeedName".equals(fieldName)) { deserializedDataFeedDetailPatch.dataFeedName = reader.getString(); } else if ("dataFeedDescription".equals(fieldName)) { deserializedDataFeedDetailPatch.dataFeedDescription = reader.getString(); } else if ("timestampColumn".equals(fieldName)) { deserializedDataFeedDetailPatch.timestampColumn = reader.getString(); } else if ("dataStartFrom".equals(fieldName)) { - deserializedDataFeedDetailPatch.dataStartFrom - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDataFeedDetailPatch.dataStartFrom = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedDataFeedDetailPatch.startOffsetInSeconds = reader.getNullable(JsonReader::getLong); } else if ("maxConcurrency".equals(fieldName)) { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDimension.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDimension.java index 4161d389204c3..1264fdc3c7b69 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDimension.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDimension.java @@ -72,6 +72,9 @@ public DataFeedDimension setDimensionDisplayName(String dimensionDisplayName) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionProgress.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionProgress.java index be35f39b4e6c2..1d24025746324 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionProgress.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionProgress.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -55,6 +56,9 @@ public OffsetDateTime getLatestActiveTimestamp() { return this.latestActiveTimestamp; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -77,11 +81,11 @@ public static DataFeedIngestionProgress fromJson(JsonReader jsonReader) throws I reader.nextToken(); if ("latestSuccessTimestamp".equals(fieldName)) { - deserializedDataFeedIngestionProgress.latestSuccessTimestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDataFeedIngestionProgress.latestSuccessTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("latestActiveTimestamp".equals(fieldName)) { - deserializedDataFeedIngestionProgress.latestActiveTimestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDataFeedIngestionProgress.latestActiveTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionStatus.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionStatus.java index 55ad622166251..919bf541025be 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionStatus.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionStatus.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -65,6 +66,9 @@ public String getMessage() { return this.message; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -87,8 +91,8 @@ public static DataFeedIngestionStatus fromJson(JsonReader jsonReader) throws IOE reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedDataFeedIngestionStatus.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDataFeedIngestionStatus.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("status".equals(fieldName)) { deserializedDataFeedIngestionStatus.status = IngestionStatusType.fromString(reader.getString()); } else if ("message".equals(fieldName)) { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedList.java index 57b1ac628f71c..815aac7f25453 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedList.java @@ -34,7 +34,7 @@ public DataFeedList() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -51,6 +51,9 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedMetric.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedMetric.java index cd9002f721a92..03f7021689fab 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedMetric.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedMetric.java @@ -111,6 +111,9 @@ public DataFeedMetric setMetricDescription(String metricDescription) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredential.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredential.java index a6ec7a9a2534c..bff21b3a8c018 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredential.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredential.java @@ -16,17 +16,37 @@ */ @Fluent public final class DataLakeGen2SharedKeyCredential extends DataSourceCredential { + /* + * Type of data source credential + */ + private DataSourceCredentialType dataSourceCredentialType = DataSourceCredentialType.DATA_LAKE_GEN2SHARED_KEY; + /* * The parameters property. */ private DataLakeGen2SharedKeyParam parameters; + /* + * Unique id of data source credential + */ + private UUID dataSourceCredentialId; + /** * Creates an instance of DataLakeGen2SharedKeyCredential class. */ public DataLakeGen2SharedKeyCredential() { } + /** + * Get the dataSourceCredentialType property: Type of data source credential. + * + * @return the dataSourceCredentialType value. + */ + @Override + public DataSourceCredentialType getDataSourceCredentialType() { + return this.dataSourceCredentialType; + } + /** * Get the parameters property: The parameters property. * @@ -47,6 +67,16 @@ public DataLakeGen2SharedKeyCredential setParameters(DataLakeGen2SharedKeyParam return this; } + /** + * Get the dataSourceCredentialId property: Unique id of data source credential. + * + * @return the dataSourceCredentialId value. + */ + @Override + public UUID getDataSourceCredentialId() { + return this.dataSourceCredentialId; + } + /** * {@inheritDoc} */ @@ -65,16 +95,17 @@ public DataLakeGen2SharedKeyCredential setDataSourceCredentialDescription(String return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceCredentialType", - DataSourceCredentialType.DATA_LAKE_GEN2SHARED_KEY == null - ? null - : DataSourceCredentialType.DATA_LAKE_GEN2SHARED_KEY.toString()); jsonWriter.writeStringField("dataSourceCredentialName", getDataSourceCredentialName()); jsonWriter.writeStringField("dataSourceCredentialDescription", getDataSourceCredentialDescription()); jsonWriter.writeJsonField("parameters", this.parameters); + jsonWriter.writeStringField("dataSourceCredentialType", + this.dataSourceCredentialType == null ? null : this.dataSourceCredentialType.toString()); return jsonWriter.writeEndObject(); } @@ -84,8 +115,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DataLakeGen2SharedKeyCredential if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the DataLakeGen2SharedKeyCredential. */ public static DataLakeGen2SharedKeyCredential fromJson(JsonReader jsonReader) throws IOException { @@ -96,23 +126,19 @@ public static DataLakeGen2SharedKeyCredential fromJson(JsonReader jsonReader) th String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceCredentialType".equals(fieldName)) { - String dataSourceCredentialType = reader.getString(); - if (!"DataLakeGen2SharedKey".equals(dataSourceCredentialType)) { - throw new IllegalStateException( - "'dataSourceCredentialType' was expected to be non-null and equal to 'DataLakeGen2SharedKey'. The found 'dataSourceCredentialType' was '" - + dataSourceCredentialType + "'."); - } - } else if ("dataSourceCredentialName".equals(fieldName)) { + if ("dataSourceCredentialName".equals(fieldName)) { deserializedDataLakeGen2SharedKeyCredential.setDataSourceCredentialName(reader.getString()); } else if ("dataSourceCredentialId".equals(fieldName)) { - deserializedDataLakeGen2SharedKeyCredential.setDataSourceCredentialId( - reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedDataLakeGen2SharedKeyCredential.dataSourceCredentialId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataSourceCredentialDescription".equals(fieldName)) { deserializedDataLakeGen2SharedKeyCredential.setDataSourceCredentialDescription(reader.getString()); } else if ("parameters".equals(fieldName)) { deserializedDataLakeGen2SharedKeyCredential.parameters = DataLakeGen2SharedKeyParam.fromJson(reader); + } else if ("dataSourceCredentialType".equals(fieldName)) { + deserializedDataLakeGen2SharedKeyCredential.dataSourceCredentialType + = DataSourceCredentialType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredentialPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredentialPatch.java index 927afd24ca5e9..843ecf9172e6f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredentialPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredentialPatch.java @@ -15,6 +15,11 @@ */ @Fluent public final class DataLakeGen2SharedKeyCredentialPatch extends DataSourceCredentialPatch { + /* + * Type of data source credential + */ + private DataSourceCredentialType dataSourceCredentialType = DataSourceCredentialType.DATA_LAKE_GEN2SHARED_KEY; + /* * The parameters property. */ @@ -26,6 +31,16 @@ public final class DataLakeGen2SharedKeyCredentialPatch extends DataSourceCreden public DataLakeGen2SharedKeyCredentialPatch() { } + /** + * Get the dataSourceCredentialType property: Type of data source credential. + * + * @return the dataSourceCredentialType value. + */ + @Override + public DataSourceCredentialType getDataSourceCredentialType() { + return this.dataSourceCredentialType; + } + /** * Get the parameters property: The parameters property. * @@ -65,15 +80,16 @@ public DataLakeGen2SharedKeyCredentialPatch setDataSourceCredentialName(String d return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceCredentialType", - DataSourceCredentialType.DATA_LAKE_GEN2SHARED_KEY == null - ? null - : DataSourceCredentialType.DATA_LAKE_GEN2SHARED_KEY.toString()); jsonWriter.writeStringField("dataSourceCredentialName", getDataSourceCredentialName()); jsonWriter.writeStringField("dataSourceCredentialDescription", getDataSourceCredentialDescription()); + jsonWriter.writeStringField("dataSourceCredentialType", + this.dataSourceCredentialType == null ? null : this.dataSourceCredentialType.toString()); jsonWriter.writeJsonField("parameters", this.parameters); return jsonWriter.writeEndObject(); } @@ -84,7 +100,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DataLakeGen2SharedKeyCredentialPatch if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the DataLakeGen2SharedKeyCredentialPatch. */ public static DataLakeGen2SharedKeyCredentialPatch fromJson(JsonReader jsonReader) throws IOException { @@ -95,18 +110,14 @@ public static DataLakeGen2SharedKeyCredentialPatch fromJson(JsonReader jsonReade String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceCredentialType".equals(fieldName)) { - String dataSourceCredentialType = reader.getString(); - if (!"DataLakeGen2SharedKey".equals(dataSourceCredentialType)) { - throw new IllegalStateException( - "'dataSourceCredentialType' was expected to be non-null and equal to 'DataLakeGen2SharedKey'. The found 'dataSourceCredentialType' was '" - + dataSourceCredentialType + "'."); - } - } else if ("dataSourceCredentialName".equals(fieldName)) { + if ("dataSourceCredentialName".equals(fieldName)) { deserializedDataLakeGen2SharedKeyCredentialPatch.setDataSourceCredentialName(reader.getString()); } else if ("dataSourceCredentialDescription".equals(fieldName)) { deserializedDataLakeGen2SharedKeyCredentialPatch .setDataSourceCredentialDescription(reader.getString()); + } else if ("dataSourceCredentialType".equals(fieldName)) { + deserializedDataLakeGen2SharedKeyCredentialPatch.dataSourceCredentialType + = DataSourceCredentialType.fromString(reader.getString()); } else if ("parameters".equals(fieldName)) { deserializedDataLakeGen2SharedKeyCredentialPatch.parameters = DataLakeGen2SharedKeyParamPatch.fromJson(reader); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParam.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParam.java index ba08650e37ecc..ebfa0340a26dd 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParam.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParam.java @@ -47,6 +47,9 @@ public DataLakeGen2SharedKeyParam setAccountKey(String accountKey) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParamPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParamPatch.java index 6fb93c4aa59a2..3d101fd9eece3 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParamPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParamPatch.java @@ -47,6 +47,9 @@ public DataLakeGen2SharedKeyParamPatch setAccountKey(String accountKey) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredential.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredential.java index 83934b8a93ab6..1bf54491de9e5 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredential.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredential.java @@ -17,6 +17,12 @@ */ @Fluent public class DataSourceCredential implements JsonSerializable { + /* + * Type of data source credential + */ + private DataSourceCredentialType dataSourceCredentialType + = DataSourceCredentialType.fromString("DataSourceCredential"); + /* * Unique id of data source credential */ @@ -38,6 +44,15 @@ public class DataSourceCredential implements JsonSerializable { String discriminatorValue = null; - JsonReader readerToUse = reader.bufferObject(); - - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("dataSourceCredentialType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("dataSourceCredentialType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("AzureSQLConnectionString".equals(discriminatorValue)) { + return AzureSQLConnectionStringCredential.fromJson(readerToUse.reset()); + } else if ("DataLakeGen2SharedKey".equals(discriminatorValue)) { + return DataLakeGen2SharedKeyCredential.fromJson(readerToUse.reset()); + } else if ("ServicePrincipal".equals(discriminatorValue)) { + return ServicePrincipalCredential.fromJson(readerToUse.reset()); + } else if ("ServicePrincipalInKV".equals(discriminatorValue)) { + return ServicePrincipalInKVCredential.fromJson(readerToUse.reset()); } else { - readerToUse.skipChildren(); + return fromJsonKnownDiscriminator(readerToUse.reset()); } } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureSQLConnectionString".equals(discriminatorValue)) { - return AzureSQLConnectionStringCredential.fromJson(readerToUse.reset()); - } else if ("DataLakeGen2SharedKey".equals(discriminatorValue)) { - return DataLakeGen2SharedKeyCredential.fromJson(readerToUse.reset()); - } else if ("ServicePrincipal".equals(discriminatorValue)) { - return ServicePrincipalCredential.fromJson(readerToUse.reset()); - } else if ("ServicePrincipalInKV".equals(discriminatorValue)) { - return ServicePrincipalInKVCredential.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } }); } @@ -156,6 +175,9 @@ static DataSourceCredential fromJsonKnownDiscriminator(JsonReader jsonReader) th if ("dataSourceCredentialName".equals(fieldName)) { deserializedDataSourceCredential.dataSourceCredentialName = reader.getString(); + } else if ("dataSourceCredentialType".equals(fieldName)) { + deserializedDataSourceCredential.dataSourceCredentialType + = DataSourceCredentialType.fromString(reader.getString()); } else if ("dataSourceCredentialId".equals(fieldName)) { deserializedDataSourceCredential.dataSourceCredentialId = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialList.java index 4ac744c566615..08313d5961958 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialList.java @@ -34,7 +34,7 @@ public DataSourceCredentialList() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -51,6 +51,9 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialPatch.java index 366464d57303e..0e69069964613 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialPatch.java @@ -16,6 +16,12 @@ */ @Fluent public class DataSourceCredentialPatch implements JsonSerializable { + /* + * Type of data source credential + */ + private DataSourceCredentialType dataSourceCredentialType + = DataSourceCredentialType.fromString("DataSourceCredentialPatch"); + /* * Name of data source credential */ @@ -32,6 +38,15 @@ public class DataSourceCredentialPatch implements JsonSerializable { String discriminatorValue = null; - JsonReader readerToUse = reader.bufferObject(); - - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("dataSourceCredentialType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("dataSourceCredentialType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("AzureSQLConnectionString".equals(discriminatorValue)) { + return AzureSQLConnectionStringCredentialPatch.fromJson(readerToUse.reset()); + } else if ("DataLakeGen2SharedKey".equals(discriminatorValue)) { + return DataLakeGen2SharedKeyCredentialPatch.fromJson(readerToUse.reset()); + } else if ("ServicePrincipal".equals(discriminatorValue)) { + return ServicePrincipalCredentialPatch.fromJson(readerToUse.reset()); + } else if ("ServicePrincipalInKV".equals(discriminatorValue)) { + return ServicePrincipalInKVCredentialPatch.fromJson(readerToUse.reset()); } else { - readerToUse.skipChildren(); + return fromJsonKnownDiscriminator(readerToUse.reset()); } } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureSQLConnectionString".equals(discriminatorValue)) { - return AzureSQLConnectionStringCredentialPatch.fromJson(readerToUse.reset()); - } else if ("DataLakeGen2SharedKey".equals(discriminatorValue)) { - return DataLakeGen2SharedKeyCredentialPatch.fromJson(readerToUse.reset()); - } else if ("ServicePrincipal".equals(discriminatorValue)) { - return ServicePrincipalCredentialPatch.fromJson(readerToUse.reset()); - } else if ("ServicePrincipalInKV".equals(discriminatorValue)) { - return ServicePrincipalInKVCredentialPatch.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } }); } @@ -127,7 +146,10 @@ static DataSourceCredentialPatch fromJsonKnownDiscriminator(JsonReader jsonReade String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceCredentialName".equals(fieldName)) { + if ("dataSourceCredentialType".equals(fieldName)) { + deserializedDataSourceCredentialPatch.dataSourceCredentialType + = DataSourceCredentialType.fromString(reader.getString()); + } else if ("dataSourceCredentialName".equals(fieldName)) { deserializedDataSourceCredentialPatch.dataSourceCredentialName = reader.getString(); } else if ("dataSourceCredentialDescription".equals(fieldName)) { deserializedDataSourceCredentialPatch.dataSourceCredentialDescription = reader.getString(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyFilterCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyFilterCondition.java index 22621a35d2504..4fca100616de9 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyFilterCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyFilterCondition.java @@ -73,6 +73,9 @@ public DetectionAnomalyFilterCondition setSeverityFilter(SeverityFilterCondition return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyResultQuery.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyResultQuery.java index 9535dd90cd83d..2e3d1dd73b65a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyResultQuery.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyResultQuery.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -99,6 +100,9 @@ public DetectionAnomalyResultQuery setFilter(DetectionAnomalyFilterCondition fil return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -127,11 +131,11 @@ public static DetectionAnomalyResultQuery fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("startTime".equals(fieldName)) { - deserializedDetectionAnomalyResultQuery.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDetectionAnomalyResultQuery.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedDetectionAnomalyResultQuery.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDetectionAnomalyResultQuery.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("filter".equals(fieldName)) { deserializedDetectionAnomalyResultQuery.filter = DetectionAnomalyFilterCondition.fromJson(reader); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionIncidentFilterCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionIncidentFilterCondition.java index c066e9321779a..547c1e89f2c46 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionIncidentFilterCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionIncidentFilterCondition.java @@ -48,6 +48,9 @@ public DetectionIncidentFilterCondition setDimensionFilter(List OffsetDateTime.parse(nonNullReader.getString())); + deserializedDetectionIncidentResultQuery.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedDetectionIncidentResultQuery.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDetectionIncidentResultQuery.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("filter".equals(fieldName)) { deserializedDetectionIncidentResultQuery.filter = DetectionIncidentFilterCondition.fromJson(reader); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionSeriesQuery.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionSeriesQuery.java index dfa1fe43d28fd..1d8147e2bd16b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionSeriesQuery.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionSeriesQuery.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -107,6 +108,9 @@ public DetectionSeriesQuery setSeries(List series) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -135,11 +139,11 @@ public static DetectionSeriesQuery fromJson(JsonReader jsonReader) throws IOExce reader.nextToken(); if ("startTime".equals(fieldName)) { - deserializedDetectionSeriesQuery.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDetectionSeriesQuery.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedDetectionSeriesQuery.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedDetectionSeriesQuery.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("series".equals(fieldName)) { List series = reader.readArray(reader1 -> SeriesIdentity.fromJson(reader1)); deserializedDetectionSeriesQuery.series = series; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupConfiguration.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupConfiguration.java index 3dcf7a8192d67..c2b50a1107a1b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupConfiguration.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupConfiguration.java @@ -153,6 +153,9 @@ public DimensionGroupConfiguration setChangeThresholdCondition(ChangeThresholdCo return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupIdentity.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupIdentity.java index 36e675fb27dab..978e1d7aa279a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupIdentity.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupIdentity.java @@ -48,6 +48,9 @@ public DimensionGroupIdentity setDimension(Map dimension) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfo.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfo.java index 51ecb62bd8725..c43a45e9df539 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfo.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfo.java @@ -17,17 +17,37 @@ */ @Fluent public final class EmailHookInfo extends HookInfo { + /* + * hook type + */ + private HookType hookType = HookType.EMAIL; + /* * The hookParameter property. */ private EmailHookParameter hookParameter; + /* + * Hook unique id + */ + private UUID hookId; + /** * Creates an instance of EmailHookInfo class. */ public EmailHookInfo() { } + /** + * Get the hookType property: hook type. + * + * @return the hookType value. + */ + @Override + public HookType getHookType() { + return this.hookType; + } + /** * Get the hookParameter property: The hookParameter property. * @@ -48,6 +68,16 @@ public EmailHookInfo setHookParameter(EmailHookParameter hookParameter) { return this; } + /** + * Get the hookId property: Hook unique id. + * + * @return the hookId value. + */ + @Override + public UUID getHookId() { + return this.hookId; + } + /** * {@inheritDoc} */ @@ -84,15 +114,18 @@ public EmailHookInfo setAdmins(List admins) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("hookType", HookType.EMAIL == null ? null : HookType.EMAIL.toString()); jsonWriter.writeStringField("hookName", getHookName()); jsonWriter.writeStringField("description", getDescription()); jsonWriter.writeStringField("externalLink", getExternalLink()); jsonWriter.writeArrayField("admins", getAdmins(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("hookParameter", this.hookParameter); + jsonWriter.writeStringField("hookType", this.hookType == null ? null : this.hookType.toString()); return jsonWriter.writeEndObject(); } @@ -102,8 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of EmailHookInfo if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the EmailHookInfo. */ public static EmailHookInfo fromJson(JsonReader jsonReader) throws IOException { @@ -113,18 +145,11 @@ public static EmailHookInfo fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("hookType".equals(fieldName)) { - String hookType = reader.getString(); - if (!"Email".equals(hookType)) { - throw new IllegalStateException( - "'hookType' was expected to be non-null and equal to 'Email'. The found 'hookType' was '" - + hookType + "'."); - } - } else if ("hookName".equals(fieldName)) { + if ("hookName".equals(fieldName)) { deserializedEmailHookInfo.setHookName(reader.getString()); } else if ("hookId".equals(fieldName)) { - deserializedEmailHookInfo - .setHookId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedEmailHookInfo.hookId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("description".equals(fieldName)) { deserializedEmailHookInfo.setDescription(reader.getString()); } else if ("externalLink".equals(fieldName)) { @@ -134,6 +159,8 @@ public static EmailHookInfo fromJson(JsonReader jsonReader) throws IOException { deserializedEmailHookInfo.setAdmins(admins); } else if ("hookParameter".equals(fieldName)) { deserializedEmailHookInfo.hookParameter = EmailHookParameter.fromJson(reader); + } else if ("hookType".equals(fieldName)) { + deserializedEmailHookInfo.hookType = HookType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfoPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfoPatch.java index 8a823bbef873d..0fad1f675a388 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfoPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfoPatch.java @@ -16,6 +16,11 @@ */ @Fluent public final class EmailHookInfoPatch extends HookInfoPatch { + /* + * hook type + */ + private HookType hookType = HookType.EMAIL; + /* * The hookParameter property. */ @@ -27,6 +32,16 @@ public final class EmailHookInfoPatch extends HookInfoPatch { public EmailHookInfoPatch() { } + /** + * Get the hookType property: hook type. + * + * @return the hookType value. + */ + @Override + public HookType getHookType() { + return this.hookType; + } + /** * Get the hookParameter property: The hookParameter property. * @@ -83,14 +98,17 @@ public EmailHookInfoPatch setAdmins(List admins) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("hookType", HookType.EMAIL == null ? null : HookType.EMAIL.toString()); jsonWriter.writeStringField("hookName", getHookName()); jsonWriter.writeStringField("description", getDescription()); jsonWriter.writeStringField("externalLink", getExternalLink()); jsonWriter.writeArrayField("admins", getAdmins(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("hookType", this.hookType == null ? null : this.hookType.toString()); jsonWriter.writeJsonField("hookParameter", this.hookParameter); return jsonWriter.writeEndObject(); } @@ -101,7 +119,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of EmailHookInfoPatch if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the EmailHookInfoPatch. */ public static EmailHookInfoPatch fromJson(JsonReader jsonReader) throws IOException { @@ -111,14 +128,7 @@ public static EmailHookInfoPatch fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("hookType".equals(fieldName)) { - String hookType = reader.getString(); - if (!"Email".equals(hookType)) { - throw new IllegalStateException( - "'hookType' was expected to be non-null and equal to 'Email'. The found 'hookType' was '" - + hookType + "'."); - } - } else if ("hookName".equals(fieldName)) { + if ("hookName".equals(fieldName)) { deserializedEmailHookInfoPatch.setHookName(reader.getString()); } else if ("description".equals(fieldName)) { deserializedEmailHookInfoPatch.setDescription(reader.getString()); @@ -127,6 +137,8 @@ public static EmailHookInfoPatch fromJson(JsonReader jsonReader) throws IOExcept } else if ("admins".equals(fieldName)) { List admins = reader.readArray(reader1 -> reader1.getString()); deserializedEmailHookInfoPatch.setAdmins(admins); + } else if ("hookType".equals(fieldName)) { + deserializedEmailHookInfoPatch.hookType = HookType.fromString(reader.getString()); } else if ("hookParameter".equals(fieldName)) { deserializedEmailHookInfoPatch.hookParameter = EmailHookParameterPatch.fromJson(reader); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameter.java index 47624332bd85e..244dd6118c437 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameter.java @@ -48,6 +48,9 @@ public EmailHookParameter setToList(List toList) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameterPatch.java index bb14336f715af..b10ac4457306b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameterPatch.java @@ -48,6 +48,9 @@ public EmailHookParameterPatch setToList(List toList) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusList.java index 62969a5b21b09..c5a57d1566eed 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusList.java @@ -35,7 +35,7 @@ public EnrichmentStatusList() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -52,6 +52,9 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusQueryOption.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusQueryOption.java index 4d615666e18cb..8fdb69774f8ee 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusQueryOption.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusQueryOption.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -74,6 +75,9 @@ public EnrichmentStatusQueryOption setEndTime(OffsetDateTime endTime) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -101,11 +105,11 @@ public static EnrichmentStatusQueryOption fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("startTime".equals(fieldName)) { - deserializedEnrichmentStatusQueryOption.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedEnrichmentStatusQueryOption.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedEnrichmentStatusQueryOption.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedEnrichmentStatusQueryOption.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ErrorCode.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ErrorCode.java index d546465d9da7a..4e8fb08a2f420 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ErrorCode.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ErrorCode.java @@ -72,6 +72,9 @@ public ErrorCode setCode(String code) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FeedbackDimensionFilter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FeedbackDimensionFilter.java index 316bb711bee90..23bfad1b48c8f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FeedbackDimensionFilter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FeedbackDimensionFilter.java @@ -48,6 +48,9 @@ public FeedbackDimensionFilter setDimension(Map dimension) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdCondition.java index 7d4a28b6a69e4..2525561601db0 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdCondition.java @@ -134,6 +134,9 @@ public HardThresholdCondition setSuppressCondition(SuppressCondition suppressCon return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdConditionPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdConditionPatch.java index f505db8cb277c..e7cce3afc274a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdConditionPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdConditionPatch.java @@ -134,6 +134,9 @@ public HardThresholdConditionPatch setSuppressCondition(SuppressConditionPatch s return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfo.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfo.java index 729ae25993a95..a9d194b752713 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfo.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfo.java @@ -18,6 +18,11 @@ */ @Fluent public class HookInfo implements JsonSerializable { + /* + * hook type + */ + private HookType hookType = HookType.fromString("HookInfo"); + /* * Hook unique id */ @@ -49,6 +54,15 @@ public class HookInfo implements JsonSerializable { public HookInfo() { } + /** + * Get the hookType property: hook type. + * + * @return the hookType value. + */ + public HookType getHookType() { + return this.hookType; + } + /** * Get the hookId property: Hook unique id. * @@ -149,10 +163,14 @@ public HookInfo setAdmins(List admins) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("hookName", this.hookName); + jsonWriter.writeStringField("hookType", this.hookType == null ? null : this.hookType.toString()); jsonWriter.writeStringField("description", this.description); jsonWriter.writeStringField("externalLink", this.externalLink); jsonWriter.writeArrayField("admins", this.admins, (writer, element) -> writer.writeString(element)); @@ -165,34 +183,33 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of HookInfo if the JsonReader was pointing to an instance of it, or null if it was pointing * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the HookInfo. */ public static HookInfo fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String discriminatorValue = null; - JsonReader readerToUse = reader.bufferObject(); - - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("hookType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("hookType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Email".equals(discriminatorValue)) { + return EmailHookInfo.fromJson(readerToUse.reset()); + } else if ("Webhook".equals(discriminatorValue)) { + return WebhookHookInfo.fromJson(readerToUse.reset()); } else { - readerToUse.skipChildren(); + return fromJsonKnownDiscriminator(readerToUse.reset()); } } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Email".equals(discriminatorValue)) { - return EmailHookInfo.fromJson(readerToUse.reset()); - } else if ("Webhook".equals(discriminatorValue)) { - return WebhookHookInfo.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } }); } @@ -205,6 +222,8 @@ static HookInfo fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOExcep if ("hookName".equals(fieldName)) { deserializedHookInfo.hookName = reader.getString(); + } else if ("hookType".equals(fieldName)) { + deserializedHookInfo.hookType = HookType.fromString(reader.getString()); } else if ("hookId".equals(fieldName)) { deserializedHookInfo.hookId = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfoPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfoPatch.java index b4a044e98d391..b5008924b62fb 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfoPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfoPatch.java @@ -17,6 +17,11 @@ */ @Fluent public class HookInfoPatch implements JsonSerializable { + /* + * hook type + */ + private HookType hookType = HookType.fromString("HookInfoPatch"); + /* * hook unique name */ @@ -43,6 +48,15 @@ public class HookInfoPatch implements JsonSerializable { public HookInfoPatch() { } + /** + * Get the hookType property: hook type. + * + * @return the hookType value. + */ + public HookType getHookType() { + return this.hookType; + } + /** * Get the hookName property: hook unique name. * @@ -123,9 +137,13 @@ public HookInfoPatch setAdmins(List admins) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("hookType", this.hookType == null ? null : this.hookType.toString()); jsonWriter.writeStringField("hookName", this.hookName); jsonWriter.writeStringField("description", this.description); jsonWriter.writeStringField("externalLink", this.externalLink); @@ -139,33 +157,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of HookInfoPatch if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the HookInfoPatch. */ public static HookInfoPatch fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String discriminatorValue = null; - JsonReader readerToUse = reader.bufferObject(); - - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("hookType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("hookType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Email".equals(discriminatorValue)) { + return EmailHookInfoPatch.fromJson(readerToUse.reset()); + } else if ("Webhook".equals(discriminatorValue)) { + return WebhookHookInfoPatch.fromJson(readerToUse.reset()); } else { - readerToUse.skipChildren(); + return fromJsonKnownDiscriminator(readerToUse.reset()); } } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Email".equals(discriminatorValue)) { - return EmailHookInfoPatch.fromJson(readerToUse.reset()); - } else if ("Webhook".equals(discriminatorValue)) { - return WebhookHookInfoPatch.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } }); } @@ -176,7 +193,9 @@ static HookInfoPatch fromJsonKnownDiscriminator(JsonReader jsonReader) throws IO String fieldName = reader.getFieldName(); reader.nextToken(); - if ("hookName".equals(fieldName)) { + if ("hookType".equals(fieldName)) { + deserializedHookInfoPatch.hookType = HookType.fromString(reader.getString()); + } else if ("hookName".equals(fieldName)) { deserializedHookInfoPatch.hookName = reader.getString(); } else if ("description".equals(fieldName)) { deserializedHookInfoPatch.description = reader.getString(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookList.java index f9be0580b0012..9493170cfa4a9 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookList.java @@ -34,7 +34,7 @@ public HookList() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -51,6 +51,9 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentProperty.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentProperty.java index ddd01b84975e6..bd62197aa9fcb 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentProperty.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentProperty.java @@ -93,6 +93,9 @@ public Double getExpectedValueOfRootNode() { return this.expectedValueOfRootNode; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResult.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResult.java index 7f835ee0ef8be..498d5a65d6dbc 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResult.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResult.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -204,6 +205,9 @@ public IncidentResult setProperty(IncidentProperty property) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -236,11 +240,11 @@ public static IncidentResult fromJson(JsonReader jsonReader) throws IOException if ("incidentId".equals(fieldName)) { deserializedIncidentResult.incidentId = reader.getString(); } else if ("startTime".equals(fieldName)) { - deserializedIncidentResult.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedIncidentResult.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastTime".equals(fieldName)) { - deserializedIncidentResult.lastTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedIncidentResult.lastTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("rootNode".equals(fieldName)) { deserializedIncidentResult.rootNode = SeriesIdentity.fromJson(reader); } else if ("property".equals(fieldName)) { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResultList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResultList.java index d711ff3aae18d..afdb7a1f2265f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResultList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResultList.java @@ -34,7 +34,7 @@ public IncidentResultList() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -62,6 +62,9 @@ public IncidentResultList setValue(List value) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeed.java index b473a77111fc7..5ae81cdea8485 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class InfluxDBDataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.INFLUX_DB; + /* * The dataSourceParameter property. */ private InfluxDBParameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of InfluxDBDataFeed class. */ public InfluxDBDataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -50,6 +91,56 @@ public InfluxDBDataFeed setDataSourceParameter(InfluxDBParameter dataSourceParam return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -266,11 +357,12 @@ public InfluxDBDataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.INFLUX_DB == null ? null : DataSourceType.INFLUX_DB.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -301,6 +393,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -310,8 +404,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of InfluxDBDataFeed if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the InfluxDBDataFeed. */ public static InfluxDBDataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -321,14 +414,7 @@ public static InfluxDBDataFeed fromJson(JsonReader jsonReader) throws IOExceptio String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"InfluxDB".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'InfluxDB'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedInfluxDBDataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedInfluxDBDataFeed.setGranularityName(Granularity.fromString(reader.getString())); @@ -336,11 +422,11 @@ public static InfluxDBDataFeed fromJson(JsonReader jsonReader) throws IOExceptio List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedInfluxDBDataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedInfluxDBDataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedInfluxDBDataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedInfluxDBDataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedInfluxDBDataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedInfluxDBDataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -382,14 +468,14 @@ public static InfluxDBDataFeed fromJson(JsonReader jsonReader) throws IOExceptio List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedInfluxDBDataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedInfluxDBDataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedInfluxDBDataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedInfluxDBDataFeed.setCreator(reader.getString()); + deserializedInfluxDBDataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedInfluxDBDataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedInfluxDBDataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedInfluxDBDataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedInfluxDBDataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedInfluxDBDataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -399,6 +485,8 @@ public static InfluxDBDataFeed fromJson(JsonReader jsonReader) throws IOExceptio deserializedInfluxDBDataFeed.setCredentialId(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedInfluxDBDataFeed.dataSourceParameter = InfluxDBParameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedInfluxDBDataFeed.dataSourceType = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeedPatch.java index 05f54a7da7055..5235934806bb1 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class InfluxDBDataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.INFLUX_DB; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class InfluxDBDataFeedPatch extends DataFeedDetailPatch { public InfluxDBDataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -238,11 +254,12 @@ public InfluxDBDataFeedPatch setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.INFLUX_DB == null ? null : DataSourceType.INFLUX_DB.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -268,6 +285,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -278,7 +297,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of InfluxDBDataFeedPatch if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the InfluxDBDataFeedPatch. */ public static InfluxDBDataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -288,22 +306,15 @@ public static InfluxDBDataFeedPatch fromJson(JsonReader jsonReader) throws IOExc String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"InfluxDB".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'InfluxDB'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedInfluxDBDataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedInfluxDBDataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedInfluxDBDataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedInfluxDBDataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedInfluxDBDataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedInfluxDBDataFeedPatch.setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); } else if ("maxConcurrency".equals(fieldName)) { @@ -346,6 +357,8 @@ public static InfluxDBDataFeedPatch fromJson(JsonReader jsonReader) throws IOExc .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedInfluxDBDataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedInfluxDBDataFeedPatch.dataSourceType = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedInfluxDBDataFeedPatch.dataSourceParameter = InfluxDBParameterPatch.fromJson(reader); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameter.java index a7b5f60f972b4..e66450bf4effa 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameter.java @@ -147,6 +147,9 @@ public InfluxDBParameter setQuery(String query) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameterPatch.java index 4960172f58685..ab5d60131ac7d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameterPatch.java @@ -147,6 +147,9 @@ public InfluxDBParameterPatch setQuery(String query) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionProgressResetOptions.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionProgressResetOptions.java index afad8425d86a8..b9d66b7300a86 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionProgressResetOptions.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionProgressResetOptions.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -74,6 +75,9 @@ public IngestionProgressResetOptions setEndTime(OffsetDateTime endTime) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -102,11 +106,11 @@ public static IngestionProgressResetOptions fromJson(JsonReader jsonReader) thro reader.nextToken(); if ("startTime".equals(fieldName)) { - deserializedIngestionProgressResetOptions.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedIngestionProgressResetOptions.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedIngestionProgressResetOptions.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedIngestionProgressResetOptions.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusList.java index cf401672a0c84..20ba0accba4c9 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusList.java @@ -34,7 +34,7 @@ public IngestionStatusList() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -51,6 +51,9 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusQueryOptions.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusQueryOptions.java index 859111efda309..b37048418adb3 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusQueryOptions.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusQueryOptions.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -74,6 +75,9 @@ public IngestionStatusQueryOptions setEndTime(OffsetDateTime endTime) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -101,11 +105,11 @@ public static IngestionStatusQueryOptions fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("startTime".equals(fieldName)) { - deserializedIngestionStatusQueryOptions.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedIngestionStatusQueryOptions.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedIngestionStatusQueryOptions.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedIngestionStatusQueryOptions.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAlertingConfiguration.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAlertingConfiguration.java index a2ef760fb50fe..1b6ef848c62a6 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAlertingConfiguration.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAlertingConfiguration.java @@ -224,6 +224,9 @@ public MetricAlertingConfiguration setValueFilter(ValueCondition valueFilter) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAnomalyAlertSnoozeCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAnomalyAlertSnoozeCondition.java index 0fa53a6ea4f85..bf9b09475ad02 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAnomalyAlertSnoozeCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAnomalyAlertSnoozeCondition.java @@ -97,6 +97,9 @@ public MetricAnomalyAlertSnoozeCondition setOnlyForSuccessive(boolean onlyForSuc return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataList.java index 8014034e5e63b..a205551ba1f1f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataList.java @@ -37,6 +37,9 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataQueryOptions.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataQueryOptions.java index 0549ebdba0230..6679921289aa8 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataQueryOptions.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataQueryOptions.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -107,6 +108,9 @@ public MetricDataQueryOptions setSeries(List> series) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -136,11 +140,11 @@ public static MetricDataQueryOptions fromJson(JsonReader jsonReader) throws IOEx reader.nextToken(); if ("startTime".equals(fieldName)) { - deserializedMetricDataQueryOptions.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedMetricDataQueryOptions.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedMetricDataQueryOptions.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedMetricDataQueryOptions.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("series".equals(fieldName)) { List> series = reader.readArray(reader1 -> reader1.readMap(reader2 -> reader2.getString())); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionList.java index 9a8eb323ef0e9..5e75e9f64b37f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionList.java @@ -34,7 +34,7 @@ public MetricDimensionList() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -51,6 +51,9 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionQueryOptions.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionQueryOptions.java index 918e6659a9965..fad753c8afbf2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionQueryOptions.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionQueryOptions.java @@ -72,6 +72,9 @@ public MetricDimensionQueryOptions setDimensionValueFilter(String dimensionValue return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedback.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedback.java index 595cb86f1e6e5..bf97f08a889c4 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedback.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedback.java @@ -4,7 +4,9 @@ package com.azure.ai.metricsadvisor.implementation.models; +import com.azure.ai.metricsadvisor.models.FeedbackType; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,6 +21,11 @@ */ @Fluent public class MetricFeedback implements JsonSerializable { + /* + * feedback type + */ + private FeedbackType feedbackType = FeedbackType.fromString("MetricFeedback"); + /* * feedback unique id */ @@ -50,6 +57,15 @@ public class MetricFeedback implements JsonSerializable { public MetricFeedback() { } + /** + * Get the feedbackType property: feedback type. + * + * @return the feedbackType value. + */ + public FeedbackType getFeedbackType() { + return this.feedbackType; + } + /** * Get the feedbackId property: feedback unique id. * @@ -150,11 +166,15 @@ public MetricFeedback setDimensionFilter(FeedbackDimensionFilter dimensionFilter return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("metricId", Objects.toString(this.metricId, null)); jsonWriter.writeJsonField("dimensionFilter", this.dimensionFilter); + jsonWriter.writeStringField("feedbackType", this.feedbackType == null ? null : this.feedbackType.toString()); return jsonWriter.writeEndObject(); } @@ -164,38 +184,37 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MetricFeedback if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the MetricFeedback. */ public static MetricFeedback fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String discriminatorValue = null; - JsonReader readerToUse = reader.bufferObject(); - - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("feedbackType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("feedbackType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Anomaly".equals(discriminatorValue)) { + return AnomalyFeedback.fromJson(readerToUse.reset()); + } else if ("ChangePoint".equals(discriminatorValue)) { + return ChangePointFeedback.fromJson(readerToUse.reset()); + } else if ("Comment".equals(discriminatorValue)) { + return CommentFeedback.fromJson(readerToUse.reset()); + } else if ("Period".equals(discriminatorValue)) { + return PeriodFeedback.fromJson(readerToUse.reset()); } else { - readerToUse.skipChildren(); + return fromJsonKnownDiscriminator(readerToUse.reset()); } } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Anomaly".equals(discriminatorValue)) { - return AnomalyFeedback.fromJson(readerToUse.reset()); - } else if ("ChangePoint".equals(discriminatorValue)) { - return ChangePointFeedback.fromJson(readerToUse.reset()); - } else if ("Comment".equals(discriminatorValue)) { - return CommentFeedback.fromJson(readerToUse.reset()); - } else if ("Period".equals(discriminatorValue)) { - return PeriodFeedback.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } }); } @@ -211,12 +230,14 @@ static MetricFeedback fromJsonKnownDiscriminator(JsonReader jsonReader) throws I = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dimensionFilter".equals(fieldName)) { deserializedMetricFeedback.dimensionFilter = FeedbackDimensionFilter.fromJson(reader); + } else if ("feedbackType".equals(fieldName)) { + deserializedMetricFeedback.feedbackType = FeedbackType.fromString(reader.getString()); } else if ("feedbackId".equals(fieldName)) { deserializedMetricFeedback.feedbackId = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("createdTime".equals(fieldName)) { - deserializedMetricFeedback.createdTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedMetricFeedback.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("userPrincipal".equals(fieldName)) { deserializedMetricFeedback.userPrincipal = reader.getString(); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackFilter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackFilter.java index 263151667bf2e..83a0d4daf41de 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackFilter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackFilter.java @@ -7,6 +7,7 @@ import com.azure.ai.metricsadvisor.models.FeedbackQueryTimeMode; import com.azure.ai.metricsadvisor.models.FeedbackType; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -178,6 +179,9 @@ public MetricFeedbackFilter setTimeMode(FeedbackQueryTimeMode timeMode) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -216,11 +220,11 @@ public static MetricFeedbackFilter fromJson(JsonReader jsonReader) throws IOExce } else if ("feedbackType".equals(fieldName)) { deserializedMetricFeedbackFilter.feedbackType = FeedbackType.fromString(reader.getString()); } else if ("startTime".equals(fieldName)) { - deserializedMetricFeedbackFilter.startTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedMetricFeedbackFilter.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedMetricFeedbackFilter.endTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedMetricFeedbackFilter.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("timeMode".equals(fieldName)) { deserializedMetricFeedbackFilter.timeMode = FeedbackQueryTimeMode.fromString(reader.getString()); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackList.java index 7153c28d2b3b0..fde3788bb88ee 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackList.java @@ -34,7 +34,7 @@ public MetricFeedbackList() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -51,6 +51,9 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesData.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesData.java index 4a08d39d87c4e..f8ae36a5d79ab 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesData.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesData.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -77,6 +78,9 @@ public List getValueList() { return this.valueList; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -103,7 +107,7 @@ public static MetricSeriesData fromJson(JsonReader jsonReader) throws IOExceptio deserializedMetricSeriesData.id = MetricSeriesItem.fromJson(reader); } else if ("timestampList".equals(fieldName)) { List timestampList = reader.readArray(reader1 -> reader1 - .getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); deserializedMetricSeriesData.timestampList = timestampList; } else if ("valueList".equals(fieldName)) { List valueList = reader.readArray(reader1 -> reader1.getDouble()); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesItem.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesItem.java index 1c43a8ac18ad1..bb55310152949 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesItem.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesItem.java @@ -52,6 +52,9 @@ public Map getDimension() { return this.dimension; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesList.java index 9ebe3bc2f01e3..85e3c542f7594 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesList.java @@ -34,7 +34,7 @@ public MetricSeriesList() { } /** - * Get the nextLink property: The @nextLink property. + * Get the nextLink property: The @nextLink property. * * @return the nextLink value. */ @@ -51,6 +51,9 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesQueryOptions.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesQueryOptions.java index d33c402f3fbc0..164ade62432e8 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesQueryOptions.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesQueryOptions.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -76,6 +77,9 @@ public MetricSeriesQueryOptions setDimensionFilter(Map> dim return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -103,8 +107,8 @@ public static MetricSeriesQueryOptions fromJson(JsonReader jsonReader) throws IO reader.nextToken(); if ("activeSince".equals(fieldName)) { - deserializedMetricSeriesQueryOptions.activeSince - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedMetricSeriesQueryOptions.activeSince = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("dimensionFilter".equals(fieldName)) { Map> dimensionFilter = reader.readMap(reader1 -> reader1.readArray(reader2 -> reader2.getString())); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeed.java index 803a506ca8d03..2b132fd684d42 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class MongoDBDataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.MONGO_DB; + /* * The dataSourceParameter property. */ private MongoDBParameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of MongoDBDataFeed class. */ public MongoDBDataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -50,6 +91,56 @@ public MongoDBDataFeed setDataSourceParameter(MongoDBParameter dataSourceParamet return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -266,11 +357,12 @@ public MongoDBDataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.MONGO_DB == null ? null : DataSourceType.MONGO_DB.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -301,6 +393,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -310,8 +404,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MongoDBDataFeed if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the MongoDBDataFeed. */ public static MongoDBDataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -321,14 +414,7 @@ public static MongoDBDataFeed fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"MongoDB".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'MongoDB'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedMongoDBDataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedMongoDBDataFeed.setGranularityName(Granularity.fromString(reader.getString())); @@ -336,11 +422,11 @@ public static MongoDBDataFeed fromJson(JsonReader jsonReader) throws IOException List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedMongoDBDataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedMongoDBDataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedMongoDBDataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedMongoDBDataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedMongoDBDataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedMongoDBDataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -382,14 +468,14 @@ public static MongoDBDataFeed fromJson(JsonReader jsonReader) throws IOException List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedMongoDBDataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedMongoDBDataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedMongoDBDataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedMongoDBDataFeed.setCreator(reader.getString()); + deserializedMongoDBDataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedMongoDBDataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedMongoDBDataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedMongoDBDataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedMongoDBDataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedMongoDBDataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -399,6 +485,8 @@ public static MongoDBDataFeed fromJson(JsonReader jsonReader) throws IOException deserializedMongoDBDataFeed.setCredentialId(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedMongoDBDataFeed.dataSourceParameter = MongoDBParameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedMongoDBDataFeed.dataSourceType = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeedPatch.java index bee51d77b04b6..fc64d8f747922 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class MongoDBDataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.MONGO_DB; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class MongoDBDataFeedPatch extends DataFeedDetailPatch { public MongoDBDataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -238,11 +254,12 @@ public MongoDBDataFeedPatch setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.MONGO_DB == null ? null : DataSourceType.MONGO_DB.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -268,6 +285,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -278,7 +297,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MongoDBDataFeedPatch if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the MongoDBDataFeedPatch. */ public static MongoDBDataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -288,22 +306,15 @@ public static MongoDBDataFeedPatch fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"MongoDB".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'MongoDB'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedMongoDBDataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedMongoDBDataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedMongoDBDataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedMongoDBDataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedMongoDBDataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedMongoDBDataFeedPatch.setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); } else if ("maxConcurrency".equals(fieldName)) { @@ -346,6 +357,8 @@ public static MongoDBDataFeedPatch fromJson(JsonReader jsonReader) throws IOExce .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedMongoDBDataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedMongoDBDataFeedPatch.dataSourceType = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedMongoDBDataFeedPatch.dataSourceParameter = MongoDBParameterPatch.fromJson(reader); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameter.java index b02c6698cf57d..058a22c9aafbf 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameter.java @@ -97,6 +97,9 @@ public MongoDBParameter setCommand(String command) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameterPatch.java index 343177bcf914a..3aa47f4067f48 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameterPatch.java @@ -97,6 +97,9 @@ public MongoDBParameterPatch setCommand(String command) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeed.java index 3ca12df6daa0d..f34108f3409ce 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class MySqlDataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.MY_SQL; + /* * The dataSourceParameter property. */ private SqlSourceParameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of MySqlDataFeed class. */ public MySqlDataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -50,6 +91,56 @@ public MySqlDataFeed setDataSourceParameter(SqlSourceParameter dataSourceParamet return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -266,11 +357,12 @@ public MySqlDataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.MY_SQL == null ? null : DataSourceType.MY_SQL.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -301,6 +393,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -310,8 +404,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MySqlDataFeed if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the MySqlDataFeed. */ public static MySqlDataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -321,14 +414,7 @@ public static MySqlDataFeed fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"MySql".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'MySql'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedMySqlDataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedMySqlDataFeed.setGranularityName(Granularity.fromString(reader.getString())); @@ -336,11 +422,11 @@ public static MySqlDataFeed fromJson(JsonReader jsonReader) throws IOException { List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedMySqlDataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedMySqlDataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedMySqlDataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedMySqlDataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedMySqlDataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedMySqlDataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -382,14 +468,14 @@ public static MySqlDataFeed fromJson(JsonReader jsonReader) throws IOException { List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedMySqlDataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedMySqlDataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedMySqlDataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedMySqlDataFeed.setCreator(reader.getString()); + deserializedMySqlDataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedMySqlDataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedMySqlDataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedMySqlDataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedMySqlDataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedMySqlDataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -399,6 +485,8 @@ public static MySqlDataFeed fromJson(JsonReader jsonReader) throws IOException { deserializedMySqlDataFeed.setCredentialId(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedMySqlDataFeed.dataSourceParameter = SqlSourceParameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedMySqlDataFeed.dataSourceType = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeedPatch.java index d95c53215f1eb..19ea0c3883934 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class MySqlDataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.MY_SQL; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class MySqlDataFeedPatch extends DataFeedDetailPatch { public MySqlDataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -238,11 +254,12 @@ public MySqlDataFeedPatch setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.MY_SQL == null ? null : DataSourceType.MY_SQL.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -268,6 +285,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -278,7 +297,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MySqlDataFeedPatch if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the MySqlDataFeedPatch. */ public static MySqlDataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -288,22 +306,15 @@ public static MySqlDataFeedPatch fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"MySql".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'MySql'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedMySqlDataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedMySqlDataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedMySqlDataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedMySqlDataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedMySqlDataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedMySqlDataFeedPatch.setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); } else if ("maxConcurrency".equals(fieldName)) { @@ -344,6 +355,8 @@ public static MySqlDataFeedPatch fromJson(JsonReader jsonReader) throws IOExcept .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedMySqlDataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedMySqlDataFeedPatch.dataSourceType = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedMySqlDataFeedPatch.dataSourceParameter = SQLSourceParameterPatch.fromJson(reader); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedback.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedback.java index d340ba46f8716..c4ad6ca49fa51 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedback.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedback.java @@ -6,6 +6,7 @@ import com.azure.ai.metricsadvisor.models.FeedbackType; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,47 @@ */ @Fluent public final class PeriodFeedback extends MetricFeedback { + /* + * feedback type + */ + private FeedbackType feedbackType = FeedbackType.PERIOD; + /* * The value property. */ private PeriodFeedbackValue value; + /* + * user who gives this feedback + */ + private String userPrincipal; + + /* + * feedback created time + */ + private OffsetDateTime createdTime; + + /* + * feedback unique id + */ + private UUID feedbackId; + /** * Creates an instance of PeriodFeedback class. */ public PeriodFeedback() { } + /** + * Get the feedbackType property: feedback type. + * + * @return the feedbackType value. + */ + @Override + public FeedbackType getFeedbackType() { + return this.feedbackType; + } + /** * Get the value property: The value property. * @@ -50,6 +81,36 @@ public PeriodFeedback setValue(PeriodFeedbackValue value) { return this; } + /** + * Get the userPrincipal property: user who gives this feedback. + * + * @return the userPrincipal value. + */ + @Override + public String getUserPrincipal() { + return this.userPrincipal; + } + + /** + * Get the createdTime property: feedback created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the feedbackId property: feedback unique id. + * + * @return the feedbackId value. + */ + @Override + public UUID getFeedbackId() { + return this.feedbackId; + } + /** * {@inheritDoc} */ @@ -68,14 +129,16 @@ public PeriodFeedback setDimensionFilter(FeedbackDimensionFilter dimensionFilter return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("feedbackType", - FeedbackType.PERIOD == null ? null : FeedbackType.PERIOD.toString()); jsonWriter.writeStringField("metricId", Objects.toString(getMetricId(), null)); jsonWriter.writeJsonField("dimensionFilter", getDimensionFilter()); jsonWriter.writeJsonField("value", this.value); + jsonWriter.writeStringField("feedbackType", this.feedbackType == null ? null : this.feedbackType.toString()); return jsonWriter.writeEndObject(); } @@ -85,8 +148,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PeriodFeedback if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PeriodFeedback. */ public static PeriodFeedback fromJson(JsonReader jsonReader) throws IOException { @@ -96,28 +158,23 @@ public static PeriodFeedback fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("feedbackType".equals(fieldName)) { - String feedbackType = reader.getString(); - if (!"Period".equals(feedbackType)) { - throw new IllegalStateException( - "'feedbackType' was expected to be non-null and equal to 'Period'. The found 'feedbackType' was '" - + feedbackType + "'."); - } - } else if ("metricId".equals(fieldName)) { + if ("metricId".equals(fieldName)) { deserializedPeriodFeedback .setMetricId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); } else if ("dimensionFilter".equals(fieldName)) { deserializedPeriodFeedback.setDimensionFilter(FeedbackDimensionFilter.fromJson(reader)); } else if ("feedbackId".equals(fieldName)) { - deserializedPeriodFeedback - .setFeedbackId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedPeriodFeedback.feedbackId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("createdTime".equals(fieldName)) { - deserializedPeriodFeedback.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedPeriodFeedback.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("userPrincipal".equals(fieldName)) { - deserializedPeriodFeedback.setUserPrincipal(reader.getString()); + deserializedPeriodFeedback.userPrincipal = reader.getString(); } else if ("value".equals(fieldName)) { deserializedPeriodFeedback.value = PeriodFeedbackValue.fromJson(reader); + } else if ("feedbackType".equals(fieldName)) { + deserializedPeriodFeedback.feedbackType = FeedbackType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedbackValue.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedbackValue.java index fea5fa27b2440..9207679a4bcad 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedbackValue.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedbackValue.java @@ -73,6 +73,9 @@ public PeriodFeedbackValue setPeriodValue(int periodValue) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeed.java index 2575dc67d7618..9bb4e712e4c71 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class PostgreSqlDataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.POSTGRE_SQL; + /* * The dataSourceParameter property. */ private SqlSourceParameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of PostgreSqlDataFeed class. */ public PostgreSqlDataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -50,6 +91,56 @@ public PostgreSqlDataFeed setDataSourceParameter(SqlSourceParameter dataSourcePa return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -266,11 +357,12 @@ public PostgreSqlDataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.POSTGRE_SQL == null ? null : DataSourceType.POSTGRE_SQL.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -301,6 +393,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -310,8 +404,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PostgreSqlDataFeed if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PostgreSqlDataFeed. */ public static PostgreSqlDataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -321,14 +414,7 @@ public static PostgreSqlDataFeed fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"PostgreSql".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'PostgreSql'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedPostgreSqlDataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedPostgreSqlDataFeed.setGranularityName(Granularity.fromString(reader.getString())); @@ -336,11 +422,11 @@ public static PostgreSqlDataFeed fromJson(JsonReader jsonReader) throws IOExcept List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedPostgreSqlDataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedPostgreSqlDataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedPostgreSqlDataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedPostgreSqlDataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedPostgreSqlDataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedPostgreSqlDataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -383,14 +469,14 @@ public static PostgreSqlDataFeed fromJson(JsonReader jsonReader) throws IOExcept List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedPostgreSqlDataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedPostgreSqlDataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedPostgreSqlDataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedPostgreSqlDataFeed.setCreator(reader.getString()); + deserializedPostgreSqlDataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedPostgreSqlDataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedPostgreSqlDataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedPostgreSqlDataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedPostgreSqlDataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedPostgreSqlDataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -400,6 +486,8 @@ public static PostgreSqlDataFeed fromJson(JsonReader jsonReader) throws IOExcept deserializedPostgreSqlDataFeed.setCredentialId(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedPostgreSqlDataFeed.dataSourceParameter = SqlSourceParameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedPostgreSqlDataFeed.dataSourceType = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeedPatch.java index c4b1789e2d88e..27abd75f0991a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class PostgreSqlDataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.POSTGRE_SQL; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class PostgreSqlDataFeedPatch extends DataFeedDetailPatch { public PostgreSqlDataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -238,11 +254,12 @@ public PostgreSqlDataFeedPatch setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.POSTGRE_SQL == null ? null : DataSourceType.POSTGRE_SQL.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -268,6 +285,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -278,7 +297,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PostgreSqlDataFeedPatch if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the PostgreSqlDataFeedPatch. */ public static PostgreSqlDataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -288,22 +306,15 @@ public static PostgreSqlDataFeedPatch fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"PostgreSql".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'PostgreSql'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedPostgreSqlDataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedPostgreSqlDataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedPostgreSqlDataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedPostgreSqlDataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedPostgreSqlDataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedPostgreSqlDataFeedPatch .setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); @@ -347,6 +358,8 @@ public static PostgreSqlDataFeedPatch fromJson(JsonReader jsonReader) throws IOE .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedPostgreSqlDataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedPostgreSqlDataFeedPatch.dataSourceType = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedPostgreSqlDataFeedPatch.dataSourceParameter = SQLSourceParameterPatch.fromJson(reader); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCause.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCause.java index d6c423a8c0f0c..81c8fd99e0c15 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCause.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCause.java @@ -123,6 +123,9 @@ public RootCause setDescription(String description) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCauseList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCauseList.java index f38b218851ddd..2b4eb9644a6a9 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCauseList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCauseList.java @@ -48,6 +48,9 @@ public RootCauseList setValue(List value) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeed.java index d4f8ec125f2a4..e5ff2c5e12194 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeed.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -19,17 +20,57 @@ */ @Fluent public final class SQLServerDataFeed extends DataFeedDetail { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.SQL_SERVER; + /* * The dataSourceParameter property. */ private SqlSourceParameter dataSourceParameter; + /* + * data feed created time + */ + private OffsetDateTime createdTime; + + /* + * data feed status + */ + private EntityStatus status; + + /* + * data feed creator + */ + private String creator; + + /* + * the query user is one of data feed administrator or not + */ + private Boolean isAdmin; + + /* + * data feed unique id + */ + private UUID dataFeedId; + /** * Creates an instance of SQLServerDataFeed class. */ public SQLServerDataFeed() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -50,6 +91,56 @@ public SQLServerDataFeed setDataSourceParameter(SqlSourceParameter dataSourcePar return this; } + /** + * Get the createdTime property: data feed created time. + * + * @return the createdTime value. + */ + @Override + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the status property: data feed status. + * + * @return the status value. + */ + @Override + public EntityStatus getStatus() { + return this.status; + } + + /** + * Get the creator property: data feed creator. + * + * @return the creator value. + */ + @Override + public String getCreator() { + return this.creator; + } + + /** + * Get the isAdmin property: the query user is one of data feed administrator or not. + * + * @return the isAdmin value. + */ + @Override + public Boolean isAdmin() { + return this.isAdmin; + } + + /** + * Get the dataFeedId property: data feed unique id. + * + * @return the dataFeedId value. + */ + @Override + public UUID getDataFeedId() { + return this.dataFeedId; + } + /** * {@inheritDoc} */ @@ -266,11 +357,12 @@ public SQLServerDataFeed setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.SQL_SERVER == null ? null : DataSourceType.SQL_SERVER.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("granularityName", getGranularityName() == null ? null : getGranularityName().toString()); @@ -301,6 +393,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); return jsonWriter.writeEndObject(); } @@ -310,8 +404,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SQLServerDataFeed if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the SQLServerDataFeed. */ public static SQLServerDataFeed fromJson(JsonReader jsonReader) throws IOException { @@ -321,14 +414,7 @@ public static SQLServerDataFeed fromJson(JsonReader jsonReader) throws IOExcepti String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"SqlServer".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'SqlServer'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedSQLServerDataFeed.setDataFeedName(reader.getString()); } else if ("granularityName".equals(fieldName)) { deserializedSQLServerDataFeed.setGranularityName(Granularity.fromString(reader.getString())); @@ -336,11 +422,11 @@ public static SQLServerDataFeed fromJson(JsonReader jsonReader) throws IOExcepti List metrics = reader.readArray(reader1 -> DataFeedMetric.fromJson(reader1)); deserializedSQLServerDataFeed.setMetrics(metrics); } else if ("dataStartFrom".equals(fieldName)) { - deserializedSQLServerDataFeed.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedSQLServerDataFeed.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("dataFeedId".equals(fieldName)) { - deserializedSQLServerDataFeed - .setDataFeedId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedSQLServerDataFeed.dataFeedId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataFeedDescription".equals(fieldName)) { deserializedSQLServerDataFeed.setDataFeedDescription(reader.getString()); } else if ("granularityAmount".equals(fieldName)) { @@ -382,14 +468,14 @@ public static SQLServerDataFeed fromJson(JsonReader jsonReader) throws IOExcepti List viewers = reader.readArray(reader1 -> reader1.getString()); deserializedSQLServerDataFeed.setViewers(viewers); } else if ("isAdmin".equals(fieldName)) { - deserializedSQLServerDataFeed.setIsAdmin(reader.getNullable(JsonReader::getBoolean)); + deserializedSQLServerDataFeed.isAdmin = reader.getNullable(JsonReader::getBoolean); } else if ("creator".equals(fieldName)) { - deserializedSQLServerDataFeed.setCreator(reader.getString()); + deserializedSQLServerDataFeed.creator = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedSQLServerDataFeed.setStatus(EntityStatus.fromString(reader.getString())); + deserializedSQLServerDataFeed.status = EntityStatus.fromString(reader.getString()); } else if ("createdTime".equals(fieldName)) { - deserializedSQLServerDataFeed.setCreatedTime( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedSQLServerDataFeed.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("actionLinkTemplate".equals(fieldName)) { deserializedSQLServerDataFeed.setActionLinkTemplate(reader.getString()); } else if ("authenticationType".equals(fieldName)) { @@ -399,6 +485,8 @@ public static SQLServerDataFeed fromJson(JsonReader jsonReader) throws IOExcepti deserializedSQLServerDataFeed.setCredentialId(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedSQLServerDataFeed.dataSourceParameter = SqlSourceParameter.fromJson(reader); + } else if ("dataSourceType".equals(fieldName)) { + deserializedSQLServerDataFeed.dataSourceType = DataSourceType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeedPatch.java index c6ba0668fc23d..7554dd4076065 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeedPatch.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +19,11 @@ */ @Fluent public final class SQLServerDataFeedPatch extends DataFeedDetailPatch { + /* + * data source type + */ + private DataSourceType dataSourceType = DataSourceType.SQL_SERVER; + /* * The dataSourceParameter property. */ @@ -29,6 +35,16 @@ public final class SQLServerDataFeedPatch extends DataFeedDetailPatch { public SQLServerDataFeedPatch() { } + /** + * Get the dataSourceType property: data source type. + * + * @return the dataSourceType value. + */ + @Override + public DataSourceType getDataSourceType() { + return this.dataSourceType; + } + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -238,11 +254,12 @@ public SQLServerDataFeedPatch setCredentialId(String credentialId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceType", - DataSourceType.SQL_SERVER == null ? null : DataSourceType.SQL_SERVER.toString()); jsonWriter.writeStringField("dataFeedName", getDataFeedName()); jsonWriter.writeStringField("dataFeedDescription", getDataFeedDescription()); jsonWriter.writeStringField("timestampColumn", getTimestampColumn()); @@ -268,6 +285,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("authenticationType", getAuthenticationType() == null ? null : getAuthenticationType().toString()); jsonWriter.writeStringField("credentialId", getCredentialId()); + jsonWriter.writeStringField("dataSourceType", + this.dataSourceType == null ? null : this.dataSourceType.toString()); jsonWriter.writeJsonField("dataSourceParameter", this.dataSourceParameter); return jsonWriter.writeEndObject(); } @@ -278,7 +297,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SQLServerDataFeedPatch if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the SQLServerDataFeedPatch. */ public static SQLServerDataFeedPatch fromJson(JsonReader jsonReader) throws IOException { @@ -288,22 +306,15 @@ public static SQLServerDataFeedPatch fromJson(JsonReader jsonReader) throws IOEx String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceType".equals(fieldName)) { - String dataSourceType = reader.getString(); - if (!"SqlServer".equals(dataSourceType)) { - throw new IllegalStateException( - "'dataSourceType' was expected to be non-null and equal to 'SqlServer'. The found 'dataSourceType' was '" - + dataSourceType + "'."); - } - } else if ("dataFeedName".equals(fieldName)) { + if ("dataFeedName".equals(fieldName)) { deserializedSQLServerDataFeedPatch.setDataFeedName(reader.getString()); } else if ("dataFeedDescription".equals(fieldName)) { deserializedSQLServerDataFeedPatch.setDataFeedDescription(reader.getString()); } else if ("timestampColumn".equals(fieldName)) { deserializedSQLServerDataFeedPatch.setTimestampColumn(reader.getString()); } else if ("dataStartFrom".equals(fieldName)) { - deserializedSQLServerDataFeedPatch.setDataStartFrom( - reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + deserializedSQLServerDataFeedPatch.setDataStartFrom(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("startOffsetInSeconds".equals(fieldName)) { deserializedSQLServerDataFeedPatch.setStartOffsetInSeconds(reader.getNullable(JsonReader::getLong)); } else if ("maxConcurrency".equals(fieldName)) { @@ -346,6 +357,8 @@ public static SQLServerDataFeedPatch fromJson(JsonReader jsonReader) throws IOEx .setAuthenticationType(AuthenticationTypeEnum.fromString(reader.getString())); } else if ("credentialId".equals(fieldName)) { deserializedSQLServerDataFeedPatch.setCredentialId(reader.getString()); + } else if ("dataSourceType".equals(fieldName)) { + deserializedSQLServerDataFeedPatch.dataSourceType = DataSourceType.fromString(reader.getString()); } else if ("dataSourceParameter".equals(fieldName)) { deserializedSQLServerDataFeedPatch.dataSourceParameter = SQLSourceParameterPatch.fromJson(reader); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLSourceParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLSourceParameterPatch.java index b0692c3630a16..a7634275e58a7 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLSourceParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLSourceParameterPatch.java @@ -72,6 +72,9 @@ public SQLSourceParameterPatch setQuery(String query) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesConfiguration.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesConfiguration.java index 4aed435ca1bc8..4a68ca7c94416 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesConfiguration.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesConfiguration.java @@ -153,6 +153,9 @@ public SeriesConfiguration setChangeThresholdCondition(ChangeThresholdCondition return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesIdentity.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesIdentity.java index 9aa76313d5cfc..c939c96c53026 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesIdentity.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesIdentity.java @@ -48,6 +48,9 @@ public SeriesIdentity setDimension(Map dimension) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResult.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResult.java index 2947f04e89505..ea70ed5e95822 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResult.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResult.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -225,6 +226,9 @@ public SeriesResult setUpperBoundaryList(List upperBoundaryList) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -264,7 +268,7 @@ public static SeriesResult fromJson(JsonReader jsonReader) throws IOException { deserializedSeriesResult.series = SeriesIdentity.fromJson(reader); } else if ("timestampList".equals(fieldName)) { List timestampList = reader.readArray(reader1 -> reader1 - .getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()))); + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); deserializedSeriesResult.timestampList = timestampList; } else if ("valueList".equals(fieldName)) { List valueList = reader.readArray(reader1 -> reader1.getDouble()); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResultList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResultList.java index bc9ad37335728..5f2aec5fa9579 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResultList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResultList.java @@ -48,6 +48,9 @@ public SeriesResultList setValue(List value) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredential.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredential.java index 9737d0c105180..9a21a49ead468 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredential.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredential.java @@ -16,17 +16,37 @@ */ @Fluent public final class ServicePrincipalCredential extends DataSourceCredential { + /* + * Type of data source credential + */ + private DataSourceCredentialType dataSourceCredentialType = DataSourceCredentialType.SERVICE_PRINCIPAL; + /* * The parameters property. */ private ServicePrincipalParam parameters; + /* + * Unique id of data source credential + */ + private UUID dataSourceCredentialId; + /** * Creates an instance of ServicePrincipalCredential class. */ public ServicePrincipalCredential() { } + /** + * Get the dataSourceCredentialType property: Type of data source credential. + * + * @return the dataSourceCredentialType value. + */ + @Override + public DataSourceCredentialType getDataSourceCredentialType() { + return this.dataSourceCredentialType; + } + /** * Get the parameters property: The parameters property. * @@ -47,6 +67,16 @@ public ServicePrincipalCredential setParameters(ServicePrincipalParam parameters return this; } + /** + * Get the dataSourceCredentialId property: Unique id of data source credential. + * + * @return the dataSourceCredentialId value. + */ + @Override + public UUID getDataSourceCredentialId() { + return this.dataSourceCredentialId; + } + /** * {@inheritDoc} */ @@ -65,16 +95,17 @@ public ServicePrincipalCredential setDataSourceCredentialDescription(String data return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceCredentialType", - DataSourceCredentialType.SERVICE_PRINCIPAL == null - ? null - : DataSourceCredentialType.SERVICE_PRINCIPAL.toString()); jsonWriter.writeStringField("dataSourceCredentialName", getDataSourceCredentialName()); jsonWriter.writeStringField("dataSourceCredentialDescription", getDataSourceCredentialDescription()); jsonWriter.writeJsonField("parameters", this.parameters); + jsonWriter.writeStringField("dataSourceCredentialType", + this.dataSourceCredentialType == null ? null : this.dataSourceCredentialType.toString()); return jsonWriter.writeEndObject(); } @@ -84,8 +115,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServicePrincipalCredential if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ServicePrincipalCredential. */ public static ServicePrincipalCredential fromJson(JsonReader jsonReader) throws IOException { @@ -95,22 +125,18 @@ public static ServicePrincipalCredential fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceCredentialType".equals(fieldName)) { - String dataSourceCredentialType = reader.getString(); - if (!"ServicePrincipal".equals(dataSourceCredentialType)) { - throw new IllegalStateException( - "'dataSourceCredentialType' was expected to be non-null and equal to 'ServicePrincipal'. The found 'dataSourceCredentialType' was '" - + dataSourceCredentialType + "'."); - } - } else if ("dataSourceCredentialName".equals(fieldName)) { + if ("dataSourceCredentialName".equals(fieldName)) { deserializedServicePrincipalCredential.setDataSourceCredentialName(reader.getString()); } else if ("dataSourceCredentialId".equals(fieldName)) { - deserializedServicePrincipalCredential.setDataSourceCredentialId( - reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedServicePrincipalCredential.dataSourceCredentialId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataSourceCredentialDescription".equals(fieldName)) { deserializedServicePrincipalCredential.setDataSourceCredentialDescription(reader.getString()); } else if ("parameters".equals(fieldName)) { deserializedServicePrincipalCredential.parameters = ServicePrincipalParam.fromJson(reader); + } else if ("dataSourceCredentialType".equals(fieldName)) { + deserializedServicePrincipalCredential.dataSourceCredentialType + = DataSourceCredentialType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredentialPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredentialPatch.java index 464bd53e5bb24..e1b24e0ba9da4 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredentialPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredentialPatch.java @@ -15,6 +15,11 @@ */ @Fluent public final class ServicePrincipalCredentialPatch extends DataSourceCredentialPatch { + /* + * Type of data source credential + */ + private DataSourceCredentialType dataSourceCredentialType = DataSourceCredentialType.SERVICE_PRINCIPAL; + /* * The parameters property. */ @@ -26,6 +31,16 @@ public final class ServicePrincipalCredentialPatch extends DataSourceCredentialP public ServicePrincipalCredentialPatch() { } + /** + * Get the dataSourceCredentialType property: Type of data source credential. + * + * @return the dataSourceCredentialType value. + */ + @Override + public DataSourceCredentialType getDataSourceCredentialType() { + return this.dataSourceCredentialType; + } + /** * Get the parameters property: The parameters property. * @@ -64,15 +79,16 @@ public ServicePrincipalCredentialPatch setDataSourceCredentialDescription(String return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceCredentialType", - DataSourceCredentialType.SERVICE_PRINCIPAL == null - ? null - : DataSourceCredentialType.SERVICE_PRINCIPAL.toString()); jsonWriter.writeStringField("dataSourceCredentialName", getDataSourceCredentialName()); jsonWriter.writeStringField("dataSourceCredentialDescription", getDataSourceCredentialDescription()); + jsonWriter.writeStringField("dataSourceCredentialType", + this.dataSourceCredentialType == null ? null : this.dataSourceCredentialType.toString()); jsonWriter.writeJsonField("parameters", this.parameters); return jsonWriter.writeEndObject(); } @@ -83,7 +99,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServicePrincipalCredentialPatch if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the ServicePrincipalCredentialPatch. */ public static ServicePrincipalCredentialPatch fromJson(JsonReader jsonReader) throws IOException { @@ -94,17 +109,13 @@ public static ServicePrincipalCredentialPatch fromJson(JsonReader jsonReader) th String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceCredentialType".equals(fieldName)) { - String dataSourceCredentialType = reader.getString(); - if (!"ServicePrincipal".equals(dataSourceCredentialType)) { - throw new IllegalStateException( - "'dataSourceCredentialType' was expected to be non-null and equal to 'ServicePrincipal'. The found 'dataSourceCredentialType' was '" - + dataSourceCredentialType + "'."); - } - } else if ("dataSourceCredentialName".equals(fieldName)) { + if ("dataSourceCredentialName".equals(fieldName)) { deserializedServicePrincipalCredentialPatch.setDataSourceCredentialName(reader.getString()); } else if ("dataSourceCredentialDescription".equals(fieldName)) { deserializedServicePrincipalCredentialPatch.setDataSourceCredentialDescription(reader.getString()); + } else if ("dataSourceCredentialType".equals(fieldName)) { + deserializedServicePrincipalCredentialPatch.dataSourceCredentialType + = DataSourceCredentialType.fromString(reader.getString()); } else if ("parameters".equals(fieldName)) { deserializedServicePrincipalCredentialPatch.parameters = ServicePrincipalParamPatch.fromJson(reader); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredential.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredential.java index 68580c890a590..6685b95291de1 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredential.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredential.java @@ -16,17 +16,37 @@ */ @Fluent public final class ServicePrincipalInKVCredential extends DataSourceCredential { + /* + * Type of data source credential + */ + private DataSourceCredentialType dataSourceCredentialType = DataSourceCredentialType.SERVICE_PRINCIPAL_IN_KV; + /* * The parameters property. */ private ServicePrincipalInKVParam parameters; + /* + * Unique id of data source credential + */ + private UUID dataSourceCredentialId; + /** * Creates an instance of ServicePrincipalInKVCredential class. */ public ServicePrincipalInKVCredential() { } + /** + * Get the dataSourceCredentialType property: Type of data source credential. + * + * @return the dataSourceCredentialType value. + */ + @Override + public DataSourceCredentialType getDataSourceCredentialType() { + return this.dataSourceCredentialType; + } + /** * Get the parameters property: The parameters property. * @@ -47,6 +67,16 @@ public ServicePrincipalInKVCredential setParameters(ServicePrincipalInKVParam pa return this; } + /** + * Get the dataSourceCredentialId property: Unique id of data source credential. + * + * @return the dataSourceCredentialId value. + */ + @Override + public UUID getDataSourceCredentialId() { + return this.dataSourceCredentialId; + } + /** * {@inheritDoc} */ @@ -65,16 +95,17 @@ public ServicePrincipalInKVCredential setDataSourceCredentialDescription(String return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceCredentialType", - DataSourceCredentialType.SERVICE_PRINCIPAL_IN_KV == null - ? null - : DataSourceCredentialType.SERVICE_PRINCIPAL_IN_KV.toString()); jsonWriter.writeStringField("dataSourceCredentialName", getDataSourceCredentialName()); jsonWriter.writeStringField("dataSourceCredentialDescription", getDataSourceCredentialDescription()); jsonWriter.writeJsonField("parameters", this.parameters); + jsonWriter.writeStringField("dataSourceCredentialType", + this.dataSourceCredentialType == null ? null : this.dataSourceCredentialType.toString()); return jsonWriter.writeEndObject(); } @@ -84,8 +115,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServicePrincipalInKVCredential if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ServicePrincipalInKVCredential. */ public static ServicePrincipalInKVCredential fromJson(JsonReader jsonReader) throws IOException { @@ -96,22 +126,18 @@ public static ServicePrincipalInKVCredential fromJson(JsonReader jsonReader) thr String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceCredentialType".equals(fieldName)) { - String dataSourceCredentialType = reader.getString(); - if (!"ServicePrincipalInKV".equals(dataSourceCredentialType)) { - throw new IllegalStateException( - "'dataSourceCredentialType' was expected to be non-null and equal to 'ServicePrincipalInKV'. The found 'dataSourceCredentialType' was '" - + dataSourceCredentialType + "'."); - } - } else if ("dataSourceCredentialName".equals(fieldName)) { + if ("dataSourceCredentialName".equals(fieldName)) { deserializedServicePrincipalInKVCredential.setDataSourceCredentialName(reader.getString()); } else if ("dataSourceCredentialId".equals(fieldName)) { - deserializedServicePrincipalInKVCredential.setDataSourceCredentialId( - reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedServicePrincipalInKVCredential.dataSourceCredentialId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("dataSourceCredentialDescription".equals(fieldName)) { deserializedServicePrincipalInKVCredential.setDataSourceCredentialDescription(reader.getString()); } else if ("parameters".equals(fieldName)) { deserializedServicePrincipalInKVCredential.parameters = ServicePrincipalInKVParam.fromJson(reader); + } else if ("dataSourceCredentialType".equals(fieldName)) { + deserializedServicePrincipalInKVCredential.dataSourceCredentialType + = DataSourceCredentialType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredentialPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredentialPatch.java index a7e26e2e6e369..e63a8860bcbcb 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredentialPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredentialPatch.java @@ -15,6 +15,11 @@ */ @Fluent public final class ServicePrincipalInKVCredentialPatch extends DataSourceCredentialPatch { + /* + * Type of data source credential + */ + private DataSourceCredentialType dataSourceCredentialType = DataSourceCredentialType.SERVICE_PRINCIPAL_IN_KV; + /* * The parameters property. */ @@ -26,6 +31,16 @@ public final class ServicePrincipalInKVCredentialPatch extends DataSourceCredent public ServicePrincipalInKVCredentialPatch() { } + /** + * Get the dataSourceCredentialType property: Type of data source credential. + * + * @return the dataSourceCredentialType value. + */ + @Override + public DataSourceCredentialType getDataSourceCredentialType() { + return this.dataSourceCredentialType; + } + /** * Get the parameters property: The parameters property. * @@ -65,15 +80,16 @@ public ServicePrincipalInKVCredentialPatch setDataSourceCredentialName(String da return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSourceCredentialType", - DataSourceCredentialType.SERVICE_PRINCIPAL_IN_KV == null - ? null - : DataSourceCredentialType.SERVICE_PRINCIPAL_IN_KV.toString()); jsonWriter.writeStringField("dataSourceCredentialName", getDataSourceCredentialName()); jsonWriter.writeStringField("dataSourceCredentialDescription", getDataSourceCredentialDescription()); + jsonWriter.writeStringField("dataSourceCredentialType", + this.dataSourceCredentialType == null ? null : this.dataSourceCredentialType.toString()); jsonWriter.writeJsonField("parameters", this.parameters); return jsonWriter.writeEndObject(); } @@ -84,7 +100,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServicePrincipalInKVCredentialPatch if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the ServicePrincipalInKVCredentialPatch. */ public static ServicePrincipalInKVCredentialPatch fromJson(JsonReader jsonReader) throws IOException { @@ -95,18 +110,14 @@ public static ServicePrincipalInKVCredentialPatch fromJson(JsonReader jsonReader String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataSourceCredentialType".equals(fieldName)) { - String dataSourceCredentialType = reader.getString(); - if (!"ServicePrincipalInKV".equals(dataSourceCredentialType)) { - throw new IllegalStateException( - "'dataSourceCredentialType' was expected to be non-null and equal to 'ServicePrincipalInKV'. The found 'dataSourceCredentialType' was '" - + dataSourceCredentialType + "'."); - } - } else if ("dataSourceCredentialName".equals(fieldName)) { + if ("dataSourceCredentialName".equals(fieldName)) { deserializedServicePrincipalInKVCredentialPatch.setDataSourceCredentialName(reader.getString()); } else if ("dataSourceCredentialDescription".equals(fieldName)) { deserializedServicePrincipalInKVCredentialPatch .setDataSourceCredentialDescription(reader.getString()); + } else if ("dataSourceCredentialType".equals(fieldName)) { + deserializedServicePrincipalInKVCredentialPatch.dataSourceCredentialType + = DataSourceCredentialType.fromString(reader.getString()); } else if ("parameters".equals(fieldName)) { deserializedServicePrincipalInKVCredentialPatch.parameters = ServicePrincipalInKVParamPatch.fromJson(reader); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParam.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParam.java index ae156e3aa29ce..54e696c4963ee 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParam.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParam.java @@ -176,6 +176,9 @@ public ServicePrincipalInKVParam setTenantId(String tenantId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParamPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParamPatch.java index ebf2e37dc9333..2f19476730329 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParamPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParamPatch.java @@ -176,6 +176,9 @@ public ServicePrincipalInKVParamPatch setTenantId(String tenantId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParam.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParam.java index a6ca7149587e3..d02e6b98160fa 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParam.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParam.java @@ -97,6 +97,9 @@ public ServicePrincipalParam setTenantId(String tenantId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParamPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParamPatch.java index b206f1bb52d8f..049451fdc2791 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParamPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParamPatch.java @@ -97,6 +97,9 @@ public ServicePrincipalParamPatch setTenantId(String tenantId) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityCondition.java index 8a496a51b69b8..8fc36f2d9fade 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityCondition.java @@ -72,6 +72,9 @@ public SeverityCondition setMaxAlertSeverity(Severity maxAlertSeverity) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityFilterCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityFilterCondition.java index 89caa6c236f6f..36ba857679746 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityFilterCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityFilterCondition.java @@ -72,6 +72,9 @@ public SeverityFilterCondition setMax(Severity max) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionCondition.java index f04a7932f786b..1cd734c3226cd 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionCondition.java @@ -97,6 +97,9 @@ public SmartDetectionCondition setSuppressCondition(SuppressCondition suppressCo return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionConditionPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionConditionPatch.java index 526bdcf154728..f848eca50d93e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionConditionPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionConditionPatch.java @@ -97,6 +97,9 @@ public SmartDetectionConditionPatch setSuppressCondition(SuppressConditionPatch return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SqlSourceParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SqlSourceParameter.java index 2a3510a421f8e..1d42d4f42c3b1 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SqlSourceParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SqlSourceParameter.java @@ -72,6 +72,9 @@ public SqlSourceParameter setQuery(String query) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressCondition.java index 9ba6ff6899881..ec12830a78645 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressCondition.java @@ -72,6 +72,9 @@ public SuppressCondition setMinRatio(double minRatio) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressConditionPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressConditionPatch.java index ec8cfdcb33959..5a03e87eecbff 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressConditionPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressConditionPatch.java @@ -72,6 +72,9 @@ public SuppressConditionPatch setMinRatio(Double minRatio) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/TopNGroupScope.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/TopNGroupScope.java index 3611cb7178787..1594565070419 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/TopNGroupScope.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/TopNGroupScope.java @@ -103,6 +103,9 @@ public TopNGroupScope setMinTopCount(int minTopCount) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/UsageStats.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/UsageStats.java index aaf93592c1499..dcd201da5304d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/UsageStats.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/UsageStats.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -93,6 +94,9 @@ public Integer getDataFeedCount() { return this.dataFeedCount; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -115,8 +119,8 @@ public static UsageStats fromJson(JsonReader jsonReader) throws IOException { reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedUsageStats.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedUsageStats.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("activeSeriesCount".equals(fieldName)) { deserializedUsageStats.activeSeriesCount = reader.getNullable(JsonReader::getInt); } else if ("allSeriesCount".equals(fieldName)) { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ValueCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ValueCondition.java index bd4e628f435b0..675622f56126a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ValueCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ValueCondition.java @@ -192,6 +192,9 @@ public ValueCondition setTriggerForMissing(Boolean triggerForMissing) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfo.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfo.java index f6fe7ae998100..4754c2b1965d4 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfo.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfo.java @@ -17,17 +17,37 @@ */ @Fluent public final class WebhookHookInfo extends HookInfo { + /* + * hook type + */ + private HookType hookType = HookType.WEBHOOK; + /* * The hookParameter property. */ private WebhookHookParameter hookParameter; + /* + * Hook unique id + */ + private UUID hookId; + /** * Creates an instance of WebhookHookInfo class. */ public WebhookHookInfo() { } + /** + * Get the hookType property: hook type. + * + * @return the hookType value. + */ + @Override + public HookType getHookType() { + return this.hookType; + } + /** * Get the hookParameter property: The hookParameter property. * @@ -48,6 +68,16 @@ public WebhookHookInfo setHookParameter(WebhookHookParameter hookParameter) { return this; } + /** + * Get the hookId property: Hook unique id. + * + * @return the hookId value. + */ + @Override + public UUID getHookId() { + return this.hookId; + } + /** * {@inheritDoc} */ @@ -84,15 +114,18 @@ public WebhookHookInfo setAdmins(List admins) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("hookType", HookType.WEBHOOK == null ? null : HookType.WEBHOOK.toString()); jsonWriter.writeStringField("hookName", getHookName()); jsonWriter.writeStringField("description", getDescription()); jsonWriter.writeStringField("externalLink", getExternalLink()); jsonWriter.writeArrayField("admins", getAdmins(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("hookParameter", this.hookParameter); + jsonWriter.writeStringField("hookType", this.hookType == null ? null : this.hookType.toString()); return jsonWriter.writeEndObject(); } @@ -102,8 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of WebhookHookInfo if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties or the - * polymorphic discriminator. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the WebhookHookInfo. */ public static WebhookHookInfo fromJson(JsonReader jsonReader) throws IOException { @@ -113,18 +145,11 @@ public static WebhookHookInfo fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("hookType".equals(fieldName)) { - String hookType = reader.getString(); - if (!"Webhook".equals(hookType)) { - throw new IllegalStateException( - "'hookType' was expected to be non-null and equal to 'Webhook'. The found 'hookType' was '" - + hookType + "'."); - } - } else if ("hookName".equals(fieldName)) { + if ("hookName".equals(fieldName)) { deserializedWebhookHookInfo.setHookName(reader.getString()); } else if ("hookId".equals(fieldName)) { - deserializedWebhookHookInfo - .setHookId(reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedWebhookHookInfo.hookId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("description".equals(fieldName)) { deserializedWebhookHookInfo.setDescription(reader.getString()); } else if ("externalLink".equals(fieldName)) { @@ -134,6 +159,8 @@ public static WebhookHookInfo fromJson(JsonReader jsonReader) throws IOException deserializedWebhookHookInfo.setAdmins(admins); } else if ("hookParameter".equals(fieldName)) { deserializedWebhookHookInfo.hookParameter = WebhookHookParameter.fromJson(reader); + } else if ("hookType".equals(fieldName)) { + deserializedWebhookHookInfo.hookType = HookType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfoPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfoPatch.java index 4cb76c2dd9058..e334fbaa80332 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfoPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfoPatch.java @@ -16,6 +16,11 @@ */ @Fluent public final class WebhookHookInfoPatch extends HookInfoPatch { + /* + * hook type + */ + private HookType hookType = HookType.WEBHOOK; + /* * The hookParameter property. */ @@ -27,6 +32,16 @@ public final class WebhookHookInfoPatch extends HookInfoPatch { public WebhookHookInfoPatch() { } + /** + * Get the hookType property: hook type. + * + * @return the hookType value. + */ + @Override + public HookType getHookType() { + return this.hookType; + } + /** * Get the hookParameter property: The hookParameter property. * @@ -83,14 +98,17 @@ public WebhookHookInfoPatch setAdmins(List admins) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("hookType", HookType.WEBHOOK == null ? null : HookType.WEBHOOK.toString()); jsonWriter.writeStringField("hookName", getHookName()); jsonWriter.writeStringField("description", getDescription()); jsonWriter.writeStringField("externalLink", getExternalLink()); jsonWriter.writeArrayField("admins", getAdmins(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("hookType", this.hookType == null ? null : this.hookType.toString()); jsonWriter.writeJsonField("hookParameter", this.hookParameter); return jsonWriter.writeEndObject(); } @@ -101,7 +119,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of WebhookHookInfoPatch if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing the polymorphic discriminator. * @throws IOException If an error occurs while reading the WebhookHookInfoPatch. */ public static WebhookHookInfoPatch fromJson(JsonReader jsonReader) throws IOException { @@ -111,14 +128,7 @@ public static WebhookHookInfoPatch fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); - if ("hookType".equals(fieldName)) { - String hookType = reader.getString(); - if (!"Webhook".equals(hookType)) { - throw new IllegalStateException( - "'hookType' was expected to be non-null and equal to 'Webhook'. The found 'hookType' was '" - + hookType + "'."); - } - } else if ("hookName".equals(fieldName)) { + if ("hookName".equals(fieldName)) { deserializedWebhookHookInfoPatch.setHookName(reader.getString()); } else if ("description".equals(fieldName)) { deserializedWebhookHookInfoPatch.setDescription(reader.getString()); @@ -127,6 +137,8 @@ public static WebhookHookInfoPatch fromJson(JsonReader jsonReader) throws IOExce } else if ("admins".equals(fieldName)) { List admins = reader.readArray(reader1 -> reader1.getString()); deserializedWebhookHookInfoPatch.setAdmins(admins); + } else if ("hookType".equals(fieldName)) { + deserializedWebhookHookInfoPatch.hookType = HookType.fromString(reader.getString()); } else if ("hookParameter".equals(fieldName)) { deserializedWebhookHookInfoPatch.hookParameter = WebhookHookParameterPatch.fromJson(reader); } else { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameter.java index 61bc868c0cc9a..b7d6b01a14f54 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameter.java @@ -54,8 +54,7 @@ public WebhookHookParameter() { } /** - * Get the endpoint property: API address, will be called when alert is triggered, only support POST method via - * SSL. + * Get the endpoint property: API address, will be called when alert is triggered, only support POST method via SSL. * * @return the endpoint value. */ @@ -64,8 +63,7 @@ public String getEndpoint() { } /** - * Set the endpoint property: API address, will be called when alert is triggered, only support POST method via - * SSL. + * Set the endpoint property: API address, will be called when alert is triggered, only support POST method via SSL. * * @param endpoint the endpoint value to set. * @return the WebhookHookParameter object itself. @@ -179,6 +177,9 @@ public WebhookHookParameter setCertificatePassword(String certificatePassword) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameterPatch.java index c3d8f0f35bda2..38605fa2e0817 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameterPatch.java @@ -54,8 +54,7 @@ public WebhookHookParameterPatch() { } /** - * Get the endpoint property: API address, will be called when alert is triggered, only support POST method via - * SSL. + * Get the endpoint property: API address, will be called when alert is triggered, only support POST method via SSL. * * @return the endpoint value. */ @@ -64,8 +63,7 @@ public String getEndpoint() { } /** - * Set the endpoint property: API address, will be called when alert is triggered, only support POST method via - * SSL. + * Set the endpoint property: API address, will be called when alert is triggered, only support POST method via SSL. * * @param endpoint the endpoint value to set. * @return the WebhookHookParameterPatch object itself. @@ -175,6 +173,9 @@ public WebhookHookParameterPatch setCertificatePassword(String certificatePasswo return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfiguration.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfiguration.java index b9e8075c18da9..809d8f95e09b8 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfiguration.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfiguration.java @@ -128,6 +128,9 @@ public WholeMetricConfiguration setChangeThresholdCondition(ChangeThresholdCondi return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfigurationPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfigurationPatch.java index 6fe8dfe376ab8..3f11e1a881b7a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfigurationPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfigurationPatch.java @@ -131,6 +131,9 @@ public ChangeThresholdConditionPatch getChangeThresholdCondition() { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java index 1804c63f83695..df85e80873444 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -79,6 +80,9 @@ public OffsetDateTime getModifiedTime() { return this.modifiedTime; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -103,14 +107,14 @@ public static AnomalyAlert fromJson(JsonReader jsonReader) throws IOException { if ("alertId".equals(fieldName)) { deserializedAnomalyAlert.id = reader.getString(); } else if ("timestamp".equals(fieldName)) { - deserializedAnomalyAlert.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAnomalyAlert.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("createdTime".equals(fieldName)) { - deserializedAnomalyAlert.createdTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAnomalyAlert.createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("modifiedTime".equals(fieldName)) { - deserializedAnomalyAlert.modifiedTime - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedAnomalyAlert.modifiedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/EnrichmentStatus.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/EnrichmentStatus.java index beb432f1c447a..06ef366f7f1d8 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/EnrichmentStatus.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/EnrichmentStatus.java @@ -5,6 +5,7 @@ package com.azure.ai.metricsadvisor.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -65,6 +66,9 @@ public String getMessage() { return this.message; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -87,8 +91,8 @@ public static EnrichmentStatus fromJson(JsonReader jsonReader) throws IOExceptio reader.nextToken(); if ("timestamp".equals(fieldName)) { - deserializedEnrichmentStatus.timestamp - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedEnrichmentStatus.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("status".equals(fieldName)) { deserializedEnrichmentStatus.status = reader.getString(); } else if ("message".equals(fieldName)) { diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md b/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md index 2c10d53dfa712..7e8c113dca92e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md @@ -1,27 +1,35 @@ -# Azure Cognitive Service - Metric Advisor for Java +# Azure Metrics Advisor for Java > see https://aka.ms/autorest +This is the AutoRest configuration file for Metrics Advisor. + +--- +## Getting Started +To build the SDK for Metrics Advisor, simply [Install AutoRest](https://aka.ms/autorest) and +in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + ### Setup ```ps -Fork and clone https://github.com/Azure/autorest.java -git checkout main -git submodule update --init --recursive -mvn package -Dlocal -npm install npm install -g autorest ``` ### Generation ```ps cd -autorest --java --use=C:/work/autorest.java +autorest ``` ### Code generation settings ``` yaml input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cognitiveservices/data-plane/MetricsAdvisor/stable/v1.0/MetricsAdvisor.json -use: '@autorest/java@4.1.26' +use: '@autorest/java@4.1.39' java: true output-folder: ..\ generate-client-as-impl: true diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImpl.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImpl.java index eb765047d0f5d..a233b47628de1 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImpl.java +++ b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImpl.java @@ -20,64 +20,78 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.RestProxy; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.mixedreality.authentication.implementation.models.GetTokenResponse; +import com.azure.mixedreality.authentication.implementation.models.GetTokenHeaders; import com.azure.mixedreality.authentication.implementation.models.StsTokenResponseMessage; import com.azure.mixedreality.authentication.implementation.models.TokenRequestOptions; import java.util.UUID; import reactor.core.publisher.Mono; -/** Initializes a new instance of the MixedRealityStsRestClient type. */ +/** + * Initializes a new instance of the MixedRealityStsRestClient type. + */ public final class MixedRealityStsRestClientImpl { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final MixedRealityStsRestClientService service; - /** server parameter. */ + /** + * server parameter. + */ private final String host; /** * Gets server parameter. - * + * * @return the host value. */ public String getHost() { return this.host; } - /** Api Version. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ public SerializerAdapter getSerializerAdapter() { @@ -86,7 +100,7 @@ public SerializerAdapter getSerializerAdapter() { /** * Initializes an instance of MixedRealityStsRestClient client. - * + * * @param host server parameter. * @param apiVersion Api Version. */ @@ -97,7 +111,7 @@ public SerializerAdapter getSerializerAdapter() { /** * Initializes an instance of MixedRealityStsRestClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param host server parameter. * @param apiVersion Api Version. @@ -108,7 +122,7 @@ public SerializerAdapter getSerializerAdapter() { /** * Initializes an instance of MixedRealityStsRestClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param host server parameter. @@ -135,37 +149,40 @@ public interface MixedRealityStsRestClientService { @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = HttpResponseException.class, code = { 400, 401, 429 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono getToken(@HostParam("$host") String host, @PathParam("accountId") UUID accountId, - @HeaderParam("X-MRC-CV") String clientRequestId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Mono> getToken(@HostParam("$host") String host, + @PathParam("accountId") UUID accountId, @HeaderParam("X-MRC-CV") String clientRequestId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Get("/Accounts/{accountId}/token") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = HttpResponseException.class, code = { 400, 401, 429 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getTokenNoCustomHeaders(@HostParam("$host") String host, + @PathParam("accountId") UUID accountId, @HeaderParam("X-MRC-CV") String clientRequestId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Gets an access token to be used with Mixed Reality services. - * + * * @param accountId The Mixed Reality account identifier. * @param tokenRequestOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws HttpResponseException thrown if the request is rejected by server on status code 400, 401, 429. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an access token to be used with Mixed Reality services on successful completion of {@link Mono}. + * @return an access token to be used with Mixed Reality services along with {@link ResponseBase} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getTokenWithResponseAsync(UUID accountId, TokenRequestOptions tokenRequestOptions) { - final String accept = "application/json"; - String clientRequestIdInternal = null; - if (tokenRequestOptions != null) { - clientRequestIdInternal = tokenRequestOptions.getClientRequestId(); - } - String clientRequestId = clientRequestIdInternal; - return FluxUtil.withContext(context -> service.getToken(this.getHost(), accountId, clientRequestId, - this.getApiVersion(), accept, context)); + public Mono> getTokenWithResponseAsync(UUID accountId, + TokenRequestOptions tokenRequestOptions) { + return FluxUtil.withContext(context -> getTokenWithResponseAsync(accountId, tokenRequestOptions, context)); } /** * Gets an access token to be used with Mixed Reality services. - * + * * @param accountId The Mixed Reality account identifier. * @param tokenRequestOptions Parameter group. * @param context The context to associate with this operation. @@ -173,11 +190,12 @@ public Mono getTokenWithResponseAsync(UUID accountId, TokenReq * @throws HttpResponseException thrown if the request is rejected by server. * @throws HttpResponseException thrown if the request is rejected by server on status code 400, 401, 429. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an access token to be used with Mixed Reality services on successful completion of {@link Mono}. + * @return an access token to be used with Mixed Reality services along with {@link ResponseBase} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getTokenWithResponseAsync(UUID accountId, TokenRequestOptions tokenRequestOptions, - Context context) { + public Mono> getTokenWithResponseAsync(UUID accountId, + TokenRequestOptions tokenRequestOptions, Context context) { final String accept = "application/json"; String clientRequestIdInternal = null; if (tokenRequestOptions != null) { @@ -189,7 +207,7 @@ public Mono getTokenWithResponseAsync(UUID accountId, TokenReq /** * Gets an access token to be used with Mixed Reality services. - * + * * @param accountId The Mixed Reality account identifier. * @param tokenRequestOptions Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -206,7 +224,7 @@ public Mono getTokenAsync(UUID accountId, TokenRequestO /** * Gets an access token to be used with Mixed Reality services. - * + * * @param accountId The Mixed Reality account identifier. * @param tokenRequestOptions Parameter group. * @param context The context to associate with this operation. @@ -222,4 +240,49 @@ public Mono getTokenAsync(UUID accountId, TokenRequestO return getTokenWithResponseAsync(accountId, tokenRequestOptions, context) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } + + /** + * Gets an access token to be used with Mixed Reality services. + * + * @param accountId The Mixed Reality account identifier. + * @param tokenRequestOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the request is rejected by server on status code 400, 401, 429. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an access token to be used with Mixed Reality services along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTokenNoCustomHeadersWithResponseAsync(UUID accountId, + TokenRequestOptions tokenRequestOptions) { + return FluxUtil + .withContext(context -> getTokenNoCustomHeadersWithResponseAsync(accountId, tokenRequestOptions, context)); + } + + /** + * Gets an access token to be used with Mixed Reality services. + * + * @param accountId The Mixed Reality account identifier. + * @param tokenRequestOptions Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the request is rejected by server on status code 400, 401, 429. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an access token to be used with Mixed Reality services along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTokenNoCustomHeadersWithResponseAsync(UUID accountId, + TokenRequestOptions tokenRequestOptions, Context context) { + final String accept = "application/json"; + String clientRequestIdInternal = null; + if (tokenRequestOptions != null) { + clientRequestIdInternal = tokenRequestOptions.getClientRequestId(); + } + String clientRequestId = clientRequestIdInternal; + return service.getTokenNoCustomHeaders(this.getHost(), accountId, clientRequestId, this.getApiVersion(), accept, + context); + } } diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImplBuilder.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImplBuilder.java index 49cbdd5b3ed6c..24ef774d5960e 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImplBuilder.java +++ b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImplBuilder.java @@ -9,7 +9,6 @@ import com.azure.core.client.traits.ConfigurationTrait; import com.azure.core.client.traits.HttpTrait; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; @@ -37,7 +36,9 @@ import java.util.Map; import java.util.Objects; -/** A builder for creating a new instance of the MixedRealityStsRestClient type. */ +/** + * A builder for creating a new instance of the MixedRealityStsRestClient type. + */ @ServiceClientBuilder(serviceClients = { MixedRealityStsRestClientImpl.class }) public final class MixedRealityStsRestClientImplBuilder implements HttpTrait, ConfigurationTrait { @@ -53,7 +54,9 @@ public final class MixedRealityStsRestClientImplBuilder implements HttpTrait pipelinePolicies; - /** Create an instance of the MixedRealityStsRestClientImplBuilder. */ + /** + * Create an instance of the MixedRealityStsRestClientImplBuilder. + */ @Generated public MixedRealityStsRestClientImplBuilder() { this.pipelinePolicies = new ArrayList<>(); @@ -65,7 +68,9 @@ public MixedRealityStsRestClientImplBuilder() { @Generated private HttpPipeline pipeline; - /** {@inheritDoc}. */ + /** + * {@inheritDoc}. + */ @Generated @Override public MixedRealityStsRestClientImplBuilder pipeline(HttpPipeline pipeline) { @@ -79,7 +84,9 @@ public MixedRealityStsRestClientImplBuilder pipeline(HttpPipeline pipeline) { @Generated private HttpClient httpClient; - /** {@inheritDoc}. */ + /** + * {@inheritDoc}. + */ @Generated @Override public MixedRealityStsRestClientImplBuilder httpClient(HttpClient httpClient) { @@ -93,7 +100,9 @@ public MixedRealityStsRestClientImplBuilder httpClient(HttpClient httpClient) { @Generated private HttpLogOptions httpLogOptions; - /** {@inheritDoc}. */ + /** + * {@inheritDoc}. + */ @Generated @Override public MixedRealityStsRestClientImplBuilder httpLogOptions(HttpLogOptions httpLogOptions) { @@ -107,7 +116,9 @@ public MixedRealityStsRestClientImplBuilder httpLogOptions(HttpLogOptions httpLo @Generated private ClientOptions clientOptions; - /** {@inheritDoc}. */ + /** + * {@inheritDoc}. + */ @Generated @Override public MixedRealityStsRestClientImplBuilder clientOptions(ClientOptions clientOptions) { @@ -121,7 +132,9 @@ public MixedRealityStsRestClientImplBuilder clientOptions(ClientOptions clientOp @Generated private RetryOptions retryOptions; - /** {@inheritDoc}. */ + /** + * {@inheritDoc}. + */ @Generated @Override public MixedRealityStsRestClientImplBuilder retryOptions(RetryOptions retryOptions) { @@ -129,7 +142,9 @@ public MixedRealityStsRestClientImplBuilder retryOptions(RetryOptions retryOptio return this; } - /** {@inheritDoc}. */ + /** + * {@inheritDoc}. + */ @Generated @Override public MixedRealityStsRestClientImplBuilder addPolicy(HttpPipelinePolicy customPolicy) { @@ -144,7 +159,9 @@ public MixedRealityStsRestClientImplBuilder addPolicy(HttpPipelinePolicy customP @Generated private Configuration configuration; - /** {@inheritDoc}. */ + /** + * {@inheritDoc}. + */ @Generated @Override public MixedRealityStsRestClientImplBuilder configuration(Configuration configuration) { @@ -160,7 +177,7 @@ public MixedRealityStsRestClientImplBuilder configuration(Configuration configur /** * Sets server parameter. - * + * * @param host the host value. * @return the MixedRealityStsRestClientImplBuilder. */ @@ -178,7 +195,7 @@ public MixedRealityStsRestClientImplBuilder host(String host) { /** * Sets Api Version. - * + * * @param apiVersion the apiVersion value. * @return the MixedRealityStsRestClientImplBuilder. */ @@ -196,7 +213,7 @@ public MixedRealityStsRestClientImplBuilder apiVersion(String apiVersion) { /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the MixedRealityStsRestClientImplBuilder. */ @@ -214,7 +231,7 @@ public MixedRealityStsRestClientImplBuilder serializerAdapter(SerializerAdapter /** * Sets The retry policy that will attempt to retry failed requests, if applicable. - * + * * @param retryPolicy the retryPolicy value. * @return the MixedRealityStsRestClientImplBuilder. */ @@ -226,11 +243,12 @@ public MixedRealityStsRestClientImplBuilder retryPolicy(RetryPolicy retryPolicy) /** * Builds an instance of MixedRealityStsRestClientImpl with the provided parameters. - * + * * @return an instance of MixedRealityStsRestClientImpl. */ @Generated public MixedRealityStsRestClientImpl buildClient() { + this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); String localHost = (host != null) ? host : "https://sts.mixedreality.azure.com"; String localApiVersion = (apiVersion != null) ? apiVersion : "2019-02-28-preview"; @@ -241,6 +259,12 @@ public MixedRealityStsRestClientImpl buildClient() { return client; } + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + } + @Generated private HttpPipeline createHttpPipeline() { Configuration buildConfiguration @@ -254,10 +278,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = new HttpHeaders(); - localClientOptions.getHeaders() - .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue())); - if (headers.getSize() > 0) { + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { policies.add(new AddHeadersPolicy(headers)); } this.pipelinePolicies.stream() @@ -270,7 +292,7 @@ private HttpPipeline createHttpPipeline() { .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .forEach(p -> policies.add(p)); HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .clientOptions(localClientOptions) diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/GetTokenHeaders.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/GetTokenHeaders.java index bb3a01553982d..a343ab08ed984 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/GetTokenHeaders.java +++ b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/GetTokenHeaders.java @@ -8,7 +8,9 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -/** The GetTokenHeaders model. */ +/** + * The GetTokenHeaders model. + */ @Fluent public final class GetTokenHeaders { /* @@ -21,7 +23,7 @@ public final class GetTokenHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of GetTokenHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public GetTokenHeaders(HttpHeaders rawHeaders) { @@ -30,7 +32,7 @@ public GetTokenHeaders(HttpHeaders rawHeaders) { /** * Get the msCV property: The MS-CV property. - * + * * @return the msCV value. */ public String getMsCV() { @@ -39,7 +41,7 @@ public String getMsCV() { /** * Set the msCV property: The MS-CV property. - * + * * @param msCV the msCV value to set. * @return the GetTokenHeaders object itself. */ diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/StsTokenResponseMessage.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/StsTokenResponseMessage.java index a2eba51905c1e..caaa82e945dd4 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/StsTokenResponseMessage.java +++ b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/StsTokenResponseMessage.java @@ -11,7 +11,9 @@ import com.azure.json.JsonWriter; import java.io.IOException; -/** Represents a token response message from the STS service. */ +/** + * Represents a token response message from the STS service. + */ @Fluent public final class StsTokenResponseMessage implements JsonSerializable { /* @@ -19,13 +21,15 @@ public final class StsTokenResponseMessage implements JsonSerializable { +public final class TokenRequestOptions { /* - * The client request correlation vector, which should be set to a new value for each request. Useful when - * debugging with Microsoft. + * The client request correlation vector, which should be set to a new value for each request. Useful when debugging + * with Microsoft. */ private String clientRequestId; - /** Creates an instance of TokenRequestOptions class. */ + /** + * Creates an instance of TokenRequestOptions class. + */ public TokenRequestOptions() { } /** * Get the clientRequestId property: The client request correlation vector, which should be set to a new value for * each request. Useful when debugging with Microsoft. - * + * * @return the clientRequestId value. */ public String getClientRequestId() { @@ -37,7 +36,7 @@ public String getClientRequestId() { /** * Set the clientRequestId property: The client request correlation vector, which should be set to a new value for * each request. Useful when debugging with Microsoft. - * + * * @param clientRequestId the clientRequestId value to set. * @return the TokenRequestOptions object itself. */ @@ -45,37 +44,4 @@ public TokenRequestOptions setClientRequestId(String clientRequestId) { this.clientRequestId = clientRequestId; return this; } - - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clientRequestId", this.clientRequestId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TokenRequestOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TokenRequestOptions if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TokenRequestOptions. - */ - public static TokenRequestOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TokenRequestOptions deserializedTokenRequestOptions = new TokenRequestOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clientRequestId".equals(fieldName)) { - deserializedTokenRequestOptions.clientRequestId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTokenRequestOptions; - }); - } } diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/package-info.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/package-info.java index 7957c74f067d8..8aa6330436b3e 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/package-info.java +++ b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for MixedRealityStsRestClient. Definition for the Mixed Reality Cloud STS service - * APIs. + * Package containing the data models for MixedRealityStsRestClient. + * Definition for the Mixed Reality Cloud STS service APIs. */ package com.azure.mixedreality.authentication.implementation.models; diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/package-info.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/package-info.java index 35b3532012d75..13291cb516253 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/package-info.java +++ b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for MixedRealityStsRestClient. Definition for the Mixed Reality Cloud STS - * service APIs. + * Package containing the implementations for MixedRealityStsRestClient. + * Definition for the Mixed Reality Cloud STS service APIs. */ package com.azure.mixedreality.authentication.implementation; diff --git a/sdk/mixedreality/azure-mixedreality-authentication/swagger/autorest.md b/sdk/mixedreality/azure-mixedreality-authentication/swagger/autorest.md index 3a268670a8d6e..6ffaef2c4a32a 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/swagger/autorest.md +++ b/sdk/mixedreality/azure-mixedreality-authentication/swagger/autorest.md @@ -29,7 +29,7 @@ autorest ## Configuration ```yaml -use: '@autorest/java@4.1.22' +use: '@autorest/java@4.1.39' output-folder: ../ java: true input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/aa19725fe79aea2a9dc580f3c66f77f89cc34563/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/2019-02-28-preview/mr-sts.json diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesAsyncClient.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesAsyncClient.java index 45bfaf53a3515..cb070828fbc44 100644 --- a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesAsyncClient.java +++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesAsyncClient.java @@ -39,39 +39,23 @@ public final class IngestionUsingDataCollectionRulesAsyncClient { * Ingestion API used to directly ingest data using Data Collection Rules * * See error response code and error response message for more detail. - *

- * Header Parameters - *

+ *

Header Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * *
Header Parameters
NameTypeRequiredDescription
Content-EncodingStringNogzip
x-ms-client-request-idStringNoClient request Id
NameTypeRequiredDescription
Content-EncodingStringNogzip
x-ms-client-request-idStringNoClient request Id
* You can add these to a request with {@link RequestOptions#addHeader} - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * [
      *     Object (Required)
      * ]
-     * }
+ * } + *
* * @param ruleId The immutable Id of the Data Collection Rule resource. * @param stream The streamDeclaration name as defined in the Data Collection Rule. diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClient.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClient.java index 89b724775e80b..e020ab6ae74a5 100644 --- a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClient.java +++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClient.java @@ -38,39 +38,23 @@ public final class IngestionUsingDataCollectionRulesClient { * Ingestion API used to directly ingest data using Data Collection Rules * * See error response code and error response message for more detail. - *

- * Header Parameters - *

+ *

Header Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * *
Header Parameters
NameTypeRequiredDescription
Content-EncodingStringNogzip
x-ms-client-request-idStringNoClient request Id
NameTypeRequiredDescription
Content-EncodingStringNogzip
x-ms-client-request-idStringNoClient request Id
* You can add these to a request with {@link RequestOptions#addHeader} - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * [
      *     Object (Required)
      * ]
-     * }
+ * } + *
* * @param ruleId The immutable Id of the Data Collection Rule resource. * @param stream The streamDeclaration name as defined in the Data Collection Rule. diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientBuilder.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientBuilder.java index bb7b259456785..4826b9b2034c4 100644 --- a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientBuilder.java +++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientBuilder.java @@ -89,7 +89,7 @@ public IngestionUsingDataCollectionRulesClientBuilder() { @Override public IngestionUsingDataCollectionRulesClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; @@ -262,6 +262,7 @@ public IngestionUsingDataCollectionRulesClientBuilder retryPolicy(RetryPolicy re */ @Generated private IngestionUsingDataCollectionRulesClientImpl buildInnerClient() { + this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); IngestionUsingDataCollectionRulesServiceVersion localServiceVersion = (serviceVersion != null) ? serviceVersion : IngestionUsingDataCollectionRulesServiceVersion.getLatest(); @@ -270,6 +271,13 @@ private IngestionUsingDataCollectionRulesClientImpl buildInnerClient() { return client; } + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + @Generated private HttpPipeline createHttpPipeline() { Configuration buildConfiguration diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientImpl.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientImpl.java index 0881f114a1730..e9496c9bc9d1b 100644 --- a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientImpl.java +++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientImpl.java @@ -181,39 +181,23 @@ Response uploadSync(@HostParam("endpoint") String endpoint, @PathParam("ru * Ingestion API used to directly ingest data using Data Collection Rules * * See error response code and error response message for more detail. - *

- * Header Parameters - *

+ *

Header Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * *
Header Parameters
NameTypeRequiredDescription
Content-EncodingStringNogzip
x-ms-client-request-idStringNoClient request Id
NameTypeRequiredDescription
Content-EncodingStringNogzip
x-ms-client-request-idStringNoClient request Id
* You can add these to a request with {@link RequestOptions#addHeader} - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * [
      *     Object (Required)
      * ]
-     * }
+ * } + *
* * @param ruleId The immutable Id of the Data Collection Rule resource. * @param stream The streamDeclaration name as defined in the Data Collection Rule. @@ -229,16 +213,15 @@ Response uploadSync(@HostParam("endpoint") String endpoint, @PathParam("ru public Mono> uploadWithResponseAsync(String ruleId, String stream, BinaryData body, RequestOptions requestOptions) { if (ruleId == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); } if (stream == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Parameter stream is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter stream is required and cannot be null.")); } if (body == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Parameter body is required and cannot be null.")); + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.upload(this.getEndpoint(), ruleId, stream, @@ -249,39 +232,23 @@ public Mono> uploadWithResponseAsync(String ruleId, String stream * Ingestion API used to directly ingest data using Data Collection Rules * * See error response code and error response message for more detail. - *

- * Header Parameters - *

+ *

Header Parameters

* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * *
Header Parameters
NameTypeRequiredDescription
Content-EncodingStringNogzip
x-ms-client-request-idStringNoClient request Id
NameTypeRequiredDescription
Content-EncodingStringNogzip
x-ms-client-request-idStringNoClient request Id
* You can add these to a request with {@link RequestOptions#addHeader} - *

- * Request Body Schema - *

- *
{@code
+     * 

Request Body Schema

+ * + *
+     * {@code
      * [
      *     Object (Required)
      * ]
-     * }
+ * } + *
* * @param ruleId The immutable Id of the Data Collection Rule resource. * @param stream The streamDeclaration name as defined in the Data Collection Rule. @@ -297,16 +264,15 @@ public Mono> uploadWithResponseAsync(String ruleId, String stream public Response uploadWithResponse(String ruleId, String stream, BinaryData body, RequestOptions requestOptions) { if (ruleId == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); } if (stream == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Parameter stream is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter stream is required and cannot be null.")); } if (body == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Parameter body is required and cannot be null.")); + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); } final String accept = "application/json"; return service.uploadSync(this.getEndpoint(), ruleId, stream, this.getServiceVersion().getVersion(), body, diff --git a/sdk/monitor/azure-monitor-ingestion/swagger/README.md b/sdk/monitor/azure-monitor-ingestion/swagger/README.md index d7978c693ccdb..4d284b9549623 100644 --- a/sdk/monitor/azure-monitor-ingestion/swagger/README.md +++ b/sdk/monitor/azure-monitor-ingestion/swagger/README.md @@ -1,15 +1,34 @@ -# Azure Monitor Ingestion client library for Java +# Azure Monitor Ingestion for Java -## Code generation settings +> see https://aka.ms/autorest -### Manual Modifications +This is the AutoRest configuration file for Monitor Ingestion. -The following edits need to be made manually after code generation: -- Rollback the edits to `module-info` file +--- +## Getting Started +To build the SDK for Monitor Ingestion, simply [Install AutoRest](https://aka.ms/autorest) and +in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +### Setup +```ps +npm install -g autorest +``` + +### Generation +```ps +cd +autorest +``` ```yaml java: true -use: '@autorest/java@4.1.27' +use: '@autorest/java@4.1.39' output-folder: ../ license-header: MICROSOFT_MIT_SMALL input-file: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/monitor/data-plane/ingestion/stable/2023-01-01/DataCollectionRules.json @@ -30,3 +49,8 @@ enable-sync-stack: true customization-class: src/main/java/MonitorIngestionCustomizations.java stream-style-serialization: true ``` + +### Manual Modifications + +The following edits need to be made manually after code generation: +- Rollback the edits to `module-info` file diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/ApplicationInsightsClientImpl.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/ApplicationInsightsClientImpl.java index 661fa9999096c..ab28a5ddddecd 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/ApplicationInsightsClientImpl.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/ApplicationInsightsClientImpl.java @@ -27,9 +27,8 @@ import com.azure.monitor.opentelemetry.exporter.implementation.models.ExportResult; import com.azure.monitor.opentelemetry.exporter.implementation.models.ExportResultException; import com.azure.monitor.opentelemetry.exporter.implementation.models.TelemetryItem; -import reactor.core.publisher.Mono; - import java.util.List; +import reactor.core.publisher.Mono; /** * Initializes a new instance of the ApplicationInsightsClient type. @@ -47,7 +46,7 @@ public final class ApplicationInsightsClientImpl { /** * Gets Breeze endpoint: https://dc.services.visualstudio.com. - * + * * @return the host value. */ public String getHost() { @@ -61,7 +60,7 @@ public String getHost() { /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { @@ -75,7 +74,7 @@ public HttpPipeline getHttpPipeline() { /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ public SerializerAdapter getSerializerAdapter() { @@ -84,7 +83,7 @@ public SerializerAdapter getSerializerAdapter() { /** * Initializes an instance of ApplicationInsightsClient client. - * + * * @param host Breeze endpoint: https://dc.services.visualstudio.com. */ ApplicationInsightsClientImpl(String host) { @@ -94,7 +93,7 @@ public SerializerAdapter getSerializerAdapter() { /** * Initializes an instance of ApplicationInsightsClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param host Breeze endpoint: https://dc.services.visualstudio.com. */ @@ -104,7 +103,7 @@ public SerializerAdapter getSerializerAdapter() { /** * Initializes an instance of ApplicationInsightsClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param host Breeze endpoint: https://dc.services.visualstudio.com. @@ -135,9 +134,9 @@ Mono> track(@HostParam("Host") String host, /** * Track telemetry events - * + * * This operation sends a sequence of telemetry events that will be monitored by Azure Monitor. - * + * * @param body The list of telemetry events to track. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ExportResultException thrown if the request is rejected by server. @@ -148,15 +147,14 @@ Mono> track(@HostParam("Host") String host, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> trackWithResponseAsync(List body) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.track(this.getHost(), body, accept, context)); + return FluxUtil.withContext(context -> trackWithResponseAsync(body, context)); } /** * Track telemetry events - * + * * This operation sends a sequence of telemetry events that will be monitored by Azure Monitor. - * + * * @param body The list of telemetry events to track. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -174,9 +172,9 @@ public Mono> trackWithResponseAsync(List b /** * Track telemetry events - * + * * This operation sends a sequence of telemetry events that will be monitored by Azure Monitor. - * + * * @param body The list of telemetry events to track. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ExportResultException thrown if the request is rejected by server. @@ -191,9 +189,9 @@ public Mono trackAsync(List body) { /** * Track telemetry events - * + * * This operation sends a sequence of telemetry events that will be monitored by Azure Monitor. - * + * * @param body The list of telemetry events to track. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/ApplicationInsightsClientImplBuilder.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/ApplicationInsightsClientImplBuilder.java index 5888b48860f73..1d352c62312a5 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/ApplicationInsightsClientImplBuilder.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/ApplicationInsightsClientImplBuilder.java @@ -9,7 +9,6 @@ import com.azure.core.client.traits.ConfigurationTrait; import com.azure.core.client.traits.HttpTrait; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; @@ -17,8 +16,8 @@ import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.AddHeadersPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; 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; @@ -231,6 +230,7 @@ public ApplicationInsightsClientImplBuilder retryPolicy(RetryPolicy retryPolicy) */ @Generated public ApplicationInsightsClientImpl buildClient() { + this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); String localHost = (host != null) ? host : "https://dc.services.visualstudio.com"; SerializerAdapter localSerializerAdapter @@ -240,6 +240,12 @@ public ApplicationInsightsClientImpl buildClient() { return client; } + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + } + @Generated private HttpPipeline createHttpPipeline() { Configuration buildConfiguration @@ -253,10 +259,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = new HttpHeaders(); - localClientOptions.getHeaders() - .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue())); - if (headers.getSize() > 0) { + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { policies.add(new AddHeadersPolicy(headers)); } this.pipelinePolicies.stream() diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/AvailabilityData.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/AvailabilityData.java index fb98a5edb6d33..57fb39663a127 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/AvailabilityData.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/AvailabilityData.java @@ -66,7 +66,7 @@ public AvailabilityData() { /** * Get the id property: Identifier of a test run. Use it to correlate steps of test run and telemetry generated by * the service. - * + * * @return the id value. */ public String getId() { @@ -76,7 +76,7 @@ public String getId() { /** * Set the id property: Identifier of a test run. Use it to correlate steps of test run and telemetry generated by * the service. - * + * * @param id the id value to set. * @return the AvailabilityData object itself. */ @@ -87,7 +87,7 @@ public AvailabilityData setId(String id) { /** * Get the name property: Name of the test that these availability results represent. - * + * * @return the name value. */ public String getName() { @@ -96,7 +96,7 @@ public String getName() { /** * Set the name property: Name of the test that these availability results represent. - * + * * @param name the name value to set. * @return the AvailabilityData object itself. */ @@ -107,7 +107,7 @@ public AvailabilityData setName(String name) { /** * Get the duration property: Duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days. - * + * * @return the duration value. */ public String getDuration() { @@ -116,7 +116,7 @@ public String getDuration() { /** * Set the duration property: Duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days. - * + * * @param duration the duration value to set. * @return the AvailabilityData object itself. */ @@ -127,7 +127,7 @@ public AvailabilityData setDuration(String duration) { /** * Get the success property: Success flag. - * + * * @return the success value. */ public boolean isSuccess() { @@ -136,7 +136,7 @@ public boolean isSuccess() { /** * Set the success property: Success flag. - * + * * @param success the success value to set. * @return the AvailabilityData object itself. */ @@ -147,7 +147,7 @@ public AvailabilityData setSuccess(boolean success) { /** * Get the runLocation property: Name of the location where the test was run from. - * + * * @return the runLocation value. */ public String getRunLocation() { @@ -156,7 +156,7 @@ public String getRunLocation() { /** * Set the runLocation property: Name of the location where the test was run from. - * + * * @param runLocation the runLocation value to set. * @return the AvailabilityData object itself. */ @@ -167,7 +167,7 @@ public AvailabilityData setRunLocation(String runLocation) { /** * Get the message property: Diagnostic message for the result. - * + * * @return the message value. */ public String getMessage() { @@ -176,7 +176,7 @@ public String getMessage() { /** * Set the message property: Diagnostic message for the result. - * + * * @param message the message value to set. * @return the AvailabilityData object itself. */ @@ -187,7 +187,7 @@ public AvailabilityData setMessage(String message) { /** * Get the properties property: Collection of custom properties. - * + * * @return the properties value. */ public Map getProperties() { @@ -196,7 +196,7 @@ public Map getProperties() { /** * Set the properties property: Collection of custom properties. - * + * * @param properties the properties value to set. * @return the AvailabilityData object itself. */ @@ -207,7 +207,7 @@ public AvailabilityData setProperties(Map properties) { /** * Get the measurements property: Collection of custom measurements. - * + * * @return the measurements value. */ public Map getMeasurements() { @@ -216,7 +216,7 @@ public Map getMeasurements() { /** * Set the measurements property: Collection of custom measurements. - * + * * @param measurements the measurements value to set. * @return the AvailabilityData object itself. */ @@ -247,8 +247,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("success", this.success); jsonWriter.writeStringField("runLocation", this.runLocation); jsonWriter.writeStringField("message", this.message); - jsonWriter.writeMapField("properties", this.properties, JsonWriter::writeString); - jsonWriter.writeMapField("measurements", this.measurements, JsonWriter::writeDouble); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("measurements", this.measurements, (writer, element) -> writer.writeDouble(element)); if (getAdditionalProperties() != null) { for (Map.Entry additionalProperty : getAdditionalProperties().entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -259,7 +259,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of AvailabilityData from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of AvailabilityData if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -289,9 +289,11 @@ public static AvailabilityData fromJson(JsonReader jsonReader) throws IOExceptio } else if ("message".equals(fieldName)) { deserializedAvailabilityData.message = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedAvailabilityData.properties = reader.readMap(JsonReader::getString); + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedAvailabilityData.properties = properties; } else if ("measurements".equals(fieldName)) { - deserializedAvailabilityData.measurements = reader.readMap(JsonReader::getDouble); + Map measurements = reader.readMap(reader1 -> reader1.getDouble()); + deserializedAvailabilityData.measurements = measurements; } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/ContextTagKeys.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/ContextTagKeys.java index e2590442a568a..84e4a7eafa2f3 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/ContextTagKeys.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/ContextTagKeys.java @@ -153,7 +153,7 @@ public final class ContextTagKeys extends ExpandableStringEnum { /** * Creates a new instance of ContextTagKeys value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -162,7 +162,7 @@ public ContextTagKeys() { /** * Creates or finds a ContextTagKeys from its string representation. - * + * * @param name a name to look for. * @return the corresponding ContextTagKeys. */ @@ -172,7 +172,7 @@ public static ContextTagKeys fromString(String name) { /** * Gets known ContextTagKeys values. - * + * * @return known ContextTagKeys values. */ public static Collection values() { diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/DataPointType.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/DataPointType.java index 393d9100ca3d2..fda61f9a649b0 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/DataPointType.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/DataPointType.java @@ -23,7 +23,7 @@ public final class DataPointType extends ExpandableStringEnum { /** * Creates a new instance of DataPointType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -32,7 +32,7 @@ public DataPointType() { /** * Creates or finds a DataPointType from its string representation. - * + * * @param name a name to look for. * @return the corresponding DataPointType. */ @@ -42,7 +42,7 @@ public static DataPointType fromString(String name) { /** * Gets known DataPointType values. - * + * * @return known DataPointType values. */ public static Collection values() { diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/ExportResult.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/ExportResult.java index 3339f04382658..ec6a8037ca467 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/ExportResult.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/ExportResult.java @@ -40,7 +40,7 @@ public ExportResult() { /** * Get the itemsReceived property: The number of items received. - * + * * @return the itemsReceived value. */ public Integer getItemsReceived() { @@ -49,7 +49,7 @@ public Integer getItemsReceived() { /** * Set the itemsReceived property: The number of items received. - * + * * @param itemsReceived the itemsReceived value to set. * @return the ExportResult object itself. */ @@ -60,7 +60,7 @@ public ExportResult setItemsReceived(Integer itemsReceived) { /** * Get the itemsAccepted property: The number of items accepted. - * + * * @return the itemsAccepted value. */ public Integer getItemsAccepted() { @@ -69,7 +69,7 @@ public Integer getItemsAccepted() { /** * Set the itemsAccepted property: The number of items accepted. - * + * * @param itemsAccepted the itemsAccepted value to set. * @return the ExportResult object itself. */ @@ -80,7 +80,7 @@ public ExportResult setItemsAccepted(Integer itemsAccepted) { /** * Get the errors property: An array of error detail objects. - * + * * @return the errors value. */ public List getErrors() { @@ -89,7 +89,7 @@ public List getErrors() { /** * Set the errors property: An array of error detail objects. - * + * * @param errors the errors value to set. * @return the ExportResult object itself. */ @@ -112,7 +112,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ExportResult from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ExportResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/ExportResultException.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/ExportResultException.java index 0156627ec65c6..82318bdef3c7a 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/ExportResultException.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/ExportResultException.java @@ -13,7 +13,7 @@ public final class ExportResultException extends HttpResponseException { /** * Initializes a new instance of the ExportResultException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. */ @@ -23,7 +23,7 @@ public ExportResultException(String message, HttpResponse response) { /** * Initializes a new instance of the ExportResultException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. * @param value the deserialized response value. diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MessageData.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MessageData.java index dea67d57690ae..bed9ad997811c 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MessageData.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MessageData.java @@ -46,7 +46,7 @@ public MessageData() { /** * Get the message property: Trace message. - * + * * @return the message value. */ public String getMessage() { @@ -55,7 +55,7 @@ public String getMessage() { /** * Set the message property: Trace message. - * + * * @param message the message value to set. * @return the MessageData object itself. */ @@ -66,7 +66,7 @@ public MessageData setMessage(String message) { /** * Get the severityLevel property: Trace severity level. - * + * * @return the severityLevel value. */ public SeverityLevel getSeverityLevel() { @@ -75,7 +75,7 @@ public SeverityLevel getSeverityLevel() { /** * Set the severityLevel property: Trace severity level. - * + * * @param severityLevel the severityLevel value to set. * @return the MessageData object itself. */ @@ -86,7 +86,7 @@ public MessageData setSeverityLevel(SeverityLevel severityLevel) { /** * Get the properties property: Collection of custom properties. - * + * * @return the properties value. */ public Map getProperties() { @@ -95,7 +95,7 @@ public Map getProperties() { /** * Set the properties property: Collection of custom properties. - * + * * @param properties the properties value to set. * @return the MessageData object itself. */ @@ -106,7 +106,7 @@ public MessageData setProperties(Map properties) { /** * Get the measurements property: Collection of custom measurements. - * + * * @return the measurements value. */ public Map getMeasurements() { @@ -115,7 +115,7 @@ public Map getMeasurements() { /** * Set the measurements property: Collection of custom measurements. - * + * * @param measurements the measurements value to set. * @return the MessageData object itself. */ @@ -142,8 +142,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeIntField("ver", getVersion()); jsonWriter.writeStringField("message", this.message); jsonWriter.writeStringField("severityLevel", this.severityLevel == null ? null : this.severityLevel.toString()); - jsonWriter.writeMapField("properties", this.properties, JsonWriter::writeString); - jsonWriter.writeMapField("measurements", this.measurements, JsonWriter::writeDouble); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("measurements", this.measurements, (writer, element) -> writer.writeDouble(element)); if (getAdditionalProperties() != null) { for (Map.Entry additionalProperty : getAdditionalProperties().entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -154,7 +154,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MessageData from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MessageData if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -176,9 +176,11 @@ public static MessageData fromJson(JsonReader jsonReader) throws IOException { } else if ("severityLevel".equals(fieldName)) { deserializedMessageData.severityLevel = SeverityLevel.fromString(reader.getString()); } else if ("properties".equals(fieldName)) { - deserializedMessageData.properties = reader.readMap(JsonReader::getString); + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedMessageData.properties = properties; } else if ("measurements".equals(fieldName)) { - deserializedMessageData.measurements = reader.readMap(JsonReader::getDouble); + Map measurements = reader.readMap(reader1 -> reader1.getDouble()); + deserializedMessageData.measurements = measurements; } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MetricDataPoint.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MetricDataPoint.java index dcafc1ab8d0ba..7a911dd3785e5 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MetricDataPoint.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MetricDataPoint.java @@ -64,7 +64,7 @@ public MetricDataPoint() { /** * Get the namespace property: Namespace of the metric. - * + * * @return the namespace value. */ public String getNamespace() { @@ -73,7 +73,7 @@ public String getNamespace() { /** * Set the namespace property: Namespace of the metric. - * + * * @param namespace the namespace value to set. * @return the MetricDataPoint object itself. */ @@ -84,7 +84,7 @@ public MetricDataPoint setNamespace(String namespace) { /** * Get the name property: Name of the metric. - * + * * @return the name value. */ public String getName() { @@ -93,7 +93,7 @@ public String getName() { /** * Set the name property: Name of the metric. - * + * * @param name the name value to set. * @return the MetricDataPoint object itself. */ @@ -104,7 +104,7 @@ public MetricDataPoint setName(String name) { /** * Get the dataPointType property: Metric type. Single measurement or the aggregated value. - * + * * @return the dataPointType value. */ public DataPointType getDataPointType() { @@ -113,7 +113,7 @@ public DataPointType getDataPointType() { /** * Set the dataPointType property: Metric type. Single measurement or the aggregated value. - * + * * @param dataPointType the dataPointType value to set. * @return the MetricDataPoint object itself. */ @@ -124,7 +124,7 @@ public MetricDataPoint setDataPointType(DataPointType dataPointType) { /** * Get the value property: Single value for measurement. Sum of individual measurements for the aggregation. - * + * * @return the value value. */ public double getValue() { @@ -133,7 +133,7 @@ public double getValue() { /** * Set the value property: Single value for measurement. Sum of individual measurements for the aggregation. - * + * * @param value the value value to set. * @return the MetricDataPoint object itself. */ @@ -144,7 +144,7 @@ public MetricDataPoint setValue(double value) { /** * Get the count property: Metric weight of the aggregated metric. Should not be set for a measurement. - * + * * @return the count value. */ public Integer getCount() { @@ -153,7 +153,7 @@ public Integer getCount() { /** * Set the count property: Metric weight of the aggregated metric. Should not be set for a measurement. - * + * * @param count the count value to set. * @return the MetricDataPoint object itself. */ @@ -164,7 +164,7 @@ public MetricDataPoint setCount(Integer count) { /** * Get the min property: Minimum value of the aggregated metric. Should not be set for a measurement. - * + * * @return the min value. */ public Double getMin() { @@ -173,7 +173,7 @@ public Double getMin() { /** * Set the min property: Minimum value of the aggregated metric. Should not be set for a measurement. - * + * * @param min the min value to set. * @return the MetricDataPoint object itself. */ @@ -184,7 +184,7 @@ public MetricDataPoint setMin(Double min) { /** * Get the max property: Maximum value of the aggregated metric. Should not be set for a measurement. - * + * * @return the max value. */ public Double getMax() { @@ -193,7 +193,7 @@ public Double getMax() { /** * Set the max property: Maximum value of the aggregated metric. Should not be set for a measurement. - * + * * @param max the max value to set. * @return the MetricDataPoint object itself. */ @@ -204,7 +204,7 @@ public MetricDataPoint setMax(Double max) { /** * Get the stdDev property: Standard deviation of the aggregated metric. Should not be set for a measurement. - * + * * @return the stdDev value. */ public Double getStdDev() { @@ -213,7 +213,7 @@ public Double getStdDev() { /** * Set the stdDev property: Standard deviation of the aggregated metric. Should not be set for a measurement. - * + * * @param stdDev the stdDev value to set. * @return the MetricDataPoint object itself. */ @@ -241,7 +241,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MetricDataPoint from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MetricDataPoint if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MetricsData.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MetricsData.java index 5648ec2184940..9257af62cba80 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MetricsData.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MetricsData.java @@ -19,7 +19,8 @@ @Fluent public final class MetricsData extends MonitorDomain { /* - * List of metrics. Only one metric in the list is currently supported by Application Insights storage. If multiple data points were sent only the first one will be used. + * List of metrics. Only one metric in the list is currently supported by Application Insights storage. If multiple + * data points were sent only the first one will be used. */ private List metrics; @@ -37,7 +38,7 @@ public MetricsData() { /** * Get the metrics property: List of metrics. Only one metric in the list is currently supported by Application * Insights storage. If multiple data points were sent only the first one will be used. - * + * * @return the metrics value. */ public List getMetrics() { @@ -47,7 +48,7 @@ public List getMetrics() { /** * Set the metrics property: List of metrics. Only one metric in the list is currently supported by Application * Insights storage. If multiple data points were sent only the first one will be used. - * + * * @param metrics the metrics value to set. * @return the MetricsData object itself. */ @@ -58,7 +59,7 @@ public MetricsData setMetrics(List metrics) { /** * Get the properties property: Collection of custom properties. - * + * * @return the properties value. */ public Map getProperties() { @@ -67,7 +68,7 @@ public Map getProperties() { /** * Set the properties property: Collection of custom properties. - * + * * @param properties the properties value to set. * @return the MetricsData object itself. */ @@ -92,8 +93,8 @@ public MetricsData setVersion(int version) { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeIntField("ver", getVersion()); - jsonWriter.writeArrayField("metrics", this.metrics, JsonWriter::writeJson); - jsonWriter.writeMapField("properties", this.properties, JsonWriter::writeString); + jsonWriter.writeArrayField("metrics", this.metrics, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); if (getAdditionalProperties() != null) { for (Map.Entry additionalProperty : getAdditionalProperties().entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -104,7 +105,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MetricsData from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MetricsData if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -122,9 +123,11 @@ public static MetricsData fromJson(JsonReader jsonReader) throws IOException { if ("ver".equals(fieldName)) { deserializedMetricsData.setVersion(reader.getInt()); } else if ("metrics".equals(fieldName)) { - deserializedMetricsData.metrics = reader.readArray(MetricDataPoint::fromJson); + List metrics = reader.readArray(reader1 -> MetricDataPoint.fromJson(reader1)); + deserializedMetricsData.metrics = metrics; } else if ("properties".equals(fieldName)) { - deserializedMetricsData.properties = reader.readMap(JsonReader::getString); + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedMetricsData.properties = properties; } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MonitorBase.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MonitorBase.java index 1145c1a5eaf79..ff820eac6d085 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MonitorBase.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MonitorBase.java @@ -35,7 +35,7 @@ public MonitorBase() { /** * Get the baseType property: Name of item (B section) if any. If telemetry data is derived straight from this, this * should be null. - * + * * @return the baseType value. */ public String getBaseType() { @@ -45,7 +45,7 @@ public String getBaseType() { /** * Set the baseType property: Name of item (B section) if any. If telemetry data is derived straight from this, this * should be null. - * + * * @param baseType the baseType value to set. * @return the MonitorBase object itself. */ @@ -56,7 +56,7 @@ public MonitorBase setBaseType(String baseType) { /** * Get the baseData property: The data payload for the telemetry request. - * + * * @return the baseData value. */ public MonitorDomain getBaseData() { @@ -65,7 +65,7 @@ public MonitorDomain getBaseData() { /** * Set the baseData property: The data payload for the telemetry request. - * + * * @param baseData the baseData value to set. * @return the MonitorBase object itself. */ @@ -87,7 +87,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MonitorBase from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MonitorBase if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MonitorDomain.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MonitorDomain.java index 57e826b9ca36d..f939976c776a8 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MonitorDomain.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/MonitorDomain.java @@ -36,7 +36,7 @@ public MonitorDomain() { /** * Get the version property: Schema version. - * + * * @return the version value. */ public int getVersion() { @@ -45,7 +45,7 @@ public int getVersion() { /** * Set the version property: Schema version. - * + * * @param version the version value to set. * @return the MonitorDomain object itself. */ @@ -56,7 +56,7 @@ public MonitorDomain setVersion(int version) { /** * Get the additionalProperties property: The abstract common base of all domains. - * + * * @return the additionalProperties value. */ public Map getAdditionalProperties() { @@ -65,7 +65,7 @@ public Map getAdditionalProperties() { /** * Set the additionalProperties property: The abstract common base of all domains. - * + * * @param additionalProperties the additionalProperties value to set. * @return the MonitorDomain object itself. */ @@ -91,7 +91,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MonitorDomain from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MonitorDomain if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/PageViewData.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/PageViewData.java index 34685f48e58fb..c8d9ed8ae693d 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/PageViewData.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/PageViewData.java @@ -34,7 +34,8 @@ public final class PageViewData extends MonitorDomain { private String url; /* - * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days. + * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page + * view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days. */ private String duration; @@ -62,7 +63,7 @@ public PageViewData() { /** * Get the id property: Identifier of a page view instance. Used for correlation between page view and other * telemetry items. - * + * * @return the id value. */ public String getId() { @@ -72,7 +73,7 @@ public String getId() { /** * Set the id property: Identifier of a page view instance. Used for correlation between page view and other * telemetry items. - * + * * @param id the id value to set. * @return the PageViewData object itself. */ @@ -83,7 +84,7 @@ public PageViewData setId(String id) { /** * Get the name property: Event name. Keep it low cardinality to allow proper grouping and useful metrics. - * + * * @return the name value. */ public String getName() { @@ -92,7 +93,7 @@ public String getName() { /** * Set the name property: Event name. Keep it low cardinality to allow proper grouping and useful metrics. - * + * * @param name the name value to set. * @return the PageViewData object itself. */ @@ -103,7 +104,7 @@ public PageViewData setName(String name) { /** * Get the url property: Request URL with all query string parameters. - * + * * @return the url value. */ public String getUrl() { @@ -112,7 +113,7 @@ public String getUrl() { /** * Set the url property: Request URL with all query string parameters. - * + * * @param url the url value to set. * @return the PageViewData object itself. */ @@ -125,7 +126,7 @@ public PageViewData setUrl(String url) { * Get the duration property: Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this * is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. * Must be less than 1000 days. - * + * * @return the duration value. */ public String getDuration() { @@ -136,7 +137,7 @@ public String getDuration() { * Set the duration property: Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this * is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. * Must be less than 1000 days. - * + * * @param duration the duration value to set. * @return the PageViewData object itself. */ @@ -147,7 +148,7 @@ public PageViewData setDuration(String duration) { /** * Get the referredUri property: Fully qualified page URI or URL of the referring page; if unknown, leave blank. - * + * * @return the referredUri value. */ public String getReferredUri() { @@ -156,7 +157,7 @@ public String getReferredUri() { /** * Set the referredUri property: Fully qualified page URI or URL of the referring page; if unknown, leave blank. - * + * * @param referredUri the referredUri value to set. * @return the PageViewData object itself. */ @@ -167,7 +168,7 @@ public PageViewData setReferredUri(String referredUri) { /** * Get the properties property: Collection of custom properties. - * + * * @return the properties value. */ public Map getProperties() { @@ -176,7 +177,7 @@ public Map getProperties() { /** * Set the properties property: Collection of custom properties. - * + * * @param properties the properties value to set. * @return the PageViewData object itself. */ @@ -187,7 +188,7 @@ public PageViewData setProperties(Map properties) { /** * Get the measurements property: Collection of custom measurements. - * + * * @return the measurements value. */ public Map getMeasurements() { @@ -196,7 +197,7 @@ public Map getMeasurements() { /** * Set the measurements property: Collection of custom measurements. - * + * * @param measurements the measurements value to set. * @return the PageViewData object itself. */ @@ -226,7 +227,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("url", this.url); jsonWriter.writeStringField("duration", this.duration); jsonWriter.writeStringField("referredUri", this.referredUri); - jsonWriter.writeMapField("properties", this.properties, JsonWriter::writeString); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("measurements", this.measurements, (writer, element) -> writer.writeDouble(element)); if (getAdditionalProperties() != null) { for (Map.Entry additionalProperty : getAdditionalProperties().entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -237,7 +239,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of PageViewData from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of PageViewData if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -265,9 +267,11 @@ public static PageViewData fromJson(JsonReader jsonReader) throws IOException { } else if ("referredUri".equals(fieldName)) { deserializedPageViewData.referredUri = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedPageViewData.properties = reader.readMap(JsonReader::getString); + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedPageViewData.properties = properties; } else if ("measurements".equals(fieldName)) { - deserializedPageViewData.measurements = reader.readMap(JsonReader::getDouble); + Map measurements = reader.readMap(reader1 -> reader1.getDouble()); + deserializedPageViewData.measurements = measurements; } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/PageViewPerfData.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/PageViewPerfData.java index 4879d7ac14e79..8711099d713c9 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/PageViewPerfData.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/PageViewPerfData.java @@ -34,7 +34,8 @@ public final class PageViewPerfData extends MonitorDomain { private String url; /* - * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days. + * Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this is the duration. For a page + * view with performance information (PageViewPerfData), this is the page load time. Must be less than 1000 days. */ private String duration; @@ -82,7 +83,7 @@ public PageViewPerfData() { /** * Get the id property: Identifier of a page view instance. Used for correlation between page view and other * telemetry items. - * + * * @return the id value. */ public String getId() { @@ -92,7 +93,7 @@ public String getId() { /** * Set the id property: Identifier of a page view instance. Used for correlation between page view and other * telemetry items. - * + * * @param id the id value to set. * @return the PageViewPerfData object itself. */ @@ -103,7 +104,7 @@ public PageViewPerfData setId(String id) { /** * Get the name property: Event name. Keep it low cardinality to allow proper grouping and useful metrics. - * + * * @return the name value. */ public String getName() { @@ -112,7 +113,7 @@ public String getName() { /** * Set the name property: Event name. Keep it low cardinality to allow proper grouping and useful metrics. - * + * * @param name the name value to set. * @return the PageViewPerfData object itself. */ @@ -123,7 +124,7 @@ public PageViewPerfData setName(String name) { /** * Get the url property: Request URL with all query string parameters. - * + * * @return the url value. */ public String getUrl() { @@ -132,7 +133,7 @@ public String getUrl() { /** * Set the url property: Request URL with all query string parameters. - * + * * @param url the url value to set. * @return the PageViewPerfData object itself. */ @@ -145,7 +146,7 @@ public PageViewPerfData setUrl(String url) { * Get the duration property: Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this * is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. * Must be less than 1000 days. - * + * * @return the duration value. */ public String getDuration() { @@ -156,7 +157,7 @@ public String getDuration() { * Set the duration property: Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view (PageViewData), this * is the duration. For a page view with performance information (PageViewPerfData), this is the page load time. * Must be less than 1000 days. - * + * * @param duration the duration value to set. * @return the PageViewPerfData object itself. */ @@ -167,7 +168,7 @@ public PageViewPerfData setDuration(String duration) { /** * Get the perfTotal property: Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff. - * + * * @return the perfTotal value. */ public String getPerfTotal() { @@ -176,7 +177,7 @@ public String getPerfTotal() { /** * Set the perfTotal property: Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff. - * + * * @param perfTotal the perfTotal value to set. * @return the PageViewPerfData object itself. */ @@ -188,7 +189,7 @@ public PageViewPerfData setPerfTotal(String perfTotal) { /** * Get the networkConnect property: Network connection time in TimeSpan 'G' (general long) format: * d:hh:mm:ss.fffffff. - * + * * @return the networkConnect value. */ public String getNetworkConnect() { @@ -198,7 +199,7 @@ public String getNetworkConnect() { /** * Set the networkConnect property: Network connection time in TimeSpan 'G' (general long) format: * d:hh:mm:ss.fffffff. - * + * * @param networkConnect the networkConnect value to set. * @return the PageViewPerfData object itself. */ @@ -209,7 +210,7 @@ public PageViewPerfData setNetworkConnect(String networkConnect) { /** * Get the sentRequest property: Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff. - * + * * @return the sentRequest value. */ public String getSentRequest() { @@ -218,7 +219,7 @@ public String getSentRequest() { /** * Set the sentRequest property: Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff. - * + * * @param sentRequest the sentRequest value to set. * @return the PageViewPerfData object itself. */ @@ -230,7 +231,7 @@ public PageViewPerfData setSentRequest(String sentRequest) { /** * Get the receivedResponse property: Received response time in TimeSpan 'G' (general long) format: * d:hh:mm:ss.fffffff. - * + * * @return the receivedResponse value. */ public String getReceivedResponse() { @@ -240,7 +241,7 @@ public String getReceivedResponse() { /** * Set the receivedResponse property: Received response time in TimeSpan 'G' (general long) format: * d:hh:mm:ss.fffffff. - * + * * @param receivedResponse the receivedResponse value to set. * @return the PageViewPerfData object itself. */ @@ -251,7 +252,7 @@ public PageViewPerfData setReceivedResponse(String receivedResponse) { /** * Get the domProcessing property: DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff. - * + * * @return the domProcessing value. */ public String getDomProcessing() { @@ -260,7 +261,7 @@ public String getDomProcessing() { /** * Set the domProcessing property: DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff. - * + * * @param domProcessing the domProcessing value to set. * @return the PageViewPerfData object itself. */ @@ -271,7 +272,7 @@ public PageViewPerfData setDomProcessing(String domProcessing) { /** * Get the properties property: Collection of custom properties. - * + * * @return the properties value. */ public Map getProperties() { @@ -280,7 +281,7 @@ public Map getProperties() { /** * Set the properties property: Collection of custom properties. - * + * * @param properties the properties value to set. * @return the PageViewPerfData object itself. */ @@ -291,7 +292,7 @@ public PageViewPerfData setProperties(Map properties) { /** * Get the measurements property: Collection of custom measurements. - * + * * @return the measurements value. */ public Map getMeasurements() { @@ -300,7 +301,7 @@ public Map getMeasurements() { /** * Set the measurements property: Collection of custom measurements. - * + * * @param measurements the measurements value to set. * @return the PageViewPerfData object itself. */ @@ -334,8 +335,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("sentRequest", this.sentRequest); jsonWriter.writeStringField("receivedResponse", this.receivedResponse); jsonWriter.writeStringField("domProcessing", this.domProcessing); - jsonWriter.writeMapField("properties", this.properties, JsonWriter::writeString); - jsonWriter.writeMapField("measurements", this.measurements, JsonWriter::writeDouble); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("measurements", this.measurements, (writer, element) -> writer.writeDouble(element)); if (getAdditionalProperties() != null) { for (Map.Entry additionalProperty : getAdditionalProperties().entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -346,7 +347,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of PageViewPerfData from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of PageViewPerfData if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -382,9 +383,11 @@ public static PageViewPerfData fromJson(JsonReader jsonReader) throws IOExceptio } else if ("domProcessing".equals(fieldName)) { deserializedPageViewPerfData.domProcessing = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedPageViewPerfData.properties = reader.readMap(JsonReader::getString); + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedPageViewPerfData.properties = properties; } else if ("measurements".equals(fieldName)) { - deserializedPageViewPerfData.measurements = reader.readMap(JsonReader::getDouble); + Map measurements = reader.readMap(reader1 -> reader1.getDouble()); + deserializedPageViewPerfData.measurements = measurements; } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/RemoteDependencyData.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/RemoteDependencyData.java index fb827524ceaa3..9e20b9c24fe28 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/RemoteDependencyData.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/RemoteDependencyData.java @@ -19,12 +19,14 @@ @Fluent public final class RemoteDependencyData extends MonitorDomain { /* - * Identifier of a dependency call instance. Used for correlation with the request telemetry item corresponding to this dependency call. + * Identifier of a dependency call instance. Used for correlation with the request telemetry item corresponding to + * this dependency call. */ private String id; /* - * Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template. + * Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure + * name and URL path template. */ private String name; @@ -39,7 +41,8 @@ public final class RemoteDependencyData extends MonitorDomain { private String data; /* - * Dependency type name. Very low cardinality value for logical grouping of dependencies and interpretation of other fields like commandName and resultCode. Examples are SQL, Azure table, and HTTP. + * Dependency type name. Very low cardinality value for logical grouping of dependencies and interpretation of other + * fields like commandName and resultCode. Examples are SQL, Azure table, and HTTP. */ private String type; @@ -77,7 +80,7 @@ public RemoteDependencyData() { /** * Get the id property: Identifier of a dependency call instance. Used for correlation with the request telemetry * item corresponding to this dependency call. - * + * * @return the id value. */ public String getId() { @@ -87,7 +90,7 @@ public String getId() { /** * Set the id property: Identifier of a dependency call instance. Used for correlation with the request telemetry * item corresponding to this dependency call. - * + * * @param id the id value to set. * @return the RemoteDependencyData object itself. */ @@ -99,7 +102,7 @@ public RemoteDependencyData setId(String id) { /** * Get the name property: Name of the command initiated with this dependency call. Low cardinality value. Examples * are stored procedure name and URL path template. - * + * * @return the name value. */ public String getName() { @@ -109,7 +112,7 @@ public String getName() { /** * Set the name property: Name of the command initiated with this dependency call. Low cardinality value. Examples * are stored procedure name and URL path template. - * + * * @param name the name value to set. * @return the RemoteDependencyData object itself. */ @@ -120,7 +123,7 @@ public RemoteDependencyData setName(String name) { /** * Get the resultCode property: Result code of a dependency call. Examples are SQL error code and HTTP status code. - * + * * @return the resultCode value. */ public String getResultCode() { @@ -129,7 +132,7 @@ public String getResultCode() { /** * Set the resultCode property: Result code of a dependency call. Examples are SQL error code and HTTP status code. - * + * * @param resultCode the resultCode value to set. * @return the RemoteDependencyData object itself. */ @@ -141,7 +144,7 @@ public RemoteDependencyData setResultCode(String resultCode) { /** * Get the data property: Command initiated by this dependency call. Examples are SQL statement and HTTP URL with * all query parameters. - * + * * @return the data value. */ public String getData() { @@ -151,7 +154,7 @@ public String getData() { /** * Set the data property: Command initiated by this dependency call. Examples are SQL statement and HTTP URL with * all query parameters. - * + * * @param data the data value to set. * @return the RemoteDependencyData object itself. */ @@ -163,7 +166,7 @@ public RemoteDependencyData setData(String data) { /** * Get the type property: Dependency type name. Very low cardinality value for logical grouping of dependencies and * interpretation of other fields like commandName and resultCode. Examples are SQL, Azure table, and HTTP. - * + * * @return the type value. */ public String getType() { @@ -173,7 +176,7 @@ public String getType() { /** * Set the type property: Dependency type name. Very low cardinality value for logical grouping of dependencies and * interpretation of other fields like commandName and resultCode. Examples are SQL, Azure table, and HTTP. - * + * * @param type the type value to set. * @return the RemoteDependencyData object itself. */ @@ -184,7 +187,7 @@ public RemoteDependencyData setType(String type) { /** * Get the target property: Target site of a dependency call. Examples are server name, host address. - * + * * @return the target value. */ public String getTarget() { @@ -193,7 +196,7 @@ public String getTarget() { /** * Set the target property: Target site of a dependency call. Examples are server name, host address. - * + * * @param target the target value to set. * @return the RemoteDependencyData object itself. */ @@ -204,7 +207,7 @@ public RemoteDependencyData setTarget(String target) { /** * Get the duration property: Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days. - * + * * @return the duration value. */ public String getDuration() { @@ -213,7 +216,7 @@ public String getDuration() { /** * Set the duration property: Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days. - * + * * @param duration the duration value to set. * @return the RemoteDependencyData object itself. */ @@ -224,7 +227,7 @@ public RemoteDependencyData setDuration(String duration) { /** * Get the success property: Indication of successful or unsuccessful call. - * + * * @return the success value. */ public Boolean isSuccess() { @@ -233,7 +236,7 @@ public Boolean isSuccess() { /** * Set the success property: Indication of successful or unsuccessful call. - * + * * @param success the success value to set. * @return the RemoteDependencyData object itself. */ @@ -244,7 +247,7 @@ public RemoteDependencyData setSuccess(Boolean success) { /** * Get the properties property: Collection of custom properties. - * + * * @return the properties value. */ public Map getProperties() { @@ -253,7 +256,7 @@ public Map getProperties() { /** * Set the properties property: Collection of custom properties. - * + * * @param properties the properties value to set. * @return the RemoteDependencyData object itself. */ @@ -264,7 +267,7 @@ public RemoteDependencyData setProperties(Map properties) { /** * Get the measurements property: Collection of custom measurements. - * + * * @return the measurements value. */ public Map getMeasurements() { @@ -273,7 +276,7 @@ public Map getMeasurements() { /** * Set the measurements property: Collection of custom measurements. - * + * * @param measurements the measurements value to set. * @return the RemoteDependencyData object itself. */ @@ -306,8 +309,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("type", this.type); jsonWriter.writeStringField("target", this.target); jsonWriter.writeBooleanField("success", this.success); - jsonWriter.writeMapField("properties", this.properties, JsonWriter::writeString); - jsonWriter.writeMapField("measurements", this.measurements, JsonWriter::writeDouble); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("measurements", this.measurements, (writer, element) -> writer.writeDouble(element)); if (getAdditionalProperties() != null) { for (Map.Entry additionalProperty : getAdditionalProperties().entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -318,7 +321,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of RemoteDependencyData from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of RemoteDependencyData if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. @@ -352,9 +355,11 @@ public static RemoteDependencyData fromJson(JsonReader jsonReader) throws IOExce } else if ("success".equals(fieldName)) { deserializedRemoteDependencyData.success = reader.getNullable(JsonReader::getBoolean); } else if ("properties".equals(fieldName)) { - deserializedRemoteDependencyData.properties = reader.readMap(JsonReader::getString); + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedRemoteDependencyData.properties = properties; } else if ("measurements".equals(fieldName)) { - deserializedRemoteDependencyData.measurements = reader.readMap(JsonReader::getDouble); + Map measurements = reader.readMap(reader1 -> reader1.getDouble()); + deserializedRemoteDependencyData.measurements = measurements; } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/RequestData.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/RequestData.java index b265d8f36de34..0a4632d24b56d 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/RequestData.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/RequestData.java @@ -24,7 +24,9 @@ public final class RequestData extends MonitorDomain { private String id; /* - * Name of the request. Represents code path taken to process request. Low cardinality value to allow better grouping of requests. For HTTP requests it represents the HTTP method and URL path template like 'GET /values/{id}'. + * Name of the request. Represents code path taken to process request. Low cardinality value to allow better + * grouping of requests. For HTTP requests it represents the HTTP method and URL path template like 'GET + * /values/{id}'. */ private String name; @@ -72,7 +74,7 @@ public RequestData() { /** * Get the id property: Identifier of a request call instance. Used for correlation between request and other * telemetry items. - * + * * @return the id value. */ public String getId() { @@ -82,7 +84,7 @@ public String getId() { /** * Set the id property: Identifier of a request call instance. Used for correlation between request and other * telemetry items. - * + * * @param id the id value to set. * @return the RequestData object itself. */ @@ -95,7 +97,7 @@ public RequestData setId(String id) { * Get the name property: Name of the request. Represents code path taken to process request. Low cardinality value * to allow better grouping of requests. For HTTP requests it represents the HTTP method and URL path template like * 'GET /values/{id}'. - * + * * @return the name value. */ public String getName() { @@ -106,7 +108,7 @@ public String getName() { * Set the name property: Name of the request. Represents code path taken to process request. Low cardinality value * to allow better grouping of requests. For HTTP requests it represents the HTTP method and URL path template like * 'GET /values/{id}'. - * + * * @param name the name value to set. * @return the RequestData object itself. */ @@ -117,7 +119,7 @@ public RequestData setName(String name) { /** * Get the duration property: Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days. - * + * * @return the duration value. */ public String getDuration() { @@ -126,7 +128,7 @@ public String getDuration() { /** * Set the duration property: Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days. - * + * * @param duration the duration value to set. * @return the RequestData object itself. */ @@ -137,7 +139,7 @@ public RequestData setDuration(String duration) { /** * Get the success property: Indication of successful or unsuccessful call. - * + * * @return the success value. */ public boolean isSuccess() { @@ -146,7 +148,7 @@ public boolean isSuccess() { /** * Set the success property: Indication of successful or unsuccessful call. - * + * * @param success the success value to set. * @return the RequestData object itself. */ @@ -157,7 +159,7 @@ public RequestData setSuccess(boolean success) { /** * Get the responseCode property: Result of a request execution. HTTP status code for HTTP requests. - * + * * @return the responseCode value. */ public String getResponseCode() { @@ -166,7 +168,7 @@ public String getResponseCode() { /** * Set the responseCode property: Result of a request execution. HTTP status code for HTTP requests. - * + * * @param responseCode the responseCode value to set. * @return the RequestData object itself. */ @@ -178,7 +180,7 @@ public RequestData setResponseCode(String responseCode) { /** * Get the source property: Source of the request. Examples are the instrumentation key of the caller or the ip * address of the caller. - * + * * @return the source value. */ public String getSource() { @@ -188,7 +190,7 @@ public String getSource() { /** * Set the source property: Source of the request. Examples are the instrumentation key of the caller or the ip * address of the caller. - * + * * @param source the source value to set. * @return the RequestData object itself. */ @@ -199,7 +201,7 @@ public RequestData setSource(String source) { /** * Get the url property: Request URL with all query string parameters. - * + * * @return the url value. */ public String getUrl() { @@ -208,7 +210,7 @@ public String getUrl() { /** * Set the url property: Request URL with all query string parameters. - * + * * @param url the url value to set. * @return the RequestData object itself. */ @@ -219,7 +221,7 @@ public RequestData setUrl(String url) { /** * Get the properties property: Collection of custom properties. - * + * * @return the properties value. */ public Map getProperties() { @@ -228,7 +230,7 @@ public Map getProperties() { /** * Set the properties property: Collection of custom properties. - * + * * @param properties the properties value to set. * @return the RequestData object itself. */ @@ -239,7 +241,7 @@ public RequestData setProperties(Map properties) { /** * Get the measurements property: Collection of custom measurements. - * + * * @return the measurements value. */ public Map getMeasurements() { @@ -248,7 +250,7 @@ public Map getMeasurements() { /** * Set the measurements property: Collection of custom measurements. - * + * * @param measurements the measurements value to set. * @return the RequestData object itself. */ @@ -280,8 +282,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("name", this.name); jsonWriter.writeStringField("source", this.source); jsonWriter.writeStringField("url", this.url); - jsonWriter.writeMapField("properties", this.properties, JsonWriter::writeString); - jsonWriter.writeMapField("measurements", this.measurements, JsonWriter::writeDouble); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("measurements", this.measurements, (writer, element) -> writer.writeDouble(element)); if (getAdditionalProperties() != null) { for (Map.Entry additionalProperty : getAdditionalProperties().entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -292,7 +294,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of RequestData from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of RequestData if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -324,9 +326,11 @@ public static RequestData fromJson(JsonReader jsonReader) throws IOException { } else if ("url".equals(fieldName)) { deserializedRequestData.url = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedRequestData.properties = reader.readMap(JsonReader::getString); + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedRequestData.properties = properties; } else if ("measurements".equals(fieldName)) { - deserializedRequestData.measurements = reader.readMap(JsonReader::getDouble); + Map measurements = reader.readMap(reader1 -> reader1.getDouble()); + deserializedRequestData.measurements = measurements; } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/SeverityLevel.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/SeverityLevel.java index 1791d5b47ac7a..91c8cf91735d8 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/SeverityLevel.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/SeverityLevel.java @@ -38,7 +38,7 @@ public final class SeverityLevel extends ExpandableStringEnum { /** * Creates a new instance of SeverityLevel value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -47,7 +47,7 @@ public SeverityLevel() { /** * Creates or finds a SeverityLevel from its string representation. - * + * * @param name a name to look for. * @return the corresponding SeverityLevel. */ @@ -57,7 +57,7 @@ public static SeverityLevel fromString(String name) { /** * Gets known SeverityLevel values. - * + * * @return known SeverityLevel values. */ public static Collection values() { diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/StackFrame.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/StackFrame.java index 08903df045273..9c39355092d3c 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/StackFrame.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/StackFrame.java @@ -49,7 +49,7 @@ public StackFrame() { /** * Get the level property: The level property. - * + * * @return the level value. */ public int getLevel() { @@ -58,7 +58,7 @@ public int getLevel() { /** * Set the level property: The level property. - * + * * @param level the level value to set. * @return the StackFrame object itself. */ @@ -69,7 +69,7 @@ public StackFrame setLevel(int level) { /** * Get the method property: Method name. - * + * * @return the method value. */ public String getMethod() { @@ -78,7 +78,7 @@ public String getMethod() { /** * Set the method property: Method name. - * + * * @param method the method value to set. * @return the StackFrame object itself. */ @@ -89,7 +89,7 @@ public StackFrame setMethod(String method) { /** * Get the assembly property: Name of the assembly (dll, jar, etc.) containing this function. - * + * * @return the assembly value. */ public String getAssembly() { @@ -98,7 +98,7 @@ public String getAssembly() { /** * Set the assembly property: Name of the assembly (dll, jar, etc.) containing this function. - * + * * @param assembly the assembly value to set. * @return the StackFrame object itself. */ @@ -109,7 +109,7 @@ public StackFrame setAssembly(String assembly) { /** * Get the fileName property: File name or URL of the method implementation. - * + * * @return the fileName value. */ public String getFileName() { @@ -118,7 +118,7 @@ public String getFileName() { /** * Set the fileName property: File name or URL of the method implementation. - * + * * @param fileName the fileName value to set. * @return the StackFrame object itself. */ @@ -129,7 +129,7 @@ public StackFrame setFileName(String fileName) { /** * Get the line property: Line number of the code implementation. - * + * * @return the line value. */ public Integer getLine() { @@ -138,7 +138,7 @@ public Integer getLine() { /** * Set the line property: Line number of the code implementation. - * + * * @param line the line value to set. * @return the StackFrame object itself. */ @@ -163,7 +163,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of StackFrame from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of StackFrame if the JsonReader was pointing to an instance of it, or null if it was pointing * to JSON null. diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryErrorDetails.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryErrorDetails.java index f1c6434e6859b..cd174ddf68370 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryErrorDetails.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryErrorDetails.java @@ -39,7 +39,7 @@ public TelemetryErrorDetails() { /** * Get the index property: The index in the original payload of the item. - * + * * @return the index value. */ public Integer getIndex() { @@ -48,7 +48,7 @@ public Integer getIndex() { /** * Set the index property: The index in the original payload of the item. - * + * * @param index the index value to set. * @return the TelemetryErrorDetails object itself. */ @@ -59,7 +59,7 @@ public TelemetryErrorDetails setIndex(Integer index) { /** * Get the statusCode property: The item specific [HTTP Response status code](#Response Status Codes). - * + * * @return the statusCode value. */ public Integer getStatusCode() { @@ -68,7 +68,7 @@ public Integer getStatusCode() { /** * Set the statusCode property: The item specific [HTTP Response status code](#Response Status Codes). - * + * * @param statusCode the statusCode value to set. * @return the TelemetryErrorDetails object itself. */ @@ -79,7 +79,7 @@ public TelemetryErrorDetails setStatusCode(Integer statusCode) { /** * Get the message property: The error message. - * + * * @return the message value. */ public String getMessage() { @@ -88,7 +88,7 @@ public String getMessage() { /** * Set the message property: The error message. - * + * * @param message the message value to set. * @return the TelemetryErrorDetails object itself. */ @@ -111,7 +111,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TelemetryErrorDetails from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TelemetryErrorDetails if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryEventData.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryEventData.java index 2e510a9b09f85..cf2d569064568 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryEventData.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryEventData.java @@ -41,7 +41,7 @@ public TelemetryEventData() { /** * Get the name property: Event name. Keep it low cardinality to allow proper grouping and useful metrics. - * + * * @return the name value. */ public String getName() { @@ -50,7 +50,7 @@ public String getName() { /** * Set the name property: Event name. Keep it low cardinality to allow proper grouping and useful metrics. - * + * * @param name the name value to set. * @return the TelemetryEventData object itself. */ @@ -61,7 +61,7 @@ public TelemetryEventData setName(String name) { /** * Get the properties property: Collection of custom properties. - * + * * @return the properties value. */ public Map getProperties() { @@ -70,7 +70,7 @@ public Map getProperties() { /** * Set the properties property: Collection of custom properties. - * + * * @param properties the properties value to set. * @return the TelemetryEventData object itself. */ @@ -81,7 +81,7 @@ public TelemetryEventData setProperties(Map properties) { /** * Get the measurements property: Collection of custom measurements. - * + * * @return the measurements value. */ public Map getMeasurements() { @@ -90,7 +90,7 @@ public Map getMeasurements() { /** * Set the measurements property: Collection of custom measurements. - * + * * @param measurements the measurements value to set. * @return the TelemetryEventData object itself. */ @@ -116,8 +116,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeIntField("ver", getVersion()); jsonWriter.writeStringField("name", this.name); - jsonWriter.writeMapField("properties", this.properties, JsonWriter::writeString); - jsonWriter.writeMapField("measurements", this.measurements, JsonWriter::writeDouble); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("measurements", this.measurements, (writer, element) -> writer.writeDouble(element)); if (getAdditionalProperties() != null) { for (Map.Entry additionalProperty : getAdditionalProperties().entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -128,7 +128,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TelemetryEventData from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TelemetryEventData if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -148,9 +148,11 @@ public static TelemetryEventData fromJson(JsonReader jsonReader) throws IOExcept } else if ("name".equals(fieldName)) { deserializedTelemetryEventData.name = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedTelemetryEventData.properties = reader.readMap(JsonReader::getString); + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedTelemetryEventData.properties = properties; } else if ("measurements".equals(fieldName)) { - deserializedTelemetryEventData.measurements = reader.readMap(JsonReader::getDouble); + Map measurements = reader.readMap(reader1 -> reader1.getDouble()); + deserializedTelemetryEventData.measurements = measurements; } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryExceptionData.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryExceptionData.java index fc64eff32750c..c1d1c0cbecb7a 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryExceptionData.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryExceptionData.java @@ -30,7 +30,8 @@ public final class TelemetryExceptionData extends MonitorDomain { private SeverityLevel severityLevel; /* - * Identifier of where the exception was thrown in code. Used for exceptions grouping. Typically a combination of exception type and a function from the call stack. + * Identifier of where the exception was thrown in code. Used for exceptions grouping. Typically a combination of + * exception type and a function from the call stack. */ private String problemId; @@ -52,7 +53,7 @@ public TelemetryExceptionData() { /** * Get the exceptions property: Exception chain - list of inner exceptions. - * + * * @return the exceptions value. */ public List getExceptions() { @@ -61,7 +62,7 @@ public List getExceptions() { /** * Set the exceptions property: Exception chain - list of inner exceptions. - * + * * @param exceptions the exceptions value to set. * @return the TelemetryExceptionData object itself. */ @@ -73,7 +74,7 @@ public TelemetryExceptionData setExceptions(List exce /** * Get the severityLevel property: Severity level. Mostly used to indicate exception severity level when it is * reported by logging library. - * + * * @return the severityLevel value. */ public SeverityLevel getSeverityLevel() { @@ -83,7 +84,7 @@ public SeverityLevel getSeverityLevel() { /** * Set the severityLevel property: Severity level. Mostly used to indicate exception severity level when it is * reported by logging library. - * + * * @param severityLevel the severityLevel value to set. * @return the TelemetryExceptionData object itself. */ @@ -95,7 +96,7 @@ public TelemetryExceptionData setSeverityLevel(SeverityLevel severityLevel) { /** * Get the problemId property: Identifier of where the exception was thrown in code. Used for exceptions grouping. * Typically a combination of exception type and a function from the call stack. - * + * * @return the problemId value. */ public String getProblemId() { @@ -105,7 +106,7 @@ public String getProblemId() { /** * Set the problemId property: Identifier of where the exception was thrown in code. Used for exceptions grouping. * Typically a combination of exception type and a function from the call stack. - * + * * @param problemId the problemId value to set. * @return the TelemetryExceptionData object itself. */ @@ -116,7 +117,7 @@ public TelemetryExceptionData setProblemId(String problemId) { /** * Get the properties property: Collection of custom properties. - * + * * @return the properties value. */ public Map getProperties() { @@ -125,7 +126,7 @@ public Map getProperties() { /** * Set the properties property: Collection of custom properties. - * + * * @param properties the properties value to set. * @return the TelemetryExceptionData object itself. */ @@ -136,7 +137,7 @@ public TelemetryExceptionData setProperties(Map properties) { /** * Get the measurements property: Collection of custom measurements. - * + * * @return the measurements value. */ public Map getMeasurements() { @@ -145,7 +146,7 @@ public Map getMeasurements() { /** * Set the measurements property: Collection of custom measurements. - * + * * @param measurements the measurements value to set. * @return the TelemetryExceptionData object itself. */ @@ -170,11 +171,11 @@ public TelemetryExceptionData setVersion(int version) { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeIntField("ver", getVersion()); - jsonWriter.writeArrayField("exceptions", this.exceptions, JsonWriter::writeJson); + jsonWriter.writeArrayField("exceptions", this.exceptions, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("severityLevel", this.severityLevel == null ? null : this.severityLevel.toString()); jsonWriter.writeStringField("problemId", this.problemId); - jsonWriter.writeMapField("properties", this.properties, JsonWriter::writeString); - jsonWriter.writeMapField("measurements", this.measurements, JsonWriter::writeDouble); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("measurements", this.measurements, (writer, element) -> writer.writeDouble(element)); if (getAdditionalProperties() != null) { for (Map.Entry additionalProperty : getAdditionalProperties().entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -185,7 +186,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TelemetryExceptionData from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TelemetryExceptionData if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. @@ -203,16 +204,19 @@ public static TelemetryExceptionData fromJson(JsonReader jsonReader) throws IOEx if ("ver".equals(fieldName)) { deserializedTelemetryExceptionData.setVersion(reader.getInt()); } else if ("exceptions".equals(fieldName)) { - deserializedTelemetryExceptionData.exceptions - = reader.readArray(TelemetryExceptionDetails::fromJson); + List exceptions + = reader.readArray(reader1 -> TelemetryExceptionDetails.fromJson(reader1)); + deserializedTelemetryExceptionData.exceptions = exceptions; } else if ("severityLevel".equals(fieldName)) { deserializedTelemetryExceptionData.severityLevel = SeverityLevel.fromString(reader.getString()); } else if ("problemId".equals(fieldName)) { deserializedTelemetryExceptionData.problemId = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedTelemetryExceptionData.properties = reader.readMap(JsonReader::getString); + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedTelemetryExceptionData.properties = properties; } else if ("measurements".equals(fieldName)) { - deserializedTelemetryExceptionData.measurements = reader.readMap(JsonReader::getDouble); + Map measurements = reader.readMap(reader1 -> reader1.getDouble()); + deserializedTelemetryExceptionData.measurements = measurements; } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryExceptionDetails.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryExceptionDetails.java index 84a8aa2e3b276..5856e25112431 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryExceptionDetails.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryExceptionDetails.java @@ -18,7 +18,8 @@ @Fluent public final class TelemetryExceptionDetails implements JsonSerializable { /* - * In case exception is nested (outer exception contains inner one), the id and outerId properties are used to represent the nesting. + * In case exception is nested (outer exception contains inner one), the id and outerId properties are used to + * represent the nesting. */ private Integer id; @@ -38,7 +39,8 @@ public final class TelemetryExceptionDetails implements JsonSerializable getParsedStack() { @@ -195,7 +197,7 @@ public List getParsedStack() { /** * Set the parsedStack property: List of stack frames. Either stack or parsedStack should have a value. - * + * * @param parsedStack the parsedStack value to set. * @return the TelemetryExceptionDetails object itself. */ @@ -222,7 +224,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TelemetryExceptionDetails from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TelemetryExceptionDetails if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryItem.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryItem.java index a9f7f642e634a..9ae8daa0186cb 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryItem.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/models/TelemetryItem.java @@ -5,6 +5,7 @@ package com.azure.monitor.opentelemetry.exporter.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -26,7 +27,8 @@ @Fluent public final class TelemetryItem implements JsonSerializable { /* - * Envelope version. For internal use only. By assigning this the default, it will not be serialized within the payload unless changed to a value other than #1. + * Envelope version. For internal use only. By assigning this the default, it will not be serialized within the + * payload unless changed to a value other than #1. */ private Integer version; @@ -36,7 +38,12 @@ public final class TelemetryItem implements JsonSerializable { private String name; /* - * Event date time when telemetry item was created. This is the wall clock time on the client when the event was generated. There is no guarantee that the client's time is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z' character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the number of decimal seconds digits provided are variable (and unspecified). Consumers should handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies a fixed length. Example: 2009-06-15T13:45:30.0000000Z. + * Event date time when telemetry item was created. This is the wall clock time on the client when the event was + * generated. There is no guarantee that the client's time is accurate. This field must be formatted in UTC ISO 8601 + * format, with a trailing 'Z' character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: + * the number of decimal seconds digits provided are variable (and unspecified). Consumers should handle this, i.e. + * managed code consumers should not use format 'O' for parsing as it specifies a fixed length. Example: + * 2009-06-15T13:45:30.0000000Z. */ private OffsetDateTime time; @@ -317,7 +324,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeNumberField("sampleRate", this.sampleRate); jsonWriter.writeStringField("seq", this.sequence); jsonWriter.writeStringField("iKey", this.instrumentationKey); - jsonWriter.writeMapField("tags", this.tags, JsonWriter::writeString); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("data", this.data); return jsonWriter.writeEndObject(); } @@ -338,13 +345,13 @@ public static TelemetryItem fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("ver".equals(fieldName)) { - deserializedTelemetryItem.version = reader.getNullable(JsonReader::getInt); - } else if ("name".equals(fieldName)) { + if ("name".equals(fieldName)) { deserializedTelemetryItem.name = reader.getString(); } else if ("time".equals(fieldName)) { - deserializedTelemetryItem.time - = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + deserializedTelemetryItem.time = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("ver".equals(fieldName)) { + deserializedTelemetryItem.version = reader.getNullable(JsonReader::getInt); } else if ("sampleRate".equals(fieldName)) { deserializedTelemetryItem.sampleRate = reader.getNullable(JsonReader::getFloat); } else if ("seq".equals(fieldName)) { @@ -352,7 +359,8 @@ public static TelemetryItem fromJson(JsonReader jsonReader) throws IOException { } else if ("iKey".equals(fieldName)) { deserializedTelemetryItem.instrumentationKey = reader.getString(); } else if ("tags".equals(fieldName)) { - deserializedTelemetryItem.tags = reader.readMap(JsonReader::getString); + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedTelemetryItem.tags = tags; } else if ("data".equals(fieldName)) { deserializedTelemetryItem.data = MonitorBase.fromJson(reader); } else { diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/swagger/README.md b/sdk/monitor/azure-monitor-opentelemetry-exporter/swagger/README.md index 4adc0f0fcddaf..03d29f4cda339 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/swagger/README.md +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/swagger/README.md @@ -1,26 +1,54 @@ -### Getting Started +# Azure Monitor OpenTelemetry Exporter for Java -[AutoRest](https://github.com/Azure/autorest) is required to generate the models. +> see https://aka.ms/autorest -#### Install autorest +This is the AutoRest configuration file for Monitor OpenTelemetry Exporter. +--- +## Getting Started +To build the SDK for Monitor OpenTelemetry Exporter, simply [Install AutoRest](https://aka.ms/autorest) and +in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +### Setup ```ps npm install -g autorest ``` -#### Generate the models - +### Generation ```ps cd -autorest autorest_code.md +autorest ``` -In order to use the latest version of autorest, update the `use` directive in the `autorest_code.md` file. - -```yml -use: '@autorest/java@4.1.29' +## Generate autorest code +``` yaml +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/applicationinsights/data-plane/Monitor.Exporters/preview/v2.1/swagger.json +java: true +use: '@autorest/java@4.1.39' +output-folder: ../ +models-subpackage: implementation.models +namespace: com.azure.monitor.opentelemetry.exporter +generate-client-interfaces: false +service-interface-as-public: true +license-header: MICROSOFT_MIT_SMALL +add-context-parameter: true +context-client-method-parameter: true +generate-client-as-impl: true +artifact-id: azure-monitor-opentelemetry-exporter +directive: + - rename-model: + from: TrackResponse + to: ExportResult ``` +### Manual modifications + After the code has been updated, copy the generated models from `sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/models/` diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/swagger/autorest_code.md b/sdk/monitor/azure-monitor-opentelemetry-exporter/swagger/autorest_code.md deleted file mode 100644 index 32491dac2cf57..0000000000000 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/swagger/autorest_code.md +++ /dev/null @@ -1,19 +0,0 @@ -## Generate autorest code -``` yaml -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/applicationinsights/data-plane/Monitor.Exporters/preview/v2.1/swagger.json -java: true -use: '@autorest/java@4.1.29' -output-folder: ../ -namespace: com.azure.monitor.opentelemetry.exporter -generate-client-interfaces: false -service-interface-as-public: true -license-header: MICROSOFT_MIT_SMALL -add-context-parameter: true -context-client-method-parameter: true -generate-client-as-impl: true -artifact-id: azure-monitor-opentelemetry-exporter -directive: - - rename-model: - from: TrackResponse - to: ExportResult -``` diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/AzureLogAnalyticsImplBuilder.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/AzureLogAnalyticsImplBuilder.java index 5dbf0f9be0675..3717c0666053e 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/AzureLogAnalyticsImplBuilder.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/AzureLogAnalyticsImplBuilder.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. - package com.azure.monitor.query.implementation.logs; import com.azure.core.annotation.Generated; @@ -11,7 +10,6 @@ import com.azure.core.client.traits.TokenCredentialTrait; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; @@ -45,6 +43,7 @@ @ServiceClientBuilder(serviceClients = { AzureLogAnalyticsImpl.class }) public final class AzureLogAnalyticsImplBuilder implements HttpTrait, ConfigurationTrait, TokenCredentialTrait { + @Generated private static final String SDK_NAME = "name"; @@ -196,7 +195,7 @@ public AzureLogAnalyticsImplBuilder credential(TokenCredential tokenCredential) /** * Sets server parameter. - * + * * @param host the host value. * @return the AzureLogAnalyticsBuilder. */ @@ -214,7 +213,7 @@ public AzureLogAnalyticsImplBuilder host(String host) { /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the AzureLogAnalyticsBuilder. */ @@ -232,7 +231,7 @@ public AzureLogAnalyticsImplBuilder serializerAdapter(SerializerAdapter serializ /** * Sets The retry policy that will attempt to retry failed requests, if applicable. - * + * * @param retryPolicy the retryPolicy value. * @return the AzureLogAnalyticsBuilder. */ @@ -244,11 +243,12 @@ public AzureLogAnalyticsImplBuilder retryPolicy(RetryPolicy retryPolicy) { /** * Builds an instance of AzureLogAnalytics with the provided parameters. - * + * * @return an instance of AzureLogAnalytics. */ @Generated public AzureLogAnalyticsImpl buildClient() { + this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); String localHost = (host != null) ? host : "https://api.loganalytics.io/v1"; SerializerAdapter localSerializerAdapter @@ -257,6 +257,12 @@ public AzureLogAnalyticsImpl buildClient() { return client; } + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + } + @Generated private HttpPipeline createHttpPipeline() { Configuration buildConfiguration @@ -270,10 +276,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = new HttpHeaders(); - localClientOptions.getHeaders() - .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue())); - if (headers.getSize() > 0) { + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { policies.add(new AddHeadersPolicy(headers)); } this.pipelinePolicies.stream() diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/MetadatasImpl.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/MetadatasImpl.java index 97f83e486bc59..686c06a2c36d3 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/MetadatasImpl.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/MetadatasImpl.java @@ -49,8 +49,8 @@ public final class MetadatasImpl { } /** - * The interface defining all the services for AzureLogAnalyticsMetadatas to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for AzureLogAnalyticsMetadatas to be used by the proxy service to perform + * REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureLogAnalyticsMet") @@ -95,8 +95,7 @@ Response postSync(@HostParam("$host") String host, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String workspaceId) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getHost(), workspaceId, accept, context)); + return FluxUtil.withContext(context -> getWithResponseAsync(workspaceId, context)); } /** @@ -209,8 +208,7 @@ public MetadataResults get(String workspaceId) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> postWithResponseAsync(String workspaceId) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.post(this.client.getHost(), workspaceId, accept, context)); + return FluxUtil.withContext(context -> postWithResponseAsync(workspaceId, context)); } /** diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/QueriesImpl.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/QueriesImpl.java index 8622986f8417a..1bb052f7b07c0 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/QueriesImpl.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/QueriesImpl.java @@ -175,9 +175,7 @@ Response resourceExecuteXmsSync(@HostParam("$host") String host, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String workspaceId, String query, Duration timespan) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getHost(), workspaceId, query, timespan, accept, context)); + return FluxUtil.withContext(context -> getWithResponseAsync(workspaceId, query, timespan, context)); } /** @@ -312,9 +310,7 @@ public QueryResults get(String workspaceId, String query, Duration timespan) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> executeWithResponseAsync(String workspaceId, QueryBody body, String prefer) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.execute(this.client.getHost(), workspaceId, prefer, body, accept, context)); + return FluxUtil.withContext(context -> executeWithResponseAsync(workspaceId, body, prefer, context)); } /** @@ -455,9 +451,7 @@ public QueryResults execute(String workspaceId, QueryBody body, String prefer) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> resourceGetWithResponseAsync(String resourceId, String query, Duration timespan) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.resourceGet(this.client.getHost(), resourceId, query, timespan, accept, context)); + return FluxUtil.withContext(context -> resourceGetWithResponseAsync(resourceId, query, timespan, context)); } /** @@ -598,9 +592,7 @@ public QueryResults resourceGet(String resourceId, String query, Duration timesp @ServiceMethod(returns = ReturnType.SINGLE) public Mono> resourceExecuteWithResponseAsync(String resourceId, QueryBody body, String prefer) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.resourceExecute(this.client.getHost(), resourceId, prefer, body, accept, context)); + return FluxUtil.withContext(context -> resourceExecuteWithResponseAsync(resourceId, body, prefer, context)); } /** @@ -732,8 +724,7 @@ public QueryResults resourceExecute(String resourceId, QueryBody body, String pr */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> batchWithResponseAsync(BatchRequest body) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.batch(this.client.getHost(), body, accept, context)); + return FluxUtil.withContext(context -> batchWithResponseAsync(body, context)); } /** @@ -851,9 +842,7 @@ public BatchResponse batch(BatchRequest body) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> resourceGetXmsWithResponseAsync(String resourceId, String query, Duration timespan) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.resourceGetXms(this.client.getHost(), resourceId, query, timespan, accept, context)); + return FluxUtil.withContext(context -> resourceGetXmsWithResponseAsync(resourceId, query, timespan, context)); } /** @@ -994,9 +983,7 @@ public QueryResults resourceGetXms(String resourceId, String query, Duration tim @ServiceMethod(returns = ReturnType.SINGLE) public Mono> resourceExecuteXmsWithResponseAsync(String resourceId, QueryBody body, String prefer) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.resourceExecuteXms(this.client.getHost(), resourceId, prefer, body, accept, context)); + return FluxUtil.withContext(context -> resourceExecuteXmsWithResponseAsync(resourceId, body, prefer, context)); } /** diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchQueryRequest.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchQueryRequest.java index f8b3dd60270a5..42b94b89f5175 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchQueryRequest.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchQueryRequest.java @@ -146,8 +146,8 @@ public BatchQueryRequest setMethod(String method) { } /** - * Get the workspace property: Primary Workspace ID of the query. This is the Workspace ID from the Properties - * blade in the Azure portal. + * Get the workspace property: Primary Workspace ID of the query. This is the Workspace ID from the Properties blade + * in the Azure portal. * * @return the workspace value. */ @@ -155,6 +155,9 @@ public String getWorkspace() { return this.workspace; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchQueryResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchQueryResponse.java index 1c0ff64a9c50e..e2ac0033fb630 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchQueryResponse.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchQueryResponse.java @@ -28,8 +28,6 @@ public final class BatchQueryResponse implements JsonSerializable headers) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchQueryResults.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchQueryResults.java index b2255eafde0db..0db034e9dd0c2 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchQueryResults.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchQueryResults.java @@ -125,6 +125,9 @@ public BatchQueryResults setError(ErrorInfo error) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchRequest.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchRequest.java index 5313c09a60eda..f055802b75065 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchRequest.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchRequest.java @@ -40,6 +40,9 @@ public List getRequests() { return this.requests; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchResponse.java index b7179786b6aa4..668dae56560a8 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchResponse.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/BatchResponse.java @@ -48,6 +48,9 @@ public BatchResponse setResponses(List responses) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/Column.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/Column.java index 91145173e9f36..3fbbab670a74f 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/Column.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/Column.java @@ -74,6 +74,9 @@ public Column setType(LogsColumnType type) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/ErrorDetail.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/ErrorDetail.java index 67fccbd8496dc..aa56b0f5ec0c4 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/ErrorDetail.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/ErrorDetail.java @@ -157,6 +157,9 @@ public ErrorDetail setAdditionalProperties(Object additionalProperties) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/ErrorInfo.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/ErrorInfo.java index 941623c0130a3..47b105cc5e7ae 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/ErrorInfo.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/ErrorInfo.java @@ -34,8 +34,6 @@ public final class ErrorInfo implements JsonSerializable { private List details; /* - * The code and message for an error. - * * Inner error details if they exist. */ private ErrorInfo innererror; @@ -95,9 +93,7 @@ public ErrorInfo setDetails(List details) { } /** - * Get the innererror property: The code and message for an error. - * - * Inner error details if they exist. + * Get the innererror property: Inner error details if they exist. * * @return the innererror value. */ @@ -106,9 +102,7 @@ public ErrorInfo getInnererror() { } /** - * Set the innererror property: The code and message for an error. - * - * Inner error details if they exist. + * Set the innererror property: Inner error details if they exist. * * @param innererror the innererror value to set. * @return the ErrorInfo object itself. @@ -138,6 +132,9 @@ public ErrorInfo setAdditionalProperties(Object additionalProperties) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/ErrorResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/ErrorResponse.java index df9a07bc0595c..a11ae49df2ee8 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/ErrorResponse.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/ErrorResponse.java @@ -19,8 +19,6 @@ @Immutable public final class ErrorResponse implements JsonSerializable { /* - * The code and message for an error. - * * The error details. */ private final ErrorInfo error; @@ -35,9 +33,7 @@ public ErrorResponse(ErrorInfo error) { } /** - * Get the error property: The code and message for an error. - * - * The error details. + * Get the error property: The error details. * * @return the error value. */ @@ -45,6 +41,9 @@ public ErrorInfo getError() { return this.error; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataApplication.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataApplication.java index 8cc130c226a87..f05a2848c8c7c 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataApplication.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataApplication.java @@ -116,6 +116,9 @@ public MetadataApplication setRelated(MetadataApplicationRelated related) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataApplicationRelated.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataApplicationRelated.java index 567ed1dde8cc7..bbc9e431d65da 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataApplicationRelated.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataApplicationRelated.java @@ -73,6 +73,9 @@ public MetadataApplicationRelated setFunctions(List functions) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataCategory.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataCategory.java index 6a3c4fe35b2f4..6bf8ac5b4772f 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataCategory.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataCategory.java @@ -109,6 +109,9 @@ public MetadataCategory setRelated(MetadataCategoryRelated related) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataCategoryRelated.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataCategoryRelated.java index 2f78f1732c82c..d0f84569b05b6 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataCategoryRelated.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataCategoryRelated.java @@ -148,6 +148,9 @@ public MetadataCategoryRelated setSolutions(List solutions) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataFunction.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataFunction.java index a5ae7a0bfd45a..d997cfe8d6957 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataFunction.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataFunction.java @@ -225,6 +225,9 @@ public MetadataFunction setRelated(MetadataFunctionRelated related) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataFunctionRelated.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataFunctionRelated.java index 76a4bf68bdec6..f83895af5b01f 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataFunctionRelated.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataFunctionRelated.java @@ -148,6 +148,9 @@ public MetadataFunctionRelated setWorkspaces(List workspaces) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataPermissions.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataPermissions.java index de3288d595547..8bd1cbd8812a3 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataPermissions.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataPermissions.java @@ -94,6 +94,9 @@ public MetadataPermissions setApplications(List denyTables) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataPermissionsWorkspacesItem.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataPermissionsWorkspacesItem.java index d2d16aea8c681..d09be7db203f1 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataPermissionsWorkspacesItem.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataPermissionsWorkspacesItem.java @@ -65,6 +65,9 @@ public MetadataPermissionsWorkspacesItem setDenyTables(List denyTables) return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataQuery.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataQuery.java index ec5ded1c9e154..ec9dfca23980f 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataQuery.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataQuery.java @@ -209,6 +209,9 @@ public MetadataQuery setRelated(MetadataQueryRelated related) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataQueryRelated.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataQueryRelated.java index 06f4377d9d79f..014508021ce4e 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataQueryRelated.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataQueryRelated.java @@ -123,6 +123,9 @@ public MetadataQueryRelated setTables(List tables) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataResourceType.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataResourceType.java index 0082999a7ea31..e57208e326e7a 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataResourceType.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataResourceType.java @@ -209,6 +209,9 @@ public MetadataResourceType setRelated(MetadataResourceTypeRelated related) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataResourceTypeRelated.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataResourceTypeRelated.java index 54fbfe76e21b7..c5b463a1320cf 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataResourceTypeRelated.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataResourceTypeRelated.java @@ -173,6 +173,9 @@ public MetadataResourceTypeRelated setResources(List resources) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataResults.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataResults.java index efa612f9355a3..717147c2f31de 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataResults.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataResults.java @@ -176,8 +176,8 @@ public MetadataResults setFunctions(List functions) { } /** - * Get the queries property: The list of saved queries stored on the workspace, or introduced by solutions, - * resource types, etc. + * Get the queries property: The list of saved queries stored on the workspace, or introduced by solutions, resource + * types, etc. * * @return the queries value. */ @@ -186,8 +186,8 @@ public List getQueries() { } /** - * Set the queries property: The list of saved queries stored on the workspace, or introduced by solutions, - * resource types, etc. + * Set the queries property: The list of saved queries stored on the workspace, or introduced by solutions, resource + * types, etc. * * @param queries the queries value to set. * @return the MetadataResults object itself. @@ -279,6 +279,9 @@ public MetadataResults setPermissions(List permissions) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataSolution.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataSolution.java index 5b8350f78e59b..d276f9dca5945 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataSolution.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataSolution.java @@ -175,6 +175,9 @@ public MetadataSolutionRelated getRelated() { return this.related; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataSolutionRelated.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataSolutionRelated.java index c9a62195d324f..8ded58bead84c 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataSolutionRelated.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataSolutionRelated.java @@ -142,6 +142,9 @@ public MetadataSolutionRelated setWorkspaces(List workspaces) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataTable.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataTable.java index f15f86f723df7..3926b6e254a61 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataTable.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataTable.java @@ -235,6 +235,9 @@ public MetadataTable setRelated(MetadataTableRelated related) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataTableColumnsItem.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataTableColumnsItem.java index 1010476e68cb2..7959ca92271a3 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataTableColumnsItem.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataTableColumnsItem.java @@ -39,8 +39,8 @@ public final class MetadataTableColumnsItem implements JsonSerializable queries) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataWorkspace.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataWorkspace.java index 1292c9790c816..e399f279283b2 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataWorkspace.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataWorkspace.java @@ -116,6 +116,9 @@ public MetadataWorkspace setRelated(MetadataWorkspaceRelated related) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataWorkspaceRelated.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataWorkspaceRelated.java index 9a2f4117c4249..24dae41227609 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataWorkspaceRelated.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataWorkspaceRelated.java @@ -148,6 +148,9 @@ public MetadataWorkspaceRelated setResources(List resources) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/QueryBody.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/QueryBody.java index 9bed055b997ba..d48be21416274 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/QueryBody.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/QueryBody.java @@ -53,8 +53,8 @@ public String getQuery() { } /** - * Get the timespan property: Optional. The timespan over which to query data. This is an ISO8601 time period - * value. This timespan is applied in addition to any that are specified in the query expression. + * Get the timespan property: Optional. The timespan over which to query data. This is an ISO8601 time period value. + * This timespan is applied in addition to any that are specified in the query expression. * * @return the timespan value. */ @@ -63,8 +63,8 @@ public String getTimespan() { } /** - * Set the timespan property: Optional. The timespan over which to query data. This is an ISO8601 time period - * value. This timespan is applied in addition to any that are specified in the query expression. + * Set the timespan property: Optional. The timespan over which to query data. This is an ISO8601 time period value. + * This timespan is applied in addition to any that are specified in the query expression. * * @param timespan the timespan value to set. * @return the QueryBody object itself. @@ -94,6 +94,9 @@ public QueryBody setWorkspaces(List workspaces) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/QueryResults.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/QueryResults.java index 4a1aedf369af0..783dfafc3f453 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/QueryResults.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/QueryResults.java @@ -117,6 +117,9 @@ public QueryResults setError(ErrorInfo error) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/Table.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/Table.java index dcccadd6f8f29..cbd7d4a69e9af 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/Table.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/Table.java @@ -75,6 +75,9 @@ public List> getRows() { return this.rows; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/MetricsImpl.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/MetricsImpl.java index d4db17db9a972..4762c4c3cea57 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/MetricsImpl.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/MetricsImpl.java @@ -198,11 +198,9 @@ public Mono> listAtSubscriptionScopeWithResponseAsync( Duration interval, String metricnames, String aggregation, Integer top, String orderBy, String filter, MetricResultType resultType, String metricnamespace, Boolean autoAdjustTimegrain, Boolean validateDimensions, String rollupby) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.listAtSubscriptionScope(this.client.getHost(), this.client.getSubscriptionId(), - this.client.getApiVersion(), region, timespan, interval, metricnames, aggregation, top, orderBy, filter, - resultType, metricnamespace, autoAdjustTimegrain, validateDimensions, rollupby, accept, context)); + return FluxUtil.withContext(context -> listAtSubscriptionScopeWithResponseAsync(region, timespan, interval, + metricnames, aggregation, top, orderBy, filter, resultType, metricnamespace, autoAdjustTimegrain, + validateDimensions, rollupby, context)); } /** @@ -510,11 +508,9 @@ public Mono> listAtSubscriptionScopePostWithResponseAs Duration interval, String metricnames, String aggregation, Integer top, String orderBy, String filter, MetricResultType resultType, String metricnamespace, Boolean autoAdjustTimegrain, Boolean validateDimensions, String rollupby, SubscriptionScopeMetricsRequestBodyParameters body) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.listAtSubscriptionScopePost(this.client.getHost(), this.client.getSubscriptionId(), - this.client.getApiVersion(), region, timespan, interval, metricnames, aggregation, top, orderBy, filter, - resultType, metricnamespace, autoAdjustTimegrain, validateDimensions, rollupby, body, accept, context)); + return FluxUtil.withContext(context -> listAtSubscriptionScopePostWithResponseAsync(region, timespan, interval, + metricnames, aggregation, top, orderBy, filter, resultType, metricnamespace, autoAdjustTimegrain, + validateDimensions, rollupby, body, context)); } /** @@ -827,10 +823,9 @@ public MetricsResponse listAtSubscriptionScopePost(String region, String timespa public Mono> listWithResponseAsync(String resourceUri, String timespan, Duration interval, String metricnames, String aggregation, Integer top, String orderBy, String filter, ResultType resultType, String metricnamespace, Boolean autoAdjustTimegrain, Boolean validateDimensions, String rollupby) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.list(this.client.getHost(), resourceUri, timespan, interval, - metricnames, aggregation, top, orderBy, filter, resultType, this.client.getApiVersion(), metricnamespace, - autoAdjustTimegrain, validateDimensions, rollupby, accept, context)); + return FluxUtil.withContext( + context -> listWithResponseAsync(resourceUri, timespan, interval, metricnames, aggregation, top, orderBy, + filter, resultType, metricnamespace, autoAdjustTimegrain, validateDimensions, rollupby, context)); } /** diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/MonitorManagementClientImplBuilder.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/MonitorManagementClientImplBuilder.java index aef34f9b92e72..510e1dd8e7df4 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/MonitorManagementClientImplBuilder.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/MonitorManagementClientImplBuilder.java @@ -11,7 +11,6 @@ import com.azure.core.client.traits.TokenCredentialTrait; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; @@ -196,7 +195,7 @@ public MonitorManagementClientImplBuilder credential(TokenCredential tokenCreden /** * Sets The ID of the target subscription. - * + * * @param subscriptionId the subscriptionId value. * @return the AzureMonitorMetricsDataAPIBuilder. */ @@ -214,7 +213,7 @@ public MonitorManagementClientImplBuilder subscriptionId(String subscriptionId) /** * Sets server parameter. - * + * * @param host the host value. * @return the AzureMonitorMetricsDataAPIBuilder. */ @@ -232,7 +231,7 @@ public MonitorManagementClientImplBuilder host(String host) { /** * Sets Api Version. - * + * * @param apiVersion the apiVersion value. * @return the AzureMonitorMetricsDataAPIBuilder. */ @@ -250,7 +249,7 @@ public MonitorManagementClientImplBuilder apiVersion(String apiVersion) { /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the AzureMonitorMetricsDataAPIBuilder. */ @@ -268,7 +267,7 @@ public MonitorManagementClientImplBuilder serializerAdapter(SerializerAdapter se /** * Sets The retry policy that will attempt to retry failed requests, if applicable. - * + * * @param retryPolicy the retryPolicy value. * @return the AzureMonitorMetricsDataAPIBuilder. */ @@ -280,7 +279,7 @@ public MonitorManagementClientImplBuilder retryPolicy(RetryPolicy retryPolicy) { /** * Builds an instance of AzureMonitorMetricsDataAPI with the provided parameters. - * + * * @return an instance of AzureMonitorMetricsDataAPI. */ @Generated @@ -308,10 +307,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = new HttpHeaders(); - localClientOptions.getHeaders() - .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue())); - if (headers.getSize() > 0) { + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { policies.add(new AddHeadersPolicy(headers)); } this.pipelinePolicies.stream() diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/ErrorAdditionalInfo.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/ErrorAdditionalInfo.java index f32998ecc5bc4..4a6896ae16219 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/ErrorAdditionalInfo.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/ErrorAdditionalInfo.java @@ -50,6 +50,9 @@ public Object getInfo() { return this.info; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/ErrorContract.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/ErrorContract.java index 341a0113d5d7a..acbf156a057a4 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/ErrorContract.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/ErrorContract.java @@ -20,8 +20,6 @@ @Fluent public final class ErrorContract implements JsonSerializable { /* - * Error Response - * * The error object. */ private ErrorResponse error; @@ -33,9 +31,7 @@ public ErrorContract() { } /** - * Get the error property: Error Response - * - * The error object. + * Get the error property: The error object. * * @return the error value. */ @@ -44,9 +40,7 @@ public ErrorResponse getError() { } /** - * Set the error property: Error Response - * - * The error object. + * Set the error property: The error object. * * @param error the error value to set. * @return the ErrorContract object itself. @@ -56,6 +50,9 @@ public ErrorContract setError(ErrorResponse error) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/ErrorResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/ErrorResponse.java index e3c19a39dadaf..140ca9c8ee44a 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/ErrorResponse.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/ErrorResponse.java @@ -96,6 +96,9 @@ public List getAdditionalInfo() { return this.additionalInfo; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/LocalizableString.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/LocalizableString.java index 2f33867901f85..fc4c19deb099d 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/LocalizableString.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/LocalizableString.java @@ -64,6 +64,9 @@ public LocalizableString setLocalizedValue(String localizedValue) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetadataValue.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetadataValue.java index 6a15e23d42b15..746c143aa86ec 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetadataValue.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetadataValue.java @@ -72,6 +72,9 @@ public MetadataValue setValue(String value) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/Metric.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/Metric.java index 09c621d63cca3..bb59b85437745 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/Metric.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/Metric.java @@ -180,6 +180,9 @@ public List getTimeseries() { return this.timeseries; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetricValue.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetricValue.java index 2f57e4a81cdf6..14b5a570c6ba4 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetricValue.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetricValue.java @@ -5,6 +5,7 @@ package com.azure.monitor.query.implementation.metrics.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -169,6 +170,9 @@ public MetricValue setCount(Double count) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -205,7 +209,8 @@ public static MetricValue fromJson(JsonReader jsonReader) throws IOException { reader.nextToken(); if ("timeStamp".equals(fieldName)) { - timeStamp = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + timeStamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); timeStampFound = true; } else if ("average".equals(fieldName)) { average = reader.getNullable(JsonReader::getDouble); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetricsResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetricsResponse.java index 7f635c66f956d..64e63ac197502 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetricsResponse.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetricsResponse.java @@ -5,11 +5,11 @@ package com.azure.monitor.query.implementation.metrics.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.monitor.query.implementation.metrics.implementation.CoreToCodegenBridgeUtils; import java.io.IOException; import java.time.Duration; import java.util.ArrayList; @@ -32,8 +32,8 @@ public final class MetricsResponse implements JsonSerializable private final String timespan; /* - * The interval (window size) for which the metric data was returned in ISO 8601 duration format with a special - * case for 'FULL' value that returns single datapoint for entire time span requested (*Examples: PT15M, PT1H, P1D, + * The interval (window size) for which the metric data was returned in ISO 8601 duration format with a special case + * for 'FULL' value that returns single datapoint for entire time span requested (*Examples: PT15M, PT1H, P1D, * FULL*). * This may be adjusted and different from what was originally requested if AutoAdjustTimegrain=true is specified. * This is not present if a metadata request was made. @@ -98,9 +98,9 @@ public String getTimespan() { } /** - * Get the interval property: The interval (window size) for which the metric data was returned in ISO 8601 - * duration format with a special case for 'FULL' value that returns single datapoint for entire time span - * requested (*Examples: PT15M, PT1H, P1D, FULL*). + * Get the interval property: The interval (window size) for which the metric data was returned in ISO 8601 duration + * format with a special case for 'FULL' value that returns single datapoint for entire time span requested + * (*Examples: PT15M, PT1H, P1D, FULL*). * This may be adjusted and different from what was originally requested if AutoAdjustTimegrain=true is specified. * This is not present if a metadata request was made. * @@ -111,9 +111,9 @@ public Duration getInterval() { } /** - * Set the interval property: The interval (window size) for which the metric data was returned in ISO 8601 - * duration format with a special case for 'FULL' value that returns single datapoint for entire time span - * requested (*Examples: PT15M, PT1H, P1D, FULL*). + * Set the interval property: The interval (window size) for which the metric data was returned in ISO 8601 duration + * format with a special case for 'FULL' value that returns single datapoint for entire time span requested + * (*Examples: PT15M, PT1H, P1D, FULL*). * This may be adjusted and different from what was originally requested if AutoAdjustTimegrain=true is specified. * This is not present if a metadata request was made. * @@ -174,13 +174,16 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("timespan", this.timespan); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeNumberField("cost", this.cost); - jsonWriter.writeStringField("interval", CoreToCodegenBridgeUtils.durationToStringWithDays(this.interval)); + jsonWriter.writeStringField("interval", CoreUtils.durationToStringWithDays(this.interval)); jsonWriter.writeStringField("namespace", this.namespace); jsonWriter.writeStringField("resourceregion", this.resourceregion); return jsonWriter.writeEndObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/SubscriptionScopeMetricsRequestBodyParameters.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/SubscriptionScopeMetricsRequestBodyParameters.java index 76cf56f4ff403..92f2a35b74785 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/SubscriptionScopeMetricsRequestBodyParameters.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/SubscriptionScopeMetricsRequestBodyParameters.java @@ -24,8 +24,8 @@ public final class SubscriptionScopeMetricsRequestBodyParameters private String timespan; /* - * The interval (i.e. timegrain) of the query in ISO 8601 duration format. Defaults to PT1M. Special case for - * 'FULL' value that returns single datapoint for entire time span requested. + * The interval (i.e. timegrain) of the query in ISO 8601 duration format. Defaults to PT1M. Special case for 'FULL' + * value that returns single datapoint for entire time span requested. * *Examples: PT15M, PT1H, P1D, FULL* */ private String interval; @@ -45,8 +45,8 @@ public final class SubscriptionScopeMetricsRequestBodyParameters * and C.
- Return all time series of C where A = a1 and B = b1 or b2
**$filter=A eq ‘a1’ and B eq ‘b1’ or B * eq ‘b2’ and C eq ‘*’**
- Invalid variant:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = * ‘b2’**
This is invalid because the logical or operator cannot separate two different metadata names.
- - * Return all time series where A = a1, B = b1 and C = c1:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq - * ‘c1’**
- Return all time series where A = a1
**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**. + * Return all time series where A = a1, B = b1 and C = c1:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**
- + * Return all time series where A = a1
**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**. */ private String filter; @@ -83,9 +83,9 @@ public final class SubscriptionScopeMetricsRequestBodyParameters private String metricNamespace; /* - * When set to true, if the timespan passed in is not supported by this metric, the API will return the result - * using the closest supported timespan. When set to false, an error is returned for invalid timespan parameters. - * Defaults to false. + * When set to true, if the timespan passed in is not supported by this metric, the API will return the result using + * the closest supported timespan. When set to false, an error is returned for invalid timespan parameters. Defaults + * to false. */ private Boolean autoAdjustTimegrain; @@ -193,8 +193,8 @@ public SubscriptionScopeMetricsRequestBodyParameters setAggregation(String aggre * where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- * Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid * because the logical or operator cannot separate two different metadata names.<br>- Return all time series - * where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return - * all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**. + * where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all + * time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**. * * @return the filter value. */ @@ -208,8 +208,8 @@ public String getFilter() { * where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- * Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid * because the logical or operator cannot separate two different metadata names.<br>- Return all time series - * where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return - * all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**. + * where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all + * time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**. * * @param filter the filter value to set. * @return the SubscriptionScopeMetricsRequestBodyParameters object itself. @@ -358,8 +358,8 @@ public SubscriptionScopeMetricsRequestBodyParameters setAutoAdjustTimegrain(Bool } /** - * Get the validateDimensions property: When set to false, invalid filter parameter values will be ignored. When - * set to true, an error is returned for invalid filter parameters. Defaults to true. + * Get the validateDimensions property: When set to false, invalid filter parameter values will be ignored. When set + * to true, an error is returned for invalid filter parameters. Defaults to true. * * @return the validateDimensions value. */ @@ -368,8 +368,8 @@ public Boolean isValidateDimensions() { } /** - * Set the validateDimensions property: When set to false, invalid filter parameter values will be ignored. When - * set to true, an error is returned for invalid filter parameters. Defaults to true. + * Set the validateDimensions property: When set to false, invalid filter parameter values will be ignored. When set + * to true, an error is returned for invalid filter parameters. Defaults to true. * * @param validateDimensions the validateDimensions value to set. * @return the SubscriptionScopeMetricsRequestBodyParameters object itself. @@ -379,6 +379,9 @@ public SubscriptionScopeMetricsRequestBodyParameters setValidateDimensions(Boole return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/TimeSeriesElement.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/TimeSeriesElement.java index 50803866eb990..884297c78c1ff 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/TimeSeriesElement.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/TimeSeriesElement.java @@ -55,8 +55,8 @@ public TimeSeriesElement setMetadatavalues(List metadatavalues) { } /** - * Get the data property: An array of data points representing the metric values. This is only returned if a - * result type of data is specified. + * Get the data property: An array of data points representing the metric values. This is only returned if a result + * type of data is specified. * * @return the data value. */ @@ -65,8 +65,8 @@ public List getData() { } /** - * Set the data property: An array of data points representing the metric values. This is only returned if a - * result type of data is specified. + * Set the data property: An array of data points representing the metric values. This is only returned if a result + * type of data is specified. * * @param data the data value to set. * @return the TimeSeriesElement object itself. @@ -76,6 +76,9 @@ public TimeSeriesElement setData(List data) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/AzureMonitorMetricBatchBuilder.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/AzureMonitorMetricBatchBuilder.java index f01acf669747e..fcbf912cdfe17 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/AzureMonitorMetricBatchBuilder.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/AzureMonitorMetricBatchBuilder.java @@ -268,6 +268,7 @@ public AzureMonitorMetricBatchBuilder retryPolicy(RetryPolicy retryPolicy) { */ @Generated public AzureMonitorMetricBatch buildClient() { + this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); String localApiVersion = (apiVersion != null) ? apiVersion : "2024-02-01"; SerializerAdapter localSerializerAdapter @@ -277,6 +278,13 @@ public AzureMonitorMetricBatch buildClient() { return client; } + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + @Generated private HttpPipeline createHttpPipeline() { Configuration buildConfiguration diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/MetricsBatches.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/MetricsBatches.java index c205a55c42fff..d7e00bb2dc226 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/MetricsBatches.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/MetricsBatches.java @@ -55,8 +55,8 @@ public final class MetricsBatches { } /** - * The interface defining all the services for AzureMonitorMetricBatchMetricsBatches to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for AzureMonitorMetricBatchMetricsBatches to be used by the proxy service + * to perform REST calls. */ @Host("{endpoint}") @ServiceInterface(name = "AzureMonitorMetricBa") @@ -130,13 +130,8 @@ Response batchSync(@HostParam("endpoint") String endpoint public Mono> batchWithResponseAsync(String subscriptionId, String metricnamespace, List metricnames, ResourceIdList batchRequest, String starttime, String endtime, Duration interval, String aggregation, Integer top, String orderBy, String filter, String rollupby) { - final String accept = "application/json"; - String metricnamesConverted = metricnames.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return FluxUtil.withContext(context -> service.batch(this.client.getEndpoint(), subscriptionId, starttime, - endtime, interval, metricnamespace, metricnamesConverted, aggregation, top, orderBy, filter, rollupby, - this.client.getApiVersion(), batchRequest, accept, context)); + return FluxUtil.withContext(context -> batchWithResponseAsync(subscriptionId, metricnamespace, metricnames, + batchRequest, starttime, endtime, interval, aggregation, top, orderBy, filter, rollupby, context)); } /** diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ErrorAdditionalInfo.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ErrorAdditionalInfo.java index 4d9512604f0e5..fbcb86dc4b65f 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ErrorAdditionalInfo.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ErrorAdditionalInfo.java @@ -50,6 +50,9 @@ public Object getInfo() { return this.info; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ErrorDetail.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ErrorDetail.java index a2feaae0724be..77ad90926b527 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ErrorDetail.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ErrorDetail.java @@ -93,6 +93,9 @@ public List getAdditionalInfo() { return this.additionalInfo; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ErrorResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ErrorResponse.java index d503bc4057696..8edf32eeba9f7 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ErrorResponse.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ErrorResponse.java @@ -50,6 +50,9 @@ public ErrorResponse setError(ErrorDetail error) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/LocalizableString.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/LocalizableString.java index b4459cfd879db..3f855637c61dd 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/LocalizableString.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/LocalizableString.java @@ -64,6 +64,9 @@ public LocalizableString setLocalizedValue(String localizedValue) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetadataValue.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetadataValue.java index 04b14c8b1bfb7..8c32157a73b4e 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetadataValue.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetadataValue.java @@ -72,6 +72,9 @@ public MetadataValue setValue(String value) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/Metric.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/Metric.java index 98bfc2a03eec0..c3e568876c873 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/Metric.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/Metric.java @@ -180,6 +180,9 @@ public List getTimeseries() { return this.timeseries; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetricResultsResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetricResultsResponse.java index bc336d4ca8180..a5b24f7f9dc37 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetricResultsResponse.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetricResultsResponse.java @@ -48,6 +48,9 @@ public MetricResultsResponse setValues(List val return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetricResultsResponseValuesItem.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetricResultsResponseValuesItem.java index 07c957ab6086d..aefc6f74b7419 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetricResultsResponseValuesItem.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetricResultsResponseValuesItem.java @@ -29,8 +29,8 @@ public final class MetricResultsResponseValuesItem implements JsonSerializable getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetricValue.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetricValue.java index c01c860fa0ea1..d2bc82e5a9ebf 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetricValue.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/MetricValue.java @@ -5,6 +5,7 @@ package com.azure.monitor.query.implementation.metricsbatch.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -169,6 +170,9 @@ public MetricValue setCount(Double count) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -205,7 +209,8 @@ public static MetricValue fromJson(JsonReader jsonReader) throws IOException { reader.nextToken(); if ("timeStamp".equals(fieldName)) { - timeStamp = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); + timeStamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); timeStampFound = true; } else if ("average".equals(fieldName)) { average = reader.getNullable(JsonReader::getDouble); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ResourceIdList.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ResourceIdList.java index 04895d2f056fb..176d84703c23a 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ResourceIdList.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/ResourceIdList.java @@ -48,6 +48,9 @@ public ResourceIdList setResourceids(List resourceids) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/TimeSeriesElement.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/TimeSeriesElement.java index c87eede2cc547..ba3b7d170d3d2 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/TimeSeriesElement.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsbatch/models/TimeSeriesElement.java @@ -55,8 +55,8 @@ public TimeSeriesElement setMetadatavalues(List metadatavalues) { } /** - * Get the data property: An array of data points representing the metric values. This is only returned if a - * result type of data is specified. + * Get the data property: An array of data points representing the metric values. This is only returned if a result + * type of data is specified. * * @return the data value. */ @@ -65,8 +65,8 @@ public List getData() { } /** - * Set the data property: An array of data points representing the metric values. This is only returned if a - * result type of data is specified. + * Set the data property: An array of data points representing the metric values. This is only returned if a result + * type of data is specified. * * @param data the data value to set. * @return the TimeSeriesElement object itself. @@ -76,6 +76,9 @@ public TimeSeriesElement setData(List data) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/MetricsDefinitionsClientImplBuilder.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/MetricsDefinitionsClientImplBuilder.java index fe54c5ff01dc2..a00b565c3dd84 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/MetricsDefinitionsClientImplBuilder.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/MetricsDefinitionsClientImplBuilder.java @@ -11,7 +11,6 @@ import com.azure.core.client.traits.TokenCredentialTrait; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; @@ -196,7 +195,7 @@ public MetricsDefinitionsClientImplBuilder credential(TokenCredential tokenCrede /** * Sets The ID of the target subscription. - * + * * @param subscriptionId the subscriptionId value. * @return the AzureMonitorMetricsDefinitionsAPIBuilder. */ @@ -214,7 +213,7 @@ public MetricsDefinitionsClientImplBuilder subscriptionId(String subscriptionId) /** * Sets server parameter. - * + * * @param host the host value. * @return the AzureMonitorMetricsDefinitionsAPIBuilder. */ @@ -232,7 +231,7 @@ public MetricsDefinitionsClientImplBuilder host(String host) { /** * Sets Api Version. - * + * * @param apiVersion the apiVersion value. * @return the AzureMonitorMetricsDefinitionsAPIBuilder. */ @@ -250,7 +249,7 @@ public MetricsDefinitionsClientImplBuilder apiVersion(String apiVersion) { /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the AzureMonitorMetricsDefinitionsAPIBuilder. */ @@ -268,7 +267,7 @@ public MetricsDefinitionsClientImplBuilder serializerAdapter(SerializerAdapter s /** * Sets The retry policy that will attempt to retry failed requests, if applicable. - * + * * @param retryPolicy the retryPolicy value. * @return the AzureMonitorMetricsDefinitionsAPIBuilder. */ @@ -280,7 +279,7 @@ public MetricsDefinitionsClientImplBuilder retryPolicy(RetryPolicy retryPolicy) /** * Builds an instance of AzureMonitorMetricsDefinitionsAPI with the provided parameters. - * + * * @return an instance of AzureMonitorMetricsDefinitionsAPI. */ @Generated @@ -308,10 +307,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = new HttpHeaders(); - localClientOptions.getHeaders() - .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue())); - if (headers.getSize() > 0) { + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { policies.add(new AddHeadersPolicy(headers)); } this.pipelinePolicies.stream() diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/ErrorAdditionalInfo.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/ErrorAdditionalInfo.java index bb632d5750186..ae92f4b9fef5b 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/ErrorAdditionalInfo.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/ErrorAdditionalInfo.java @@ -50,6 +50,9 @@ public Object getInfo() { return this.info; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/ErrorContract.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/ErrorContract.java index e633b7991eeb2..b2d020d65bb2a 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/ErrorContract.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/ErrorContract.java @@ -20,8 +20,6 @@ @Fluent public final class ErrorContract implements JsonSerializable { /* - * Error Response - * * The error object. */ private ErrorResponse error; @@ -33,9 +31,7 @@ public ErrorContract() { } /** - * Get the error property: Error Response - * - * The error object. + * Get the error property: The error object. * * @return the error value. */ @@ -44,9 +40,7 @@ public ErrorResponse getError() { } /** - * Set the error property: Error Response - * - * The error object. + * Set the error property: The error object. * * @param error the error value to set. * @return the ErrorContract object itself. @@ -56,6 +50,9 @@ public ErrorContract setError(ErrorResponse error) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/ErrorResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/ErrorResponse.java index 65d92ffd14c5b..3eac525509925 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/ErrorResponse.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/ErrorResponse.java @@ -96,6 +96,9 @@ public List getAdditionalInfo() { return this.additionalInfo; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/LocalizableString.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/LocalizableString.java index a79f750037588..4b4e1cfa49278 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/LocalizableString.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/LocalizableString.java @@ -64,6 +64,9 @@ public LocalizableString setLocalizedValue(String localizedValue) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/MetricAvailability.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/MetricAvailability.java index 52223432eacaa..00597ff2faa2b 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/MetricAvailability.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/MetricAvailability.java @@ -5,11 +5,11 @@ package com.azure.monitor.query.implementation.metricsdefinitions.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.monitor.query.implementation.metricsdefinitions.implementation.CoreToCodegenBridgeUtils; import java.io.IOException; import java.time.Duration; @@ -80,11 +80,14 @@ public MetricAvailability setRetention(Duration retention) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("timeGrain", CoreToCodegenBridgeUtils.durationToStringWithDays(this.timeGrain)); - jsonWriter.writeStringField("retention", CoreToCodegenBridgeUtils.durationToStringWithDays(this.retention)); + jsonWriter.writeStringField("timeGrain", CoreUtils.durationToStringWithDays(this.timeGrain)); + jsonWriter.writeStringField("retention", CoreUtils.durationToStringWithDays(this.retention)); return jsonWriter.writeEndObject(); } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/MetricDefinition.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/MetricDefinition.java index 64be5655a5f5d..b07b5c5a29eec 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/MetricDefinition.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/MetricDefinition.java @@ -350,6 +350,9 @@ public MetricDefinition setDimensions(List dimensions) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/MetricDefinitionCollection.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/MetricDefinitionCollection.java index 7039caa691a0a..beb03936203dc 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/MetricDefinitionCollection.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/MetricDefinitionCollection.java @@ -40,6 +40,9 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/SubscriptionScopeMetricDefinition.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/SubscriptionScopeMetricDefinition.java index dfe67a4723920..2fbb22af30528 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/SubscriptionScopeMetricDefinition.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/SubscriptionScopeMetricDefinition.java @@ -351,6 +351,9 @@ public SubscriptionScopeMetricDefinition setDimensions(List d return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/SubscriptionScopeMetricDefinitionCollection.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/SubscriptionScopeMetricDefinitionCollection.java index b87389585ee7c..90e4edd8d68b8 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/SubscriptionScopeMetricDefinitionCollection.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsdefinitions/models/SubscriptionScopeMetricDefinitionCollection.java @@ -41,6 +41,9 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/MetricsNamespacesClientImplBuilder.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/MetricsNamespacesClientImplBuilder.java index 9cc270d6a68cc..bb43141570c85 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/MetricsNamespacesClientImplBuilder.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/MetricsNamespacesClientImplBuilder.java @@ -11,7 +11,6 @@ import com.azure.core.client.traits.TokenCredentialTrait; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; @@ -267,6 +266,7 @@ public MetricsNamespacesClientImplBuilder retryPolicy(RetryPolicy retryPolicy) { */ @Generated public MetricsNamespacesClientImpl buildClient() { + this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); String localHost = (host != null) ? host : "https://management.azure.com"; String localApiVersion = (apiVersion != null) ? apiVersion : "2024-02-01"; @@ -277,6 +277,12 @@ public MetricsNamespacesClientImpl buildClient() { return client; } + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + } + @Generated private HttpPipeline createHttpPipeline() { Configuration buildConfiguration @@ -290,10 +296,8 @@ private HttpPipeline createHttpPipeline() { policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = new HttpHeaders(); - localClientOptions.getHeaders() - .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue())); - if (headers.getSize() > 0) { + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { policies.add(new AddHeadersPolicy(headers)); } this.pipelinePolicies.stream() diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/ErrorResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/ErrorResponse.java index 197a60b30cf28..20b3acc24de10 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/ErrorResponse.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/ErrorResponse.java @@ -72,6 +72,9 @@ public ErrorResponse setMessage(String message) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/MetricNamespace.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/MetricNamespace.java index 35a4797609bfb..38aad815f8759 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/MetricNamespace.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/MetricNamespace.java @@ -147,6 +147,9 @@ public MetricNamespace setProperties(MetricNamespaceName properties) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/MetricNamespaceCollection.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/MetricNamespaceCollection.java index ab54da4a28cdc..1447e99a8bfca 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/MetricNamespaceCollection.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/MetricNamespaceCollection.java @@ -40,6 +40,9 @@ public List getValue() { return this.value; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/MetricNamespaceName.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/MetricNamespaceName.java index b8e7faba5db4a..7d3b0f93c8001 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/MetricNamespaceName.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metricsnamespaces/models/MetricNamespaceName.java @@ -47,6 +47,9 @@ public MetricNamespaceName setMetricNamespaceName(String metricNamespaceName) { return this; } + /** + * {@inheritDoc} + */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/monitor/azure-monitor-query/swagger/README.md b/sdk/monitor/azure-monitor-query/swagger/README.md index 9e8e98c4e088a..b8e408f69afa4 100644 --- a/sdk/monitor/azure-monitor-query/swagger/README.md +++ b/sdk/monitor/azure-monitor-query/swagger/README.md @@ -1,11 +1,54 @@ -## Generate autorest code +# Azure Monitor Query for Java + +> see https://aka.ms/autorest + +This is the Autorest configuration file for Monitor Query. + +--- +## Getting Started +To build the SDK for Monitor Query, simply [Install Autorest](https://aka.ms/autorest) and +in this folder, run: + +> `autorest --tag={swagger specification}` + +To see additional help and options, run: + +> `autorest --help` + +### Setup +```ps +npm install -g autorest +``` + +### Generation + +There are five swagger specifications for Monitor Query: `log`, `metrics`, `metrics-namespaces`, `metrics-definitions`, +and `metrics-batch`. +They use the following tags respectively: `--tag=log`, `--tag=metrics`, `--tag=metrics-namespaces`, +`--tag=metrics-definitions`, `--tag=metrics-batch`. + +```ps +cd +autorest --tag={swagger specification} +``` + +e.g. +```ps +cd +autorest --tag=log +autorest --tag=metrics +autorest --tag=metrics-namespaces +autorest --tag=metrics-definitions +autorest --tag=metrics-batch +``` + ## input-file: https://dev.loganalytics.io/swagger/api.loganalytics.io/v1/swagger.json ## Log Query -These settings apply only when `--tag=package-log` is specified on the command line. +These settings apply only when `--tag=log` is specified on the command line. -```yaml $(tag) == 'package-log' -use: '@autorest/java@4.1.27' +```yaml $(tag) == 'log' +use: '@autorest/java@4.1.39' input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/21f5332f2dc7437d1446edf240e9a3d4c90c6431/specification/operationalinsights/data-plane/Microsoft.OperationalInsights/stable/2022-10-27/OperationalInsights.json java: true output-folder: ../ @@ -27,10 +70,10 @@ stream-style-serialization: true ``` ## Metrics Query -These settings apply only when `--tag=package-metrics` is specified on the command line. +These settings apply only when `--tag=metrics` is specified on the command line. -```yaml $(tag) == 'package-metrics' -use: '@autorest/java@4.1.27' +```yaml $(tag) == 'metrics' +use: '@autorest/java@4.1.39' input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0b64ca7cbe3af8cd13228dfb783a16b8272b8be2/specification/monitor/resource-manager/Microsoft.Insights/stable/2024-02-01/metrics_API.json java: true output-folder: ../ @@ -57,7 +100,7 @@ directive: ### Change Interval to type 'Duration' -```yaml $(tag) == 'package-metrics' +```yaml $(tag) == 'metrics' directive: - from: swagger-document where: $.definitions.MetricsResponse.properties.interval @@ -65,7 +108,7 @@ directive: $["format"] = "duration"; ``` -```yaml $(tag) == 'package-metrics' +```yaml $(tag) == 'metrics' directive: - from: swagger-document where: $.parameters.IntervalParameter @@ -74,10 +117,10 @@ directive: ``` ## Metrics Namespaces Query -These settings apply only when `--tag=package-metrics-namespaces` is specified on the command line. +These settings apply only when `--tag=metrics-namespaces` is specified on the command line. -```yaml $(tag) == 'package-metrics-namespaces' -use: '@autorest/java@4.1.27' +```yaml $(tag) == 'metrics-namespaces' +use: '@autorest/java@4.1.39' service-name: MetricsNamespaces input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0b64ca7cbe3af8cd13228dfb783a16b8272b8be2/specification/monitor/resource-manager/Microsoft.Insights/stable/2024-02-01/metricNamespaces_API.json java: true @@ -100,10 +143,10 @@ stream-style-serialization: true ``` ## Metrics Definitions Query -These settings apply only when `--tag=package-metrics-definitions` is specified on the command line. +These settings apply only when `--tag=metrics-definitions` is specified on the command line. -```yaml $(tag) == 'package-metrics-definitions' -use: '@autorest/java@4.1.27' +```yaml $(tag) == 'metrics-definitions' +use: '@autorest/java@4.1.39' input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0b64ca7cbe3af8cd13228dfb783a16b8272b8be2/specification/monitor/resource-manager/Microsoft.Insights/stable/2024-02-01/metricDefinitions_API.json service-name: MetricsDefinitions java: true @@ -126,10 +169,10 @@ stream-style-serialization: true ``` ## Metrics Batch Query -These settings apply only when `--tag=package-metrics-batch` is specified on the command line. +These settings apply only when `--tag=metrics-batch` is specified on the command line. -```yaml $(tag) == 'package-metrics-batch' -use: '@autorest/java@4.1.27' +```yaml $(tag) == 'metrics-batch' +use: '@autorest/java@4.1.39' input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0550754fb421cd3a5859abf6713a542b682f626c/specification/monitor/data-plane/Microsoft.Insights/stable/2024-02-01/metricBatch.json service-name: MetricsBatch java: true @@ -153,7 +196,7 @@ customization-class: src/main/java/MetricsClientCustomization.java ### Change Interval to type 'Duration' -```yaml $(tag) == 'package-metrics-batch' +```yaml $(tag) == 'metrics-batch' directive: - from: swagger-document where: $.parameters.IntervalParameter @@ -162,7 +205,7 @@ directive: ``` ### Change subscriptionId to type 'String' -```yaml $(tag) == 'package-metrics-batch' +```yaml $(tag) == 'metrics-batch' directive: - from: swagger-document where: $.parameters.SubscriptionIdParameter diff --git a/sdk/monitor/azure-monitor-query/swagger/src/main/java/LogsCustomization.java b/sdk/monitor/azure-monitor-query/swagger/src/main/java/LogsCustomization.java index d52ea0339d465..4eab7b397fe10 100644 --- a/sdk/monitor/azure-monitor-query/swagger/src/main/java/LogsCustomization.java +++ b/sdk/monitor/azure-monitor-query/swagger/src/main/java/LogsCustomization.java @@ -1,44 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import com.azure.autorest.customization.ClassCustomization; import com.azure.autorest.customization.Customization; import com.azure.autorest.customization.LibraryCustomization; +import com.azure.autorest.customization.PackageCustomization; +import com.github.javaparser.StaticJavaParser; +import com.github.javaparser.ast.body.MethodDeclaration; import org.slf4j.Logger; public class LogsCustomization extends Customization { @Override public void customize(LibraryCustomization libraryCustomization, Logger logger) { - ClassCustomization azureLogAnalytics = libraryCustomization.getClass("com.azure.monitor.query.implementation.logs", "AzureLogAnalytics"); - azureLogAnalytics.rename("AzureLogAnalyticsImpl"); + PackageCustomization packageCustomization = libraryCustomization.getPackage("com.azure.monitor.query.implementation.logs"); + packageCustomization.getClass("AzureLogAnalytics").rename("AzureLogAnalyticsImpl"); + packageCustomization.getClass("Metadatas").rename("MetadatasImpl"); + packageCustomization.getClass("Queries").rename("QueriesImpl"); - ClassCustomization metadatas = libraryCustomization.getClass("com.azure.monitor.query.implementation.logs", "Metadatas"); - metadatas.rename("MetadatasImpl"); - - ClassCustomization queries = libraryCustomization.getClass("com.azure.monitor.query.implementation.logs", "Queries"); - queries.rename("QueriesImpl"); - - ClassCustomization azureLogAnalyticsBuilder = libraryCustomization.getClass("com.azure.monitor.query.implementation.logs", "AzureLogAnalyticsBuilder"); - azureLogAnalyticsBuilder.rename("AzureLogAnalyticsImplBuilder"); - String replace = libraryCustomization.getRawEditor().getFileContent("src/main/java/com/azure/monitor/query/implementation" + - "/logs/AzureLogAnalyticsImplBuilder.java") - .replace("policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, String.format(\"%s/" + - ".default\", host)));", - "String localHost;\n" + - " if (host != null) {\n" + - " try {\n" + - " localHost = new java.net.URL(host).getHost();\n" + - " } catch (java.net.MalformedURLException e) {\n" + - " throw new RuntimeException(e);\n" + - " }\n" + - " } else {\n" + - " localHost = \"api.loganalytics.io\";\n" + - " }\n" + - " policies.add(new BearerTokenAuthenticationPolicy(\n" + - " tokenCredential,\n" + - " String.format(\"https://%s/.default\", localHost)));"); - libraryCustomization.getRawEditor().replaceFile("src/main/java/com/azure/monitor/query/implementation" + - "/logs/AzureLogAnalyticsImplBuilder.java", replace); + packageCustomization.getClass("AzureLogAnalyticsBuilder").rename("AzureLogAnalyticsImplBuilder") + .customizeAst(ast -> ast.getClassByName("AzureLogAnalyticsImplBuilder").ifPresent(clazz -> { + MethodDeclaration createHttpPipeline = clazz.getMethodsByName("createHttpPipeline").get(0); + String target = "policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, String.format(\"%s/.default\", host)));"; + String replacement = "String localHost;if (host != null) {try {localHost = new java.net.URL(host).getHost();} " + + "catch (java.net.MalformedURLException e) {throw new RuntimeException(e);}} else {" + + "localHost = \"api.loganalytics.io\";}policies.add(new BearerTokenAuthenticationPolicy(" + + "tokenCredential,String.format(\"https://%s/.default\", localHost)));"; + createHttpPipeline.setBody(StaticJavaParser.parseBlock(createHttpPipeline.getBody().get().toString() + .replace(target, replacement))); + })); } }