From 26c6b1e79082eb22b34d54236cd405a81d354d25 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 9 Apr 2026 15:39:08 +0000 Subject: [PATCH] Configurations: 'specification/computeschedule/ComputeSchedule.Management/tspconfig.yaml', API Version: 2026-04-15-preview, SDK Release Type: beta, and CommitSHA: '679c30c9ef3043eca2cd8b3322bba5ef7f6a4fbc' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6131549 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 476 ++++++++- .../README.md | 4 +- .../SAMPLE.md | 910 +++++++++++++----- .../pom.xml | 4 +- .../fluent/ScheduledActionsClient.java | 115 ++- ...ateFlexResourceOperationResponseInner.java | 131 +++ .../ComputeScheduleMgmtClientImpl.java | 2 +- ...eateFlexResourceOperationResponseImpl.java | 52 + .../ScheduledActionsClientImpl.java | 288 ++++-- .../implementation/ScheduledActionsImpl.java | 88 +- .../models/AdditionalCapabilities.java | 119 +++ .../models/AdditionalUnattendContent.java | 183 ++++ ...dditionalUnattendContentComponentName.java | 51 + .../AdditionalUnattendContentPassName.java | 51 + .../models/AllInstancesDown.java | 87 ++ .../models/AllocationStrategy.java | 56 ++ .../models/ApiEntityReference.java | 87 ++ .../models/ApplicationProfile.java | 89 ++ .../models/BootDiagnostics.java | 118 +++ .../models/BulkActionVMExtension.java | 114 +++ .../models/BulkActionVMProfile.java | 466 +++++++++ .../models/BulkActionVMSpec.java | 260 +++++ .../BulkActionVmExtensionProperties.java | 415 ++++++++ .../models/BulkVMConfiguration.java | 178 ++++ .../computeschedule/models/CachingTypes.java | 57 ++ ...uest.java => CancelOperationsContent.java} | 30 +- .../models/CapacityReservationProfile.java | 91 ++ .../CreateFlexResourceOperationResponse.java | 49 + .../computeschedule/models/DataDisk.java | 459 +++++++++ .../computeschedule/models/DeleteOptions.java | 51 + .../models/DiagnosticsProfile.java | 94 ++ .../models/DiffDiskOptions.java | 46 + .../models/DiffDiskPlacement.java | 61 ++ .../models/DiffDiskSettings.java | 120 +++ .../models/DiskControllerTypes.java | 56 ++ .../models/DiskCreateOptionTypes.java | 72 ++ .../models/DiskDeleteOptionTypes.java | 54 ++ .../models/DiskDetachOptionTypes.java | 52 + .../models/DiskEncryptionSetParameters.java | 71 ++ .../models/DiskEncryptionSettings.java | 143 +++ .../models/DistributionStrategy.java | 61 ++ .../models/DomainNameLabelScopeTypes.java | 63 ++ .../models/EncryptionIdentity.java | 87 ++ .../models/EventGridAndResourceGraph.java | 117 +++ ...Request.java => ExecuteCreateContent.java} | 36 +- .../models/ExecuteCreateFlexContent.java | 144 +++ ...est.java => ExecuteDeallocateContent.java} | 36 +- ...Request.java => ExecuteDeleteContent.java} | 42 +- ...uest.java => ExecuteHibernateContent.java} | 36 +- ...tRequest.java => ExecuteStartContent.java} | 36 +- .../models/ExtendedLocation.java | 114 +++ .../models/ExtendedLocationType.java | 51 + .../models/FallbackOperationInfo.java | 109 +++ .../models/FlexProperties.java | 173 ++++ ...st.java => GetOperationErrorsContent.java} | 24 +- ...st.java => GetOperationStatusContent.java} | 30 +- .../models/HostEndpointSettings.java | 128 +++ .../computeschedule/models/IPVersions.java | 52 + .../models/ImageReference.java | 269 ++++++ .../models/KeyVaultKeyReference.java | 115 +++ .../models/KeyVaultSecretReference.java | 115 +++ .../models/LinuxConfiguration.java | 209 ++++ .../models/LinuxPatchAssessmentMode.java | 54 ++ .../models/LinuxPatchSettings.java | 167 ++++ ...PatchAutomaticByPlatformRebootSetting.java | 62 ++ ...GuestPatchAutomaticByPlatformSettings.java | 124 +++ .../models/LinuxVMGuestPatchMode.java | 55 ++ .../models/ManagedDiskParameters.java | 160 +++ .../computeschedule/models/Mode.java | 53 + .../computeschedule/models/Modes.java | 58 ++ .../models/NetworkApiVersion.java | 52 + .../models/NetworkInterfaceAuxiliaryMode.java | 56 ++ .../models/NetworkInterfaceAuxiliarySku.java | 66 ++ .../models/NetworkInterfaceReference.java | 98 ++ .../NetworkInterfaceReferenceProperties.java | 119 +++ .../models/NetworkProfile.java | 157 +++ .../computeschedule/models/OSDisk.java | 431 +++++++++ .../models/OSImageNotificationProfile.java | 119 +++ .../computeschedule/models/OSProfile.java | 411 ++++++++ .../models/OperatingSystemTypes.java | 52 + .../computeschedule/models/OsType.java | 51 + .../computeschedule/models/PatchSettings.java | 210 ++++ .../computeschedule/models/Placement.java | 169 ++++ .../computeschedule/models/Plan.java | 203 ++++ .../models/PriorityProfile.java | 114 +++ .../computeschedule/models/PriorityType.java | 51 + .../computeschedule/models/ProtocolTypes.java | 51 + .../models/ProxyAgentSettings.java | 242 +++++ .../models/PublicIPAddressSku.java | 113 +++ .../models/PublicIPAddressSkuName.java | 51 + .../models/PublicIPAddressSkuTier.java | 51 + .../models/PublicIPAllocationMethod.java | 51 + .../models/ResourceIdentityType.java | 68 ++ .../models/ResourceOperationDetails.java | 17 + .../models/ResourceOperationType.java | 10 + .../models/ResourceProvisionFlexPayload.java | 208 ++++ .../models/ResourceProvisionPayload.java | 78 +- .../computeschedule/models/RetryPolicy.java | 29 + .../models/ScheduledActions.java | 89 +- ...uledEventsAdditionalPublishingTargets.java | 91 ++ .../models/ScheduledEventsPolicy.java | 180 ++++ .../models/ScheduledEventsProfile.java | 117 +++ .../models/SecurityEncryptionTypes.java | 58 ++ .../models/SecurityProfile.java | 218 +++++ .../computeschedule/models/SecurityTypes.java | 52 + .../computeschedule/models/SettingNames.java | 52 + .../models/SshConfiguration.java | 87 ++ .../computeschedule/models/SshPublicKey.java | 122 +++ .../models/StorageAccountTypes.java | 82 ++ .../models/StorageProfile.java | 204 ++++ ...uest.java => SubmitDeallocateContent.java} | 42 +- ...quest.java => SubmitHibernateContent.java} | 42 +- ...rtRequest.java => SubmitStartContent.java} | 42 +- .../models/TerminateNotificationProfile.java | 119 +++ .../computeschedule/models/UefiSettings.java | 118 +++ .../models/UserAssignedIdentitiesValue.java | 89 ++ .../models/UserInitiatedReboot.java | 85 ++ .../models/UserInitiatedRedeploy.java | 85 ++ .../models/VMDiskSecurityProfile.java | 127 +++ .../models/VMGalleryApplication.java | 240 +++++ .../models/VaultCertificate.java | 150 +++ .../models/VaultSecretGroup.java | 120 +++ .../models/VirtualHardDisk.java | 85 ++ .../models/VirtualMachineIdentity.java | 166 ++++ .../models/VirtualMachineIpTag.java | 113 +++ ...lMachineNetworkInterfaceConfiguration.java | 150 +++ ...tworkInterfaceConfigurationProperties.java | 429 +++++++++ ...workInterfaceDnsSettingsConfiguration.java | 90 ++ ...achineNetworkInterfaceIPConfiguration.java | 118 +++ ...orkInterfaceIPConfigurationProperties.java | 297 ++++++ ...alMachinePublicIPAddressConfiguration.java | 178 ++++ ...ublicIPAddressConfigurationProperties.java | 274 ++++++ ...blicIPAddressDnsSettingsConfiguration.java | 130 +++ .../computeschedule/models/VmSizeProfile.java | 114 +++ .../models/WinRMConfiguration.java | 87 ++ .../computeschedule/models/WinRMListener.java | 139 +++ .../models/WindowsConfiguration.java | 258 +++++ .../models/WindowsPatchAssessmentMode.java | 54 ++ ...PatchAutomaticByPlatformRebootSetting.java | 62 ++ ...GuestPatchAutomaticByPlatformSettings.java | 125 +++ .../models/WindowsVMGuestPatchMode.java | 63 ++ .../models/ZoneAllocationPolicy.java | 119 +++ .../models/ZonePlacementPolicyType.java | 53 + .../models/ZonePreference.java | 114 +++ ...ourcemanager-computeschedule_metadata.json | 2 +- ...ceExtensionListOccurrenceByVmsSamples.java | 23 +- .../generated/OccurrencesCancelSamples.java | 6 +- .../generated/OccurrencesDelaySamples.java | 10 +- .../generated/OccurrencesGetSamples.java | 4 +- ...currencesListByScheduledActionSamples.java | 4 +- .../OccurrencesListResourcesSamples.java | 4 +- .../generated/OperationsListSamples.java | 4 +- ...eduledActionExtensionListByVmsSamples.java | 14 +- ...cheduledActionsAttachResourcesSamples.java | 6 +- ...ledActionsCancelNextOccurrenceSamples.java | 6 +- ...ScheduledActionsCreateOrUpdateSamples.java | 25 +- .../ScheduledActionsDeleteSamples.java | 4 +- ...cheduledActionsDetachResourcesSamples.java | 6 +- .../ScheduledActionsDisableSamples.java | 4 +- .../ScheduledActionsEnableSamples.java | 4 +- ...duledActionsGetByResourceGroupSamples.java | 5 +- ...uledActionsListByResourceGroupSamples.java | 4 +- .../ScheduledActionsListResourcesSamples.java | 4 +- .../ScheduledActionsListSamples.java | 4 +- ...ScheduledActionsPatchResourcesSamples.java | 6 +- ...ActionsTriggerManualOccurrenceSamples.java | 4 +- .../ScheduledActionsUpdateSamples.java | 24 +- ...irtualMachinesCancelOperationsSamples.java | 18 +- ...rtualMachinesExecuteCreateFlexSamples.java | 229 +++++ ...nsVirtualMachinesExecuteCreateSamples.java | 221 +++-- ...rtualMachinesExecuteDeallocateSamples.java | 23 +- ...nsVirtualMachinesExecuteDeleteSamples.java | 37 +- ...irtualMachinesExecuteHibernateSamples.java | 27 +- ...onsVirtualMachinesExecuteStartSamples.java | 27 +- ...tualMachinesGetOperationErrorsSamples.java | 22 +- ...tualMachinesGetOperationStatusSamples.java | 22 +- ...irtualMachinesSubmitDeallocateSamples.java | 37 +- ...VirtualMachinesSubmitHibernateSamples.java | 37 +- ...ionsVirtualMachinesSubmitStartSamples.java | 37 +- .../AdditionalCapabilitiesTests.java | 28 + .../AdditionalUnattendContentTests.java | 41 + .../generated/AllInstancesDownTests.java | 25 + .../generated/ApiEntityReferenceTests.java | 24 + .../generated/ApplicationProfileTests.java | 44 + .../generated/BootDiagnosticsTests.java | 27 + .../CancelOccurrenceRequestTests.java | 13 +- .../CancelOperationsContentTests.java | 31 + .../CancelOperationsRequestTests.java | 31 - .../CapacityReservationProfileTests.java | 27 + .../generated/DataDiskTests.java | 89 ++ .../generated/DelayRequestTests.java | 17 +- .../generated/DiagnosticsProfileTests.java | 30 + .../generated/DiffDiskSettingsTests.java | 30 + .../DiskEncryptionSetParametersTests.java | 25 + .../generated/EncryptionIdentityTests.java | 25 + .../EventGridAndResourceGraphTests.java | 29 + .../generated/ExecuteCreateRequestTests.java | 62 -- .../ExecuteDeallocateContentTests.java | 53 + .../ExecuteDeallocateRequestTests.java | 44 - .../generated/ExecuteDeleteContentTests.java | 56 ++ .../generated/ExecuteDeleteRequestTests.java | 49 - .../ExecuteHibernateContentTests.java | 53 + .../ExecuteHibernateRequestTests.java | 46 - .../generated/ExecuteStartContentTests.java | 54 ++ .../generated/ExecuteStartRequestTests.java | 43 - .../generated/ExecutionParametersTests.java | 17 +- .../generated/ExtendedLocationTests.java | 29 + .../generated/FlexPropertiesTests.java | 62 ++ ...va => GetOperationErrorsContentTests.java} | 20 +- .../GetOperationStatusContentTests.java | 31 + .../GetOperationStatusRequestTests.java | 31 - .../generated/HostEndpointSettingsTests.java | 30 + .../generated/ImageReferenceTests.java | 44 + .../generated/LinuxPatchSettingsTests.java | 42 + ...PatchAutomaticByPlatformSettingsTests.java | 31 + .../generated/ManagedDiskParametersTests.java | 45 + ...workInterfaceReferencePropertiesTests.java | 30 + .../NetworkInterfaceReferenceTests.java | 34 + .../generated/NetworkProfileTests.java | 133 +++ .../NotificationPropertiesTests.java | 8 +- .../OSImageNotificationProfileTests.java | 28 + .../generated/OperationsListMockTests.java | 2 +- .../generated/PatchSettingsTests.java | 45 + .../generated/PlacementTests.java | 34 + .../generated/PriorityProfileTests.java | 30 + .../generated/PublicIPAddressSkuTests.java | 30 + .../generated/ResourceAttachRequestTests.java | 58 +- .../generated/ResourceDetachRequestTests.java | 8 +- .../generated/ResourceListResponseTests.java | 8 +- .../generated/ResourcePatchRequestTests.java | 51 +- .../ResourceProvisionPayloadTests.java | 46 - .../generated/ResourcesTests.java | 8 +- .../generated/RetryPolicyTests.java | 18 +- .../generated/ScheduleTests.java | 32 +- ...ledActionExtensionsListByVmsMockTests.java | 38 +- .../generated/ScheduledActionInnerTests.java | 127 ++- .../ScheduledActionListResultTests.java | 31 +- .../ScheduledActionPropertiesTests.java | 88 +- .../ScheduledActionResourceInnerTests.java | 26 +- .../ScheduledActionResourcesInnerTests.java | 35 +- ...heduledActionResourcesListResultTests.java | 31 +- .../ScheduledActionUpdatePropertiesTests.java | 112 ++- .../generated/ScheduledActionUpdateTests.java | 121 ++- ...heduledActionsCreateOrUpdateMockTests.java | 113 +-- ...edActionsDisableWithResponseMockTests.java | 2 +- ...ledActionsEnableWithResponseMockTests.java | 3 +- ...eduledActionsExtensionPropertiesTests.java | 32 +- ...tByResourceGroupWithResponseMockTests.java | 35 +- ...edActionsListByResourceGroupMockTests.java | 40 +- .../ScheduledActionsListMockTests.java | 40 +- ...cheduledActionsListResourcesMockTests.java | 10 +- .../ScheduledActionsScheduleTests.java | 56 +- ...ventsAdditionalPublishingTargetsTests.java | 32 + .../generated/ScheduledEventsPolicyTests.java | 47 + .../ScheduledEventsProfileTests.java | 38 + ...java => SubmitDeallocateContentTests.java} | 35 +- .../SubmitHibernateContentTests.java | 68 ++ .../SubmitHibernateRequestTests.java | 64 -- .../generated/SubmitStartContentTests.java | 72 ++ .../generated/SubmitStartRequestTests.java | 64 -- .../TerminateNotificationProfileTests.java | 29 + .../generated/UefiSettingsTests.java | 27 + .../UserAssignedIdentitiesValueTests.java | 23 + .../generated/UserInitiatedRebootTests.java | 25 + .../generated/UserInitiatedRedeployTests.java | 25 + .../generated/VMDiskSecurityProfileTests.java | 33 + .../generated/VMGalleryApplicationTests.java | 41 + .../generated/VaultCertificateTests.java | 29 + .../generated/VaultSecretGroupTests.java | 39 + .../generated/VirtualHardDiskTests.java | 24 + .../VirtualMachineIdentityTests.java | 46 + .../generated/VirtualMachineIpTagTests.java | 27 + ...InterfaceConfigurationPropertiesTests.java | 272 ++++++ ...ineNetworkInterfaceConfigurationTests.java | 176 ++++ ...nterfaceDnsSettingsConfigurationTests.java | 29 + ...terfaceIPConfigurationPropertiesTests.java | 129 +++ ...eNetworkInterfaceIPConfigurationTests.java | 146 +++ ...IPAddressConfigurationPropertiesTests.java | 63 ++ ...hinePublicIPAddressConfigurationTests.java | 92 ++ ...PAddressDnsSettingsConfigurationTests.java | 31 + .../generated/VmSizeProfileTests.java | 27 + .../generated/WinRMConfigurationTests.java | 32 + .../generated/WinRMListenerTests.java | 29 + .../generated/WindowsConfigurationTests.java | 90 ++ ...PatchAutomaticByPlatformSettingsTests.java | 31 + .../generated/ZoneAllocationPolicyTests.java | 36 + .../generated/ZonePreferenceTests.java | 27 + .../tsp-location.yaml | 2 +- 288 files changed, 21566 insertions(+), 2056 deletions(-) create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateFlexResourceOperationResponseInner.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateFlexResourceOperationResponseImpl.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalCapabilities.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContent.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentComponentName.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentPassName.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllInstancesDown.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllocationStrategy.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApiEntityReference.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApplicationProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BootDiagnostics.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMExtension.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMSpec.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVmExtensionProperties.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkVMConfiguration.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CachingTypes.java rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/{CancelOperationsRequest.java => CancelOperationsContent.java} (76%) create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CapacityReservationProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CreateFlexResourceOperationResponse.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DataDisk.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteOptions.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiagnosticsProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskOptions.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskPlacement.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskSettings.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskControllerTypes.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskCreateOptionTypes.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDeleteOptionTypes.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDetachOptionTypes.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSetParameters.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSettings.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DistributionStrategy.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DomainNameLabelScopeTypes.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EncryptionIdentity.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EventGridAndResourceGraph.java rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/{ExecuteCreateRequest.java => ExecuteCreateContent.java} (78%) create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateFlexContent.java rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/{ExecuteDeallocateRequest.java => ExecuteDeallocateContent.java} (76%) rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/{ExecuteDeleteRequest.java => ExecuteDeleteContent.java} (77%) rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/{ExecuteHibernateRequest.java => ExecuteHibernateContent.java} (76%) rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/{ExecuteStartRequest.java => ExecuteStartContent.java} (76%) create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocation.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocationType.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FallbackOperationInfo.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FlexProperties.java rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/{GetOperationErrorsRequest.java => GetOperationErrorsContent.java} (75%) rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/{GetOperationStatusRequest.java => GetOperationStatusContent.java} (75%) create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HostEndpointSettings.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/IPVersions.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ImageReference.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultKeyReference.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultSecretReference.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxConfiguration.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchAssessmentMode.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchSettings.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformRebootSetting.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformSettings.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchMode.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ManagedDiskParameters.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Mode.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Modes.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkApiVersion.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliaryMode.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliarySku.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReference.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReferenceProperties.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSDisk.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSImageNotificationProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperatingSystemTypes.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OsType.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PatchSettings.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Placement.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Plan.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityType.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProtocolTypes.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProxyAgentSettings.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSku.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuName.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuTier.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAllocationMethod.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceIdentityType.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionFlexPayload.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsAdditionalPublishingTargets.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsPolicy.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityEncryptionTypes.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityTypes.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SettingNames.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshConfiguration.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshPublicKey.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageAccountTypes.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageProfile.java rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/{SubmitDeallocateRequest.java => SubmitDeallocateContent.java} (76%) rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/{SubmitHibernateRequest.java => SubmitHibernateContent.java} (76%) rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/{SubmitStartRequest.java => SubmitStartContent.java} (77%) create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/TerminateNotificationProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UefiSettings.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserAssignedIdentitiesValue.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedReboot.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedRedeploy.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMDiskSecurityProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMGalleryApplication.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultCertificate.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultSecretGroup.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualHardDisk.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIdentity.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIpTag.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfiguration.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfigurationProperties.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfiguration.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfiguration.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfigurationProperties.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProfile.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMConfiguration.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMListener.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsConfiguration.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsPatchAssessmentMode.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformRebootSetting.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformSettings.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchMode.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZoneAllocationPolicy.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePlacementPolicyType.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePreference.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateFlexSamples.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalCapabilitiesTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalUnattendContentTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AllInstancesDownTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApiEntityReferenceTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApplicationProfileTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/BootDiagnosticsTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOperationsContentTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOperationsRequestTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CapacityReservationProfileTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DataDiskTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiagnosticsProfileTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiffDiskSettingsTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiskEncryptionSetParametersTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EncryptionIdentityTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EventGridAndResourceGraphTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteCreateRequestTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeallocateContentTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeallocateRequestTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeleteContentTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeleteRequestTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteHibernateContentTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteHibernateRequestTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteStartContentTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteStartRequestTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExtendedLocationTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/FlexPropertiesTests.java rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/{GetOperationErrorsRequestTests.java => GetOperationErrorsContentTests.java} (50%) create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationStatusContentTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationStatusRequestTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/HostEndpointSettingsTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ImageReferenceTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxPatchSettingsTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxVMGuestPatchAutomaticByPlatformSettingsTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ManagedDiskParametersTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferencePropertiesTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferenceTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkProfileTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OSImageNotificationProfileTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PatchSettingsTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PlacementTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PriorityProfileTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PublicIPAddressSkuTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceProvisionPayloadTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsAdditionalPublishingTargetsTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsPolicyTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsProfileTests.java rename sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/{SubmitDeallocateRequestTests.java => SubmitDeallocateContentTests.java} (74%) create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitHibernateContentTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitHibernateRequestTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitStartContentTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitStartRequestTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/TerminateNotificationProfileTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UefiSettingsTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserAssignedIdentitiesValueTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRebootTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRedeployTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMDiskSecurityProfileTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMGalleryApplicationTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultCertificateTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultSecretGroupTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualHardDiskTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIdentityTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIpTagTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationPropertiesTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceDnsSettingsConfigurationTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationPropertiesTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationPropertiesTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressDnsSettingsConfigurationTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VmSizeProfileTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMConfigurationTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMListenerTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsConfigurationTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsVMGuestPatchAutomaticByPlatformSettingsTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZoneAllocationPolicyTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZonePreferenceTests.java diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/CHANGELOG.md b/sdk/computeschedule/azure-resourcemanager-computeschedule/CHANGELOG.md index 2171f64b005e..8f1eee76f725 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/CHANGELOG.md +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/CHANGELOG.md @@ -1,14 +1,482 @@ # Release History -## 1.2.0-beta.2 (Unreleased) +## 1.2.0-beta.2 (2026-04-09) -### Features Added +- Azure Resource Manager Compute Schedule client library for Java. This package contains Microsoft Azure SDK for Compute Schedule Management SDK. Microsoft.ComputeSchedule Resource Provider management API. Package api-version 2026-04-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.SubmitDeallocateRequest` was removed + +#### `models.ExecuteDeallocateRequest` was removed + +#### `models.ExecuteCreateRequest` was removed + +#### `models.GetOperationErrorsRequest` was removed + +#### `models.ExecuteDeleteRequest` was removed + +#### `models.ExecuteStartRequest` was removed + +#### `models.SubmitHibernateRequest` was removed + +#### `models.CancelOperationsRequest` was removed + +#### `models.GetOperationStatusRequest` was removed + +#### `models.ExecuteHibernateRequest` was removed + +#### `models.SubmitStartRequest` was removed + +#### `models.OccurrenceResultSummary` was modified + +* `validate()` was removed + +#### `models.ScheduledActionUpdateProperties` was modified + +* `validate()` was removed + +#### `models.RetryPolicy` was modified + +* `validate()` was removed + +#### `models.OccurrenceExtensionProperties` was modified + +* `validate()` was removed + +#### `models.DelayRequest` was modified + +* `validate()` was removed + +#### `models.ResourceAttachRequest` was modified + +* `validate()` was removed + +#### `models.CancelOccurrenceRequest` was modified + +* `validate()` was removed + +#### `models.InnerError` was modified + +* `validate()` was removed + +#### `models.ResourceResultSummary` was modified + +* `validate()` was removed + +#### `models.ScheduledActions` was modified + +* `virtualMachinesSubmitDeallocateWithResponse(java.lang.String,models.SubmitDeallocateRequest,com.azure.core.util.Context)` was removed +* `virtualMachinesGetOperationErrors(java.lang.String,models.GetOperationErrorsRequest)` was removed +* `virtualMachinesSubmitHibernate(java.lang.String,models.SubmitHibernateRequest)` was removed +* `virtualMachinesExecuteDeallocate(java.lang.String,models.ExecuteDeallocateRequest)` was removed +* `virtualMachinesExecuteDelete(java.lang.String,models.ExecuteDeleteRequest)` was removed +* `virtualMachinesGetOperationErrorsWithResponse(java.lang.String,models.GetOperationErrorsRequest,com.azure.core.util.Context)` was removed +* `virtualMachinesExecuteStart(java.lang.String,models.ExecuteStartRequest)` was removed +* `virtualMachinesGetOperationStatusWithResponse(java.lang.String,models.GetOperationStatusRequest,com.azure.core.util.Context)` was removed +* `virtualMachinesExecuteCreateWithResponse(java.lang.String,models.ExecuteCreateRequest,com.azure.core.util.Context)` was removed +* `virtualMachinesExecuteDeleteWithResponse(java.lang.String,models.ExecuteDeleteRequest,com.azure.core.util.Context)` was removed +* `virtualMachinesGetOperationStatus(java.lang.String,models.GetOperationStatusRequest)` was removed +* `virtualMachinesExecuteCreate(java.lang.String,models.ExecuteCreateRequest)` was removed +* `virtualMachinesExecuteDeallocateWithResponse(java.lang.String,models.ExecuteDeallocateRequest,com.azure.core.util.Context)` was removed +* `virtualMachinesCancelOperationsWithResponse(java.lang.String,models.CancelOperationsRequest,com.azure.core.util.Context)` was removed +* `virtualMachinesExecuteHibernate(java.lang.String,models.ExecuteHibernateRequest)` was removed +* `virtualMachinesExecuteStartWithResponse(java.lang.String,models.ExecuteStartRequest,com.azure.core.util.Context)` was removed +* `virtualMachinesSubmitHibernateWithResponse(java.lang.String,models.SubmitHibernateRequest,com.azure.core.util.Context)` was removed +* `virtualMachinesExecuteHibernateWithResponse(java.lang.String,models.ExecuteHibernateRequest,com.azure.core.util.Context)` was removed +* `virtualMachinesSubmitStartWithResponse(java.lang.String,models.SubmitStartRequest,com.azure.core.util.Context)` was removed +* `virtualMachinesSubmitDeallocate(java.lang.String,models.SubmitDeallocateRequest)` was removed +* `virtualMachinesSubmitStart(java.lang.String,models.SubmitStartRequest)` was removed +* `virtualMachinesCancelOperations(java.lang.String,models.CancelOperationsRequest)` was removed + +#### `models.ScheduledActionProperties` was modified + +* `validate()` was removed + +#### `models.ResourceProvisionPayload` was modified + +* `validate()` was removed +* `withBaseProfile(java.util.Map)` was removed +* `java.util.Map baseProfile()` -> `models.BulkVMConfiguration baseProfile()` + +#### `models.OccurrenceProperties` was modified + +* `validate()` was removed + +#### `models.OperationErrorDetails` was modified + +* `validate()` was removed + +#### `models.OperationDisplay` was modified + +* `validate()` was removed + +#### `models.ResourceOperation` was modified + +* `validate()` was removed + +#### `models.ScheduledActionsSchedule` was modified + +* `validate()` was removed + +#### `models.ResourceDetachRequest` was modified + +* `validate()` was removed + +#### `models.Resources` was modified + +* `validate()` was removed + +#### `models.ResourceStatus` was modified + +* `validate()` was removed + +#### `models.ExecutionParameters` was modified + +* `validate()` was removed + +#### `models.Error` was modified + +* `validate()` was removed + +#### `models.ScheduledActionResources` was modified + +* `models.ScheduledActionProperties properties()` -> `models.ScheduledActionsExtensionProperties properties()` + +#### `models.ResourceOperationError` was modified + +* `validate()` was removed + +#### `models.OperationErrorsResult` was modified + +* `validate()` was removed + +#### `models.NotificationProperties` was modified + +* `validate()` was removed + +#### `models.ResourceOperationDetails` was modified + +* `validate()` was removed + +#### `models.ResourcePatchRequest` was modified + +* `validate()` was removed + +#### `models.Schedule` was modified + +* `validate()` was removed + +#### `models.ScheduledActionUpdate` was modified + +* `validate()` was removed + +### Features Added + +* `models.StorageProfile` was added + +* `models.VirtualMachineNetworkInterfaceConfiguration` was added + +* `models.VaultSecretGroup` was added + +* `models.SecurityEncryptionTypes` was added + +* `models.VMGalleryApplication` was added + +* `models.CapacityReservationProfile` was added + +* `models.DiffDiskOptions` was added + +* `models.WindowsVMGuestPatchAutomaticByPlatformSettings` was added + +* `models.UserInitiatedRedeploy` was added + +* `models.VirtualMachinePublicIPAddressConfigurationProperties` was added + +* `models.SshPublicKey` was added + +* `models.ExecuteCreateFlexContent` was added + +* `models.TerminateNotificationProfile` was added + +* `models.SubmitStartContent` was added + +* `models.ZonePlacementPolicyType` was added + +* `models.DeleteOptions` was added + +* `models.FallbackOperationInfo` was added + +* `models.DiffDiskPlacement` was added + +* `models.ScheduledEventsAdditionalPublishingTargets` was added + +* `models.BulkActionVmExtensionProperties` was added + +* `models.PublicIPAddressSkuName` was added + +* `models.Modes` was added + +* `models.VirtualMachineNetworkInterfaceConfigurationProperties` was added + +* `models.FlexProperties` was added + +* `models.AllInstancesDown` was added + +* `models.SecurityProfile` was added + +* `models.ZoneAllocationPolicy` was added + +* `models.LinuxConfiguration` was added + +* `models.ScheduledEventsProfile` was added + +* `models.HostEndpointSettings` was added + +* `models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration` was added + +* `models.WinRMListener` was added + +* `models.ScheduledActionsExtensionProperties` was added + +* `models.ExecuteDeleteContent` was added + +* `models.PriorityType` was added + +* `models.ExecuteStartContent` was added + +* `models.ApiEntityReference` was added + +* `models.WindowsConfiguration` was added + +* `models.OSProfile` was added + +* `models.StorageAccountTypes` was added + +* `models.ExtendedLocationType` was added + +* `models.SecurityTypes` was added + +* `models.UefiSettings` was added + +* `models.ResourceIdentityType` was added + +* `models.NetworkApiVersion` was added + +* `models.ExecuteDeallocateContent` was added + +* `models.DiagnosticsProfile` was added + +* `models.VirtualMachineIdentity` was added + +* `models.ImageReference` was added + +* `models.NetworkInterfaceAuxiliarySku` was added + +* `models.ScheduledEventsPolicy` was added + +* `models.VaultCertificate` was added + +* `models.ProtocolTypes` was added + +* `models.NetworkProfile` was added + +* `models.SubmitHibernateContent` was added + +* `models.Mode` was added + +* `models.VMDiskSecurityProfile` was added + +* `models.NetworkInterfaceReference` was added + +* `models.UserInitiatedReboot` was added + +* `models.ProxyAgentSettings` was added + +* `models.CachingTypes` was added + +* `models.VirtualMachineNetworkInterfaceIPConfiguration` was added + +* `models.BulkVMConfiguration` was added + +* `models.PublicIPAllocationMethod` was added + +* `models.CreateFlexResourceOperationResponse` was added + +* `models.DiffDiskSettings` was added + +* `models.DomainNameLabelScopeTypes` was added + +* `models.AdditionalUnattendContent` was added + +* `models.BulkActionVMSpec` was added + +* `models.KeyVaultSecretReference` was added + +* `models.KeyVaultKeyReference` was added + +* `models.EventGridAndResourceGraph` was added + +* `models.ExecuteCreateContent` was added + +* `models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting` was added + +* `models.OperatingSystemTypes` was added + +* `models.AdditionalUnattendContentComponentName` was added + +* `models.DiskEncryptionSettings` was added + +* `models.GetOperationErrorsContent` was added + +* `models.DiskDetachOptionTypes` was added + +* `models.BootDiagnostics` was added + +* `models.PriorityProfile` was added + +* `models.NetworkInterfaceAuxiliaryMode` was added + +* `models.WinRMConfiguration` was added + +* `models.PublicIPAddressSku` was added + +* `models.Placement` was added + +* `models.LinuxVMGuestPatchAutomaticByPlatformSettings` was added + +* `models.SshConfiguration` was added + +* `models.UserAssignedIdentitiesValue` was added + +* `models.ExecuteHibernateContent` was added + +* `models.BulkActionVMExtension` was added + +* `models.OSDisk` was added + +* `models.SubmitDeallocateContent` was added + +* `models.VmSizeProfile` was added + +* `models.GetOperationStatusContent` was added + +* `models.NetworkInterfaceReferenceProperties` was added + +* `models.Plan` was added + +* `models.ManagedDiskParameters` was added + +* `models.DiskDeleteOptionTypes` was added + +* `models.LinuxPatchSettings` was added + +* `models.AdditionalCapabilities` was added + +* `models.ApplicationProfile` was added + +* `models.PatchSettings` was added + +* `models.AllocationStrategy` was added + +* `models.PublicIPAddressSkuTier` was added + +* `models.EncryptionIdentity` was added + +* `models.OSImageNotificationProfile` was added + +* `models.VirtualMachinePublicIPAddressDnsSettingsConfiguration` was added + +* `models.WindowsVMGuestPatchMode` was added + +* `models.LinuxVMGuestPatchMode` was added + +* `models.WindowsPatchAssessmentMode` was added + +* `models.IPVersions` was added + +* `models.LinuxPatchAssessmentMode` was added + +* `models.VirtualMachineIpTag` was added + +* `models.CancelOperationsContent` was added + +* `models.DiskCreateOptionTypes` was added + +* `models.SettingNames` was added + +* `models.AdditionalUnattendContentPassName` was added + +* `models.ResourceProvisionFlexPayload` was added + +* `models.VirtualMachineNetworkInterfaceIPConfigurationProperties` was added + +* `models.VirtualMachinePublicIPAddressConfiguration` was added + +* `models.DiskEncryptionSetParameters` was added + +* `models.BulkActionVMProfile` was added + +* `models.ZonePreference` was added + +* `models.VirtualHardDisk` was added + +* `models.DiskControllerTypes` was added + +* `models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting` was added + +* `models.DataDisk` was added + +* `models.DistributionStrategy` was added + +* `models.OsType` was added + +* `models.ExtendedLocation` was added + +#### `models.RetryPolicy` was modified + +* `onFailureAction()` was added +* `withOnFailureAction(models.ResourceOperationType)` was added + +#### `models.ResourceOperationType` was modified + +* `DELETE` was added +* `CREATE` was added + +#### `models.ScheduledActions` was modified + +* `virtualMachinesSubmitStartWithResponse(java.lang.String,models.SubmitStartContent,com.azure.core.util.Context)` was added +* `virtualMachinesExecuteDeallocateWithResponse(java.lang.String,models.ExecuteDeallocateContent,com.azure.core.util.Context)` was added +* `virtualMachinesExecuteDelete(java.lang.String,models.ExecuteDeleteContent)` was added +* `virtualMachinesExecuteStartWithResponse(java.lang.String,models.ExecuteStartContent,com.azure.core.util.Context)` was added +* `virtualMachinesExecuteCreateFlex(java.lang.String,models.ExecuteCreateFlexContent)` was added +* `virtualMachinesGetOperationStatusWithResponse(java.lang.String,models.GetOperationStatusContent,com.azure.core.util.Context)` was added +* `virtualMachinesExecuteCreate(java.lang.String,models.ExecuteCreateContent)` was added +* `virtualMachinesGetOperationStatus(java.lang.String,models.GetOperationStatusContent)` was added +* `virtualMachinesSubmitDeallocateWithResponse(java.lang.String,models.SubmitDeallocateContent,com.azure.core.util.Context)` was added +* `virtualMachinesGetOperationErrors(java.lang.String,models.GetOperationErrorsContent)` was added +* `virtualMachinesSubmitStart(java.lang.String,models.SubmitStartContent)` was added +* `virtualMachinesExecuteHibernate(java.lang.String,models.ExecuteHibernateContent)` was added +* `virtualMachinesExecuteCreateFlexWithResponse(java.lang.String,models.ExecuteCreateFlexContent,com.azure.core.util.Context)` was added +* `virtualMachinesCancelOperationsWithResponse(java.lang.String,models.CancelOperationsContent,com.azure.core.util.Context)` was added +* `virtualMachinesSubmitHibernate(java.lang.String,models.SubmitHibernateContent)` was added +* `virtualMachinesExecuteHibernateWithResponse(java.lang.String,models.ExecuteHibernateContent,com.azure.core.util.Context)` was added +* `virtualMachinesCancelOperations(java.lang.String,models.CancelOperationsContent)` was added +* `virtualMachinesExecuteCreateWithResponse(java.lang.String,models.ExecuteCreateContent,com.azure.core.util.Context)` was added +* `virtualMachinesExecuteStart(java.lang.String,models.ExecuteStartContent)` was added +* `virtualMachinesSubmitDeallocate(java.lang.String,models.SubmitDeallocateContent)` was added +* `virtualMachinesGetOperationErrorsWithResponse(java.lang.String,models.GetOperationErrorsContent,com.azure.core.util.Context)` was added +* `virtualMachinesExecuteDeleteWithResponse(java.lang.String,models.ExecuteDeleteContent,com.azure.core.util.Context)` was added +* `virtualMachinesExecuteDeallocate(java.lang.String,models.ExecuteDeallocateContent)` was added +* `virtualMachinesSubmitHibernateWithResponse(java.lang.String,models.SubmitHibernateContent,com.azure.core.util.Context)` was added + +#### `models.ResourceProvisionPayload` was modified + +* `withBaseProfile(models.BulkVMConfiguration)` was added + +#### `models.ResourceOperationDetails` was modified -### Other Changes +* `fallbackOperationInfo()` was added ## 1.2.0-beta.1 (2025-07-24) diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/README.md b/sdk/computeschedule/azure-resourcemanager-computeschedule/README.md index 68e1deac90cd..e009893720fb 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/README.md +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Compute Schedule client library for Java. -This package contains Microsoft Azure SDK for Compute Schedule Management SDK. Microsoft.ComputeSchedule Resource Provider management API. Package api-version 2025-04-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Compute Schedule Management SDK. Microsoft.ComputeSchedule Resource Provider management API. Package api-version 2026-04-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-computeschedule - 1.2.0-beta.1 + 1.2.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/SAMPLE.md b/sdk/computeschedule/azure-resourcemanager-computeschedule/SAMPLE.md index addb072e737c..cfff57967f63 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/SAMPLE.md +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/SAMPLE.md @@ -39,6 +39,7 @@ - [Update](#scheduledactions_update) - [VirtualMachinesCancelOperations](#scheduledactions_virtualmachinescanceloperations) - [VirtualMachinesExecuteCreate](#scheduledactions_virtualmachinesexecutecreate) +- [VirtualMachinesExecuteCreateFlex](#scheduledactions_virtualmachinesexecutecreateflex) - [VirtualMachinesExecuteDeallocate](#scheduledactions_virtualmachinesexecutedeallocate) - [VirtualMachinesExecuteDelete](#scheduledactions_virtualmachinesexecutedelete) - [VirtualMachinesExecuteHibernate](#scheduledactions_virtualmachinesexecutehibernate) @@ -56,7 +57,23 @@ */ public final class OccurrenceExtensionListOccurrenceByVmsSamples { /* - * x-ms-original-file: 2025-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MinimumSet_Gen.json + */ + /** + * Sample code: OccurrenceExtension_ListOccurrenceByVms_MinimumSet. + * + * @param manager Entry point to ComputeScheduleManager. + */ + public static void occurrenceExtensionListOccurrenceByVmsMinimumSet( + com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { + manager.occurrenceExtensions() + .listOccurrenceByVms( + "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MaximumSet_Gen.json */ /** * Sample code: OccurrenceExtension_ListOccurrenceByVms_MaximumSet. @@ -65,7 +82,10 @@ public final class OccurrenceExtensionListOccurrenceByVmsSamples { */ public static void occurrenceExtensionListOccurrenceByVmsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.occurrenceExtensions().listOccurrenceByVms("sazvpabfud", com.azure.core.util.Context.NONE); + manager.occurrenceExtensions() + .listOccurrenceByVms( + "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", + com.azure.core.util.Context.NONE); } } ``` @@ -81,7 +101,7 @@ import java.util.Arrays; */ public final class OccurrencesCancelSamples { /* - * x-ms-original-file: 2025-04-15-preview/Occurrences_Cancel_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Occurrences_Cancel_MaximumSet_Gen.json */ /** * Sample code: Occurrences_Cancel_MaximumSet. @@ -91,9 +111,9 @@ public final class OccurrencesCancelSamples { public static void occurrencesCancelMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .cancelWithResponse("rgcomputeschedule", "myScheduledAction", "CB26D7CB-3E27-465F-99C8-EAF7A4118245", + .cancelWithResponse("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", new CancelOccurrenceRequest().withResourceIds(Arrays.asList( - "/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), com.azure.core.util.Context.NONE); } } @@ -111,7 +131,7 @@ import java.util.Arrays; */ public final class OccurrencesDelaySamples { /* - * x-ms-original-file: 2025-04-15-preview/Occurrences_Delay_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Occurrences_Delay_MaximumSet_Gen.json */ /** * Sample code: Occurrences_Delay_MaximumSet. @@ -121,10 +141,10 @@ public final class OccurrencesDelaySamples { public static void occurrencesDelayMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .delay("rgcomputeschedule", "myScheduledAction", "CB26D7CB-3E27-465F-99C8-EAF7A4118245", new DelayRequest() - .withDelay(OffsetDateTime.parse("2025-05-22T17:00:00.000-07:00")) - .withResourceIds(Arrays.asList( - "/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), + .delay("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", + new DelayRequest().withDelay(OffsetDateTime.parse("2026-03-12T02:39:48.148Z")) + .withResourceIds(Arrays.asList( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), com.azure.core.util.Context.NONE); } } @@ -138,7 +158,7 @@ public final class OccurrencesDelaySamples { */ public final class OccurrencesGetSamples { /* - * x-ms-original-file: 2025-04-15-preview/Occurrences_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Occurrences_Get_MaximumSet_Gen.json */ /** * Sample code: Occurrences_Get_MaximumSet. @@ -148,7 +168,7 @@ public final class OccurrencesGetSamples { public static void occurrencesGetMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .getWithResponse("rgcomputeschedule", "myScheduledAction", "67b5bada-4772-43fc-8dbb-402476d98a45", + .getWithResponse("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", com.azure.core.util.Context.NONE); } } @@ -162,7 +182,7 @@ public final class OccurrencesGetSamples { */ public final class OccurrencesListByScheduledActionSamples { /* - * x-ms-original-file: 2025-04-15-preview/Occurrences_ListByScheduledAction_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Occurrences_ListByScheduledAction_MaximumSet_Gen.json */ /** * Sample code: Occurrences_ListByScheduledAction_MaximumSet. @@ -172,7 +192,7 @@ public final class OccurrencesListByScheduledActionSamples { public static void occurrencesListByScheduledActionMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .listByScheduledAction("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); + .listByScheduledAction("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); } } ``` @@ -185,7 +205,7 @@ public final class OccurrencesListByScheduledActionSamples { */ public final class OccurrencesListResourcesSamples { /* - * x-ms-original-file: 2025-04-15-preview/Occurrences_ListResources_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Occurrences_ListResources_MaximumSet_Gen.json */ /** * Sample code: Occurrences_ListResources_MaximumSet. @@ -195,7 +215,7 @@ public final class OccurrencesListResourcesSamples { public static void occurrencesListResourcesMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .listResources("rgcomputeschedule", "myScheduledAction", "CB26D7CB-3E27-465F-99C8-EAF7A4118245", + .listResources("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", com.azure.core.util.Context.NONE); } } @@ -209,7 +229,7 @@ public final class OccurrencesListResourcesSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-04-15-preview/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Operations_List_MinimumSet_Gen.json */ /** * Sample code: Operations_List_MinimumSet. @@ -222,7 +242,7 @@ public final class OperationsListSamples { } /* - * x-ms-original-file: 2025-04-15-preview/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List_MaximumSet. @@ -244,7 +264,7 @@ public final class OperationsListSamples { */ public final class ScheduledActionExtensionListByVmsSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActionExtension_ListByVms_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActionExtension_ListByVms_MaximumSet_Gen.json */ /** * Sample code: ScheduledActionExtension_ListByVms_MaximumSet. @@ -253,11 +273,14 @@ public final class ScheduledActionExtensionListByVmsSamples { */ public static void scheduledActionExtensionListByVmsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActionExtensions().listByVms("sazvpabfud", com.azure.core.util.Context.NONE); + manager.scheduledActionExtensions() + .listByVms( + "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActionExtension_ListByVms_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActionExtension_ListByVms_MinimumSet_Gen.json */ /** * Sample code: ScheduledActionExtension_ListByVms_MinimumSet. @@ -266,7 +289,10 @@ public final class ScheduledActionExtensionListByVmsSamples { */ public static void scheduledActionExtensionListByVmsMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActionExtensions().listByVms("sazvpabfud", com.azure.core.util.Context.NONE); + manager.scheduledActionExtensions() + .listByVms( + "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", + com.azure.core.util.Context.NONE); } } ``` @@ -286,7 +312,7 @@ import java.util.Arrays; */ public final class ScheduledActionsAttachResourcesSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_AttachResources_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_AttachResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_AttachResources_MaximumSet. @@ -296,11 +322,11 @@ public final class ScheduledActionsAttachResourcesSamples { public static void scheduledActionsAttachResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .attachResourcesWithResponse("rgcomputeschedule", "myScheduledAction", new ResourceAttachRequest() + .attachResourcesWithResponse("rgcomputeschedule", "scheduled-action-01", new ResourceAttachRequest() .withResources(Arrays.asList(new ScheduledActionResourceInner().withResourceId( "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm") .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") + Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))))), @@ -320,7 +346,7 @@ import java.util.Arrays; */ public final class ScheduledActionsCancelNextOccurrenceSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_CancelNextOccurrence_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_CancelNextOccurrence_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_CancelNextOccurrence_MaximumSet. @@ -330,9 +356,9 @@ public final class ScheduledActionsCancelNextOccurrenceSamples { public static void scheduledActionsCancelNextOccurrenceMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .cancelNextOccurrenceWithResponse("rgcomputeschedule", "myScheduledAction", + .cancelNextOccurrenceWithResponse("rgcomputeschedule", "scheduled-action-01", new CancelOccurrenceRequest().withResourceIds(Arrays.asList( - "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), com.azure.core.util.Context.NONE); } } @@ -348,6 +374,7 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionProperties; @@ -364,7 +391,7 @@ import java.util.Map; */ public final class ScheduledActionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_CreateOrUpdate_MaximumSet. @@ -374,25 +401,27 @@ public final class ScheduledActionsCreateOrUpdateSamples { public static void scheduledActionsCreateOrUpdateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .define("myScheduledAction") - .withRegion("vmuhgdgipeypkcv") + .define("scheduled-action-01") + .withRegion("eastus2") .withExistingResourceGroup("rgcomputeschedule") - .withTags(mapOf("key2102", "fakeTokenPlaceholder")) + .withTags(mapOf("environment", "production")) .withProperties(new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2025-04-17T00:23:55.281Z")) - .withEndTime(OffsetDateTime.parse("2025-04-17T00:23:55.286Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("19:00:00") - .withTimeZone("g") + .withStartTime(OffsetDateTime.parse("2026-03-12T02:39:45.061Z")) + .withEndTime(OffsetDateTime.parse("2026-03-12T02:39:45.062Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("12:00:00") + .withTimeZone("America/Los_Angeles") .withRequestedWeekDays(Arrays.asList(WeekDay.MONDAY)) .withRequestedMonths(Arrays.asList(Month.JANUARY)) - .withRequestedDaysOfTheMonth(Arrays.asList(15)) + .withRequestedDaysOfTheMonth(Arrays.asList(1)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withDeadlineType(DeadlineType.UNKNOWN)) .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") + Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))) @@ -422,7 +451,7 @@ public final class ScheduledActionsCreateOrUpdateSamples { */ public final class ScheduledActionsDeleteSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Delete_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Delete_MaximumSet. @@ -431,7 +460,7 @@ public final class ScheduledActionsDeleteSamples { */ public static void scheduledActionsDeleteMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActions().delete("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); + manager.scheduledActions().delete("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); } } ``` @@ -447,7 +476,7 @@ import java.util.Arrays; */ public final class ScheduledActionsDetachResourcesSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_DetachResources_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_DetachResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_DetachResources_MaximumSet. @@ -457,9 +486,9 @@ public final class ScheduledActionsDetachResourcesSamples { public static void scheduledActionsDetachResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .detachResourcesWithResponse("rgcomputeschedule", "myScheduledAction", + .detachResourcesWithResponse("rgcomputeschedule", "scheduled-action-01", new ResourceDetachRequest().withResources(Arrays.asList( - "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), com.azure.core.util.Context.NONE); } } @@ -473,7 +502,7 @@ public final class ScheduledActionsDetachResourcesSamples { */ public final class ScheduledActionsDisableSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Disable_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Disable_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Disable_MaximumSet. @@ -483,7 +512,7 @@ public final class ScheduledActionsDisableSamples { public static void scheduledActionsDisableMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .disableWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); + .disableWithResponse("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); } } ``` @@ -496,7 +525,7 @@ public final class ScheduledActionsDisableSamples { */ public final class ScheduledActionsEnableSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Enable_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Enable_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Enable_MaximumSet. @@ -506,7 +535,7 @@ public final class ScheduledActionsEnableSamples { public static void scheduledActionsEnableMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .enableWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); + .enableWithResponse("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); } } ``` @@ -519,7 +548,7 @@ public final class ScheduledActionsEnableSamples { */ public final class ScheduledActionsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Get_MaximumSet. @@ -529,7 +558,8 @@ public final class ScheduledActionsGetByResourceGroupSamples { public static void scheduledActionsGetMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .getByResourceGroupWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("rgcomputeschedule", "scheduled-action-01", + com.azure.core.util.Context.NONE); } } ``` @@ -542,7 +572,7 @@ public final class ScheduledActionsGetByResourceGroupSamples { */ public final class ScheduledActionsListSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_ListBySubscription_MaximumSet. @@ -555,7 +585,7 @@ public final class ScheduledActionsListSamples { } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListBySubscription_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListBySubscription_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_ListBySubscription_MinimumSet. @@ -577,7 +607,7 @@ public final class ScheduledActionsListSamples { */ public final class ScheduledActionsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_ListByResourceGroup_MaximumSet. @@ -590,7 +620,7 @@ public final class ScheduledActionsListByResourceGroupSamples { } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListByResourceGroup_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_ListByResourceGroup_MinimumSet. @@ -612,7 +642,7 @@ public final class ScheduledActionsListByResourceGroupSamples { */ public final class ScheduledActionsListResourcesSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListResources_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_ListResources_MaximumSet. @@ -622,7 +652,7 @@ public final class ScheduledActionsListResourcesSamples { public static void scheduledActionsListResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .listResources("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); + .listResources("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); } } ``` @@ -642,7 +672,7 @@ import java.util.Arrays; */ public final class ScheduledActionsPatchResourcesSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_PatchResources_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_PatchResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_PatchResources_MaximumSet. @@ -652,11 +682,11 @@ public final class ScheduledActionsPatchResourcesSamples { public static void scheduledActionsPatchResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .patchResourcesWithResponse("rgcomputeschedule", "myScheduledAction", new ResourcePatchRequest() + .patchResourcesWithResponse("rgcomputeschedule", "scheduled-action-01", new ResourcePatchRequest() .withResources(Arrays.asList(new ScheduledActionResourceInner().withResourceId( "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm") .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") + Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))))), @@ -673,7 +703,7 @@ public final class ScheduledActionsPatchResourcesSamples { */ public final class ScheduledActionsTriggerManualOccurrenceSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_TriggerManualOccurrence_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_TriggerManualOccurrence_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_TriggerManualOccurrence_MaximumSet. @@ -683,7 +713,7 @@ public final class ScheduledActionsTriggerManualOccurrenceSamples { public static void scheduledActionsTriggerManualOccurrenceMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .triggerManualOccurrenceWithResponse("rgcomputeschedule", "myScheduledAction", + .triggerManualOccurrenceWithResponse("rgcomputeschedule", "my-scheduled-action", com.azure.core.util.Context.NONE); } } @@ -699,6 +729,7 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledAction; @@ -716,7 +747,7 @@ import java.util.Map; */ public final class ScheduledActionsUpdateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Update_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Update_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Update_MaximumSet. @@ -726,25 +757,28 @@ public final class ScheduledActionsUpdateSamples { public static void scheduledActionsUpdateMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { ScheduledAction resource = manager.scheduledActions() - .getByResourceGroupWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("rgcomputeschedule", "scheduled-action-01", + com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key9989", "fakeTokenPlaceholder")) + .withTags(mapOf("environment", "staging")) .withProperties(new ScheduledActionUpdateProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2025-04-17T00:23:58.149Z")) - .withEndTime(OffsetDateTime.parse("2025-04-17T00:23:58.149Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("19:00:00") - .withTimeZone("bni") + .withStartTime(OffsetDateTime.parse("2026-03-12T02:39:45.818Z")) + .withEndTime(OffsetDateTime.parse("2026-03-12T02:39:45.818Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("12:00:00") + .withTimeZone("America/Los_Angeles") .withRequestedWeekDays(Arrays.asList(WeekDay.MONDAY)) .withRequestedMonths(Arrays.asList(Month.JANUARY)) - .withRequestedDaysOfTheMonth(Arrays.asList(15)) + .withRequestedDaysOfTheMonth(Arrays.asList(1)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withDeadlineType(DeadlineType.UNKNOWN)) .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") + Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))) @@ -769,7 +803,7 @@ public final class ScheduledActionsUpdateSamples { ### ScheduledActions_VirtualMachinesCancelOperations ```java -import com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest; +import com.azure.resourcemanager.computeschedule.models.CancelOperationsContent; import java.util.Arrays; /** @@ -777,7 +811,7 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesCancelOperationsSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesCancelOperations_MinimumSet. @@ -787,14 +821,14 @@ public final class ScheduledActionsVirtualMachinesCancelOperationsSamples { public static void scheduledActionsVirtualMachinesCancelOperationsMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesCancelOperationsWithResponse("fhdunfivmjiltaiakwhhwdgemfcld", - new CancelOperationsRequest().withOperationIds(Arrays.asList("b211f086-4b91-4686-a453-2f5c012e4d80")) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), + .virtualMachinesCancelOperationsWithResponse("eastus2", + new CancelOperationsContent().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesCancelOperations_MaximumSet. @@ -804,9 +838,9 @@ public final class ScheduledActionsVirtualMachinesCancelOperationsSamples { public static void scheduledActionsVirtualMachinesCancelOperationsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesCancelOperationsWithResponse("nivsvluajruxhmsfgmxjnl", - new CancelOperationsRequest().withOperationIds(Arrays.asList("b211f086-4b91-4686-a453-2f5c012e4d80")) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), + .virtualMachinesCancelOperationsWithResponse("eastus2", + new CancelOperationsContent().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } @@ -815,12 +849,47 @@ public final class ScheduledActionsVirtualMachinesCancelOperationsSamples { ### ScheduledActions_VirtualMachinesExecuteCreate ```java -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest; +import com.azure.resourcemanager.computeschedule.models.AdditionalCapabilities; +import com.azure.resourcemanager.computeschedule.models.BootDiagnostics; +import com.azure.resourcemanager.computeschedule.models.BulkActionVMExtension; +import com.azure.resourcemanager.computeschedule.models.BulkActionVMProfile; +import com.azure.resourcemanager.computeschedule.models.BulkActionVMSpec; +import com.azure.resourcemanager.computeschedule.models.BulkActionVmExtensionProperties; +import com.azure.resourcemanager.computeschedule.models.BulkVMConfiguration; +import com.azure.resourcemanager.computeschedule.models.CachingTypes; +import com.azure.resourcemanager.computeschedule.models.DataDisk; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.DiagnosticsProfile; +import com.azure.resourcemanager.computeschedule.models.DiskControllerTypes; +import com.azure.resourcemanager.computeschedule.models.DiskCreateOptionTypes; +import com.azure.resourcemanager.computeschedule.models.DiskDeleteOptionTypes; +import com.azure.resourcemanager.computeschedule.models.ExecuteCreateContent; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.ImageReference; +import com.azure.resourcemanager.computeschedule.models.LinuxConfiguration; +import com.azure.resourcemanager.computeschedule.models.LinuxPatchAssessmentMode; +import com.azure.resourcemanager.computeschedule.models.LinuxPatchSettings; +import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchMode; +import com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; +import com.azure.resourcemanager.computeschedule.models.NetworkProfile; +import com.azure.resourcemanager.computeschedule.models.OSDisk; +import com.azure.resourcemanager.computeschedule.models.OSProfile; +import com.azure.resourcemanager.computeschedule.models.OperatingSystemTypes; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceIdentityType; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceProvisionPayload; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import java.nio.charset.StandardCharsets; +import com.azure.resourcemanager.computeschedule.models.SecurityProfile; +import com.azure.resourcemanager.computeschedule.models.SecurityTypes; +import com.azure.resourcemanager.computeschedule.models.SshConfiguration; +import com.azure.resourcemanager.computeschedule.models.SshPublicKey; +import com.azure.resourcemanager.computeschedule.models.StorageAccountTypes; +import com.azure.resourcemanager.computeschedule.models.StorageProfile; +import com.azure.resourcemanager.computeschedule.models.UefiSettings; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -830,83 +899,369 @@ import java.util.Map; */ public final class ScheduledActionsVirtualMachinesExecuteCreateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen - generated by [MaximumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteCreateMaximumSetGenGeneratedByMaximumSetRule( + public static void scheduledActionsVirtualMachinesExecuteCreateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteCreateWithResponse("oslhbouzgevzpeydssyelhw", new ExecuteCreateRequest() - .withResourceConfigParameters(new ResourceProvisionPayload().withBaseProfile(mapOf("hardwareProfile", - BinaryData.fromBytes("{name=F1}".getBytes(StandardCharsets.UTF_8)), "provisioningState", - BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "storageProfile", - BinaryData.fromBytes("{osDisk={osType=0}}".getBytes(StandardCharsets.UTF_8)), "vmExtensions", - BinaryData.fromBytes( - "[{autoUpgradeMinorVersion=true, protectedSettings=SomeDecryptedSecretValue, provisioningState=0, enableAutomaticUpgrade=true, publisher=Microsoft.Azure.Monitor, type=AzureMonitorLinuxAgent, typeHandlerVersion=1.0}, {name=myExtensionName}]" - .getBytes(StandardCharsets.UTF_8)), - "resourcegroupName", - BinaryData.fromBytes("RG5ABF491C-3164-42A6-8CB5-BF3CB53B018B".getBytes(StandardCharsets.UTF_8)), - "computeApiVersion", BinaryData.fromBytes("2024-07-01".getBytes(StandardCharsets.UTF_8)))) - .withResourceOverrides(Arrays.asList(mapOf("name", - BinaryData.fromBytes("myFleet_523".getBytes(StandardCharsets.UTF_8)), "location", - BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", - BinaryData.fromBytes( - "{hardwareProfile={vmSize=Standard_F1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" - .getBytes(StandardCharsets.UTF_8)), - "zones", BinaryData.fromBytes("[1]".getBytes(StandardCharsets.UTF_8))), - mapOf("name", BinaryData.fromBytes("myFleet_524".getBytes(StandardCharsets.UTF_8)), "location", - BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", - BinaryData.fromBytes( - "{hardwareProfile={vmSize=Standard_G1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" - .getBytes(StandardCharsets.UTF_8)), - "zones", BinaryData.fromBytes("[2]".getBytes(StandardCharsets.UTF_8))))) - .withResourceCount(2) - .withResourcePrefix("TL1")) - .withExecutionParameters(new ExecutionParameters() - .withRetryPolicy(new RetryPolicy().withRetryCount(5).withRetryWindowInMinutes(40))) - .withCorrelationid("dfe927c5-16a6-40b7-a0f7-8524975ed642"), com.azure.core.util.Context.NONE); + .virtualMachinesExecuteCreateWithResponse("eastus2", + new ExecuteCreateContent() + .withResourceConfigParameters( + new ResourceProvisionPayload() + .withBaseProfile( + new BulkVMConfiguration() + .withVmProperties(new BulkActionVMSpec().withZones(Arrays.asList("1")) + .withIdentity( + new VirtualMachineIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .withTags(mapOf("environment", "production", "department", "engineering")) + .withVmProperties(new BulkActionVMProfile() + .withStorageProfile(new StorageProfile() + .withImageReference(new ImageReference().withPublisher("Canonical") + .withOffer("0001-com-ubuntu-server-jammy") + .withSku("22_04-lts-gen2") + .withVersion("latest")) + .withOsDisk(new OSDisk().withOsType(OperatingSystemTypes.LINUX) + .withName("myOsDisk") + .withCaching(CachingTypes.READ_WRITE) + .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) + .withDiskSizeGB(128) + .withManagedDisk(new ManagedDiskParameters() + .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) + .withDeleteOption(DiskDeleteOptionTypes.DELETE)) + .withDataDisks( + Arrays.asList(new DataDisk().withLun(0) + .withName("myDataDisk-0") + .withCaching(CachingTypes.READ_ONLY) + .withCreateOption(DiskCreateOptionTypes.EMPTY) + .withDiskSizeGB(256) + .withManagedDisk( + new ManagedDiskParameters().withStorageAccountType( + StorageAccountTypes.PREMIUM_LRS)) + .withDeleteOption(DiskDeleteOptionTypes.DELETE))) + .withDiskControllerType(DiskControllerTypes.SCSI)) + .withAdditionalCapabilities( + new AdditionalCapabilities().withUltraSSDEnabled(false) + .withHibernationEnabled(false)) + .withOsProfile(new OSProfile().withComputerName("myVM") + .withAdminUsername("azureuser") + .withLinuxConfiguration( + new LinuxConfiguration().withDisablePasswordAuthentication(true) + .withSsh(new SshConfiguration() + .withPublicKeys(Arrays.asList(new SshPublicKey() + .withPath("/home/azureuser/.ssh/authorized_keys") + .withKeyData("fakeTokenPlaceholder")))) + .withProvisionVMAgent(true) + .withPatchSettings(new LinuxPatchSettings() + .withPatchMode(LinuxVMGuestPatchMode.AUTOMATIC_BY_PLATFORM) + .withAssessmentMode( + LinuxPatchAssessmentMode.AUTOMATIC_BY_PLATFORM))) + .withAllowExtensionOperations(true)) + .withNetworkProfile(new NetworkProfile().withNetworkInterfaces( + Arrays.asList(new NetworkInterfaceReference().withId( + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic") + .withProperties( + new NetworkInterfaceReferenceProperties().withPrimary(true) + .withDeleteOption(DeleteOptions.DELETE))))) + .withSecurityProfile(new SecurityProfile() + .withUefiSettings(new UefiSettings().withSecureBootEnabled(true) + .withVTpmEnabled(true)) + .withSecurityType(SecurityTypes.TRUSTED_LAUNCH)) + .withDiagnosticsProfile(new DiagnosticsProfile() + .withBootDiagnostics(new BootDiagnostics().withEnabled(true))))) + .withExtensions( + Arrays.asList(new BulkActionVMExtension().withName("AzureMonitorLinuxAgent") + .withProperties(new BulkActionVmExtensionProperties() + .withPublisher("Microsoft.Azure.Monitor") + .withType("AzureMonitorLinuxAgent") + .withTypeHandlerVersion("1.0") + .withAutoUpgradeMinorVersion(true) + .withEnableAutomaticUpgrade(true) + .withSettings(mapOf()) + .withSuppressFailures(false)))) + .withComputeApiVersion("2024-07-01") + .withName("baseVmConfig")) + .withResourceOverrides(Arrays.asList(new BulkVMConfiguration() + .withVmProperties(new BulkActionVMSpec().withZones(Arrays.asList("2")) + .withTags(mapOf("environment", "production", "department", "engineering", "role", + "web-server")) + .withVmProperties(new BulkActionVMProfile() + .withStorageProfile(new StorageProfile().withOsDisk( + new OSDisk() + .withOsType(OperatingSystemTypes.LINUX) + .withName("overrideOsDisk") + .withCaching(CachingTypes.READ_WRITE) + .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) + .withDiskSizeGB(256) + .withManagedDisk(new ManagedDiskParameters() + .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) + .withDeleteOption(DiskDeleteOptionTypes.DELETE))) + .withNetworkProfile(new NetworkProfile() + .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceReference().withId( + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic-override") + .withProperties( + new NetworkInterfaceReferenceProperties().withPrimary(true) + .withDeleteOption(DeleteOptions.DELETE))))))) + .withComputeApiVersion("2024-07-01") + .withName("overrideVmConfig-0"))) + .withResourceCount(3) + .withResourcePrefix("myBulkVm")) + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withCorrelationid("01234567-89ab-cdef-0123-456789abcdef"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteCreateMinimumSetGenGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesExecuteCreateMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteCreateWithResponse("useast", new ExecuteCreateRequest() - .withResourceConfigParameters(new ResourceProvisionPayload().withBaseProfile(mapOf("hardwareProfile", - BinaryData.fromBytes("{name=F1}".getBytes(StandardCharsets.UTF_8)), "provisioningState", - BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "storageProfile", - BinaryData.fromBytes("{osDisk={osType=0}}".getBytes(StandardCharsets.UTF_8)), "vmExtensions", - BinaryData.fromBytes( - "[{autoUpgradeMinorVersion=true, protectedSettings=SomeDecryptedSecretValue, provisioningState=0, enableAutomaticUpgrade=true, publisher=Microsoft.Azure.Monitor, type=AzureMonitorLinuxAgent, typeHandlerVersion=1.0}, {name=myExtensionName}]" - .getBytes(StandardCharsets.UTF_8)), - "resourcegroupName", - BinaryData.fromBytes("RG5ABF491C-3164-42A6-8CB5-BF3CB53B018B".getBytes(StandardCharsets.UTF_8)), - "computeApiVersion", BinaryData.fromBytes("2024-07-01".getBytes(StandardCharsets.UTF_8)))) - .withResourceOverrides(Arrays.asList(mapOf("name", - BinaryData.fromBytes("myFleet_523".getBytes(StandardCharsets.UTF_8)), "location", - BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", - BinaryData.fromBytes( - "{hardwareProfile={vmSize=Standard_F1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" - .getBytes(StandardCharsets.UTF_8)), - "zones", BinaryData.fromBytes("[1]".getBytes(StandardCharsets.UTF_8))), - mapOf("name", BinaryData.fromBytes("myFleet_524".getBytes(StandardCharsets.UTF_8)), "location", - BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", - BinaryData.fromBytes( - "{hardwareProfile={vmSize=Standard_G1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" - .getBytes(StandardCharsets.UTF_8)), - "zones", BinaryData.fromBytes("[2]".getBytes(StandardCharsets.UTF_8))))) - .withResourceCount(2)) + .virtualMachinesExecuteCreateWithResponse("eastus2", + new ExecuteCreateContent() + .withResourceConfigParameters(new ResourceProvisionPayload().withResourceCount(3)) + .withExecutionParameters(new ExecutionParameters()), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ScheduledActions_VirtualMachinesExecuteCreateFlex + +```java +import com.azure.resourcemanager.computeschedule.models.AdditionalCapabilities; +import com.azure.resourcemanager.computeschedule.models.AllocationStrategy; +import com.azure.resourcemanager.computeschedule.models.BootDiagnostics; +import com.azure.resourcemanager.computeschedule.models.BulkActionVMExtension; +import com.azure.resourcemanager.computeschedule.models.BulkActionVMProfile; +import com.azure.resourcemanager.computeschedule.models.BulkActionVMSpec; +import com.azure.resourcemanager.computeschedule.models.BulkActionVmExtensionProperties; +import com.azure.resourcemanager.computeschedule.models.BulkVMConfiguration; +import com.azure.resourcemanager.computeschedule.models.CachingTypes; +import com.azure.resourcemanager.computeschedule.models.DataDisk; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.DiagnosticsProfile; +import com.azure.resourcemanager.computeschedule.models.DiskControllerTypes; +import com.azure.resourcemanager.computeschedule.models.DiskCreateOptionTypes; +import com.azure.resourcemanager.computeschedule.models.DiskDeleteOptionTypes; +import com.azure.resourcemanager.computeschedule.models.DistributionStrategy; +import com.azure.resourcemanager.computeschedule.models.ExecuteCreateFlexContent; +import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.FlexProperties; +import com.azure.resourcemanager.computeschedule.models.ImageReference; +import com.azure.resourcemanager.computeschedule.models.LinuxConfiguration; +import com.azure.resourcemanager.computeschedule.models.LinuxPatchAssessmentMode; +import com.azure.resourcemanager.computeschedule.models.LinuxPatchSettings; +import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchMode; +import com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; +import com.azure.resourcemanager.computeschedule.models.NetworkProfile; +import com.azure.resourcemanager.computeschedule.models.OSDisk; +import com.azure.resourcemanager.computeschedule.models.OSProfile; +import com.azure.resourcemanager.computeschedule.models.OperatingSystemTypes; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.OsType; +import com.azure.resourcemanager.computeschedule.models.PriorityProfile; +import com.azure.resourcemanager.computeschedule.models.PriorityType; +import com.azure.resourcemanager.computeschedule.models.ResourceIdentityType; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; +import com.azure.resourcemanager.computeschedule.models.ResourceProvisionFlexPayload; +import com.azure.resourcemanager.computeschedule.models.RetryPolicy; +import com.azure.resourcemanager.computeschedule.models.SecurityProfile; +import com.azure.resourcemanager.computeschedule.models.SecurityTypes; +import com.azure.resourcemanager.computeschedule.models.SshConfiguration; +import com.azure.resourcemanager.computeschedule.models.SshPublicKey; +import com.azure.resourcemanager.computeschedule.models.StorageAccountTypes; +import com.azure.resourcemanager.computeschedule.models.StorageProfile; +import com.azure.resourcemanager.computeschedule.models.UefiSettings; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineIdentity; +import com.azure.resourcemanager.computeschedule.models.VmSizeProfile; +import com.azure.resourcemanager.computeschedule.models.ZoneAllocationPolicy; +import com.azure.resourcemanager.computeschedule.models.ZonePreference; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ScheduledActions VirtualMachinesExecuteCreateFlex. + */ +public final class ScheduledActionsVirtualMachinesExecuteCreateFlexSamples { + /* + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreateFlex_MaximumSet_Gen.json + */ + /** + * Sample code: ScheduledActions_VirtualMachinesExecuteCreateFlex_MaximumSet. + * + * @param manager Entry point to ComputeScheduleManager. + */ + public static void scheduledActionsVirtualMachinesExecuteCreateFlexMaximumSet( + com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { + manager.scheduledActions() + .virtualMachinesExecuteCreateFlexWithResponse("eastus2", + new ExecuteCreateFlexContent() + .withResourceConfigParameters( + new ResourceProvisionFlexPayload() + .withBaseProfile( + new BulkVMConfiguration() + .withVmProperties(new BulkActionVMSpec().withZones(Arrays.asList("1")) + .withIdentity( + new VirtualMachineIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .withTags(mapOf("environment", "production", "department", "engineering")) + .withVmProperties(new BulkActionVMProfile() + .withStorageProfile(new StorageProfile() + .withImageReference(new ImageReference().withPublisher("Canonical") + .withOffer("0001-com-ubuntu-server-jammy") + .withSku("22_04-lts-gen2") + .withVersion("latest")) + .withOsDisk(new OSDisk().withOsType(OperatingSystemTypes.LINUX) + .withName("myOsDisk") + .withCaching(CachingTypes.READ_WRITE) + .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) + .withDiskSizeGB(128) + .withManagedDisk(new ManagedDiskParameters() + .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) + .withDeleteOption(DiskDeleteOptionTypes.DELETE)) + .withDataDisks( + Arrays.asList(new DataDisk().withLun(0) + .withName("myDataDisk-0") + .withCaching(CachingTypes.READ_ONLY) + .withCreateOption(DiskCreateOptionTypes.EMPTY) + .withDiskSizeGB(256) + .withManagedDisk( + new ManagedDiskParameters().withStorageAccountType( + StorageAccountTypes.PREMIUM_LRS)) + .withDeleteOption(DiskDeleteOptionTypes.DELETE))) + .withDiskControllerType(DiskControllerTypes.SCSI)) + .withAdditionalCapabilities( + new AdditionalCapabilities().withUltraSSDEnabled(false) + .withHibernationEnabled(false)) + .withOsProfile(new OSProfile().withComputerName("myFlexVM") + .withAdminUsername("azureuser") + .withLinuxConfiguration( + new LinuxConfiguration().withDisablePasswordAuthentication(true) + .withSsh(new SshConfiguration() + .withPublicKeys(Arrays.asList(new SshPublicKey() + .withPath("/home/azureuser/.ssh/authorized_keys") + .withKeyData("fakeTokenPlaceholder")))) + .withProvisionVMAgent(true) + .withPatchSettings(new LinuxPatchSettings() + .withPatchMode(LinuxVMGuestPatchMode.AUTOMATIC_BY_PLATFORM) + .withAssessmentMode( + LinuxPatchAssessmentMode.AUTOMATIC_BY_PLATFORM))) + .withAllowExtensionOperations(true)) + .withNetworkProfile(new NetworkProfile().withNetworkInterfaces( + Arrays.asList(new NetworkInterfaceReference().withId( + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic") + .withProperties( + new NetworkInterfaceReferenceProperties().withPrimary(true) + .withDeleteOption(DeleteOptions.DELETE))))) + .withSecurityProfile(new SecurityProfile() + .withUefiSettings(new UefiSettings().withSecureBootEnabled(true) + .withVTpmEnabled(true)) + .withSecurityType(SecurityTypes.TRUSTED_LAUNCH)) + .withDiagnosticsProfile(new DiagnosticsProfile() + .withBootDiagnostics(new BootDiagnostics().withEnabled(true))))) + .withExtensions( + Arrays.asList(new BulkActionVMExtension().withName("AzureMonitorLinuxAgent") + .withProperties(new BulkActionVmExtensionProperties() + .withPublisher("Microsoft.Azure.Monitor") + .withType("AzureMonitorLinuxAgent") + .withTypeHandlerVersion("1.0") + .withAutoUpgradeMinorVersion(true) + .withEnableAutomaticUpgrade(true) + .withSettings(mapOf()) + .withSuppressFailures(false)))) + .withComputeApiVersion("2024-07-01") + .withName("baseFlexVmConfig")) + .withResourceOverrides(Arrays.asList(new BulkVMConfiguration() + .withVmProperties(new BulkActionVMSpec().withZones(Arrays.asList("2")) + .withTags(mapOf("environment", "production", "department", "engineering", "role", + "web-server")) + .withVmProperties(new BulkActionVMProfile() + .withStorageProfile(new StorageProfile().withOsDisk( + new OSDisk() + .withOsType(OperatingSystemTypes.LINUX) + .withName("overrideOsDisk") + .withCaching(CachingTypes.READ_WRITE) + .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) + .withDiskSizeGB(256) + .withManagedDisk(new ManagedDiskParameters() + .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) + .withDeleteOption(DiskDeleteOptionTypes.DELETE))) + .withNetworkProfile(new NetworkProfile() + .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceReference().withId( + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic-override") + .withProperties( + new NetworkInterfaceReferenceProperties().withPrimary(true) + .withDeleteOption(DeleteOptions.DELETE))))))) + .withComputeApiVersion("2024-07-01") + .withName("overrideFlexVmConfig-0"))) + .withResourceCount(24) + .withResourcePrefix("myFlexVm") + .withFlexProperties(new FlexProperties() + .withVmSizeProfiles( + Arrays.asList(new VmSizeProfile().withName("Standard_D2s_v3").withRank(24), + new VmSizeProfile().withName("Standard_D2s_v3").withRank(24))) + .withOsType(OsType.WINDOWS) + .withPriorityProfile(new PriorityProfile().withType(PriorityType.REGULAR) + .withAllocationStrategy(AllocationStrategy.LOWEST_PRICE)) + .withZoneAllocationPolicy(new ZoneAllocationPolicy() + .withDistributionStrategy(DistributionStrategy.BEST_EFFORT_SINGLE_ZONE) + .withZonePreferences( + Arrays.asList(new ZonePreference().withZone("1").withRank(21)))))) + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreateFlex_MinimumSet_Gen.json + */ + /** + * Sample code: ScheduledActions_VirtualMachinesExecuteCreateFlex_MinimumSet. + * + * @param manager Entry point to ComputeScheduleManager. + */ + public static void scheduledActionsVirtualMachinesExecuteCreateFlexMinimumSet( + com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { + manager.scheduledActions() + .virtualMachinesExecuteCreateFlexWithResponse("eastus2", new ExecuteCreateFlexContent() + .withResourceConfigParameters(new ResourceProvisionFlexPayload().withResourceCount(24) + .withFlexProperties(new FlexProperties() + .withVmSizeProfiles(Arrays.asList(new VmSizeProfile().withName("Standard_D2s_v3").withRank(24), + new VmSizeProfile().withName("Standard_D2s_v3").withRank(24))) + .withOsType(OsType.WINDOWS) + .withPriorityProfile(new PriorityProfile()))) .withExecutionParameters(new ExecutionParameters()), com.azure.core.util.Context.NONE); } @@ -927,9 +1282,10 @@ public final class ScheduledActionsVirtualMachinesExecuteCreateSamples { ### ScheduledActions_VirtualMachinesExecuteDeallocate ```java -import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest; +import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateContent; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -939,7 +1295,7 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesExecuteDeallocateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet. @@ -949,15 +1305,15 @@ public final class ScheduledActionsVirtualMachinesExecuteDeallocateSamples { public static void scheduledActionsVirtualMachinesExecuteDeallocateMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeallocateWithResponse("qqfrkswrovcice", new ExecuteDeallocateRequest() + .virtualMachinesExecuteDeallocateWithResponse("eastus2", new ExecuteDeallocateContent() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet. @@ -967,13 +1323,15 @@ public final class ScheduledActionsVirtualMachinesExecuteDeallocateSamples { public static void scheduledActionsVirtualMachinesExecuteDeallocateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeallocateWithResponse("ykcaptgboliddcfyaiuimj", new ExecuteDeallocateRequest() + .virtualMachinesExecuteDeallocateWithResponse("eastus2", new ExecuteDeallocateContent() .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } ``` @@ -981,8 +1339,10 @@ public final class ScheduledActionsVirtualMachinesExecuteDeallocateSamples { ### ScheduledActions_VirtualMachinesExecuteDelete ```java -import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest; +import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteContent; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -992,43 +1352,44 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesExecuteDeleteSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteDeleteMinimumSetGenGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesExecuteDeleteMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeleteWithResponse("east", new ExecuteDeleteRequest() + .virtualMachinesExecuteDeleteWithResponse("eastus2", new ExecuteDeleteContent() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3", - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))), + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen - generated by [MaximumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteDeleteMaximumSetGenGeneratedByMaximumSetRule( + public static void scheduledActionsVirtualMachinesExecuteDeleteMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeleteWithResponse("east", new ExecuteDeleteRequest() - .withExecutionParameters(new ExecutionParameters() - .withRetryPolicy(new RetryPolicy().withRetryCount(2).withRetryWindowInMinutes(4))) + .virtualMachinesExecuteDeleteWithResponse("eastus2", new ExecuteDeleteContent() + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3", - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("dfe927c5-16a6-40b7-a0f7-8524975ed642") - .withForceDeletion(false), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890") + .withForceDeletion(true), com.azure.core.util.Context.NONE); } } ``` @@ -1036,9 +1397,10 @@ public final class ScheduledActionsVirtualMachinesExecuteDeleteSamples { ### ScheduledActions_VirtualMachinesExecuteHibernate ```java -import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest; +import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateContent; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -1048,25 +1410,25 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesExecuteHibernateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteHibernateMinimumSet( + public static void scheduledActionsVirtualMachinesExecuteHibernateMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteHibernateWithResponse("xtmm", new ExecuteHibernateRequest() + .virtualMachinesExecuteHibernateWithResponse("eastus2", new ExecuteHibernateContent() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet. @@ -1076,13 +1438,15 @@ public final class ScheduledActionsVirtualMachinesExecuteHibernateSamples { public static void scheduledActionsVirtualMachinesExecuteHibernateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteHibernateWithResponse("gztd", new ExecuteHibernateRequest() + .virtualMachinesExecuteHibernateWithResponse("eastus2", new ExecuteHibernateContent() .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } ``` @@ -1090,9 +1454,10 @@ public final class ScheduledActionsVirtualMachinesExecuteHibernateSamples { ### ScheduledActions_VirtualMachinesExecuteStart ```java -import com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest; +import com.azure.resourcemanager.computeschedule.models.ExecuteStartContent; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -1102,7 +1467,7 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesExecuteStartSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteStart_MaximumSet. @@ -1112,31 +1477,33 @@ public final class ScheduledActionsVirtualMachinesExecuteStartSamples { public static void scheduledActionsVirtualMachinesExecuteStartMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteStartWithResponse("qk", new ExecuteStartRequest() + .virtualMachinesExecuteStartWithResponse("eastus2", new ExecuteStartContent() .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteStart_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesExecuteStart_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteStartMinimumSet( + public static void scheduledActionsVirtualMachinesExecuteStartMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteStartWithResponse("fbdewllahrteoavajbomjc", new ExecuteStartRequest() + .virtualMachinesExecuteStartWithResponse("eastus2", new ExecuteStartContent() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } ``` @@ -1144,7 +1511,7 @@ public final class ScheduledActionsVirtualMachinesExecuteStartSamples { ### ScheduledActions_VirtualMachinesGetOperationErrors ```java -import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsRequest; +import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsContent; import java.util.Arrays; /** @@ -1152,34 +1519,34 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesGetOperationErrorsSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen - generated by [MaximumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesGetOperationErrorsMaximumSetGenGeneratedByMaximumSetRule( + public static void scheduledActionsVirtualMachinesGetOperationErrorsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationErrorsWithResponse("ennweqswbghorrgzbet", - new GetOperationErrorsRequest().withOperationIds(Arrays.asList("ksufjznokhsbowdupyt")), + .virtualMachinesGetOperationErrorsWithResponse("eastus2", + new GetOperationErrorsContent().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesGetOperationErrorsMinimumSetGenGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesGetOperationErrorsMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationErrorsWithResponse("gcdqwzmxtcn", - new GetOperationErrorsRequest().withOperationIds(Arrays.asList("ksufjznokhsbowdupyt")), + .virtualMachinesGetOperationErrorsWithResponse("eastus2", + new GetOperationErrorsContent().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")), com.azure.core.util.Context.NONE); } } @@ -1188,7 +1555,7 @@ public final class ScheduledActionsVirtualMachinesGetOperationErrorsSamples { ### ScheduledActions_VirtualMachinesGetOperationStatus ```java -import com.azure.resourcemanager.computeschedule.models.GetOperationStatusRequest; +import com.azure.resourcemanager.computeschedule.models.GetOperationStatusContent; import java.util.Arrays; /** @@ -1196,7 +1563,7 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesGetOperationStatusSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet. @@ -1206,26 +1573,26 @@ public final class ScheduledActionsVirtualMachinesGetOperationStatusSamples { public static void scheduledActionsVirtualMachinesGetOperationStatusMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationStatusWithResponse("ntfcikxsmthfkdhdcjpevmydzu", - new GetOperationStatusRequest().withOperationIds(Arrays.asList("b211f086-4b91-4686-a453-2f5c012e4d80")) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), + .virtualMachinesGetOperationStatusWithResponse("eastus2", + new GetOperationStatusContent().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesGetOperationStatusMinimumSet( + public static void scheduledActionsVirtualMachinesGetOperationStatusMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationStatusWithResponse("ykvvjfoopmkwznctgaiblzvea", - new GetOperationStatusRequest().withOperationIds(Arrays.asList("duhqnwosjzexcfwfhryvy")) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), + .virtualMachinesGetOperationStatusWithResponse("eastus2", + new GetOperationStatusContent().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } @@ -1237,10 +1604,11 @@ public final class ScheduledActionsVirtualMachinesGetOperationStatusSamples { import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; -import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateRequest; +import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateContent; import java.time.OffsetDateTime; import java.util.Arrays; @@ -1249,7 +1617,7 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesSubmitDeallocateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet. @@ -1259,37 +1627,39 @@ public final class ScheduledActionsVirtualMachinesSubmitDeallocateSamples { public static void scheduledActionsVirtualMachinesSubmitDeallocateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitDeallocateWithResponse("ycipx", new SubmitDeallocateRequest() - .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) - .withTimeZone("aigbjdnldtzkteqi") + .virtualMachinesSubmitDeallocateWithResponse("eastus2", new SubmitDeallocateContent() + .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) + .withDeadLine(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) + .withTimezone("America/Los_Angeles") + .withTimeZone("America/Los_Angeles") .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesSubmitDeallocateMinimumSet( + public static void scheduledActionsVirtualMachinesSubmitDeallocateMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitDeallocateWithResponse("zrcmkxsbuxsxxulky", new SubmitDeallocateRequest() - .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) - .withTimeZone("aigbjdnldtzkteqi") - .withDeadlineType(DeadlineType.UNKNOWN)) + .virtualMachinesSubmitDeallocateWithResponse("eastus2", new SubmitDeallocateContent() + .withSchedule(new Schedule().withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } ``` @@ -1300,10 +1670,11 @@ public final class ScheduledActionsVirtualMachinesSubmitDeallocateSamples { import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; -import com.azure.resourcemanager.computeschedule.models.SubmitHibernateRequest; +import com.azure.resourcemanager.computeschedule.models.SubmitHibernateContent; import java.time.OffsetDateTime; import java.util.Arrays; @@ -1312,28 +1683,26 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesSubmitHibernateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesSubmitHibernateMinimumSet( + public static void scheduledActionsVirtualMachinesSubmitHibernateMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitHibernateWithResponse("zuevcqpgdohzbjodhachtr", new SubmitHibernateRequest() - .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) - .withTimeZone("aigbjdnldtzkteqi") - .withDeadlineType(DeadlineType.UNKNOWN)) + .virtualMachinesSubmitHibernateWithResponse("eastus2", new SubmitHibernateContent() + .withSchedule(new Schedule().withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet. @@ -1343,16 +1712,20 @@ public final class ScheduledActionsVirtualMachinesSubmitHibernateSamples { public static void scheduledActionsVirtualMachinesSubmitHibernateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitHibernateWithResponse("rhadyapnyvmobwg", new SubmitHibernateRequest() - .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) - .withTimeZone("aigbjdnldtzkteqi") + .virtualMachinesSubmitHibernateWithResponse("eastus2", new SubmitHibernateContent() + .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) + .withDeadLine(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) + .withTimezone("America/Los_Angeles") + .withTimeZone("America/Los_Angeles") .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } ``` @@ -1363,10 +1736,11 @@ public final class ScheduledActionsVirtualMachinesSubmitHibernateSamples { import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; -import com.azure.resourcemanager.computeschedule.models.SubmitStartRequest; +import com.azure.resourcemanager.computeschedule.models.SubmitStartContent; import java.time.OffsetDateTime; import java.util.Arrays; @@ -1375,7 +1749,7 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesSubmitStartSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesSubmitStart_MaximumSet. @@ -1385,37 +1759,39 @@ public final class ScheduledActionsVirtualMachinesSubmitStartSamples { public static void scheduledActionsVirtualMachinesSubmitStartMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitStartWithResponse("pxtvvk", new SubmitStartRequest() - .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) - .withTimeZone("aigbjdnldtzkteqi") + .virtualMachinesSubmitStartWithResponse("eastus2", new SubmitStartContent() + .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) + .withDeadLine(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) + .withTimezone("America/Los_Angeles") + .withTimeZone("America/Los_Angeles") .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesSubmitStart_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesSubmitStart_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesSubmitStartMinimumSet( + public static void scheduledActionsVirtualMachinesSubmitStartMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitStartWithResponse("ufrcsuw", new SubmitStartRequest() - .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) - .withTimeZone("aigbjdnldtzkteqi") - .withDeadlineType(DeadlineType.UNKNOWN)) + .virtualMachinesSubmitStartWithResponse("eastus2", new SubmitStartContent() + .withSchedule(new Schedule().withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/pom.xml b/sdk/computeschedule/azure-resourcemanager-computeschedule/pom.xml index 1f9d7f9c9f7d..1a9d10f16709 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/pom.xml +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/pom.xml @@ -3,7 +3,7 @@ ~ Licensed under the MIT License. ~ Code generated by Microsoft (R) TypeSpec Code Generator. --> - + 4.0.0 com.azure @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Compute Schedule Management - This package contains Microsoft Azure SDK for Compute Schedule Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft.ComputeSchedule Resource Provider management API. Package api-version 2025-04-15-preview. + This package contains Microsoft Azure SDK for Compute Schedule Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft.ComputeSchedule Resource Provider management API. Package api-version 2026-04-15-preview. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java index 0ede96423a8c..ae2451032535 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner; +import com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.CreateResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.DeleteResourceOperationResponseInner; @@ -24,21 +25,22 @@ import com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionResourceInner; import com.azure.resourcemanager.computeschedule.fluent.models.StartResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.models.CancelOccurrenceRequest; -import com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest; -import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsRequest; -import com.azure.resourcemanager.computeschedule.models.GetOperationStatusRequest; +import com.azure.resourcemanager.computeschedule.models.CancelOperationsContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteCreateContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteCreateFlexContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteStartContent; +import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsContent; +import com.azure.resourcemanager.computeschedule.models.GetOperationStatusContent; import com.azure.resourcemanager.computeschedule.models.ResourceAttachRequest; import com.azure.resourcemanager.computeschedule.models.ResourceDetachRequest; import com.azure.resourcemanager.computeschedule.models.ResourcePatchRequest; import com.azure.resourcemanager.computeschedule.models.ScheduledActionUpdate; -import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateRequest; -import com.azure.resourcemanager.computeschedule.models.SubmitHibernateRequest; -import com.azure.resourcemanager.computeschedule.models.SubmitStartRequest; +import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateContent; +import com.azure.resourcemanager.computeschedule.models.SubmitHibernateContent; +import com.azure.resourcemanager.computeschedule.models.SubmitStartContent; /** * An instance of this class provides access to all the operations defined in ScheduledActionsClient. @@ -58,7 +60,7 @@ public interface ScheduledActionsClient { */ @ServiceMethod(returns = ReturnType.SINGLE) Response virtualMachinesSubmitDeallocateWithResponse( - String locationparameter, SubmitDeallocateRequest requestBody, Context context); + String locationparameter, SubmitDeallocateContent requestBody, Context context); /** * VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines at datetime in @@ -73,7 +75,7 @@ Response virtualMachinesSubmitDealloca */ @ServiceMethod(returns = ReturnType.SINGLE) DeallocateResourceOperationResponseInner virtualMachinesSubmitDeallocate(String locationparameter, - SubmitDeallocateRequest requestBody); + SubmitDeallocateContent requestBody); /** * VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in @@ -89,7 +91,7 @@ DeallocateResourceOperationResponseInner virtualMachinesSubmitDeallocate(String */ @ServiceMethod(returns = ReturnType.SINGLE) Response virtualMachinesSubmitHibernateWithResponse( - String locationparameter, SubmitHibernateRequest requestBody, Context context); + String locationparameter, SubmitHibernateContent requestBody, Context context); /** * VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in @@ -104,7 +106,7 @@ Response virtualMachinesSubmitHibernate */ @ServiceMethod(returns = ReturnType.SINGLE) HibernateResourceOperationResponseInner virtualMachinesSubmitHibernate(String locationparameter, - SubmitHibernateRequest requestBody); + SubmitHibernateContent requestBody); /** * VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future. @@ -119,7 +121,7 @@ HibernateResourceOperationResponseInner virtualMachinesSubmitHibernate(String lo */ @ServiceMethod(returns = ReturnType.SINGLE) Response virtualMachinesSubmitStartWithResponse(String locationparameter, - SubmitStartRequest requestBody, Context context); + SubmitStartContent requestBody, Context context); /** * VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future. @@ -133,7 +135,7 @@ Response virtualMachinesSubmitStartWithResp */ @ServiceMethod(returns = ReturnType.SINGLE) StartResourceOperationResponseInner virtualMachinesSubmitStart(String locationparameter, - SubmitStartRequest requestBody); + SubmitStartContent requestBody); /** * VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is @@ -149,7 +151,7 @@ StartResourceOperationResponseInner virtualMachinesSubmitStart(String locationpa */ @ServiceMethod(returns = ReturnType.SINGLE) Response virtualMachinesExecuteDeallocateWithResponse( - String locationparameter, ExecuteDeallocateRequest requestBody, Context context); + String locationparameter, ExecuteDeallocateContent requestBody, Context context); /** * VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is @@ -164,7 +166,7 @@ Response virtualMachinesExecuteDealloc */ @ServiceMethod(returns = ReturnType.SINGLE) DeallocateResourceOperationResponseInner virtualMachinesExecuteDeallocate(String locationparameter, - ExecuteDeallocateRequest requestBody); + ExecuteDeallocateContent requestBody); /** * VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, this operation is @@ -180,7 +182,7 @@ DeallocateResourceOperationResponseInner virtualMachinesExecuteDeallocate(String */ @ServiceMethod(returns = ReturnType.SINGLE) Response virtualMachinesExecuteHibernateWithResponse( - String locationparameter, ExecuteHibernateRequest requestBody, Context context); + String locationparameter, ExecuteHibernateContent requestBody, Context context); /** * VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, this operation is @@ -195,7 +197,7 @@ Response virtualMachinesExecuteHibernat */ @ServiceMethod(returns = ReturnType.SINGLE) HibernateResourceOperationResponseInner virtualMachinesExecuteHibernate(String locationparameter, - ExecuteHibernateRequest requestBody); + ExecuteHibernateContent requestBody); /** * VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered @@ -211,7 +213,7 @@ HibernateResourceOperationResponseInner virtualMachinesExecuteHibernate(String l */ @ServiceMethod(returns = ReturnType.SINGLE) Response virtualMachinesExecuteStartWithResponse(String locationparameter, - ExecuteStartRequest requestBody, Context context); + ExecuteStartContent requestBody, Context context); /** * VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered @@ -226,11 +228,42 @@ Response virtualMachinesExecuteStartWithRes */ @ServiceMethod(returns = ReturnType.SINGLE) StartResourceOperationResponseInner virtualMachinesExecuteStart(String locationparameter, - ExecuteStartRequest requestBody); + ExecuteStartContent requestBody); /** - * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, + * this operation is triggered as soon as Computeschedule receives it. + * + * @param locationparameter The location name. + * @param body The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a create flex request along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response virtualMachinesExecuteCreateFlexWithResponse( + String locationparameter, ExecuteCreateFlexContent body, Context context); + + /** + * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, + * this operation is triggered as soon as Computeschedule receives it. + * + * @param locationparameter The location name. + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a create flex request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CreateFlexResourceOperationResponseInner virtualMachinesExecuteCreateFlex(String locationparameter, + ExecuteCreateFlexContent body); + + /** + * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -242,11 +275,11 @@ StartResourceOperationResponseInner virtualMachinesExecuteStart(String locationp */ @ServiceMethod(returns = ReturnType.SINGLE) Response virtualMachinesExecuteCreateWithResponse(String locationparameter, - ExecuteCreateRequest requestBody, Context context); + ExecuteCreateContent requestBody, Context context); /** - * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -257,11 +290,11 @@ Response virtualMachinesExecuteCreateWithR */ @ServiceMethod(returns = ReturnType.SINGLE) CreateResourceOperationResponseInner virtualMachinesExecuteCreate(String locationparameter, - ExecuteCreateRequest requestBody); + ExecuteCreateContent requestBody); /** - * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -273,11 +306,11 @@ CreateResourceOperationResponseInner virtualMachinesExecuteCreate(String locatio */ @ServiceMethod(returns = ReturnType.SINGLE) Response virtualMachinesExecuteDeleteWithResponse(String locationparameter, - ExecuteDeleteRequest requestBody, Context context); + ExecuteDeleteContent requestBody, Context context); /** - * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -288,7 +321,7 @@ Response virtualMachinesExecuteDeleteWithR */ @ServiceMethod(returns = ReturnType.SINGLE) DeleteResourceOperationResponseInner virtualMachinesExecuteDelete(String locationparameter, - ExecuteDeleteRequest requestBody); + ExecuteDeleteContent requestBody); /** * VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines. @@ -303,7 +336,7 @@ DeleteResourceOperationResponseInner virtualMachinesExecuteDelete(String locatio */ @ServiceMethod(returns = ReturnType.SINGLE) Response virtualMachinesGetOperationStatusWithResponse(String locationparameter, - GetOperationStatusRequest requestBody, Context context); + GetOperationStatusContent requestBody, Context context); /** * VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines. @@ -317,7 +350,7 @@ Response virtualMachinesGetOperationStatusWithR */ @ServiceMethod(returns = ReturnType.SINGLE) GetOperationStatusResponseInner virtualMachinesGetOperationStatus(String locationparameter, - GetOperationStatusRequest requestBody); + GetOperationStatusContent requestBody); /** * VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. @@ -332,7 +365,7 @@ GetOperationStatusResponseInner virtualMachinesGetOperationStatus(String locatio */ @ServiceMethod(returns = ReturnType.SINGLE) Response virtualMachinesCancelOperationsWithResponse(String locationparameter, - CancelOperationsRequest requestBody, Context context); + CancelOperationsContent requestBody, Context context); /** * VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. @@ -346,7 +379,7 @@ Response virtualMachinesCancelOperationsWithRespo */ @ServiceMethod(returns = ReturnType.SINGLE) CancelOperationsResponseInner virtualMachinesCancelOperations(String locationparameter, - CancelOperationsRequest requestBody); + CancelOperationsContent requestBody); /** * VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors encountered, @@ -362,7 +395,7 @@ CancelOperationsResponseInner virtualMachinesCancelOperations(String locationpar */ @ServiceMethod(returns = ReturnType.SINGLE) Response virtualMachinesGetOperationErrorsWithResponse(String locationparameter, - GetOperationErrorsRequest requestBody, Context context); + GetOperationErrorsContent requestBody, Context context); /** * VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors encountered, @@ -377,7 +410,7 @@ Response virtualMachinesGetOperationErrorsWithR */ @ServiceMethod(returns = ReturnType.SINGLE) GetOperationErrorsResponseInner virtualMachinesGetOperationErrors(String locationparameter, - GetOperationErrorsRequest requestBody); + GetOperationErrorsContent requestBody); /** * Get a ScheduledAction. diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateFlexResourceOperationResponseInner.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateFlexResourceOperationResponseInner.java new file mode 100644 index 000000000000..82db97de60e0 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateFlexResourceOperationResponseInner.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.computeschedule.models.ResourceOperation; +import java.io.IOException; +import java.util.List; + +/** + * The response from a create flex request. + */ +@Immutable +public final class CreateFlexResourceOperationResponseInner + implements JsonSerializable { + /* + * The description of the operation response + */ + private String description; + + /* + * The type of resources used in the create flex request eg virtual machines + */ + private String type; + + /* + * The location of the create flex request eg westus + */ + private String location; + + /* + * The results from the create flex request if no errors exist + */ + private List results; + + /** + * Creates an instance of CreateFlexResourceOperationResponseInner class. + */ + private CreateFlexResourceOperationResponseInner() { + } + + /** + * Get the description property: The description of the operation response. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the type property: The type of resources used in the create flex request eg virtual machines. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the location property: The location of the create flex request eg westus. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the results property: The results from the create flex request if no errors exist. + * + * @return the results value. + */ + public List results() { + return this.results; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeArrayField("results", this.results, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CreateFlexResourceOperationResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CreateFlexResourceOperationResponseInner 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. + * @throws IOException If an error occurs while reading the CreateFlexResourceOperationResponseInner. + */ + public static CreateFlexResourceOperationResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CreateFlexResourceOperationResponseInner deserializedCreateFlexResourceOperationResponseInner + = new CreateFlexResourceOperationResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedCreateFlexResourceOperationResponseInner.description = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCreateFlexResourceOperationResponseInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedCreateFlexResourceOperationResponseInner.location = reader.getString(); + } else if ("results".equals(fieldName)) { + List results = reader.readArray(reader1 -> ResourceOperation.fromJson(reader1)); + deserializedCreateFlexResourceOperationResponseInner.results = results; + } else { + reader.skipChildren(); + } + } + + return deserializedCreateFlexResourceOperationResponseInner; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientImpl.java index ab94a835313d..c07b52aab249 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientImpl.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientImpl.java @@ -217,7 +217,7 @@ public OccurrenceExtensionsClient getOccurrenceExtensions() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-04-15-preview"; + this.apiVersion = "2026-04-15-preview"; this.operations = new OperationsClientImpl(this); this.scheduledActions = new ScheduledActionsClientImpl(this); this.scheduledActionExtensions = new ScheduledActionExtensionsClientImpl(this); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateFlexResourceOperationResponseImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateFlexResourceOperationResponseImpl.java new file mode 100644 index 000000000000..25802b6047be --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateFlexResourceOperationResponseImpl.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.implementation; + +import com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner; +import com.azure.resourcemanager.computeschedule.models.CreateFlexResourceOperationResponse; +import com.azure.resourcemanager.computeschedule.models.ResourceOperation; +import java.util.Collections; +import java.util.List; + +public final class CreateFlexResourceOperationResponseImpl implements CreateFlexResourceOperationResponse { + private CreateFlexResourceOperationResponseInner innerObject; + + private final com.azure.resourcemanager.computeschedule.ComputeScheduleManager serviceManager; + + CreateFlexResourceOperationResponseImpl(CreateFlexResourceOperationResponseInner innerObject, + com.azure.resourcemanager.computeschedule.ComputeScheduleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String description() { + return this.innerModel().description(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public List results() { + List inner = this.innerModel().results(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public CreateFlexResourceOperationResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java index 1f0a60a73914..a955731ec9e3 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java @@ -36,6 +36,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient; import com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner; +import com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.CreateResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.DeleteResourceOperationResponseInner; @@ -50,21 +51,22 @@ import com.azure.resourcemanager.computeschedule.implementation.models.ResourceListResponse; import com.azure.resourcemanager.computeschedule.implementation.models.ScheduledActionListResult; import com.azure.resourcemanager.computeschedule.models.CancelOccurrenceRequest; -import com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest; -import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsRequest; -import com.azure.resourcemanager.computeschedule.models.GetOperationStatusRequest; +import com.azure.resourcemanager.computeschedule.models.CancelOperationsContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteCreateContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteCreateFlexContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteStartContent; +import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsContent; +import com.azure.resourcemanager.computeschedule.models.GetOperationStatusContent; import com.azure.resourcemanager.computeschedule.models.ResourceAttachRequest; import com.azure.resourcemanager.computeschedule.models.ResourceDetachRequest; import com.azure.resourcemanager.computeschedule.models.ResourcePatchRequest; import com.azure.resourcemanager.computeschedule.models.ScheduledActionUpdate; -import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateRequest; -import com.azure.resourcemanager.computeschedule.models.SubmitHibernateRequest; -import com.azure.resourcemanager.computeschedule.models.SubmitStartRequest; +import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateContent; +import com.azure.resourcemanager.computeschedule.models.SubmitHibernateContent; +import com.azure.resourcemanager.computeschedule.models.SubmitStartContent; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -108,7 +110,7 @@ Mono> virtualMachinesSubmitDe @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") SubmitDeallocateRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") SubmitDeallocateContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitDeallocate") @@ -118,7 +120,7 @@ Response virtualMachinesSubmitDealloca @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") SubmitDeallocateRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") SubmitDeallocateContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitHibernate") @@ -128,7 +130,7 @@ Mono> virtualMachinesSubmitHib @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") SubmitHibernateRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") SubmitHibernateContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitHibernate") @@ -138,7 +140,7 @@ Response virtualMachinesSubmitHibernate @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") SubmitHibernateRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") SubmitHibernateContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitStart") @@ -148,7 +150,7 @@ Mono> virtualMachinesSubmitStart( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") SubmitStartRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") SubmitStartContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitStart") @@ -158,7 +160,7 @@ Response virtualMachinesSubmitStartSync( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") SubmitStartRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") SubmitStartContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDeallocate") @@ -168,7 +170,7 @@ Mono> virtualMachinesExecuteD @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteDeallocateRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteDeallocateContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDeallocate") @@ -178,7 +180,7 @@ Response virtualMachinesExecuteDealloc @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteDeallocateRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteDeallocateContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteHibernate") @@ -188,7 +190,7 @@ Mono> virtualMachinesExecuteHi @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteHibernateRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteHibernateContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteHibernate") @@ -198,7 +200,7 @@ Response virtualMachinesExecuteHibernat @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteHibernateRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteHibernateContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteStart") @@ -208,7 +210,7 @@ Mono> virtualMachinesExecuteStart( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteStartRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteStartContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteStart") @@ -218,7 +220,27 @@ Response virtualMachinesExecuteStartSync( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteStartRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteStartContent requestBody, + Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreateFlex") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> virtualMachinesExecuteCreateFlex( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteCreateFlexContent body, + Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreateFlex") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response virtualMachinesExecuteCreateFlexSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteCreateFlexContent body, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreate") @@ -228,7 +250,7 @@ Mono> virtualMachinesExecuteCreat @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteCreateRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteCreateContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreate") @@ -238,7 +260,7 @@ Response virtualMachinesExecuteCreateSync( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteCreateRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteCreateContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDelete") @@ -248,7 +270,7 @@ Mono> virtualMachinesExecuteDelet @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteDeleteRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteDeleteContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDelete") @@ -258,7 +280,7 @@ Response virtualMachinesExecuteDeleteSync( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteDeleteRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteDeleteContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationStatus") @@ -268,7 +290,7 @@ Mono> virtualMachinesGetOperationStatu @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") GetOperationStatusRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") GetOperationStatusContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationStatus") @@ -278,7 +300,7 @@ Response virtualMachinesGetOperationStatusSync( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") GetOperationStatusRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") GetOperationStatusContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesCancelOperations") @@ -288,7 +310,7 @@ Mono> virtualMachinesCancelOperations( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") CancelOperationsRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CancelOperationsContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesCancelOperations") @@ -298,7 +320,7 @@ Response virtualMachinesCancelOperationsSync( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") CancelOperationsRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CancelOperationsContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationErrors") @@ -308,7 +330,7 @@ Mono> virtualMachinesGetOperationError @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") GetOperationErrorsRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") GetOperationErrorsContent requestBody, Context context); @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationErrors") @@ -318,7 +340,7 @@ Response virtualMachinesGetOperationErrorsSync( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") GetOperationErrorsRequest requestBody, + @HeaderParam("Accept") String accept, @BodyParam("application/json") GetOperationErrorsContent requestBody, Context context); @Headers({ "Content-Type: application/json" }) @@ -660,7 +682,7 @@ Response listResourcesNextSync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> virtualMachinesSubmitDeallocateWithResponseAsync( - String locationparameter, SubmitDeallocateRequest requestBody) { + String locationparameter, SubmitDeallocateContent requestBody) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -683,7 +705,7 @@ private Mono> virtualMachines */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono - virtualMachinesSubmitDeallocateAsync(String locationparameter, SubmitDeallocateRequest requestBody) { + virtualMachinesSubmitDeallocateAsync(String locationparameter, SubmitDeallocateContent requestBody) { return virtualMachinesSubmitDeallocateWithResponseAsync(locationparameter, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -702,7 +724,7 @@ private Mono> virtualMachines */ @ServiceMethod(returns = ReturnType.SINGLE) public Response virtualMachinesSubmitDeallocateWithResponse( - String locationparameter, SubmitDeallocateRequest requestBody, Context context) { + String locationparameter, SubmitDeallocateContent requestBody, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.virtualMachinesSubmitDeallocateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -722,7 +744,7 @@ public Response virtualMachinesSubmitD */ @ServiceMethod(returns = ReturnType.SINGLE) public DeallocateResourceOperationResponseInner virtualMachinesSubmitDeallocate(String locationparameter, - SubmitDeallocateRequest requestBody) { + SubmitDeallocateContent requestBody) { return virtualMachinesSubmitDeallocateWithResponse(locationparameter, requestBody, Context.NONE).getValue(); } @@ -740,7 +762,7 @@ public DeallocateResourceOperationResponseInner virtualMachinesSubmitDeallocate( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - virtualMachinesSubmitHibernateWithResponseAsync(String locationparameter, SubmitHibernateRequest requestBody) { + virtualMachinesSubmitHibernateWithResponseAsync(String locationparameter, SubmitHibernateContent requestBody) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -763,7 +785,7 @@ public DeallocateResourceOperationResponseInner virtualMachinesSubmitDeallocate( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono virtualMachinesSubmitHibernateAsync(String locationparameter, - SubmitHibernateRequest requestBody) { + SubmitHibernateContent requestBody) { return virtualMachinesSubmitHibernateWithResponseAsync(locationparameter, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -782,7 +804,7 @@ private Mono virtualMachinesSubmitHiber */ @ServiceMethod(returns = ReturnType.SINGLE) public Response virtualMachinesSubmitHibernateWithResponse( - String locationparameter, SubmitHibernateRequest requestBody, Context context) { + String locationparameter, SubmitHibernateContent requestBody, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.virtualMachinesSubmitHibernateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -802,7 +824,7 @@ public Response virtualMachinesSubmitHi */ @ServiceMethod(returns = ReturnType.SINGLE) public HibernateResourceOperationResponseInner virtualMachinesSubmitHibernate(String locationparameter, - SubmitHibernateRequest requestBody) { + SubmitHibernateContent requestBody) { return virtualMachinesSubmitHibernateWithResponse(locationparameter, requestBody, Context.NONE).getValue(); } @@ -818,7 +840,7 @@ public HibernateResourceOperationResponseInner virtualMachinesSubmitHibernate(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - virtualMachinesSubmitStartWithResponseAsync(String locationparameter, SubmitStartRequest requestBody) { + virtualMachinesSubmitStartWithResponseAsync(String locationparameter, SubmitStartContent requestBody) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -840,7 +862,7 @@ public HibernateResourceOperationResponseInner virtualMachinesSubmitHibernate(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono virtualMachinesSubmitStartAsync(String locationparameter, - SubmitStartRequest requestBody) { + SubmitStartContent requestBody) { return virtualMachinesSubmitStartWithResponseAsync(locationparameter, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -858,7 +880,7 @@ private Mono virtualMachinesSubmitStartAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) public Response virtualMachinesSubmitStartWithResponse( - String locationparameter, SubmitStartRequest requestBody, Context context) { + String locationparameter, SubmitStartContent requestBody, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.virtualMachinesSubmitStartSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -877,7 +899,7 @@ public Response virtualMachinesSubmitStartW */ @ServiceMethod(returns = ReturnType.SINGLE) public StartResourceOperationResponseInner virtualMachinesSubmitStart(String locationparameter, - SubmitStartRequest requestBody) { + SubmitStartContent requestBody) { return virtualMachinesSubmitStartWithResponse(locationparameter, requestBody, Context.NONE).getValue(); } @@ -895,7 +917,7 @@ public StartResourceOperationResponseInner virtualMachinesSubmitStart(String loc */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> virtualMachinesExecuteDeallocateWithResponseAsync( - String locationparameter, ExecuteDeallocateRequest requestBody) { + String locationparameter, ExecuteDeallocateContent requestBody) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -918,7 +940,7 @@ private Mono> virtualMachines */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono - virtualMachinesExecuteDeallocateAsync(String locationparameter, ExecuteDeallocateRequest requestBody) { + virtualMachinesExecuteDeallocateAsync(String locationparameter, ExecuteDeallocateContent requestBody) { return virtualMachinesExecuteDeallocateWithResponseAsync(locationparameter, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -937,7 +959,7 @@ private Mono> virtualMachines */ @ServiceMethod(returns = ReturnType.SINGLE) public Response virtualMachinesExecuteDeallocateWithResponse( - String locationparameter, ExecuteDeallocateRequest requestBody, Context context) { + String locationparameter, ExecuteDeallocateContent requestBody, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.virtualMachinesExecuteDeallocateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -957,7 +979,7 @@ public Response virtualMachinesExecute */ @ServiceMethod(returns = ReturnType.SINGLE) public DeallocateResourceOperationResponseInner virtualMachinesExecuteDeallocate(String locationparameter, - ExecuteDeallocateRequest requestBody) { + ExecuteDeallocateContent requestBody) { return virtualMachinesExecuteDeallocateWithResponse(locationparameter, requestBody, Context.NONE).getValue(); } @@ -975,7 +997,7 @@ public DeallocateResourceOperationResponseInner virtualMachinesExecuteDeallocate */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> virtualMachinesExecuteHibernateWithResponseAsync( - String locationparameter, ExecuteHibernateRequest requestBody) { + String locationparameter, ExecuteHibernateContent requestBody) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -998,7 +1020,7 @@ private Mono> virtualMachinesE */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono virtualMachinesExecuteHibernateAsync(String locationparameter, - ExecuteHibernateRequest requestBody) { + ExecuteHibernateContent requestBody) { return virtualMachinesExecuteHibernateWithResponseAsync(locationparameter, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1017,7 +1039,7 @@ private Mono virtualMachinesExecuteHibe */ @ServiceMethod(returns = ReturnType.SINGLE) public Response virtualMachinesExecuteHibernateWithResponse( - String locationparameter, ExecuteHibernateRequest requestBody, Context context) { + String locationparameter, ExecuteHibernateContent requestBody, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.virtualMachinesExecuteHibernateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1037,7 +1059,7 @@ public Response virtualMachinesExecuteH */ @ServiceMethod(returns = ReturnType.SINGLE) public HibernateResourceOperationResponseInner virtualMachinesExecuteHibernate(String locationparameter, - ExecuteHibernateRequest requestBody) { + ExecuteHibernateContent requestBody) { return virtualMachinesExecuteHibernateWithResponse(locationparameter, requestBody, Context.NONE).getValue(); } @@ -1054,7 +1076,7 @@ public HibernateResourceOperationResponseInner virtualMachinesExecuteHibernate(S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - virtualMachinesExecuteStartWithResponseAsync(String locationparameter, ExecuteStartRequest requestBody) { + virtualMachinesExecuteStartWithResponseAsync(String locationparameter, ExecuteStartContent requestBody) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -1077,7 +1099,7 @@ public HibernateResourceOperationResponseInner virtualMachinesExecuteHibernate(S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono virtualMachinesExecuteStartAsync(String locationparameter, - ExecuteStartRequest requestBody) { + ExecuteStartContent requestBody) { return virtualMachinesExecuteStartWithResponseAsync(locationparameter, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1096,7 +1118,7 @@ private Mono virtualMachinesExecuteStartAsy */ @ServiceMethod(returns = ReturnType.SINGLE) public Response virtualMachinesExecuteStartWithResponse( - String locationparameter, ExecuteStartRequest requestBody, Context context) { + String locationparameter, ExecuteStartContent requestBody, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.virtualMachinesExecuteStartSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1116,13 +1138,93 @@ public Response virtualMachinesExecuteStart */ @ServiceMethod(returns = ReturnType.SINGLE) public StartResourceOperationResponseInner virtualMachinesExecuteStart(String locationparameter, - ExecuteStartRequest requestBody) { + ExecuteStartContent requestBody) { return virtualMachinesExecuteStartWithResponse(locationparameter, requestBody, Context.NONE).getValue(); } /** - * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, + * this operation is triggered as soon as Computeschedule receives it. + * + * @param locationparameter The location name. + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a create flex request along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + virtualMachinesExecuteCreateFlexWithResponseAsync(String locationparameter, ExecuteCreateFlexContent body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.virtualMachinesExecuteCreateFlex(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), locationparameter, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, + * this operation is triggered as soon as Computeschedule receives it. + * + * @param locationparameter The location name. + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a create flex request on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono + virtualMachinesExecuteCreateFlexAsync(String locationparameter, ExecuteCreateFlexContent body) { + return virtualMachinesExecuteCreateFlexWithResponseAsync(locationparameter, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, + * this operation is triggered as soon as Computeschedule receives it. + * + * @param locationparameter The location name. + * @param body The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a create flex request along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response virtualMachinesExecuteCreateFlexWithResponse( + String locationparameter, ExecuteCreateFlexContent body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.virtualMachinesExecuteCreateFlexSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationparameter, contentType, accept, body, context); + } + + /** + * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, + * this operation is triggered as soon as Computeschedule receives it. + * + * @param locationparameter The location name. + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a create flex request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CreateFlexResourceOperationResponseInner virtualMachinesExecuteCreateFlex(String locationparameter, + ExecuteCreateFlexContent body) { + return virtualMachinesExecuteCreateFlexWithResponse(locationparameter, body, Context.NONE).getValue(); + } + + /** + * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1133,7 +1235,7 @@ public StartResourceOperationResponseInner virtualMachinesExecuteStart(String lo */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - virtualMachinesExecuteCreateWithResponseAsync(String locationparameter, ExecuteCreateRequest requestBody) { + virtualMachinesExecuteCreateWithResponseAsync(String locationparameter, ExecuteCreateContent requestBody) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -1144,8 +1246,8 @@ public StartResourceOperationResponseInner virtualMachinesExecuteStart(String lo } /** - * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1156,14 +1258,14 @@ public StartResourceOperationResponseInner virtualMachinesExecuteStart(String lo */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono virtualMachinesExecuteCreateAsync(String locationparameter, - ExecuteCreateRequest requestBody) { + ExecuteCreateContent requestBody) { return virtualMachinesExecuteCreateWithResponseAsync(locationparameter, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1175,7 +1277,7 @@ private Mono virtualMachinesExecuteCreateA */ @ServiceMethod(returns = ReturnType.SINGLE) public Response virtualMachinesExecuteCreateWithResponse( - String locationparameter, ExecuteCreateRequest requestBody, Context context) { + String locationparameter, ExecuteCreateContent requestBody, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.virtualMachinesExecuteCreateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1183,8 +1285,8 @@ public Response virtualMachinesExecuteCrea } /** - * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1195,13 +1297,13 @@ public Response virtualMachinesExecuteCrea */ @ServiceMethod(returns = ReturnType.SINGLE) public CreateResourceOperationResponseInner virtualMachinesExecuteCreate(String locationparameter, - ExecuteCreateRequest requestBody) { + ExecuteCreateContent requestBody) { return virtualMachinesExecuteCreateWithResponse(locationparameter, requestBody, Context.NONE).getValue(); } /** - * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1212,7 +1314,7 @@ public CreateResourceOperationResponseInner virtualMachinesExecuteCreate(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - virtualMachinesExecuteDeleteWithResponseAsync(String locationparameter, ExecuteDeleteRequest requestBody) { + virtualMachinesExecuteDeleteWithResponseAsync(String locationparameter, ExecuteDeleteContent requestBody) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -1223,8 +1325,8 @@ public CreateResourceOperationResponseInner virtualMachinesExecuteCreate(String } /** - * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1235,14 +1337,14 @@ public CreateResourceOperationResponseInner virtualMachinesExecuteCreate(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono virtualMachinesExecuteDeleteAsync(String locationparameter, - ExecuteDeleteRequest requestBody) { + ExecuteDeleteContent requestBody) { return virtualMachinesExecuteDeleteWithResponseAsync(locationparameter, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1254,7 +1356,7 @@ private Mono virtualMachinesExecuteDeleteA */ @ServiceMethod(returns = ReturnType.SINGLE) public Response virtualMachinesExecuteDeleteWithResponse( - String locationparameter, ExecuteDeleteRequest requestBody, Context context) { + String locationparameter, ExecuteDeleteContent requestBody, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.virtualMachinesExecuteDeleteSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1262,8 +1364,8 @@ public Response virtualMachinesExecuteDele } /** - * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1274,7 +1376,7 @@ public Response virtualMachinesExecuteDele */ @ServiceMethod(returns = ReturnType.SINGLE) public DeleteResourceOperationResponseInner virtualMachinesExecuteDelete(String locationparameter, - ExecuteDeleteRequest requestBody) { + ExecuteDeleteContent requestBody) { return virtualMachinesExecuteDeleteWithResponse(locationparameter, requestBody, Context.NONE).getValue(); } @@ -1291,7 +1393,7 @@ public DeleteResourceOperationResponseInner virtualMachinesExecuteDelete(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> virtualMachinesGetOperationStatusWithResponseAsync( - String locationparameter, GetOperationStatusRequest requestBody) { + String locationparameter, GetOperationStatusContent requestBody) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -1313,7 +1415,7 @@ private Mono> virtualMachinesGetOperat */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono virtualMachinesGetOperationStatusAsync(String locationparameter, - GetOperationStatusRequest requestBody) { + GetOperationStatusContent requestBody) { return virtualMachinesGetOperationStatusWithResponseAsync(locationparameter, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1331,7 +1433,7 @@ private Mono virtualMachinesGetOperationStatusA */ @ServiceMethod(returns = ReturnType.SINGLE) public Response virtualMachinesGetOperationStatusWithResponse( - String locationparameter, GetOperationStatusRequest requestBody, Context context) { + String locationparameter, GetOperationStatusContent requestBody, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.virtualMachinesGetOperationStatusSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1350,7 +1452,7 @@ public Response virtualMachinesGetOperationStat */ @ServiceMethod(returns = ReturnType.SINGLE) public GetOperationStatusResponseInner virtualMachinesGetOperationStatus(String locationparameter, - GetOperationStatusRequest requestBody) { + GetOperationStatusContent requestBody) { return virtualMachinesGetOperationStatusWithResponse(locationparameter, requestBody, Context.NONE).getValue(); } @@ -1367,7 +1469,7 @@ public GetOperationStatusResponseInner virtualMachinesGetOperationStatus(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> virtualMachinesCancelOperationsWithResponseAsync( - String locationparameter, CancelOperationsRequest requestBody) { + String locationparameter, CancelOperationsContent requestBody) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -1389,7 +1491,7 @@ private Mono> virtualMachinesCancelOpera */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono virtualMachinesCancelOperationsAsync(String locationparameter, - CancelOperationsRequest requestBody) { + CancelOperationsContent requestBody) { return virtualMachinesCancelOperationsWithResponseAsync(locationparameter, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1407,7 +1509,7 @@ private Mono virtualMachinesCancelOperationsAsync */ @ServiceMethod(returns = ReturnType.SINGLE) public Response virtualMachinesCancelOperationsWithResponse(String locationparameter, - CancelOperationsRequest requestBody, Context context) { + CancelOperationsContent requestBody, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.virtualMachinesCancelOperationsSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1426,7 +1528,7 @@ public Response virtualMachinesCancelOperationsWi */ @ServiceMethod(returns = ReturnType.SINGLE) public CancelOperationsResponseInner virtualMachinesCancelOperations(String locationparameter, - CancelOperationsRequest requestBody) { + CancelOperationsContent requestBody) { return virtualMachinesCancelOperationsWithResponse(locationparameter, requestBody, Context.NONE).getValue(); } @@ -1444,7 +1546,7 @@ public CancelOperationsResponseInner virtualMachinesCancelOperations(String loca */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> virtualMachinesGetOperationErrorsWithResponseAsync( - String locationparameter, GetOperationErrorsRequest requestBody) { + String locationparameter, GetOperationErrorsContent requestBody) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -1467,7 +1569,7 @@ private Mono> virtualMachinesGetOperat */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono virtualMachinesGetOperationErrorsAsync(String locationparameter, - GetOperationErrorsRequest requestBody) { + GetOperationErrorsContent requestBody) { return virtualMachinesGetOperationErrorsWithResponseAsync(locationparameter, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1486,7 +1588,7 @@ private Mono virtualMachinesGetOperationErrorsA */ @ServiceMethod(returns = ReturnType.SINGLE) public Response virtualMachinesGetOperationErrorsWithResponse( - String locationparameter, GetOperationErrorsRequest requestBody, Context context) { + String locationparameter, GetOperationErrorsContent requestBody, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.virtualMachinesGetOperationErrorsSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1506,7 +1608,7 @@ public Response virtualMachinesGetOperationErro */ @ServiceMethod(returns = ReturnType.SINGLE) public GetOperationErrorsResponseInner virtualMachinesGetOperationErrors(String locationparameter, - GetOperationErrorsRequest requestBody) { + GetOperationErrorsContent requestBody) { return virtualMachinesGetOperationErrorsWithResponse(locationparameter, requestBody, Context.NONE).getValue(); } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java index 64c4a1121324..fa89195e70f3 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java @@ -11,6 +11,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient; import com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner; +import com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.CreateResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.DeleteResourceOperationResponseInner; @@ -23,19 +24,21 @@ import com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionResourceInner; import com.azure.resourcemanager.computeschedule.fluent.models.StartResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.models.CancelOccurrenceRequest; -import com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest; +import com.azure.resourcemanager.computeschedule.models.CancelOperationsContent; import com.azure.resourcemanager.computeschedule.models.CancelOperationsResponse; +import com.azure.resourcemanager.computeschedule.models.CreateFlexResourceOperationResponse; import com.azure.resourcemanager.computeschedule.models.CreateResourceOperationResponse; import com.azure.resourcemanager.computeschedule.models.DeallocateResourceOperationResponse; import com.azure.resourcemanager.computeschedule.models.DeleteResourceOperationResponse; -import com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest; -import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsRequest; +import com.azure.resourcemanager.computeschedule.models.ExecuteCreateContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteCreateFlexContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateContent; +import com.azure.resourcemanager.computeschedule.models.ExecuteStartContent; +import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsContent; import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsResponse; -import com.azure.resourcemanager.computeschedule.models.GetOperationStatusRequest; +import com.azure.resourcemanager.computeschedule.models.GetOperationStatusContent; import com.azure.resourcemanager.computeschedule.models.GetOperationStatusResponse; import com.azure.resourcemanager.computeschedule.models.HibernateResourceOperationResponse; import com.azure.resourcemanager.computeschedule.models.Occurrence; @@ -47,9 +50,9 @@ import com.azure.resourcemanager.computeschedule.models.ScheduledActionResource; import com.azure.resourcemanager.computeschedule.models.ScheduledActions; import com.azure.resourcemanager.computeschedule.models.StartResourceOperationResponse; -import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateRequest; -import com.azure.resourcemanager.computeschedule.models.SubmitHibernateRequest; -import com.azure.resourcemanager.computeschedule.models.SubmitStartRequest; +import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateContent; +import com.azure.resourcemanager.computeschedule.models.SubmitHibernateContent; +import com.azure.resourcemanager.computeschedule.models.SubmitStartContent; public final class ScheduledActionsImpl implements ScheduledActions { private static final ClientLogger LOGGER = new ClientLogger(ScheduledActionsImpl.class); @@ -65,7 +68,7 @@ public ScheduledActionsImpl(ScheduledActionsClient innerClient, } public Response virtualMachinesSubmitDeallocateWithResponse( - String locationparameter, SubmitDeallocateRequest requestBody, Context context) { + String locationparameter, SubmitDeallocateContent requestBody, Context context) { Response inner = this.serviceClient().virtualMachinesSubmitDeallocateWithResponse(locationparameter, requestBody, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), @@ -73,7 +76,7 @@ public Response virtualMachinesSubmitDeallo } public DeallocateResourceOperationResponse virtualMachinesSubmitDeallocate(String locationparameter, - SubmitDeallocateRequest requestBody) { + SubmitDeallocateContent requestBody) { DeallocateResourceOperationResponseInner inner = this.serviceClient().virtualMachinesSubmitDeallocate(locationparameter, requestBody); if (inner != null) { @@ -84,7 +87,7 @@ public DeallocateResourceOperationResponse virtualMachinesSubmitDeallocate(Strin } public Response virtualMachinesSubmitHibernateWithResponse( - String locationparameter, SubmitHibernateRequest requestBody, Context context) { + String locationparameter, SubmitHibernateContent requestBody, Context context) { Response inner = this.serviceClient().virtualMachinesSubmitHibernateWithResponse(locationparameter, requestBody, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), @@ -92,7 +95,7 @@ public Response virtualMachinesSubmitHiberna } public HibernateResourceOperationResponse virtualMachinesSubmitHibernate(String locationparameter, - SubmitHibernateRequest requestBody) { + SubmitHibernateContent requestBody) { HibernateResourceOperationResponseInner inner = this.serviceClient().virtualMachinesSubmitHibernate(locationparameter, requestBody); if (inner != null) { @@ -103,7 +106,7 @@ public HibernateResourceOperationResponse virtualMachinesSubmitHibernate(String } public Response virtualMachinesSubmitStartWithResponse(String locationparameter, - SubmitStartRequest requestBody, Context context) { + SubmitStartContent requestBody, Context context) { Response inner = this.serviceClient().virtualMachinesSubmitStartWithResponse(locationparameter, requestBody, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), @@ -111,7 +114,7 @@ public Response virtualMachinesSubmitStartWithRe } public StartResourceOperationResponse virtualMachinesSubmitStart(String locationparameter, - SubmitStartRequest requestBody) { + SubmitStartContent requestBody) { StartResourceOperationResponseInner inner = this.serviceClient().virtualMachinesSubmitStart(locationparameter, requestBody); if (inner != null) { @@ -122,7 +125,7 @@ public StartResourceOperationResponse virtualMachinesSubmitStart(String location } public Response virtualMachinesExecuteDeallocateWithResponse( - String locationparameter, ExecuteDeallocateRequest requestBody, Context context) { + String locationparameter, ExecuteDeallocateContent requestBody, Context context) { Response inner = this.serviceClient() .virtualMachinesExecuteDeallocateWithResponse(locationparameter, requestBody, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), @@ -130,7 +133,7 @@ public Response virtualMachinesExecuteDeall } public DeallocateResourceOperationResponse virtualMachinesExecuteDeallocate(String locationparameter, - ExecuteDeallocateRequest requestBody) { + ExecuteDeallocateContent requestBody) { DeallocateResourceOperationResponseInner inner = this.serviceClient().virtualMachinesExecuteDeallocate(locationparameter, requestBody); if (inner != null) { @@ -141,7 +144,7 @@ public DeallocateResourceOperationResponse virtualMachinesExecuteDeallocate(Stri } public Response virtualMachinesExecuteHibernateWithResponse( - String locationparameter, ExecuteHibernateRequest requestBody, Context context) { + String locationparameter, ExecuteHibernateContent requestBody, Context context) { Response inner = this.serviceClient().virtualMachinesExecuteHibernateWithResponse(locationparameter, requestBody, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), @@ -149,7 +152,7 @@ public Response virtualMachinesExecuteHibern } public HibernateResourceOperationResponse virtualMachinesExecuteHibernate(String locationparameter, - ExecuteHibernateRequest requestBody) { + ExecuteHibernateContent requestBody) { HibernateResourceOperationResponseInner inner = this.serviceClient().virtualMachinesExecuteHibernate(locationparameter, requestBody); if (inner != null) { @@ -160,7 +163,7 @@ public HibernateResourceOperationResponse virtualMachinesExecuteHibernate(String } public Response virtualMachinesExecuteStartWithResponse(String locationparameter, - ExecuteStartRequest requestBody, Context context) { + ExecuteStartContent requestBody, Context context) { Response inner = this.serviceClient().virtualMachinesExecuteStartWithResponse(locationparameter, requestBody, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), @@ -168,7 +171,7 @@ public Response virtualMachinesExecuteStartWithR } public StartResourceOperationResponse virtualMachinesExecuteStart(String locationparameter, - ExecuteStartRequest requestBody) { + ExecuteStartContent requestBody) { StartResourceOperationResponseInner inner = this.serviceClient().virtualMachinesExecuteStart(locationparameter, requestBody); if (inner != null) { @@ -178,8 +181,27 @@ public StartResourceOperationResponse virtualMachinesExecuteStart(String locatio } } + public Response virtualMachinesExecuteCreateFlexWithResponse( + String locationparameter, ExecuteCreateFlexContent body, Context context) { + Response inner + = this.serviceClient().virtualMachinesExecuteCreateFlexWithResponse(locationparameter, body, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CreateFlexResourceOperationResponseImpl(inner.getValue(), this.manager())); + } + + public CreateFlexResourceOperationResponse virtualMachinesExecuteCreateFlex(String locationparameter, + ExecuteCreateFlexContent body) { + CreateFlexResourceOperationResponseInner inner + = this.serviceClient().virtualMachinesExecuteCreateFlex(locationparameter, body); + if (inner != null) { + return new CreateFlexResourceOperationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public Response virtualMachinesExecuteCreateWithResponse(String locationparameter, - ExecuteCreateRequest requestBody, Context context) { + ExecuteCreateContent requestBody, Context context) { Response inner = this.serviceClient().virtualMachinesExecuteCreateWithResponse(locationparameter, requestBody, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), @@ -187,7 +209,7 @@ public Response virtualMachinesExecuteCreateWit } public CreateResourceOperationResponse virtualMachinesExecuteCreate(String locationparameter, - ExecuteCreateRequest requestBody) { + ExecuteCreateContent requestBody) { CreateResourceOperationResponseInner inner = this.serviceClient().virtualMachinesExecuteCreate(locationparameter, requestBody); if (inner != null) { @@ -198,7 +220,7 @@ public CreateResourceOperationResponse virtualMachinesExecuteCreate(String locat } public Response virtualMachinesExecuteDeleteWithResponse(String locationparameter, - ExecuteDeleteRequest requestBody, Context context) { + ExecuteDeleteContent requestBody, Context context) { Response inner = this.serviceClient().virtualMachinesExecuteDeleteWithResponse(locationparameter, requestBody, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), @@ -206,7 +228,7 @@ public Response virtualMachinesExecuteDeleteWit } public DeleteResourceOperationResponse virtualMachinesExecuteDelete(String locationparameter, - ExecuteDeleteRequest requestBody) { + ExecuteDeleteContent requestBody) { DeleteResourceOperationResponseInner inner = this.serviceClient().virtualMachinesExecuteDelete(locationparameter, requestBody); if (inner != null) { @@ -217,7 +239,7 @@ public DeleteResourceOperationResponse virtualMachinesExecuteDelete(String locat } public Response virtualMachinesGetOperationStatusWithResponse(String locationparameter, - GetOperationStatusRequest requestBody, Context context) { + GetOperationStatusContent requestBody, Context context) { Response inner = this.serviceClient() .virtualMachinesGetOperationStatusWithResponse(locationparameter, requestBody, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), @@ -225,7 +247,7 @@ public Response virtualMachinesGetOperationStatusWit } public GetOperationStatusResponse virtualMachinesGetOperationStatus(String locationparameter, - GetOperationStatusRequest requestBody) { + GetOperationStatusContent requestBody) { GetOperationStatusResponseInner inner = this.serviceClient().virtualMachinesGetOperationStatus(locationparameter, requestBody); if (inner != null) { @@ -236,7 +258,7 @@ public GetOperationStatusResponse virtualMachinesGetOperationStatus(String locat } public Response virtualMachinesCancelOperationsWithResponse(String locationparameter, - CancelOperationsRequest requestBody, Context context) { + CancelOperationsContent requestBody, Context context) { Response inner = this.serviceClient().virtualMachinesCancelOperationsWithResponse(locationparameter, requestBody, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), @@ -244,7 +266,7 @@ public Response virtualMachinesCancelOperationsWithRes } public CancelOperationsResponse virtualMachinesCancelOperations(String locationparameter, - CancelOperationsRequest requestBody) { + CancelOperationsContent requestBody) { CancelOperationsResponseInner inner = this.serviceClient().virtualMachinesCancelOperations(locationparameter, requestBody); if (inner != null) { @@ -255,7 +277,7 @@ public CancelOperationsResponse virtualMachinesCancelOperations(String locationp } public Response virtualMachinesGetOperationErrorsWithResponse(String locationparameter, - GetOperationErrorsRequest requestBody, Context context) { + GetOperationErrorsContent requestBody, Context context) { Response inner = this.serviceClient() .virtualMachinesGetOperationErrorsWithResponse(locationparameter, requestBody, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), @@ -263,7 +285,7 @@ public Response virtualMachinesGetOperationErrorsWit } public GetOperationErrorsResponse virtualMachinesGetOperationErrors(String locationparameter, - GetOperationErrorsRequest requestBody) { + GetOperationErrorsContent requestBody) { GetOperationErrorsResponseInner inner = this.serviceClient().virtualMachinesGetOperationErrors(locationparameter, requestBody); if (inner != null) { diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalCapabilities.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalCapabilities.java new file mode 100644 index 000000000000..d08e9fb8725b --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalCapabilities.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Enables or disables a capability on the virtual machine or virtual machine scale set. + */ +@Fluent +public final class AdditionalCapabilities implements JsonSerializable { + /* + * The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage + * account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual + * machine or virtual machine scale set only if this property is enabled. + */ + private Boolean ultraSSDEnabled; + + /* + * The flag that enables or disables hibernation capability on the VM. + */ + private Boolean hibernationEnabled; + + /** + * Creates an instance of AdditionalCapabilities class. + */ + public AdditionalCapabilities() { + } + + /** + * Get the ultraSSDEnabled property: The flag that enables or disables a capability to have one or more managed data + * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type + * UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. + * + * @return the ultraSSDEnabled value. + */ + public Boolean ultraSSDEnabled() { + return this.ultraSSDEnabled; + } + + /** + * Set the ultraSSDEnabled property: The flag that enables or disables a capability to have one or more managed data + * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type + * UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. + * + * @param ultraSSDEnabled the ultraSSDEnabled value to set. + * @return the AdditionalCapabilities object itself. + */ + public AdditionalCapabilities withUltraSSDEnabled(Boolean ultraSSDEnabled) { + this.ultraSSDEnabled = ultraSSDEnabled; + return this; + } + + /** + * Get the hibernationEnabled property: The flag that enables or disables hibernation capability on the VM. + * + * @return the hibernationEnabled value. + */ + public Boolean hibernationEnabled() { + return this.hibernationEnabled; + } + + /** + * Set the hibernationEnabled property: The flag that enables or disables hibernation capability on the VM. + * + * @param hibernationEnabled the hibernationEnabled value to set. + * @return the AdditionalCapabilities object itself. + */ + public AdditionalCapabilities withHibernationEnabled(Boolean hibernationEnabled) { + this.hibernationEnabled = hibernationEnabled; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("ultraSSDEnabled", this.ultraSSDEnabled); + jsonWriter.writeBooleanField("hibernationEnabled", this.hibernationEnabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdditionalCapabilities from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdditionalCapabilities 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 AdditionalCapabilities. + */ + public static AdditionalCapabilities fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdditionalCapabilities deserializedAdditionalCapabilities = new AdditionalCapabilities(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ultraSSDEnabled".equals(fieldName)) { + deserializedAdditionalCapabilities.ultraSSDEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("hibernationEnabled".equals(fieldName)) { + deserializedAdditionalCapabilities.hibernationEnabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedAdditionalCapabilities; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContent.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContent.java new file mode 100644 index 000000000000..48bcca829ee8 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContent.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by + * Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. + */ +@Fluent +public final class AdditionalUnattendContent implements JsonSerializable { + /* + * The pass name. Currently, the only allowable value is OobeSystem. + */ + private AdditionalUnattendContentPassName passName; + + /* + * The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. + */ + private AdditionalUnattendContentComponentName componentName; + + /* + * Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and + * AutoLogon. + */ + private SettingNames settingName; + + /* + * Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. + * The XML must be less than 4KB and must include the root element for the setting or feature that is being + * inserted. + */ + private String content; + + /** + * Creates an instance of AdditionalUnattendContent class. + */ + public AdditionalUnattendContent() { + } + + /** + * Get the passName property: The pass name. Currently, the only allowable value is OobeSystem. + * + * @return the passName value. + */ + public AdditionalUnattendContentPassName passName() { + return this.passName; + } + + /** + * Set the passName property: The pass name. Currently, the only allowable value is OobeSystem. + * + * @param passName the passName value to set. + * @return the AdditionalUnattendContent object itself. + */ + public AdditionalUnattendContent withPassName(AdditionalUnattendContentPassName passName) { + this.passName = passName; + return this; + } + + /** + * Get the componentName property: The component name. Currently, the only allowable value is + * Microsoft-Windows-Shell-Setup. + * + * @return the componentName value. + */ + public AdditionalUnattendContentComponentName componentName() { + return this.componentName; + } + + /** + * Set the componentName property: The component name. Currently, the only allowable value is + * Microsoft-Windows-Shell-Setup. + * + * @param componentName the componentName value to set. + * @return the AdditionalUnattendContent object itself. + */ + public AdditionalUnattendContent withComponentName(AdditionalUnattendContentComponentName componentName) { + this.componentName = componentName; + return this; + } + + /** + * Get the settingName property: Specifies the name of the setting to which the content applies. Possible values + * are: FirstLogonCommands and AutoLogon. + * + * @return the settingName value. + */ + public SettingNames settingName() { + return this.settingName; + } + + /** + * Set the settingName property: Specifies the name of the setting to which the content applies. Possible values + * are: FirstLogonCommands and AutoLogon. + * + * @param settingName the settingName value to set. + * @return the AdditionalUnattendContent object itself. + */ + public AdditionalUnattendContent withSettingName(SettingNames settingName) { + this.settingName = settingName; + return this; + } + + /** + * Get the content property: Specifies the XML formatted content that is added to the unattend.xml file for the + * specified path and component. The XML must be less than 4KB and must include the root element for the setting or + * feature that is being inserted. + * + * @return the content value. + */ + public String content() { + return this.content; + } + + /** + * Set the content property: Specifies the XML formatted content that is added to the unattend.xml file for the + * specified path and component. The XML must be less than 4KB and must include the root element for the setting or + * feature that is being inserted. + * + * @param content the content value to set. + * @return the AdditionalUnattendContent object itself. + */ + public AdditionalUnattendContent withContent(String content) { + this.content = content; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("passName", this.passName == null ? null : this.passName.toString()); + jsonWriter.writeStringField("componentName", this.componentName == null ? null : this.componentName.toString()); + jsonWriter.writeStringField("settingName", this.settingName == null ? null : this.settingName.toString()); + jsonWriter.writeStringField("content", this.content); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdditionalUnattendContent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdditionalUnattendContent 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 AdditionalUnattendContent. + */ + public static AdditionalUnattendContent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdditionalUnattendContent deserializedAdditionalUnattendContent = new AdditionalUnattendContent(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("passName".equals(fieldName)) { + deserializedAdditionalUnattendContent.passName + = AdditionalUnattendContentPassName.fromString(reader.getString()); + } else if ("componentName".equals(fieldName)) { + deserializedAdditionalUnattendContent.componentName + = AdditionalUnattendContentComponentName.fromString(reader.getString()); + } else if ("settingName".equals(fieldName)) { + deserializedAdditionalUnattendContent.settingName = SettingNames.fromString(reader.getString()); + } else if ("content".equals(fieldName)) { + deserializedAdditionalUnattendContent.content = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdditionalUnattendContent; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentComponentName.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentComponentName.java new file mode 100644 index 000000000000..d51a42cf1f02 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentComponentName.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +/** + * Defines values for AdditionalUnattendContentComponentName. + */ +public enum AdditionalUnattendContentComponentName { + /** + * Enum value Microsoft-Windows-Shell-Setup. + */ + MICROSOFT_WINDOWS_SHELL_SETUP("Microsoft-Windows-Shell-Setup"); + + /** + * The actual serialized value for a AdditionalUnattendContentComponentName instance. + */ + private final String value; + + AdditionalUnattendContentComponentName(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AdditionalUnattendContentComponentName instance. + * + * @param value the serialized value to parse. + * @return the parsed AdditionalUnattendContentComponentName object, or null if unable to parse. + */ + public static AdditionalUnattendContentComponentName fromString(String value) { + if (value == null) { + return null; + } + AdditionalUnattendContentComponentName[] items = AdditionalUnattendContentComponentName.values(); + for (AdditionalUnattendContentComponentName item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentPassName.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentPassName.java new file mode 100644 index 000000000000..876285e32a86 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentPassName.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +/** + * Defines values for AdditionalUnattendContentPassName. + */ +public enum AdditionalUnattendContentPassName { + /** + * Enum value OobeSystem. + */ + OOBE_SYSTEM("OobeSystem"); + + /** + * The actual serialized value for a AdditionalUnattendContentPassName instance. + */ + private final String value; + + AdditionalUnattendContentPassName(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AdditionalUnattendContentPassName instance. + * + * @param value the serialized value to parse. + * @return the parsed AdditionalUnattendContentPassName object, or null if unable to parse. + */ + public static AdditionalUnattendContentPassName fromString(String value) { + if (value == null) { + return null; + } + AdditionalUnattendContentPassName[] items = AdditionalUnattendContentPassName.values(); + for (AdditionalUnattendContentPassName item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllInstancesDown.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllInstancesDown.java new file mode 100644 index 000000000000..822a79848ceb --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllInstancesDown.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies if Scheduled Events should be auto-approved when all instances are down. + */ +@Fluent +public final class AllInstancesDown implements JsonSerializable { + /* + * Specifies if Scheduled Events should be auto-approved when all instances are down. Its default value is true. + */ + private Boolean automaticallyApprove; + + /** + * Creates an instance of AllInstancesDown class. + */ + public AllInstancesDown() { + } + + /** + * Get the automaticallyApprove property: Specifies if Scheduled Events should be auto-approved when all instances + * are down. Its default value is true. + * + * @return the automaticallyApprove value. + */ + public Boolean automaticallyApprove() { + return this.automaticallyApprove; + } + + /** + * Set the automaticallyApprove property: Specifies if Scheduled Events should be auto-approved when all instances + * are down. Its default value is true. + * + * @param automaticallyApprove the automaticallyApprove value to set. + * @return the AllInstancesDown object itself. + */ + public AllInstancesDown withAutomaticallyApprove(Boolean automaticallyApprove) { + this.automaticallyApprove = automaticallyApprove; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("automaticallyApprove", this.automaticallyApprove); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AllInstancesDown from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AllInstancesDown 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 AllInstancesDown. + */ + public static AllInstancesDown fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AllInstancesDown deserializedAllInstancesDown = new AllInstancesDown(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("automaticallyApprove".equals(fieldName)) { + deserializedAllInstancesDown.automaticallyApprove = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedAllInstancesDown; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllocationStrategy.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllocationStrategy.java new file mode 100644 index 000000000000..a7a4e8d4ecd8 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllocationStrategy.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The allocation strategy for VM size selection. + */ +public final class AllocationStrategy extends ExpandableStringEnum { + /** + * Platform prioritizes VM sizes with the lowest hourly cost. + */ + public static final AllocationStrategy LOWEST_PRICE = fromString("LowestPrice"); + + /** + * Customer specifies a rank for each VM size, platform uses VM sizes in rank order. + */ + public static final AllocationStrategy PRIORITIZED = fromString("Prioritized"); + + /** + * Platform prioritizes VM sizes with the highest available capacity first. + */ + public static final AllocationStrategy CAPACITY_OPTIMIZED = fromString("CapacityOptimized"); + + /** + * Creates a new instance of AllocationStrategy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AllocationStrategy() { + } + + /** + * Creates or finds a AllocationStrategy from its string representation. + * + * @param name a name to look for. + * @return the corresponding AllocationStrategy. + */ + public static AllocationStrategy fromString(String name) { + return fromString(name, AllocationStrategy.class); + } + + /** + * Gets known AllocationStrategy values. + * + * @return known AllocationStrategy values. + */ + public static Collection values() { + return values(AllocationStrategy.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApiEntityReference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApiEntityReference.java new file mode 100644 index 000000000000..969e284eb930 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApiEntityReference.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The API entity reference. + */ +@Fluent +public final class ApiEntityReference implements JsonSerializable { + /* + * The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + */ + private String id; + + /** + * Creates an instance of ApiEntityReference class. + */ + public ApiEntityReference() { + } + + /** + * Get the id property: The ARM resource id in the form of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The ARM resource id in the form of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + * + * @param id the id value to set. + * @return the ApiEntityReference object itself. + */ + public ApiEntityReference withId(String id) { + this.id = id; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ApiEntityReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ApiEntityReference 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 ApiEntityReference. + */ + public static ApiEntityReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ApiEntityReference deserializedApiEntityReference = new ApiEntityReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedApiEntityReference.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedApiEntityReference; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApplicationProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApplicationProfile.java new file mode 100644 index 000000000000..6a3f012506aa --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApplicationProfile.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; + +/** + * Contains the list of gallery applications that should be made available to the VM. + */ +@Fluent +public final class ApplicationProfile implements JsonSerializable { + /* + * Specifies the gallery applications that should be made available to the VM + */ + private List galleryApplications; + + /** + * Creates an instance of ApplicationProfile class. + */ + public ApplicationProfile() { + } + + /** + * Get the galleryApplications property: Specifies the gallery applications that should be made available to the VM. + * + * @return the galleryApplications value. + */ + public List galleryApplications() { + return this.galleryApplications; + } + + /** + * Set the galleryApplications property: Specifies the gallery applications that should be made available to the VM. + * + * @param galleryApplications the galleryApplications value to set. + * @return the ApplicationProfile object itself. + */ + public ApplicationProfile withGalleryApplications(List galleryApplications) { + this.galleryApplications = galleryApplications; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("galleryApplications", this.galleryApplications, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ApplicationProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ApplicationProfile 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 ApplicationProfile. + */ + public static ApplicationProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ApplicationProfile deserializedApplicationProfile = new ApplicationProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("galleryApplications".equals(fieldName)) { + List galleryApplications + = reader.readArray(reader1 -> VMGalleryApplication.fromJson(reader1)); + deserializedApplicationProfile.galleryApplications = galleryApplications; + } else { + reader.skipChildren(); + } + } + + return deserializedApplicationProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BootDiagnostics.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BootDiagnostics.java new file mode 100644 index 000000000000..d8e30f370852 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BootDiagnostics.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. + * You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the + * hypervisor. + */ +@Fluent +public final class BootDiagnostics implements JsonSerializable { + /* + * Whether boot diagnostics should be enabled on the Virtual Machine. + */ + private Boolean enabled; + + /* + * Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified + * while enabling boot diagnostics, managed storage will be used. + */ + private String storageUri; + + /** + * Creates an instance of BootDiagnostics class. + */ + public BootDiagnostics() { + } + + /** + * Get the enabled property: Whether boot diagnostics should be enabled on the Virtual Machine. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether boot diagnostics should be enabled on the Virtual Machine. + * + * @param enabled the enabled value to set. + * @return the BootDiagnostics object itself. + */ + public BootDiagnostics withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the storageUri property: Uri of the storage account to use for placing the console output and screenshot. If + * storageUri is not specified while enabling boot diagnostics, managed storage will be used. + * + * @return the storageUri value. + */ + public String storageUri() { + return this.storageUri; + } + + /** + * Set the storageUri property: Uri of the storage account to use for placing the console output and screenshot. If + * storageUri is not specified while enabling boot diagnostics, managed storage will be used. + * + * @param storageUri the storageUri value to set. + * @return the BootDiagnostics object itself. + */ + public BootDiagnostics withStorageUri(String storageUri) { + this.storageUri = storageUri; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("storageUri", this.storageUri); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BootDiagnostics from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BootDiagnostics 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 BootDiagnostics. + */ + public static BootDiagnostics fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BootDiagnostics deserializedBootDiagnostics = new BootDiagnostics(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedBootDiagnostics.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("storageUri".equals(fieldName)) { + deserializedBootDiagnostics.storageUri = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBootDiagnostics; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMExtension.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMExtension.java new file mode 100644 index 000000000000..b39dd1f23789 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMExtension.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Defines a virtual machine extension. + */ +@Fluent +public final class BulkActionVMExtension implements JsonSerializable { + /* + * The name of the virtual machine extension. + */ + private String name; + + /* + * Properties of the virtual machine extension. + */ + private BulkActionVmExtensionProperties properties; + + /** + * Creates an instance of BulkActionVMExtension class. + */ + public BulkActionVMExtension() { + } + + /** + * Get the name property: The name of the virtual machine extension. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the virtual machine extension. + * + * @param name the name value to set. + * @return the BulkActionVMExtension object itself. + */ + public BulkActionVMExtension withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties property: Properties of the virtual machine extension. + * + * @return the properties value. + */ + public BulkActionVmExtensionProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties of the virtual machine extension. + * + * @param properties the properties value to set. + * @return the BulkActionVMExtension object itself. + */ + public BulkActionVMExtension withProperties(BulkActionVmExtensionProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BulkActionVMExtension from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BulkActionVMExtension 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. + * @throws IOException If an error occurs while reading the BulkActionVMExtension. + */ + public static BulkActionVMExtension fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BulkActionVMExtension deserializedBulkActionVMExtension = new BulkActionVMExtension(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedBulkActionVMExtension.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedBulkActionVMExtension.properties = BulkActionVmExtensionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBulkActionVMExtension; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMProfile.java new file mode 100644 index 000000000000..f189e6552c3a --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMProfile.java @@ -0,0 +1,466 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the properties of a Virtual Machine for create. + */ +@Fluent +public final class BulkActionVMProfile implements JsonSerializable { + /* + * Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations + * for the virtual machine. + */ + private ScheduledEventsPolicy scheduledEventsPolicy; + + /* + * Specifies the storage settings for the virtual machine disks. + */ + private StorageProfile storageProfile; + + /* + * Specifies additional capabilities enabled or disabled on the virtual machine. + */ + private AdditionalCapabilities additionalCapabilities; + + /* + * Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be + * changed once VM is provisioned. + */ + private OSProfile osProfile; + + /* + * Specifies the network interfaces of the virtual machine. + */ + private NetworkProfile networkProfile; + + /* + * Specifies the Security related profile settings for the virtual machine. + */ + private SecurityProfile securityProfile; + + /* + * Specifies the boot diagnostic settings state. Minimum compute api-version: 2015-06-15. + */ + private DiagnosticsProfile diagnosticsProfile; + + /* + * Specifies that the image or disk that is being used was licensed on-premises.

Possible values for + * Windows Server operating system are:

Windows_Client

Windows_Server

Possible values for + * Linux Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more + * information, see [Azure Hybrid Use Benefit for Windows + * Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

[Azure + * Hybrid Use Benefit for Linux + * Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum + * api-version: 2015-06-15 + */ + private String licenseType; + + /* + * Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 + * minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). + * Minimum compute api-version: 2020-06-01. + */ + private String extensionsTimeBudget; + + /* + * Specifies Scheduled Event related configurations. + */ + private ScheduledEventsProfile scheduledEventsProfile; + + /* + * UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum compute + * api-version: 2021-03-01. + */ + private String userData; + + /* + * Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum compute + * api-version: 2021-04-01. + */ + private CapacityReservationProfile capacityReservation; + + /* + * Specifies the gallery applications that should be made available to the VM. + */ + private ApplicationProfile applicationProfile; + + /** + * Creates an instance of BulkActionVMProfile class. + */ + public BulkActionVMProfile() { + } + + /** + * Get the scheduledEventsPolicy property: Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets + * Scheduled Event related configurations for the virtual machine. + * + * @return the scheduledEventsPolicy value. + */ + public ScheduledEventsPolicy scheduledEventsPolicy() { + return this.scheduledEventsPolicy; + } + + /** + * Set the scheduledEventsPolicy property: Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets + * Scheduled Event related configurations for the virtual machine. + * + * @param scheduledEventsPolicy the scheduledEventsPolicy value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withScheduledEventsPolicy(ScheduledEventsPolicy scheduledEventsPolicy) { + this.scheduledEventsPolicy = scheduledEventsPolicy; + return this; + } + + /** + * Get the storageProfile property: Specifies the storage settings for the virtual machine disks. + * + * @return the storageProfile value. + */ + public StorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Set the storageProfile property: Specifies the storage settings for the virtual machine disks. + * + * @param storageProfile the storageProfile value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withStorageProfile(StorageProfile storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get the additionalCapabilities property: Specifies additional capabilities enabled or disabled on the virtual + * machine. + * + * @return the additionalCapabilities value. + */ + public AdditionalCapabilities additionalCapabilities() { + return this.additionalCapabilities; + } + + /** + * Set the additionalCapabilities property: Specifies additional capabilities enabled or disabled on the virtual + * machine. + * + * @param additionalCapabilities the additionalCapabilities value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withAdditionalCapabilities(AdditionalCapabilities additionalCapabilities) { + this.additionalCapabilities = additionalCapabilities; + return this; + } + + /** + * Get the osProfile property: Specifies the operating system settings used while creating the virtual machine. Some + * of the settings cannot be changed once VM is provisioned. + * + * @return the osProfile value. + */ + public OSProfile osProfile() { + return this.osProfile; + } + + /** + * Set the osProfile property: Specifies the operating system settings used while creating the virtual machine. Some + * of the settings cannot be changed once VM is provisioned. + * + * @param osProfile the osProfile value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withOsProfile(OSProfile osProfile) { + this.osProfile = osProfile; + return this; + } + + /** + * Get the networkProfile property: Specifies the network interfaces of the virtual machine. + * + * @return the networkProfile value. + */ + public NetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: Specifies the network interfaces of the virtual machine. + * + * @param networkProfile the networkProfile value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withNetworkProfile(NetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get the securityProfile property: Specifies the Security related profile settings for the virtual machine. + * + * @return the securityProfile value. + */ + public SecurityProfile securityProfile() { + return this.securityProfile; + } + + /** + * Set the securityProfile property: Specifies the Security related profile settings for the virtual machine. + * + * @param securityProfile the securityProfile value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withSecurityProfile(SecurityProfile securityProfile) { + this.securityProfile = securityProfile; + return this; + } + + /** + * Get the diagnosticsProfile property: Specifies the boot diagnostic settings state. Minimum compute api-version: + * 2015-06-15. + * + * @return the diagnosticsProfile value. + */ + public DiagnosticsProfile diagnosticsProfile() { + return this.diagnosticsProfile; + } + + /** + * Set the diagnosticsProfile property: Specifies the boot diagnostic settings state. Minimum compute api-version: + * 2015-06-15. + * + * @param diagnosticsProfile the diagnosticsProfile value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withDiagnosticsProfile(DiagnosticsProfile diagnosticsProfile) { + this.diagnosticsProfile = diagnosticsProfile; + return this; + } + + /** + * Get the licenseType property: Specifies that the image or disk that is being used was licensed on-premises. + * <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client + * <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: + * <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more + * information, see [Azure Hybrid Use Benefit for Windows + * Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) + * <br><br> [Azure Hybrid Use Benefit for Linux + * Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> + * Minimum api-version: 2015-06-15. + * + * @return the licenseType value. + */ + public String licenseType() { + return this.licenseType; + } + + /** + * Set the licenseType property: Specifies that the image or disk that is being used was licensed on-premises. + * <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client + * <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: + * <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more + * information, see [Azure Hybrid Use Benefit for Windows + * Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) + * <br><br> [Azure Hybrid Use Benefit for Linux + * Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> + * Minimum api-version: 2015-06-15. + * + * @param licenseType the licenseType value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withLicenseType(String licenseType) { + this.licenseType = licenseType; + return this; + } + + /** + * Get the extensionsTimeBudget property: Specifies the time alloted for all extensions to start. The time duration + * should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default + * value is 90 minutes (PT1H30M). Minimum compute api-version: 2020-06-01. + * + * @return the extensionsTimeBudget value. + */ + public String extensionsTimeBudget() { + return this.extensionsTimeBudget; + } + + /** + * Set the extensionsTimeBudget property: Specifies the time alloted for all extensions to start. The time duration + * should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default + * value is 90 minutes (PT1H30M). Minimum compute api-version: 2020-06-01. + * + * @param extensionsTimeBudget the extensionsTimeBudget value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withExtensionsTimeBudget(String extensionsTimeBudget) { + this.extensionsTimeBudget = extensionsTimeBudget; + return this; + } + + /** + * Get the scheduledEventsProfile property: Specifies Scheduled Event related configurations. + * + * @return the scheduledEventsProfile value. + */ + public ScheduledEventsProfile scheduledEventsProfile() { + return this.scheduledEventsProfile; + } + + /** + * Set the scheduledEventsProfile property: Specifies Scheduled Event related configurations. + * + * @param scheduledEventsProfile the scheduledEventsProfile value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withScheduledEventsProfile(ScheduledEventsProfile scheduledEventsProfile) { + this.scheduledEventsProfile = scheduledEventsProfile; + return this; + } + + /** + * Get the userData property: UserData for the VM, which must be base-64 encoded. Customer should not pass any + * secrets in here. Minimum compute api-version: 2021-03-01. + * + * @return the userData value. + */ + public String userData() { + return this.userData; + } + + /** + * Set the userData property: UserData for the VM, which must be base-64 encoded. Customer should not pass any + * secrets in here. Minimum compute api-version: 2021-03-01. + * + * @param userData the userData value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withUserData(String userData) { + this.userData = userData; + return this; + } + + /** + * Get the capacityReservation property: Specifies information about the capacity reservation that is used to + * allocate virtual machine. Minimum compute api-version: 2021-04-01. + * + * @return the capacityReservation value. + */ + public CapacityReservationProfile capacityReservation() { + return this.capacityReservation; + } + + /** + * Set the capacityReservation property: Specifies information about the capacity reservation that is used to + * allocate virtual machine. Minimum compute api-version: 2021-04-01. + * + * @param capacityReservation the capacityReservation value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withCapacityReservation(CapacityReservationProfile capacityReservation) { + this.capacityReservation = capacityReservation; + return this; + } + + /** + * Get the applicationProfile property: Specifies the gallery applications that should be made available to the VM. + * + * @return the applicationProfile value. + */ + public ApplicationProfile applicationProfile() { + return this.applicationProfile; + } + + /** + * Set the applicationProfile property: Specifies the gallery applications that should be made available to the VM. + * + * @param applicationProfile the applicationProfile value to set. + * @return the BulkActionVMProfile object itself. + */ + public BulkActionVMProfile withApplicationProfile(ApplicationProfile applicationProfile) { + this.applicationProfile = applicationProfile; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("scheduledEventsPolicy", this.scheduledEventsPolicy); + jsonWriter.writeJsonField("storageProfile", this.storageProfile); + jsonWriter.writeJsonField("additionalCapabilities", this.additionalCapabilities); + jsonWriter.writeJsonField("osProfile", this.osProfile); + jsonWriter.writeJsonField("networkProfile", this.networkProfile); + jsonWriter.writeJsonField("securityProfile", this.securityProfile); + jsonWriter.writeJsonField("diagnosticsProfile", this.diagnosticsProfile); + jsonWriter.writeStringField("licenseType", this.licenseType); + jsonWriter.writeStringField("extensionsTimeBudget", this.extensionsTimeBudget); + jsonWriter.writeJsonField("scheduledEventsProfile", this.scheduledEventsProfile); + jsonWriter.writeStringField("userData", this.userData); + jsonWriter.writeJsonField("capacityReservation", this.capacityReservation); + jsonWriter.writeJsonField("applicationProfile", this.applicationProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BulkActionVMProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BulkActionVMProfile 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 BulkActionVMProfile. + */ + public static BulkActionVMProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BulkActionVMProfile deserializedBulkActionVMProfile = new BulkActionVMProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scheduledEventsPolicy".equals(fieldName)) { + deserializedBulkActionVMProfile.scheduledEventsPolicy = ScheduledEventsPolicy.fromJson(reader); + } else if ("storageProfile".equals(fieldName)) { + deserializedBulkActionVMProfile.storageProfile = StorageProfile.fromJson(reader); + } else if ("additionalCapabilities".equals(fieldName)) { + deserializedBulkActionVMProfile.additionalCapabilities = AdditionalCapabilities.fromJson(reader); + } else if ("osProfile".equals(fieldName)) { + deserializedBulkActionVMProfile.osProfile = OSProfile.fromJson(reader); + } else if ("networkProfile".equals(fieldName)) { + deserializedBulkActionVMProfile.networkProfile = NetworkProfile.fromJson(reader); + } else if ("securityProfile".equals(fieldName)) { + deserializedBulkActionVMProfile.securityProfile = SecurityProfile.fromJson(reader); + } else if ("diagnosticsProfile".equals(fieldName)) { + deserializedBulkActionVMProfile.diagnosticsProfile = DiagnosticsProfile.fromJson(reader); + } else if ("licenseType".equals(fieldName)) { + deserializedBulkActionVMProfile.licenseType = reader.getString(); + } else if ("extensionsTimeBudget".equals(fieldName)) { + deserializedBulkActionVMProfile.extensionsTimeBudget = reader.getString(); + } else if ("scheduledEventsProfile".equals(fieldName)) { + deserializedBulkActionVMProfile.scheduledEventsProfile = ScheduledEventsProfile.fromJson(reader); + } else if ("userData".equals(fieldName)) { + deserializedBulkActionVMProfile.userData = reader.getString(); + } else if ("capacityReservation".equals(fieldName)) { + deserializedBulkActionVMProfile.capacityReservation = CapacityReservationProfile.fromJson(reader); + } else if ("applicationProfile".equals(fieldName)) { + deserializedBulkActionVMProfile.applicationProfile = ApplicationProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBulkActionVMProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMSpec.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMSpec.java new file mode 100644 index 000000000000..a493aa080fc2 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMSpec.java @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; +import java.util.Map; + +/** + * Specifies the properties of a Virtual Machine. + */ +@Fluent +public final class BulkActionVMSpec implements JsonSerializable { + /* + * The marketplace image plan used for the virtual machine. + */ + private Plan plan; + + /* + * The availability zones. + */ + private List zones; + + /* + * The identity of the virtual machine, if configured. + */ + private VirtualMachineIdentity identity; + + /* + * The extended location of the Virtual Machine. + */ + private ExtendedLocation extendedLocation; + + /* + * Placement constraints for virtual machine hardware placement - see + * specification/compute/Compute.Management/models.tsp#Placement + */ + private Placement placement; + + /* + * Resource tags to apply to the virtual machines created by this bulk action. + */ + private Map tags; + + /* + * Describes the properties of a Virtual Machine. + */ + private BulkActionVMProfile vmProperties; + + /** + * Creates an instance of BulkActionVMSpec class. + */ + public BulkActionVMSpec() { + } + + /** + * Get the plan property: The marketplace image plan used for the virtual machine. + * + * @return the plan value. + */ + public Plan plan() { + return this.plan; + } + + /** + * Set the plan property: The marketplace image plan used for the virtual machine. + * + * @param plan the plan value to set. + * @return the BulkActionVMSpec object itself. + */ + public BulkActionVMSpec withPlan(Plan plan) { + this.plan = plan; + return this; + } + + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the BulkActionVMSpec object itself. + */ + public BulkActionVMSpec withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get the identity property: The identity of the virtual machine, if configured. + * + * @return the identity value. + */ + public VirtualMachineIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the virtual machine, if configured. + * + * @param identity the identity value to set. + * @return the BulkActionVMSpec object itself. + */ + public BulkActionVMSpec withIdentity(VirtualMachineIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the extendedLocation property: The extended location of the Virtual Machine. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The extended location of the Virtual Machine. + * + * @param extendedLocation the extendedLocation value to set. + * @return the BulkActionVMSpec object itself. + */ + public BulkActionVMSpec withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the placement property: Placement constraints for virtual machine hardware placement - see + * specification/compute/Compute.Management/models.tsp#Placement. + * + * @return the placement value. + */ + public Placement placement() { + return this.placement; + } + + /** + * Set the placement property: Placement constraints for virtual machine hardware placement - see + * specification/compute/Compute.Management/models.tsp#Placement. + * + * @param placement the placement value to set. + * @return the BulkActionVMSpec object itself. + */ + public BulkActionVMSpec withPlacement(Placement placement) { + this.placement = placement; + return this; + } + + /** + * Get the tags property: Resource tags to apply to the virtual machines created by this bulk action. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags to apply to the virtual machines created by this bulk action. + * + * @param tags the tags value to set. + * @return the BulkActionVMSpec object itself. + */ + public BulkActionVMSpec withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the vmProperties property: Describes the properties of a Virtual Machine. + * + * @return the vmProperties value. + */ + public BulkActionVMProfile vmProperties() { + return this.vmProperties; + } + + /** + * Set the vmProperties property: Describes the properties of a Virtual Machine. + * + * @param vmProperties the vmProperties value to set. + * @return the BulkActionVMSpec object itself. + */ + public BulkActionVMSpec withVmProperties(BulkActionVMProfile vmProperties) { + this.vmProperties = vmProperties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("plan", this.plan); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); + jsonWriter.writeJsonField("placement", this.placement); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("vmProperties", this.vmProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BulkActionVMSpec from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BulkActionVMSpec 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 BulkActionVMSpec. + */ + public static BulkActionVMSpec fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BulkActionVMSpec deserializedBulkActionVMSpec = new BulkActionVMSpec(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("plan".equals(fieldName)) { + deserializedBulkActionVMSpec.plan = Plan.fromJson(reader); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedBulkActionVMSpec.zones = zones; + } else if ("identity".equals(fieldName)) { + deserializedBulkActionVMSpec.identity = VirtualMachineIdentity.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedBulkActionVMSpec.extendedLocation = ExtendedLocation.fromJson(reader); + } else if ("placement".equals(fieldName)) { + deserializedBulkActionVMSpec.placement = Placement.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedBulkActionVMSpec.tags = tags; + } else if ("vmProperties".equals(fieldName)) { + deserializedBulkActionVMSpec.vmProperties = BulkActionVMProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBulkActionVMSpec; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVmExtensionProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVmExtensionProperties.java new file mode 100644 index 000000000000..5ca78f1575e2 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVmExtensionProperties.java @@ -0,0 +1,415 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.BinaryData; +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.util.List; +import java.util.Map; + +/** + * Describes the properties of a Virtual Machine Extension. + */ +@Fluent +public final class BulkActionVmExtensionProperties implements JsonSerializable { + /* + * How the extension handler should be forced to update even if the extension configuration has not changed. + */ + private String forceUpdateTag; + + /* + * The name of the extension handler publisher. + */ + private String publisher; + + /* + * Specifies the type of the extension; an example is 'CustomScriptExtension'. + */ + private String type; + + /* + * Specifies the version of the script handler. + */ + private String typeHandlerVersion; + + /* + * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once + * deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set + * to true. + */ + private Boolean autoUpgradeMinorVersion; + + /* + * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of + * the extension available. + */ + private Boolean enableAutomaticUpgrade; + + /* + * JSON formatted public settings for the extension. + */ + private Map settings; + + /* + * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at + * all. + */ + private Map protectedSettings; + + /* + * Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not + * connecting to the VM will not be suppressed regardless of this value). The default is false. + */ + private Boolean suppressFailures; + + /* + * The extensions protected settings that are passed by reference, and consumed from key vault + */ + private KeyVaultSecretReference protectedSettingsFromKeyVault; + + /* + * Collection of extension names after which this extension needs to be provisioned. + */ + private List provisionAfterExtensions; + + /** + * Creates an instance of BulkActionVmExtensionProperties class. + */ + public BulkActionVmExtensionProperties() { + } + + /** + * Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension + * configuration has not changed. + * + * @return the forceUpdateTag value. + */ + public String forceUpdateTag() { + return this.forceUpdateTag; + } + + /** + * Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension + * configuration has not changed. + * + * @param forceUpdateTag the forceUpdateTag value to set. + * @return the BulkActionVmExtensionProperties object itself. + */ + public BulkActionVmExtensionProperties withForceUpdateTag(String forceUpdateTag) { + this.forceUpdateTag = forceUpdateTag; + return this; + } + + /** + * Get the publisher property: The name of the extension handler publisher. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: The name of the extension handler publisher. + * + * @param publisher the publisher value to set. + * @return the BulkActionVmExtensionProperties object itself. + */ + public BulkActionVmExtensionProperties withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the type property: Specifies the type of the extension; an example is 'CustomScriptExtension'. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Specifies the type of the extension; an example is 'CustomScriptExtension'. + * + * @param type the type value to set. + * @return the BulkActionVmExtensionProperties object itself. + */ + public BulkActionVmExtensionProperties withType(String type) { + this.type = type; + return this; + } + + /** + * Get the typeHandlerVersion property: Specifies the version of the script handler. + * + * @return the typeHandlerVersion value. + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Set the typeHandlerVersion property: Specifies the version of the script handler. + * + * @param typeHandlerVersion the typeHandlerVersion value to set. + * @return the BulkActionVmExtensionProperties object itself. + */ + public BulkActionVmExtensionProperties withTypeHandlerVersion(String typeHandlerVersion) { + this.typeHandlerVersion = typeHandlerVersion; + return this; + } + + /** + * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless + * redeployed, even with this property set to true. + * + * @return the autoUpgradeMinorVersion value. + */ + public Boolean autoUpgradeMinorVersion() { + return this.autoUpgradeMinorVersion; + } + + /** + * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless + * redeployed, even with this property set to true. + * + * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set. + * @return the BulkActionVmExtensionProperties object itself. + */ + public BulkActionVmExtensionProperties withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; + return this; + } + + /** + * Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version of the extension available. + * + * @return the enableAutomaticUpgrade value. + */ + public Boolean enableAutomaticUpgrade() { + return this.enableAutomaticUpgrade; + } + + /** + * Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version of the extension available. + * + * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. + * @return the BulkActionVmExtensionProperties object itself. + */ + public BulkActionVmExtensionProperties withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { + this.enableAutomaticUpgrade = enableAutomaticUpgrade; + return this; + } + + /** + * Get the settings property: JSON formatted public settings for the extension. + * + * @return the settings value. + */ + public Map settings() { + return this.settings; + } + + /** + * Set the settings property: JSON formatted public settings for the extension. + * + * @param settings the settings value to set. + * @return the BulkActionVmExtensionProperties object itself. + */ + public BulkActionVmExtensionProperties withSettings(Map settings) { + this.settings = settings; + return this; + } + + /** + * Get the protectedSettings property: The extension can contain either protectedSettings or + * protectedSettingsFromKeyVault or no protected settings at all. + * + * @return the protectedSettings value. + */ + public Map protectedSettings() { + return this.protectedSettings; + } + + /** + * Set the protectedSettings property: The extension can contain either protectedSettings or + * protectedSettingsFromKeyVault or no protected settings at all. + * + * @param protectedSettings the protectedSettings value to set. + * @return the BulkActionVmExtensionProperties object itself. + */ + public BulkActionVmExtensionProperties withProtectedSettings(Map protectedSettings) { + this.protectedSettings = protectedSettings; + return this; + } + + /** + * Get the suppressFailures property: Indicates whether failures stemming from the extension will be suppressed + * (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The + * default is false. + * + * @return the suppressFailures value. + */ + public Boolean suppressFailures() { + return this.suppressFailures; + } + + /** + * Set the suppressFailures property: Indicates whether failures stemming from the extension will be suppressed + * (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The + * default is false. + * + * @param suppressFailures the suppressFailures value to set. + * @return the BulkActionVmExtensionProperties object itself. + */ + public BulkActionVmExtensionProperties withSuppressFailures(Boolean suppressFailures) { + this.suppressFailures = suppressFailures; + return this; + } + + /** + * Get the protectedSettingsFromKeyVault property: The extensions protected settings that are passed by reference, + * and consumed from key vault. + * + * @return the protectedSettingsFromKeyVault value. + */ + public KeyVaultSecretReference protectedSettingsFromKeyVault() { + return this.protectedSettingsFromKeyVault; + } + + /** + * Set the protectedSettingsFromKeyVault property: The extensions protected settings that are passed by reference, + * and consumed from key vault. + * + * @param protectedSettingsFromKeyVault the protectedSettingsFromKeyVault value to set. + * @return the BulkActionVmExtensionProperties object itself. + */ + public BulkActionVmExtensionProperties + withProtectedSettingsFromKeyVault(KeyVaultSecretReference protectedSettingsFromKeyVault) { + this.protectedSettingsFromKeyVault = protectedSettingsFromKeyVault; + return this; + } + + /** + * Get the provisionAfterExtensions property: Collection of extension names after which this extension needs to be + * provisioned. + * + * @return the provisionAfterExtensions value. + */ + public List provisionAfterExtensions() { + return this.provisionAfterExtensions; + } + + /** + * Set the provisionAfterExtensions property: Collection of extension names after which this extension needs to be + * provisioned. + * + * @param provisionAfterExtensions the provisionAfterExtensions value to set. + * @return the BulkActionVmExtensionProperties object itself. + */ + public BulkActionVmExtensionProperties withProvisionAfterExtensions(List provisionAfterExtensions) { + this.provisionAfterExtensions = provisionAfterExtensions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("forceUpdateTag", this.forceUpdateTag); + jsonWriter.writeStringField("publisher", this.publisher); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("typeHandlerVersion", this.typeHandlerVersion); + jsonWriter.writeBooleanField("autoUpgradeMinorVersion", this.autoUpgradeMinorVersion); + jsonWriter.writeBooleanField("enableAutomaticUpgrade", this.enableAutomaticUpgrade); + jsonWriter.writeMapField("settings", this.settings, (writer, element) -> { + if (element == null) { + writer.writeNull(); + } else { + element.writeTo(writer); + } + }); + jsonWriter.writeMapField("protectedSettings", this.protectedSettings, (writer, element) -> { + if (element == null) { + writer.writeNull(); + } else { + element.writeTo(writer); + } + }); + jsonWriter.writeBooleanField("suppressFailures", this.suppressFailures); + jsonWriter.writeJsonField("protectedSettingsFromKeyVault", this.protectedSettingsFromKeyVault); + jsonWriter.writeArrayField("provisionAfterExtensions", this.provisionAfterExtensions, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BulkActionVmExtensionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BulkActionVmExtensionProperties 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 BulkActionVmExtensionProperties. + */ + public static BulkActionVmExtensionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BulkActionVmExtensionProperties deserializedBulkActionVmExtensionProperties + = new BulkActionVmExtensionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("forceUpdateTag".equals(fieldName)) { + deserializedBulkActionVmExtensionProperties.forceUpdateTag = reader.getString(); + } else if ("publisher".equals(fieldName)) { + deserializedBulkActionVmExtensionProperties.publisher = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedBulkActionVmExtensionProperties.type = reader.getString(); + } else if ("typeHandlerVersion".equals(fieldName)) { + deserializedBulkActionVmExtensionProperties.typeHandlerVersion = reader.getString(); + } else if ("autoUpgradeMinorVersion".equals(fieldName)) { + deserializedBulkActionVmExtensionProperties.autoUpgradeMinorVersion + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableAutomaticUpgrade".equals(fieldName)) { + deserializedBulkActionVmExtensionProperties.enableAutomaticUpgrade + = reader.getNullable(JsonReader::getBoolean); + } else if ("settings".equals(fieldName)) { + Map settings = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedBulkActionVmExtensionProperties.settings = settings; + } else if ("protectedSettings".equals(fieldName)) { + Map protectedSettings = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedBulkActionVmExtensionProperties.protectedSettings = protectedSettings; + } else if ("suppressFailures".equals(fieldName)) { + deserializedBulkActionVmExtensionProperties.suppressFailures + = reader.getNullable(JsonReader::getBoolean); + } else if ("protectedSettingsFromKeyVault".equals(fieldName)) { + deserializedBulkActionVmExtensionProperties.protectedSettingsFromKeyVault + = KeyVaultSecretReference.fromJson(reader); + } else if ("provisionAfterExtensions".equals(fieldName)) { + List provisionAfterExtensions = reader.readArray(reader1 -> reader1.getString()); + deserializedBulkActionVmExtensionProperties.provisionAfterExtensions = provisionAfterExtensions; + } else { + reader.skipChildren(); + } + } + + return deserializedBulkActionVmExtensionProperties; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkVMConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkVMConfiguration.java new file mode 100644 index 000000000000..a5e6ecfbed48 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkVMConfiguration.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; + +/** + * Specifies the configuration for a virtual machine operation. + */ +@Fluent +public final class BulkVMConfiguration implements JsonSerializable { + /* + * Virtual Machine Profile to configure Virtual Machines - mirrors Microsoft.Compute VirtualMachine structure + */ + private BulkActionVMSpec vmProperties; + + /* + * Virtual Machine Extensions Array to be applied to the Virtual Machines. + */ + private List extensions; + + /* + * Specifies the Microsoft.Compute API version to use when creating underlying Virtual Machines. + */ + private String computeApiVersion; + + /* + * identifier for created virtual machine, if not passed it will create one from resource prefix. + */ + private String name; + + /** + * Creates an instance of BulkVMConfiguration class. + */ + public BulkVMConfiguration() { + } + + /** + * Get the vmProperties property: Virtual Machine Profile to configure Virtual Machines - mirrors Microsoft.Compute + * VirtualMachine structure. + * + * @return the vmProperties value. + */ + public BulkActionVMSpec vmProperties() { + return this.vmProperties; + } + + /** + * Set the vmProperties property: Virtual Machine Profile to configure Virtual Machines - mirrors Microsoft.Compute + * VirtualMachine structure. + * + * @param vmProperties the vmProperties value to set. + * @return the BulkVMConfiguration object itself. + */ + public BulkVMConfiguration withVmProperties(BulkActionVMSpec vmProperties) { + this.vmProperties = vmProperties; + return this; + } + + /** + * Get the extensions property: Virtual Machine Extensions Array to be applied to the Virtual Machines. + * + * @return the extensions value. + */ + public List extensions() { + return this.extensions; + } + + /** + * Set the extensions property: Virtual Machine Extensions Array to be applied to the Virtual Machines. + * + * @param extensions the extensions value to set. + * @return the BulkVMConfiguration object itself. + */ + public BulkVMConfiguration withExtensions(List extensions) { + this.extensions = extensions; + return this; + } + + /** + * Get the computeApiVersion property: Specifies the Microsoft.Compute API version to use when creating underlying + * Virtual Machines. + * + * @return the computeApiVersion value. + */ + public String computeApiVersion() { + return this.computeApiVersion; + } + + /** + * Set the computeApiVersion property: Specifies the Microsoft.Compute API version to use when creating underlying + * Virtual Machines. + * + * @param computeApiVersion the computeApiVersion value to set. + * @return the BulkVMConfiguration object itself. + */ + public BulkVMConfiguration withComputeApiVersion(String computeApiVersion) { + this.computeApiVersion = computeApiVersion; + return this; + } + + /** + * Get the name property: identifier for created virtual machine, if not passed it will create one from resource + * prefix. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: identifier for created virtual machine, if not passed it will create one from resource + * prefix. + * + * @param name the name value to set. + * @return the BulkVMConfiguration object itself. + */ + public BulkVMConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("vmProperties", this.vmProperties); + jsonWriter.writeArrayField("extensions", this.extensions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("computeApiVersion", this.computeApiVersion); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BulkVMConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BulkVMConfiguration 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 BulkVMConfiguration. + */ + public static BulkVMConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BulkVMConfiguration deserializedBulkVMConfiguration = new BulkVMConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vmProperties".equals(fieldName)) { + deserializedBulkVMConfiguration.vmProperties = BulkActionVMSpec.fromJson(reader); + } else if ("extensions".equals(fieldName)) { + List extensions + = reader.readArray(reader1 -> BulkActionVMExtension.fromJson(reader1)); + deserializedBulkVMConfiguration.extensions = extensions; + } else if ("computeApiVersion".equals(fieldName)) { + deserializedBulkVMConfiguration.computeApiVersion = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedBulkVMConfiguration.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBulkVMConfiguration; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CachingTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CachingTypes.java new file mode 100644 index 000000000000..590fc0022cf3 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CachingTypes.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values + * are: **None for Standard storage. ReadOnly for Premium storage**. + */ +public final class CachingTypes extends ExpandableStringEnum { + /** + * Caching type:None. + */ + public static final CachingTypes NONE = fromString("None"); + + /** + * Caching type:ReadOnly. + */ + public static final CachingTypes READ_ONLY = fromString("ReadOnly"); + + /** + * Caching type:ReadWrite. + */ + public static final CachingTypes READ_WRITE = fromString("ReadWrite"); + + /** + * Creates a new instance of CachingTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CachingTypes() { + } + + /** + * Creates or finds a CachingTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding CachingTypes. + */ + public static CachingTypes fromString(String name) { + return fromString(name, CachingTypes.class); + } + + /** + * Gets known CachingTypes values. + * + * @return known CachingTypes values. + */ + public static Collection values() { + return values(CachingTypes.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsContent.java similarity index 76% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsRequest.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsContent.java index f34ede3d5957..1de627e7f110 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsRequest.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsContent.java @@ -16,7 +16,7 @@ * This is the request to cancel running operations in scheduled actions using the operation ids. */ @Fluent -public final class CancelOperationsRequest implements JsonSerializable { +public final class CancelOperationsContent implements JsonSerializable { /* * The list of operation ids to cancel operations on */ @@ -28,9 +28,9 @@ public final class CancelOperationsRequest implements JsonSerializable operationIds() { * Set the operationIds property: The list of operation ids to cancel operations on. * * @param operationIds the operationIds value to set. - * @return the CancelOperationsRequest object itself. + * @return the CancelOperationsContent object itself. */ - public CancelOperationsRequest withOperationIds(List operationIds) { + public CancelOperationsContent withOperationIds(List operationIds) { this.operationIds = operationIds; return this; } @@ -66,9 +66,9 @@ public String correlationid() { * Set the correlationid property: CorrelationId item. * * @param correlationid the correlationid value to set. - * @return the CancelOperationsRequest object itself. + * @return the CancelOperationsContent object itself. */ - public CancelOperationsRequest withCorrelationid(String correlationid) { + public CancelOperationsContent withCorrelationid(String correlationid) { this.correlationid = correlationid; return this; } @@ -85,32 +85,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of CancelOperationsRequest from the JsonReader. + * Reads an instance of CancelOperationsContent from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of CancelOperationsRequest if the JsonReader was pointing to an instance of it, or null if it + * @return An instance of CancelOperationsContent 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. - * @throws IOException If an error occurs while reading the CancelOperationsRequest. + * @throws IOException If an error occurs while reading the CancelOperationsContent. */ - public static CancelOperationsRequest fromJson(JsonReader jsonReader) throws IOException { + public static CancelOperationsContent fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - CancelOperationsRequest deserializedCancelOperationsRequest = new CancelOperationsRequest(); + CancelOperationsContent deserializedCancelOperationsContent = new CancelOperationsContent(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("operationIds".equals(fieldName)) { List operationIds = reader.readArray(reader1 -> reader1.getString()); - deserializedCancelOperationsRequest.operationIds = operationIds; + deserializedCancelOperationsContent.operationIds = operationIds; } else if ("correlationid".equals(fieldName)) { - deserializedCancelOperationsRequest.correlationid = reader.getString(); + deserializedCancelOperationsContent.correlationid = reader.getString(); } else { reader.skipChildren(); } } - return deserializedCancelOperationsRequest; + return deserializedCancelOperationsContent; }); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CapacityReservationProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CapacityReservationProfile.java new file mode 100644 index 000000000000..522dbded989e --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CapacityReservationProfile.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The parameters of a capacity reservation Profile. + */ +@Fluent +public final class CapacityReservationProfile implements JsonSerializable { + /* + * Specifies the capacity reservation group resource id that should be used for allocating the virtual machine + * provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details. + */ + private SubResource capacityReservationGroup; + + /** + * Creates an instance of CapacityReservationProfile class. + */ + public CapacityReservationProfile() { + } + + /** + * Get the capacityReservationGroup property: Specifies the capacity reservation group resource id that should be + * used for allocating the virtual machine provided enough capacity has been reserved. Please refer to + * https://aka.ms/CapacityReservation for more details. + * + * @return the capacityReservationGroup value. + */ + public SubResource capacityReservationGroup() { + return this.capacityReservationGroup; + } + + /** + * Set the capacityReservationGroup property: Specifies the capacity reservation group resource id that should be + * used for allocating the virtual machine provided enough capacity has been reserved. Please refer to + * https://aka.ms/CapacityReservation for more details. + * + * @param capacityReservationGroup the capacityReservationGroup value to set. + * @return the CapacityReservationProfile object itself. + */ + public CapacityReservationProfile withCapacityReservationGroup(SubResource capacityReservationGroup) { + this.capacityReservationGroup = capacityReservationGroup; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("capacityReservationGroup", this.capacityReservationGroup); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapacityReservationProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapacityReservationProfile 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 CapacityReservationProfile. + */ + public static CapacityReservationProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapacityReservationProfile deserializedCapacityReservationProfile = new CapacityReservationProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capacityReservationGroup".equals(fieldName)) { + deserializedCapacityReservationProfile.capacityReservationGroup = SubResource.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCapacityReservationProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CreateFlexResourceOperationResponse.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CreateFlexResourceOperationResponse.java new file mode 100644 index 000000000000..3af9769b67c0 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CreateFlexResourceOperationResponse.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of CreateFlexResourceOperationResponse. + */ +public interface CreateFlexResourceOperationResponse { + /** + * Gets the description property: The description of the operation response. + * + * @return the description value. + */ + String description(); + + /** + * Gets the type property: The type of resources used in the create flex request eg virtual machines. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The location of the create flex request eg westus. + * + * @return the location value. + */ + String location(); + + /** + * Gets the results property: The results from the create flex request if no errors exist. + * + * @return the results value. + */ + List results(); + + /** + * Gets the inner com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner + * object. + * + * @return the inner object. + */ + CreateFlexResourceOperationResponseInner innerModel(); +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DataDisk.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DataDisk.java new file mode 100644 index 000000000000..795cd80053e2 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DataDisk.java @@ -0,0 +1,459 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes a data disk. + */ +@Fluent +public final class DataDisk implements JsonSerializable { + /* + * Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and + * therefore must be unique for each data disk attached to a VM. + */ + private int lun; + + /* + * The disk name. + */ + private String name; + + /* + * The virtual hard disk. + */ + private VirtualHardDisk vhd; + + /* + * The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the + * virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. + */ + private VirtualHardDisk image; + + /* + * Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: + * None for Standard storage. ReadOnly for Premium storage. + */ + private CachingTypes caching; + + /* + * Specifies whether writeAccelerator should be enabled or disabled on the disk. + */ + private Boolean writeAcceleratorEnabled; + + /* + * Specifies how the virtual machine disk should be created. Possible values are Attach, FromImage, Empty, Copy, + * Restore. + */ + private DiskCreateOptionTypes createOption; + + /* + * Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk + * in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value + * cannot be larger than 1023. + */ + private Integer diskSizeGB; + + /* + * The managed disk parameters. + */ + private ManagedDiskParameters managedDisk; + + /* + * The source resource identifier. It can be a snapshot, or disk restore point from which to create a disk. + */ + private ApiEntityReference sourceResource; + + /* + * Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset. + */ + private Boolean toBeDetached; + + /* + * Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment + * from the virtual machine. Supported values: ForceDetach. This feature is still in preview. To force-detach a data + * disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + */ + private DiskDetachOptionTypes detachOption; + + /* + * Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: Delete, Detach. + * The default value is set to Detach. + */ + private DiskDeleteOptionTypes deleteOption; + + /** + * Creates an instance of DataDisk class. + */ + public DataDisk() { + } + + /** + * Get the lun property: Specifies the logical unit number of the data disk. This value is used to identify data + * disks within the VM and therefore must be unique for each data disk attached to a VM. + * + * @return the lun value. + */ + public int lun() { + return this.lun; + } + + /** + * Set the lun property: Specifies the logical unit number of the data disk. This value is used to identify data + * disks within the VM and therefore must be unique for each data disk attached to a VM. + * + * @param lun the lun value to set. + * @return the DataDisk object itself. + */ + public DataDisk withLun(int lun) { + this.lun = lun; + return this; + } + + /** + * Get the name property: The disk name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The disk name. + * + * @param name the name value to set. + * @return the DataDisk object itself. + */ + public DataDisk withName(String name) { + this.name = name; + return this; + } + + /** + * Get the vhd property: The virtual hard disk. + * + * @return the vhd value. + */ + public VirtualHardDisk vhd() { + return this.vhd; + } + + /** + * Set the vhd property: The virtual hard disk. + * + * @param vhd the vhd value to set. + * @return the DataDisk object itself. + */ + public DataDisk withVhd(VirtualHardDisk vhd) { + this.vhd = vhd; + return this; + } + + /** + * Get the image property: The source user image virtual hard disk. The virtual hard disk will be copied before + * being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not + * exist. + * + * @return the image value. + */ + public VirtualHardDisk image() { + return this.image; + } + + /** + * Set the image property: The source user image virtual hard disk. The virtual hard disk will be copied before + * being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not + * exist. + * + * @param image the image value to set. + * @return the DataDisk object itself. + */ + public DataDisk withImage(VirtualHardDisk image) { + this.image = image; + return this; + } + + /** + * Get the caching property: Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The + * defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. + * + * @return the caching value. + */ + public CachingTypes caching() { + return this.caching; + } + + /** + * Set the caching property: Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The + * defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. + * + * @param caching the caching value to set. + * @return the DataDisk object itself. + */ + public DataDisk withCaching(CachingTypes caching) { + this.caching = caching; + return this; + } + + /** + * Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + * + * @return the writeAcceleratorEnabled value. + */ + public Boolean writeAcceleratorEnabled() { + return this.writeAcceleratorEnabled; + } + + /** + * Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + * + * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set. + * @return the DataDisk object itself. + */ + public DataDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { + this.writeAcceleratorEnabled = writeAcceleratorEnabled; + return this; + } + + /** + * Get the createOption property: Specifies how the virtual machine disk should be created. Possible values are + * Attach, FromImage, Empty, Copy, Restore. + * + * @return the createOption value. + */ + public DiskCreateOptionTypes createOption() { + return this.createOption; + } + + /** + * Set the createOption property: Specifies how the virtual machine disk should be created. Possible values are + * Attach, FromImage, Empty, Copy, Restore. + * + * @param createOption the createOption value to set. + * @return the DataDisk object itself. + */ + public DataDisk withCreateOption(DiskCreateOptionTypes createOption) { + this.createOption = createOption; + return this; + } + + /** + * Get the diskSizeGB property: Specifies the size of an empty data disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x + * 1024^3 for the disk and the value cannot be larger than 1023. + * + * @return the diskSizeGB value. + */ + public Integer diskSizeGB() { + return this.diskSizeGB; + } + + /** + * Set the diskSizeGB property: Specifies the size of an empty data disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x + * 1024^3 for the disk and the value cannot be larger than 1023. + * + * @param diskSizeGB the diskSizeGB value to set. + * @return the DataDisk object itself. + */ + public DataDisk withDiskSizeGB(Integer diskSizeGB) { + this.diskSizeGB = diskSizeGB; + return this; + } + + /** + * Get the managedDisk property: The managed disk parameters. + * + * @return the managedDisk value. + */ + public ManagedDiskParameters managedDisk() { + return this.managedDisk; + } + + /** + * Set the managedDisk property: The managed disk parameters. + * + * @param managedDisk the managedDisk value to set. + * @return the DataDisk object itself. + */ + public DataDisk withManagedDisk(ManagedDiskParameters managedDisk) { + this.managedDisk = managedDisk; + return this; + } + + /** + * Get the sourceResource property: The source resource identifier. It can be a snapshot, or disk restore point from + * which to create a disk. + * + * @return the sourceResource value. + */ + public ApiEntityReference sourceResource() { + return this.sourceResource; + } + + /** + * Set the sourceResource property: The source resource identifier. It can be a snapshot, or disk restore point from + * which to create a disk. + * + * @param sourceResource the sourceResource value to set. + * @return the DataDisk object itself. + */ + public DataDisk withSourceResource(ApiEntityReference sourceResource) { + this.sourceResource = sourceResource; + return this; + } + + /** + * Get the toBeDetached property: Specifies whether the data disk is in process of detachment from the + * VirtualMachine/VirtualMachineScaleset. + * + * @return the toBeDetached value. + */ + public Boolean toBeDetached() { + return this.toBeDetached; + } + + /** + * Set the toBeDetached property: Specifies whether the data disk is in process of detachment from the + * VirtualMachine/VirtualMachineScaleset. + * + * @param toBeDetached the toBeDetached value to set. + * @return the DataDisk object itself. + */ + public DataDisk withToBeDetached(Boolean toBeDetached) { + this.toBeDetached = toBeDetached; + return this; + } + + /** + * Get the detachOption property: Specifies the detach behavior to be used while detaching a disk or which is + * already in the process of detachment from the virtual machine. Supported values: ForceDetach. This feature is + * still in preview. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: + * 'ForceDetach'. + * + * @return the detachOption value. + */ + public DiskDetachOptionTypes detachOption() { + return this.detachOption; + } + + /** + * Set the detachOption property: Specifies the detach behavior to be used while detaching a disk or which is + * already in the process of detachment from the virtual machine. Supported values: ForceDetach. This feature is + * still in preview. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: + * 'ForceDetach'. + * + * @param detachOption the detachOption value to set. + * @return the DataDisk object itself. + */ + public DataDisk withDetachOption(DiskDetachOptionTypes detachOption) { + this.detachOption = detachOption; + return this; + } + + /** + * Get the deleteOption property: Specifies whether data disk should be deleted or detached upon VM deletion. + * Possible values are: Delete, Detach. The default value is set to Detach. + * + * @return the deleteOption value. + */ + public DiskDeleteOptionTypes deleteOption() { + return this.deleteOption; + } + + /** + * Set the deleteOption property: Specifies whether data disk should be deleted or detached upon VM deletion. + * Possible values are: Delete, Detach. The default value is set to Detach. + * + * @param deleteOption the deleteOption value to set. + * @return the DataDisk object itself. + */ + public DataDisk withDeleteOption(DiskDeleteOptionTypes deleteOption) { + this.deleteOption = deleteOption; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("lun", this.lun); + jsonWriter.writeStringField("createOption", this.createOption == null ? null : this.createOption.toString()); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("vhd", this.vhd); + jsonWriter.writeJsonField("image", this.image); + jsonWriter.writeStringField("caching", this.caching == null ? null : this.caching.toString()); + jsonWriter.writeBooleanField("writeAcceleratorEnabled", this.writeAcceleratorEnabled); + jsonWriter.writeNumberField("diskSizeGB", this.diskSizeGB); + jsonWriter.writeJsonField("managedDisk", this.managedDisk); + jsonWriter.writeJsonField("sourceResource", this.sourceResource); + jsonWriter.writeBooleanField("toBeDetached", this.toBeDetached); + jsonWriter.writeStringField("detachOption", this.detachOption == null ? null : this.detachOption.toString()); + jsonWriter.writeStringField("deleteOption", this.deleteOption == null ? null : this.deleteOption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataDisk from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataDisk 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. + * @throws IOException If an error occurs while reading the DataDisk. + */ + public static DataDisk fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataDisk deserializedDataDisk = new DataDisk(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lun".equals(fieldName)) { + deserializedDataDisk.lun = reader.getInt(); + } else if ("createOption".equals(fieldName)) { + deserializedDataDisk.createOption = DiskCreateOptionTypes.fromString(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedDataDisk.name = reader.getString(); + } else if ("vhd".equals(fieldName)) { + deserializedDataDisk.vhd = VirtualHardDisk.fromJson(reader); + } else if ("image".equals(fieldName)) { + deserializedDataDisk.image = VirtualHardDisk.fromJson(reader); + } else if ("caching".equals(fieldName)) { + deserializedDataDisk.caching = CachingTypes.fromString(reader.getString()); + } else if ("writeAcceleratorEnabled".equals(fieldName)) { + deserializedDataDisk.writeAcceleratorEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("diskSizeGB".equals(fieldName)) { + deserializedDataDisk.diskSizeGB = reader.getNullable(JsonReader::getInt); + } else if ("managedDisk".equals(fieldName)) { + deserializedDataDisk.managedDisk = ManagedDiskParameters.fromJson(reader); + } else if ("sourceResource".equals(fieldName)) { + deserializedDataDisk.sourceResource = ApiEntityReference.fromJson(reader); + } else if ("toBeDetached".equals(fieldName)) { + deserializedDataDisk.toBeDetached = reader.getNullable(JsonReader::getBoolean); + } else if ("detachOption".equals(fieldName)) { + deserializedDataDisk.detachOption = DiskDetachOptionTypes.fromString(reader.getString()); + } else if ("deleteOption".equals(fieldName)) { + deserializedDataDisk.deleteOption = DiskDeleteOptionTypes.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDataDisk; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteOptions.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteOptions.java new file mode 100644 index 000000000000..c4159c02582f --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteOptions.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specify what happens to the network interface when the VM is deleted. + */ +public final class DeleteOptions extends ExpandableStringEnum { + /** + * Delete network interface when the VM is deleted. + */ + public static final DeleteOptions DELETE = fromString("Delete"); + + /** + * Detach network interface when the VM is deleted. + */ + public static final DeleteOptions DETACH = fromString("Detach"); + + /** + * Creates a new instance of DeleteOptions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeleteOptions() { + } + + /** + * Creates or finds a DeleteOptions from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeleteOptions. + */ + public static DeleteOptions fromString(String name) { + return fromString(name, DeleteOptions.class); + } + + /** + * Gets known DeleteOptions values. + * + * @return known DeleteOptions values. + */ + public static Collection values() { + return values(DeleteOptions.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiagnosticsProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiagnosticsProfile.java new file mode 100644 index 000000000000..3262fc2212ee --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiagnosticsProfile.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies the boot diagnostic settings state. Minimum compute api-version: 2015-06-15. + */ +@Fluent +public final class DiagnosticsProfile implements JsonSerializable { + /* + * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM + * status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and + * subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a + * screenshot of the VM from the hypervisor. + */ + private BootDiagnostics bootDiagnostics; + + /** + * Creates an instance of DiagnosticsProfile class. + */ + public DiagnosticsProfile() { + } + + /** + * Get the bootDiagnostics property: Boot Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage + * account is in the same region and subscription as the VM. You can easily view the output of your console log. + * Azure also enables you to see a screenshot of the VM from the hypervisor. + * + * @return the bootDiagnostics value. + */ + public BootDiagnostics bootDiagnostics() { + return this.bootDiagnostics; + } + + /** + * Set the bootDiagnostics property: Boot Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage + * account is in the same region and subscription as the VM. You can easily view the output of your console log. + * Azure also enables you to see a screenshot of the VM from the hypervisor. + * + * @param bootDiagnostics the bootDiagnostics value to set. + * @return the DiagnosticsProfile object itself. + */ + public DiagnosticsProfile withBootDiagnostics(BootDiagnostics bootDiagnostics) { + this.bootDiagnostics = bootDiagnostics; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bootDiagnostics", this.bootDiagnostics); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiagnosticsProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiagnosticsProfile 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 DiagnosticsProfile. + */ + public static DiagnosticsProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiagnosticsProfile deserializedDiagnosticsProfile = new DiagnosticsProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bootDiagnostics".equals(fieldName)) { + deserializedDiagnosticsProfile.bootDiagnostics = BootDiagnostics.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDiagnosticsProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskOptions.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskOptions.java new file mode 100644 index 000000000000..0c3253c6f6e2 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskOptions.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the ephemeral disk option for operating system disk. + */ +public final class DiffDiskOptions extends ExpandableStringEnum { + /** + * Local Ephemeral disk option: Local. + */ + public static final DiffDiskOptions LOCAL = fromString("Local"); + + /** + * Creates a new instance of DiffDiskOptions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DiffDiskOptions() { + } + + /** + * Creates or finds a DiffDiskOptions from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiffDiskOptions. + */ + public static DiffDiskOptions fromString(String name) { + return fromString(name, DiffDiskOptions.class); + } + + /** + * Gets known DiffDiskOptions values. + * + * @return known DiffDiskOptions values. + */ + public static Collection values() { + return values(DiffDiskOptions.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskPlacement.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskPlacement.java new file mode 100644 index 000000000000..dc8578158fb3 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskPlacement.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to + * choose the location i.e, cache disk, resource disk or nvme disk space for Ephemeral OS disk provisioning. For more + * information on Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM + * at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at + * https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. Minimum api-version for + * NvmeDisk: 2024-03-01. + */ +public final class DiffDiskPlacement extends ExpandableStringEnum { + /** + * CacheDisk disk placement. + */ + public static final DiffDiskPlacement CACHE_DISK = fromString("CacheDisk"); + + /** + * ResourceDisk disk placement. + */ + public static final DiffDiskPlacement RESOURCE_DISK = fromString("ResourceDisk"); + + /** + * NvmeDisk disk placement. + */ + public static final DiffDiskPlacement NVME_DISK = fromString("NvmeDisk"); + + /** + * Creates a new instance of DiffDiskPlacement value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DiffDiskPlacement() { + } + + /** + * Creates or finds a DiffDiskPlacement from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiffDiskPlacement. + */ + public static DiffDiskPlacement fromString(String name) { + return fromString(name, DiffDiskPlacement.class); + } + + /** + * Gets known DiffDiskPlacement values. + * + * @return known DiffDiskPlacement values. + */ + public static Collection values() { + return values(DiffDiskPlacement.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskSettings.java new file mode 100644 index 000000000000..ab3ac92d9d24 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskSettings.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the parameters of ephemeral disk settings that can be specified for operating system disk. Note: The + * ephemeral disk settings can only be specified for managed disk. + */ +@Fluent +public final class DiffDiskSettings implements JsonSerializable { + /* + * Specifies the ephemeral disk settings for operating system disk. + */ + private DiffDiskOptions option; + + /* + * Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, + * NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or + * NvmeDisk is used. Minimum api-version for NvmeDisk: 2024-03-01. + */ + private DiffDiskPlacement placement; + + /** + * Creates an instance of DiffDiskSettings class. + */ + public DiffDiskSettings() { + } + + /** + * Get the option property: Specifies the ephemeral disk settings for operating system disk. + * + * @return the option value. + */ + public DiffDiskOptions option() { + return this.option; + } + + /** + * Set the option property: Specifies the ephemeral disk settings for operating system disk. + * + * @param option the option value to set. + * @return the DiffDiskSettings object itself. + */ + public DiffDiskSettings withOption(DiffDiskOptions option) { + this.option = option; + return this; + } + + /** + * Get the placement property: Specifies the ephemeral disk placement for operating system disk. Possible values + * are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM + * size otherwise ResourceDisk or NvmeDisk is used. Minimum api-version for NvmeDisk: 2024-03-01. + * + * @return the placement value. + */ + public DiffDiskPlacement placement() { + return this.placement; + } + + /** + * Set the placement property: Specifies the ephemeral disk placement for operating system disk. Possible values + * are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM + * size otherwise ResourceDisk or NvmeDisk is used. Minimum api-version for NvmeDisk: 2024-03-01. + * + * @param placement the placement value to set. + * @return the DiffDiskSettings object itself. + */ + public DiffDiskSettings withPlacement(DiffDiskPlacement placement) { + this.placement = placement; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("option", this.option == null ? null : this.option.toString()); + jsonWriter.writeStringField("placement", this.placement == null ? null : this.placement.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiffDiskSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiffDiskSettings 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 DiffDiskSettings. + */ + public static DiffDiskSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiffDiskSettings deserializedDiffDiskSettings = new DiffDiskSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("option".equals(fieldName)) { + deserializedDiffDiskSettings.option = DiffDiskOptions.fromString(reader.getString()); + } else if ("placement".equals(fieldName)) { + deserializedDiffDiskSettings.placement = DiffDiskPlacement.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDiffDiskSettings; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskControllerTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskControllerTypes.java new file mode 100644 index 000000000000..b38e3af74da0 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskControllerTypes.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This property is only supported + * for virtual machines whose operating system disk and VM sku supports Generation 2 + * (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please check the HyperVGenerations capability + * returned as part of VM sku capabilities in the response of Microsoft.Compute SKUs api for the region contains V2 + * (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more information about Disk Controller Types + * supported please refer to https://aka.ms/azure-diskcontrollertypes. + */ +public final class DiskControllerTypes extends ExpandableStringEnum { + /** + * SCSI disk controller type. + */ + public static final DiskControllerTypes SCSI = fromString("SCSI"); + + /** + * NVMe disk controller type. + */ + public static final DiskControllerTypes NVME = fromString("NVMe"); + + /** + * Creates a new instance of DiskControllerTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DiskControllerTypes() { + } + + /** + * Creates or finds a DiskControllerTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiskControllerTypes. + */ + public static DiskControllerTypes fromString(String name) { + return fromString(name, DiskControllerTypes.class); + } + + /** + * Gets known DiskControllerTypes values. + * + * @return known DiskControllerTypes values. + */ + public static Collection values() { + return values(DiskControllerTypes.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskCreateOptionTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskCreateOptionTypes.java new file mode 100644 index 000000000000..f352658cdcad --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskCreateOptionTypes.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies how the virtual machine disk should be created. Possible values are **Attach:** This value is used when you + * are using a specialized disk to create the virtual machine. **FromImage:** This value is used when you are using an + * image to create the virtual machine. If you are using a platform image, you should also use the imageReference + * element described above. If you are using a marketplace image, you should also use the plan element previously + * described. **Empty:** This value is used when creating an empty data disk. **Copy:** This value is used to create a + * data disk from a snapshot or another disk. **Restore:** This value is used to create a data disk from a disk restore + * point. + */ +public final class DiskCreateOptionTypes extends ExpandableStringEnum { + /** + * Create disk FromImage. + */ + public static final DiskCreateOptionTypes FROM_IMAGE = fromString("FromImage"); + + /** + * Empty value. + */ + public static final DiskCreateOptionTypes EMPTY = fromString("Empty"); + + /** + * Create disk by Attach. + */ + public static final DiskCreateOptionTypes ATTACH = fromString("Attach"); + + /** + * Create disk by Copy. + */ + public static final DiskCreateOptionTypes COPY = fromString("Copy"); + + /** + * Create disk by Restore. + */ + public static final DiskCreateOptionTypes RESTORE = fromString("Restore"); + + /** + * Creates a new instance of DiskCreateOptionTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DiskCreateOptionTypes() { + } + + /** + * Creates or finds a DiskCreateOptionTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiskCreateOptionTypes. + */ + public static DiskCreateOptionTypes fromString(String name) { + return fromString(name, DiskCreateOptionTypes.class); + } + + /** + * Gets known DiskCreateOptionTypes values. + * + * @return known DiskCreateOptionTypes values. + */ + public static Collection values() { + return values(DiskCreateOptionTypes.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDeleteOptionTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDeleteOptionTypes.java new file mode 100644 index 000000000000..1a714071ccfd --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDeleteOptionTypes.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the behavior of the managed disk when the VM gets deleted, for example whether the managed disk is deleted + * or detached. Supported values are: **Delete.** If this value is used, the managed disk is deleted when VM gets + * deleted. **Detach.** If this value is used, the managed disk is retained after VM gets deleted. Minimum api-version: + * 2021-03-01. + */ +public final class DiskDeleteOptionTypes extends ExpandableStringEnum { + /** + * Delete the disk upon VM deletion. + */ + public static final DiskDeleteOptionTypes DELETE = fromString("Delete"); + + /** + * Detach the disk upon VM deletion. + */ + public static final DiskDeleteOptionTypes DETACH = fromString("Detach"); + + /** + * Creates a new instance of DiskDeleteOptionTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DiskDeleteOptionTypes() { + } + + /** + * Creates or finds a DiskDeleteOptionTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiskDeleteOptionTypes. + */ + public static DiskDeleteOptionTypes fromString(String name) { + return fromString(name, DiskDeleteOptionTypes.class); + } + + /** + * Gets known DiskDeleteOptionTypes values. + * + * @return known DiskDeleteOptionTypes values. + */ + public static Collection values() { + return values(DiskDeleteOptionTypes.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDetachOptionTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDetachOptionTypes.java new file mode 100644 index 000000000000..e3fde217f364 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDetachOptionTypes.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from + * the virtual machine. Supported values are: **ForceDetach.** detachOption: **ForceDetach** is applicable only for + * managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure + * from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach + * the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature + * is still in preview**. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: + * 'ForceDetach'. + */ +public final class DiskDetachOptionTypes extends ExpandableStringEnum { + /** + * ForceDetach the disk. + */ + public static final DiskDetachOptionTypes FORCE_DETACH = fromString("ForceDetach"); + + /** + * Creates a new instance of DiskDetachOptionTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DiskDetachOptionTypes() { + } + + /** + * Creates or finds a DiskDetachOptionTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiskDetachOptionTypes. + */ + public static DiskDetachOptionTypes fromString(String name) { + return fromString(name, DiskDetachOptionTypes.class); + } + + /** + * Gets known DiskDetachOptionTypes values. + * + * @return known DiskDetachOptionTypes values. + */ + public static Collection values() { + return values(DiskDetachOptionTypes.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSetParameters.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSetParameters.java new file mode 100644 index 000000000000..06dd0e471d71 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSetParameters.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** + * The disk encryption set resource id can only be specified for managed disk. Please refer + * https://aka.ms/mdssewithcmkoverview for more details. + */ +@Fluent +public final class DiskEncryptionSetParameters extends SubResource { + /** + * Creates an instance of DiskEncryptionSetParameters class. + */ + public DiskEncryptionSetParameters() { + } + + /** + * {@inheritDoc} + */ + @Override + public DiskEncryptionSetParameters withId(String id) { + super.withId(id); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", id()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiskEncryptionSetParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiskEncryptionSetParameters 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 DiskEncryptionSetParameters. + */ + public static DiskEncryptionSetParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiskEncryptionSetParameters deserializedDiskEncryptionSetParameters = new DiskEncryptionSetParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDiskEncryptionSetParameters.withId(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDiskEncryptionSetParameters; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSettings.java new file mode 100644 index 000000000000..2606a03b6321 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSettings.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes a Encryption Settings for a Disk. + */ +@Fluent +public final class DiskEncryptionSettings implements JsonSerializable { + /* + * Specifies the location of the disk encryption key, which is a Key Vault Secret. + */ + private KeyVaultSecretReference diskEncryptionKey; + + /* + * Specifies the location of the key encryption key in Key Vault. + */ + private KeyVaultKeyReference keyEncryptionKey; + + /* + * Specifies whether disk encryption should be enabled on the virtual machine. + */ + private Boolean enabled; + + /** + * Creates an instance of DiskEncryptionSettings class. + */ + public DiskEncryptionSettings() { + } + + /** + * Get the diskEncryptionKey property: Specifies the location of the disk encryption key, which is a Key Vault + * Secret. + * + * @return the diskEncryptionKey value. + */ + public KeyVaultSecretReference diskEncryptionKey() { + return this.diskEncryptionKey; + } + + /** + * Set the diskEncryptionKey property: Specifies the location of the disk encryption key, which is a Key Vault + * Secret. + * + * @param diskEncryptionKey the diskEncryptionKey value to set. + * @return the DiskEncryptionSettings object itself. + */ + public DiskEncryptionSettings withDiskEncryptionKey(KeyVaultSecretReference diskEncryptionKey) { + this.diskEncryptionKey = diskEncryptionKey; + return this; + } + + /** + * Get the keyEncryptionKey property: Specifies the location of the key encryption key in Key Vault. + * + * @return the keyEncryptionKey value. + */ + public KeyVaultKeyReference keyEncryptionKey() { + return this.keyEncryptionKey; + } + + /** + * Set the keyEncryptionKey property: Specifies the location of the key encryption key in Key Vault. + * + * @param keyEncryptionKey the keyEncryptionKey value to set. + * @return the DiskEncryptionSettings object itself. + */ + public DiskEncryptionSettings withKeyEncryptionKey(KeyVaultKeyReference keyEncryptionKey) { + this.keyEncryptionKey = keyEncryptionKey; + return this; + } + + /** + * Get the enabled property: Specifies whether disk encryption should be enabled on the virtual machine. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Specifies whether disk encryption should be enabled on the virtual machine. + * + * @param enabled the enabled value to set. + * @return the DiskEncryptionSettings object itself. + */ + public DiskEncryptionSettings withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("diskEncryptionKey", this.diskEncryptionKey); + jsonWriter.writeJsonField("keyEncryptionKey", this.keyEncryptionKey); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiskEncryptionSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiskEncryptionSettings 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 DiskEncryptionSettings. + */ + public static DiskEncryptionSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiskEncryptionSettings deserializedDiskEncryptionSettings = new DiskEncryptionSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("diskEncryptionKey".equals(fieldName)) { + deserializedDiskEncryptionSettings.diskEncryptionKey = KeyVaultSecretReference.fromJson(reader); + } else if ("keyEncryptionKey".equals(fieldName)) { + deserializedDiskEncryptionSettings.keyEncryptionKey = KeyVaultKeyReference.fromJson(reader); + } else if ("enabled".equals(fieldName)) { + deserializedDiskEncryptionSettings.enabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedDiskEncryptionSettings; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DistributionStrategy.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DistributionStrategy.java new file mode 100644 index 000000000000..ce5e89c044ce --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DistributionStrategy.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The distribution strategy for zone allocation. + */ +public final class DistributionStrategy extends ExpandableStringEnum { + /** + * Platform attempts to place as many VMs as possible in a single zone, falls back to multiple zones if needed. + */ + public static final DistributionStrategy BEST_EFFORT_SINGLE_ZONE = fromString("BestEffortSingleZone"); + + /** + * Platform uses customer-provided zone rankings to allocate VMs. + */ + public static final DistributionStrategy PRIORITIZED = fromString("Prioritized"); + + /** + * Platform attempts to evenly distribute VMs across all available zones with best effort. + */ + public static final DistributionStrategy BEST_EFFORT_BALANCED = fromString("BestEffortBalanced"); + + /** + * Platform must evenly distribute VMs across zones, request is rejected if exact balance cannot be achieved. + */ + public static final DistributionStrategy STRICT_BALANCED = fromString("StrictBalanced"); + + /** + * Creates a new instance of DistributionStrategy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DistributionStrategy() { + } + + /** + * Creates or finds a DistributionStrategy from its string representation. + * + * @param name a name to look for. + * @return the corresponding DistributionStrategy. + */ + public static DistributionStrategy fromString(String name) { + return fromString(name, DistributionStrategy.class); + } + + /** + * Gets known DistributionStrategy values. + * + * @return known DistributionStrategy values. + */ + public static Collection values() { + return values(DistributionStrategy.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DomainNameLabelScopeTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DomainNameLabelScopeTypes.java new file mode 100644 index 000000000000..3bc6eafa2ed3 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DomainNameLabelScopeTypes.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The Domain name label scope.The concatenation of the hashed domain name label that generated according to the policy + * from domain name label scope and vm index will be the domain name labels of the PublicIPAddress resources that will + * be created. + */ +public final class DomainNameLabelScopeTypes extends ExpandableStringEnum { + /** + * TenantReuse scope type. + */ + public static final DomainNameLabelScopeTypes TENANT_REUSE = fromString("TenantReuse"); + + /** + * SubscriptionReuse scope type. + */ + public static final DomainNameLabelScopeTypes SUBSCRIPTION_REUSE = fromString("SubscriptionReuse"); + + /** + * ResourceGroupReuse scope type. + */ + public static final DomainNameLabelScopeTypes RESOURCE_GROUP_REUSE = fromString("ResourceGroupReuse"); + + /** + * NoReuse scope type. + */ + public static final DomainNameLabelScopeTypes NO_REUSE = fromString("NoReuse"); + + /** + * Creates a new instance of DomainNameLabelScopeTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DomainNameLabelScopeTypes() { + } + + /** + * Creates or finds a DomainNameLabelScopeTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding DomainNameLabelScopeTypes. + */ + public static DomainNameLabelScopeTypes fromString(String name) { + return fromString(name, DomainNameLabelScopeTypes.class); + } + + /** + * Gets known DomainNameLabelScopeTypes values. + * + * @return known DomainNameLabelScopeTypes values. + */ + public static Collection values() { + return values(DomainNameLabelScopeTypes.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EncryptionIdentity.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EncryptionIdentity.java new file mode 100644 index 000000000000..14cc7845ba19 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EncryptionIdentity.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies the Managed Identity used by ADE to get access token for keyvault operations. + */ +@Fluent +public final class EncryptionIdentity implements JsonSerializable { + /* + * Specifies ARM Resource ID of one of the user identities associated with the VM. + */ + private String userAssignedIdentityResourceId; + + /** + * Creates an instance of EncryptionIdentity class. + */ + public EncryptionIdentity() { + } + + /** + * Get the userAssignedIdentityResourceId property: Specifies ARM Resource ID of one of the user identities + * associated with the VM. + * + * @return the userAssignedIdentityResourceId value. + */ + public String userAssignedIdentityResourceId() { + return this.userAssignedIdentityResourceId; + } + + /** + * Set the userAssignedIdentityResourceId property: Specifies ARM Resource ID of one of the user identities + * associated with the VM. + * + * @param userAssignedIdentityResourceId the userAssignedIdentityResourceId value to set. + * @return the EncryptionIdentity object itself. + */ + public EncryptionIdentity withUserAssignedIdentityResourceId(String userAssignedIdentityResourceId) { + this.userAssignedIdentityResourceId = userAssignedIdentityResourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userAssignedIdentityResourceId", this.userAssignedIdentityResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EncryptionIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EncryptionIdentity 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 EncryptionIdentity. + */ + public static EncryptionIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EncryptionIdentity deserializedEncryptionIdentity = new EncryptionIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userAssignedIdentityResourceId".equals(fieldName)) { + deserializedEncryptionIdentity.userAssignedIdentityResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEncryptionIdentity; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EventGridAndResourceGraph.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EventGridAndResourceGraph.java new file mode 100644 index 000000000000..3a973fa9504d --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EventGridAndResourceGraph.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies eventGridAndResourceGraph related Scheduled Event related configurations. + */ +@Fluent +public final class EventGridAndResourceGraph implements JsonSerializable { + /* + * Specifies if event grid and resource graph is enabled for Scheduled event related configurations. + */ + private Boolean enable; + + /* + * Specifies the api-version to determine which Scheduled Events configuration schema version will be delivered. + */ + private String scheduledEventsApiVersion; + + /** + * Creates an instance of EventGridAndResourceGraph class. + */ + public EventGridAndResourceGraph() { + } + + /** + * Get the enable property: Specifies if event grid and resource graph is enabled for Scheduled event related + * configurations. + * + * @return the enable value. + */ + public Boolean enable() { + return this.enable; + } + + /** + * Set the enable property: Specifies if event grid and resource graph is enabled for Scheduled event related + * configurations. + * + * @param enable the enable value to set. + * @return the EventGridAndResourceGraph object itself. + */ + public EventGridAndResourceGraph withEnable(Boolean enable) { + this.enable = enable; + return this; + } + + /** + * Get the scheduledEventsApiVersion property: Specifies the api-version to determine which Scheduled Events + * configuration schema version will be delivered. + * + * @return the scheduledEventsApiVersion value. + */ + public String scheduledEventsApiVersion() { + return this.scheduledEventsApiVersion; + } + + /** + * Set the scheduledEventsApiVersion property: Specifies the api-version to determine which Scheduled Events + * configuration schema version will be delivered. + * + * @param scheduledEventsApiVersion the scheduledEventsApiVersion value to set. + * @return the EventGridAndResourceGraph object itself. + */ + public EventGridAndResourceGraph withScheduledEventsApiVersion(String scheduledEventsApiVersion) { + this.scheduledEventsApiVersion = scheduledEventsApiVersion; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enable", this.enable); + jsonWriter.writeStringField("scheduledEventsApiVersion", this.scheduledEventsApiVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventGridAndResourceGraph from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventGridAndResourceGraph 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 EventGridAndResourceGraph. + */ + public static EventGridAndResourceGraph fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventGridAndResourceGraph deserializedEventGridAndResourceGraph = new EventGridAndResourceGraph(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enable".equals(fieldName)) { + deserializedEventGridAndResourceGraph.enable = reader.getNullable(JsonReader::getBoolean); + } else if ("scheduledEventsApiVersion".equals(fieldName)) { + deserializedEventGridAndResourceGraph.scheduledEventsApiVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEventGridAndResourceGraph; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateContent.java similarity index 78% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateRequest.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateContent.java index e386ab789e79..5b76e72133fc 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateRequest.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateContent.java @@ -15,7 +15,7 @@ * The ExecuteCreateRequest request for create operations. */ @Fluent -public final class ExecuteCreateRequest implements JsonSerializable { +public final class ExecuteCreateContent implements JsonSerializable { /* * resource creation payload */ @@ -32,9 +32,9 @@ public final class ExecuteCreateRequest implements JsonSerializable { - ExecuteCreateRequest deserializedExecuteCreateRequest = new ExecuteCreateRequest(); + ExecuteCreateContent deserializedExecuteCreateContent = new ExecuteCreateContent(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("resourceConfigParameters".equals(fieldName)) { - deserializedExecuteCreateRequest.resourceConfigParameters + deserializedExecuteCreateContent.resourceConfigParameters = ResourceProvisionPayload.fromJson(reader); } else if ("executionParameters".equals(fieldName)) { - deserializedExecuteCreateRequest.executionParameters = ExecutionParameters.fromJson(reader); + deserializedExecuteCreateContent.executionParameters = ExecutionParameters.fromJson(reader); } else if ("correlationid".equals(fieldName)) { - deserializedExecuteCreateRequest.correlationid = reader.getString(); + deserializedExecuteCreateContent.correlationid = reader.getString(); } else { reader.skipChildren(); } } - return deserializedExecuteCreateRequest; + return deserializedExecuteCreateContent; }); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateFlexContent.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateFlexContent.java new file mode 100644 index 000000000000..0810b31db450 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateFlexContent.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ExecuteCreateFlexRequest request for executeCreateFlex operations. + */ +@Fluent +public final class ExecuteCreateFlexContent implements JsonSerializable { + /* + * Resource creation payload with flex properties + */ + private ResourceProvisionFlexPayload resourceConfigParameters; + + /* + * The execution parameters for the request + */ + private ExecutionParameters executionParameters; + + /* + * Correlationid item + */ + private String correlationid; + + /** + * Creates an instance of ExecuteCreateFlexContent class. + */ + public ExecuteCreateFlexContent() { + } + + /** + * Get the resourceConfigParameters property: Resource creation payload with flex properties. + * + * @return the resourceConfigParameters value. + */ + public ResourceProvisionFlexPayload resourceConfigParameters() { + return this.resourceConfigParameters; + } + + /** + * Set the resourceConfigParameters property: Resource creation payload with flex properties. + * + * @param resourceConfigParameters the resourceConfigParameters value to set. + * @return the ExecuteCreateFlexContent object itself. + */ + public ExecuteCreateFlexContent + withResourceConfigParameters(ResourceProvisionFlexPayload resourceConfigParameters) { + this.resourceConfigParameters = resourceConfigParameters; + return this; + } + + /** + * Get the executionParameters property: The execution parameters for the request. + * + * @return the executionParameters value. + */ + public ExecutionParameters executionParameters() { + return this.executionParameters; + } + + /** + * Set the executionParameters property: The execution parameters for the request. + * + * @param executionParameters the executionParameters value to set. + * @return the ExecuteCreateFlexContent object itself. + */ + public ExecuteCreateFlexContent withExecutionParameters(ExecutionParameters executionParameters) { + this.executionParameters = executionParameters; + return this; + } + + /** + * Get the correlationid property: Correlationid item. + * + * @return the correlationid value. + */ + public String correlationid() { + return this.correlationid; + } + + /** + * Set the correlationid property: Correlationid item. + * + * @param correlationid the correlationid value to set. + * @return the ExecuteCreateFlexContent object itself. + */ + public ExecuteCreateFlexContent withCorrelationid(String correlationid) { + this.correlationid = correlationid; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("resourceConfigParameters", this.resourceConfigParameters); + jsonWriter.writeJsonField("executionParameters", this.executionParameters); + jsonWriter.writeStringField("correlationid", this.correlationid); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExecuteCreateFlexContent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExecuteCreateFlexContent 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. + * @throws IOException If an error occurs while reading the ExecuteCreateFlexContent. + */ + public static ExecuteCreateFlexContent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExecuteCreateFlexContent deserializedExecuteCreateFlexContent = new ExecuteCreateFlexContent(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceConfigParameters".equals(fieldName)) { + deserializedExecuteCreateFlexContent.resourceConfigParameters + = ResourceProvisionFlexPayload.fromJson(reader); + } else if ("executionParameters".equals(fieldName)) { + deserializedExecuteCreateFlexContent.executionParameters = ExecutionParameters.fromJson(reader); + } else if ("correlationid".equals(fieldName)) { + deserializedExecuteCreateFlexContent.correlationid = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExecuteCreateFlexContent; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateContent.java similarity index 76% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateRequest.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateContent.java index 1ad9b8a8fb9f..aea3916b50cb 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateRequest.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateContent.java @@ -15,7 +15,7 @@ * The ExecuteDeallocateRequest request for executeDeallocate operations. */ @Fluent -public final class ExecuteDeallocateRequest implements JsonSerializable { +public final class ExecuteDeallocateContent implements JsonSerializable { /* * The execution parameters for the request */ @@ -32,9 +32,9 @@ public final class ExecuteDeallocateRequest implements JsonSerializable { - ExecuteDeallocateRequest deserializedExecuteDeallocateRequest = new ExecuteDeallocateRequest(); + ExecuteDeallocateContent deserializedExecuteDeallocateContent = new ExecuteDeallocateContent(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("executionParameters".equals(fieldName)) { - deserializedExecuteDeallocateRequest.executionParameters = ExecutionParameters.fromJson(reader); + deserializedExecuteDeallocateContent.executionParameters = ExecutionParameters.fromJson(reader); } else if ("resources".equals(fieldName)) { - deserializedExecuteDeallocateRequest.resources = Resources.fromJson(reader); + deserializedExecuteDeallocateContent.resources = Resources.fromJson(reader); } else if ("correlationid".equals(fieldName)) { - deserializedExecuteDeallocateRequest.correlationid = reader.getString(); + deserializedExecuteDeallocateContent.correlationid = reader.getString(); } else { reader.skipChildren(); } } - return deserializedExecuteDeallocateRequest; + return deserializedExecuteDeallocateContent; }); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeleteRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeleteContent.java similarity index 77% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeleteRequest.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeleteContent.java index af539d5f6121..c536a26b06d2 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeleteRequest.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeleteContent.java @@ -15,7 +15,7 @@ * The ExecuteDeleteRequest for delete VM operation. */ @Fluent -public final class ExecuteDeleteRequest implements JsonSerializable { +public final class ExecuteDeleteContent implements JsonSerializable { /* * The execution parameters for the request */ @@ -37,9 +37,9 @@ public final class ExecuteDeleteRequest implements JsonSerializable { - ExecuteDeleteRequest deserializedExecuteDeleteRequest = new ExecuteDeleteRequest(); + ExecuteDeleteContent deserializedExecuteDeleteContent = new ExecuteDeleteContent(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("executionParameters".equals(fieldName)) { - deserializedExecuteDeleteRequest.executionParameters = ExecutionParameters.fromJson(reader); + deserializedExecuteDeleteContent.executionParameters = ExecutionParameters.fromJson(reader); } else if ("resources".equals(fieldName)) { - deserializedExecuteDeleteRequest.resources = Resources.fromJson(reader); + deserializedExecuteDeleteContent.resources = Resources.fromJson(reader); } else if ("correlationid".equals(fieldName)) { - deserializedExecuteDeleteRequest.correlationid = reader.getString(); + deserializedExecuteDeleteContent.correlationid = reader.getString(); } else if ("forceDeletion".equals(fieldName)) { - deserializedExecuteDeleteRequest.forceDeletion = reader.getNullable(JsonReader::getBoolean); + deserializedExecuteDeleteContent.forceDeletion = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } } - return deserializedExecuteDeleteRequest; + return deserializedExecuteDeleteContent; }); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateContent.java similarity index 76% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateRequest.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateContent.java index fd5b38f2f2bc..e1ce92135815 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateRequest.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateContent.java @@ -15,7 +15,7 @@ * The ExecuteHibernateRequest request for executeHibernate operations. */ @Fluent -public final class ExecuteHibernateRequest implements JsonSerializable { +public final class ExecuteHibernateContent implements JsonSerializable { /* * The execution parameters for the request */ @@ -32,9 +32,9 @@ public final class ExecuteHibernateRequest implements JsonSerializable { - ExecuteHibernateRequest deserializedExecuteHibernateRequest = new ExecuteHibernateRequest(); + ExecuteHibernateContent deserializedExecuteHibernateContent = new ExecuteHibernateContent(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("executionParameters".equals(fieldName)) { - deserializedExecuteHibernateRequest.executionParameters = ExecutionParameters.fromJson(reader); + deserializedExecuteHibernateContent.executionParameters = ExecutionParameters.fromJson(reader); } else if ("resources".equals(fieldName)) { - deserializedExecuteHibernateRequest.resources = Resources.fromJson(reader); + deserializedExecuteHibernateContent.resources = Resources.fromJson(reader); } else if ("correlationid".equals(fieldName)) { - deserializedExecuteHibernateRequest.correlationid = reader.getString(); + deserializedExecuteHibernateContent.correlationid = reader.getString(); } else { reader.skipChildren(); } } - return deserializedExecuteHibernateRequest; + return deserializedExecuteHibernateContent; }); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartContent.java similarity index 76% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartRequest.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartContent.java index 3dc64c011228..2bb97da4634b 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartRequest.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartContent.java @@ -15,7 +15,7 @@ * The ExecuteStartRequest request for executeStart operations. */ @Fluent -public final class ExecuteStartRequest implements JsonSerializable { +public final class ExecuteStartContent implements JsonSerializable { /* * The execution parameters for the request */ @@ -32,9 +32,9 @@ public final class ExecuteStartRequest implements JsonSerializable { - ExecuteStartRequest deserializedExecuteStartRequest = new ExecuteStartRequest(); + ExecuteStartContent deserializedExecuteStartContent = new ExecuteStartContent(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("executionParameters".equals(fieldName)) { - deserializedExecuteStartRequest.executionParameters = ExecutionParameters.fromJson(reader); + deserializedExecuteStartContent.executionParameters = ExecutionParameters.fromJson(reader); } else if ("resources".equals(fieldName)) { - deserializedExecuteStartRequest.resources = Resources.fromJson(reader); + deserializedExecuteStartContent.resources = Resources.fromJson(reader); } else if ("correlationid".equals(fieldName)) { - deserializedExecuteStartRequest.correlationid = reader.getString(); + deserializedExecuteStartContent.correlationid = reader.getString(); } else { reader.skipChildren(); } } - return deserializedExecuteStartRequest; + return deserializedExecuteStartContent; }); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocation.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocation.java new file mode 100644 index 000000000000..ecb791991b8c --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocation.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The complex type of the extended location. + */ +@Fluent +public final class ExtendedLocation implements JsonSerializable { + /* + * The name of the extended location. + */ + private String name; + + /* + * The type of the extended location. + */ + private ExtendedLocationType type; + + /** + * Creates an instance of ExtendedLocation class. + */ + public ExtendedLocation() { + } + + /** + * Get the name property: The name of the extended location. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the extended location. + * + * @param name the name value to set. + * @return the ExtendedLocation object itself. + */ + public ExtendedLocation withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of the extended location. + * + * @return the type value. + */ + public ExtendedLocationType type() { + return this.type; + } + + /** + * Set the type property: The type of the extended location. + * + * @param type the type value to set. + * @return the ExtendedLocation object itself. + */ + public ExtendedLocation withType(ExtendedLocationType type) { + this.type = type; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtendedLocation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtendedLocation 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. + * @throws IOException If an error occurs while reading the ExtendedLocation. + */ + public static ExtendedLocation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtendedLocation deserializedExtendedLocation = new ExtendedLocation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedExtendedLocation.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExtendedLocation.type = ExtendedLocationType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExtendedLocation; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocationType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocationType.java new file mode 100644 index 000000000000..0cc0b3dfdc5c --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocationType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The supported ExtendedLocation types. + */ +public final class ExtendedLocationType extends ExpandableStringEnum { + /** + * Azure Edge Zones location type. + */ + public static final ExtendedLocationType EDGE_ZONE = fromString("EdgeZone"); + + /** + * Azure Custom Locations type. + */ + public static final ExtendedLocationType CUSTOM_LOCATION = fromString("CustomLocation"); + + /** + * Creates a new instance of ExtendedLocationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExtendedLocationType() { + } + + /** + * Creates or finds a ExtendedLocationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExtendedLocationType. + */ + public static ExtendedLocationType fromString(String name) { + return fromString(name, ExtendedLocationType.class); + } + + /** + * Gets known ExtendedLocationType values. + * + * @return known ExtendedLocationType values. + */ + public static Collection values() { + return values(ExtendedLocationType.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FallbackOperationInfo.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FallbackOperationInfo.java new file mode 100644 index 000000000000..2bec923e4ef4 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FallbackOperationInfo.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the fallback operation that was performed. + */ +@Immutable +public final class FallbackOperationInfo implements JsonSerializable { + /* + * The last operation type that was performed as a fallback + */ + private ResourceOperationType lastOpType; + + /* + * The status of the fallback operation + */ + private String status; + + /* + * The error code if the fallback operation failed + */ + private ResourceOperationError error; + + /** + * Creates an instance of FallbackOperationInfo class. + */ + private FallbackOperationInfo() { + } + + /** + * Get the lastOpType property: The last operation type that was performed as a fallback. + * + * @return the lastOpType value. + */ + public ResourceOperationType lastOpType() { + return this.lastOpType; + } + + /** + * Get the status property: The status of the fallback operation. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the error property: The error code if the fallback operation failed. + * + * @return the error value. + */ + public ResourceOperationError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("lastOpType", this.lastOpType == null ? null : this.lastOpType.toString()); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FallbackOperationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FallbackOperationInfo 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. + * @throws IOException If an error occurs while reading the FallbackOperationInfo. + */ + public static FallbackOperationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FallbackOperationInfo deserializedFallbackOperationInfo = new FallbackOperationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lastOpType".equals(fieldName)) { + deserializedFallbackOperationInfo.lastOpType = ResourceOperationType.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedFallbackOperationInfo.status = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedFallbackOperationInfo.error = ResourceOperationError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFallbackOperationInfo; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FlexProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FlexProperties.java new file mode 100644 index 000000000000..4b1cec8ee886 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FlexProperties.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; + +/** + * The flex properties for flexible VM creation. + */ +@Fluent +public final class FlexProperties implements JsonSerializable { + /* + * The list of VM size profiles to use for flex creation + */ + private List vmSizeProfiles; + + /* + * The operating system type for the VMs + */ + private OsType osType; + + /* + * The priority profile for VM allocation + */ + private PriorityProfile priorityProfile; + + /* + * The zone allocation policy for distributing VMs across availability zones + */ + private ZoneAllocationPolicy zoneAllocationPolicy; + + /** + * Creates an instance of FlexProperties class. + */ + public FlexProperties() { + } + + /** + * Get the vmSizeProfiles property: The list of VM size profiles to use for flex creation. + * + * @return the vmSizeProfiles value. + */ + public List vmSizeProfiles() { + return this.vmSizeProfiles; + } + + /** + * Set the vmSizeProfiles property: The list of VM size profiles to use for flex creation. + * + * @param vmSizeProfiles the vmSizeProfiles value to set. + * @return the FlexProperties object itself. + */ + public FlexProperties withVmSizeProfiles(List vmSizeProfiles) { + this.vmSizeProfiles = vmSizeProfiles; + return this; + } + + /** + * Get the osType property: The operating system type for the VMs. + * + * @return the osType value. + */ + public OsType osType() { + return this.osType; + } + + /** + * Set the osType property: The operating system type for the VMs. + * + * @param osType the osType value to set. + * @return the FlexProperties object itself. + */ + public FlexProperties withOsType(OsType osType) { + this.osType = osType; + return this; + } + + /** + * Get the priorityProfile property: The priority profile for VM allocation. + * + * @return the priorityProfile value. + */ + public PriorityProfile priorityProfile() { + return this.priorityProfile; + } + + /** + * Set the priorityProfile property: The priority profile for VM allocation. + * + * @param priorityProfile the priorityProfile value to set. + * @return the FlexProperties object itself. + */ + public FlexProperties withPriorityProfile(PriorityProfile priorityProfile) { + this.priorityProfile = priorityProfile; + return this; + } + + /** + * Get the zoneAllocationPolicy property: The zone allocation policy for distributing VMs across availability zones. + * + * @return the zoneAllocationPolicy value. + */ + public ZoneAllocationPolicy zoneAllocationPolicy() { + return this.zoneAllocationPolicy; + } + + /** + * Set the zoneAllocationPolicy property: The zone allocation policy for distributing VMs across availability zones. + * + * @param zoneAllocationPolicy the zoneAllocationPolicy value to set. + * @return the FlexProperties object itself. + */ + public FlexProperties withZoneAllocationPolicy(ZoneAllocationPolicy zoneAllocationPolicy) { + this.zoneAllocationPolicy = zoneAllocationPolicy; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("vmSizeProfiles", this.vmSizeProfiles, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); + jsonWriter.writeJsonField("priorityProfile", this.priorityProfile); + jsonWriter.writeJsonField("zoneAllocationPolicy", this.zoneAllocationPolicy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FlexProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FlexProperties 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. + * @throws IOException If an error occurs while reading the FlexProperties. + */ + public static FlexProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FlexProperties deserializedFlexProperties = new FlexProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vmSizeProfiles".equals(fieldName)) { + List vmSizeProfiles = reader.readArray(reader1 -> VmSizeProfile.fromJson(reader1)); + deserializedFlexProperties.vmSizeProfiles = vmSizeProfiles; + } else if ("osType".equals(fieldName)) { + deserializedFlexProperties.osType = OsType.fromString(reader.getString()); + } else if ("priorityProfile".equals(fieldName)) { + deserializedFlexProperties.priorityProfile = PriorityProfile.fromJson(reader); + } else if ("zoneAllocationPolicy".equals(fieldName)) { + deserializedFlexProperties.zoneAllocationPolicy = ZoneAllocationPolicy.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFlexProperties; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsContent.java similarity index 75% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsRequest.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsContent.java index 39006f132b22..8003842a1e0a 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsRequest.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsContent.java @@ -16,16 +16,16 @@ * This is the request to get errors per vm operations. */ @Fluent -public final class GetOperationErrorsRequest implements JsonSerializable { +public final class GetOperationErrorsContent implements JsonSerializable { /* * The list of operation ids to query errors of */ private List operationIds; /** - * Creates an instance of GetOperationErrorsRequest class. + * Creates an instance of GetOperationErrorsContent class. */ - public GetOperationErrorsRequest() { + public GetOperationErrorsContent() { } /** @@ -41,9 +41,9 @@ public List operationIds() { * Set the operationIds property: The list of operation ids to query errors of. * * @param operationIds the operationIds value to set. - * @return the GetOperationErrorsRequest object itself. + * @return the GetOperationErrorsContent object itself. */ - public GetOperationErrorsRequest withOperationIds(List operationIds) { + public GetOperationErrorsContent withOperationIds(List operationIds) { this.operationIds = operationIds; return this; } @@ -59,30 +59,30 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of GetOperationErrorsRequest from the JsonReader. + * Reads an instance of GetOperationErrorsContent from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of GetOperationErrorsRequest if the JsonReader was pointing to an instance of it, or null if + * @return An instance of GetOperationErrorsContent 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. - * @throws IOException If an error occurs while reading the GetOperationErrorsRequest. + * @throws IOException If an error occurs while reading the GetOperationErrorsContent. */ - public static GetOperationErrorsRequest fromJson(JsonReader jsonReader) throws IOException { + public static GetOperationErrorsContent fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - GetOperationErrorsRequest deserializedGetOperationErrorsRequest = new GetOperationErrorsRequest(); + GetOperationErrorsContent deserializedGetOperationErrorsContent = new GetOperationErrorsContent(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("operationIds".equals(fieldName)) { List operationIds = reader.readArray(reader1 -> reader1.getString()); - deserializedGetOperationErrorsRequest.operationIds = operationIds; + deserializedGetOperationErrorsContent.operationIds = operationIds; } else { reader.skipChildren(); } } - return deserializedGetOperationErrorsRequest; + return deserializedGetOperationErrorsContent; }); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusContent.java similarity index 75% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusRequest.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusContent.java index 7b1d2a40f64d..225d9a3bd2bf 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusRequest.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusContent.java @@ -16,7 +16,7 @@ * This is the request to get operation status using operationids. */ @Fluent -public final class GetOperationStatusRequest implements JsonSerializable { +public final class GetOperationStatusContent implements JsonSerializable { /* * The list of operation ids to get the status of */ @@ -28,9 +28,9 @@ public final class GetOperationStatusRequest implements JsonSerializable operationIds() { * Set the operationIds property: The list of operation ids to get the status of. * * @param operationIds the operationIds value to set. - * @return the GetOperationStatusRequest object itself. + * @return the GetOperationStatusContent object itself. */ - public GetOperationStatusRequest withOperationIds(List operationIds) { + public GetOperationStatusContent withOperationIds(List operationIds) { this.operationIds = operationIds; return this; } @@ -66,9 +66,9 @@ public String correlationid() { * Set the correlationid property: CorrelationId item. * * @param correlationid the correlationid value to set. - * @return the GetOperationStatusRequest object itself. + * @return the GetOperationStatusContent object itself. */ - public GetOperationStatusRequest withCorrelationid(String correlationid) { + public GetOperationStatusContent withCorrelationid(String correlationid) { this.correlationid = correlationid; return this; } @@ -85,32 +85,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of GetOperationStatusRequest from the JsonReader. + * Reads an instance of GetOperationStatusContent from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of GetOperationStatusRequest if the JsonReader was pointing to an instance of it, or null if + * @return An instance of GetOperationStatusContent 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. - * @throws IOException If an error occurs while reading the GetOperationStatusRequest. + * @throws IOException If an error occurs while reading the GetOperationStatusContent. */ - public static GetOperationStatusRequest fromJson(JsonReader jsonReader) throws IOException { + public static GetOperationStatusContent fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - GetOperationStatusRequest deserializedGetOperationStatusRequest = new GetOperationStatusRequest(); + GetOperationStatusContent deserializedGetOperationStatusContent = new GetOperationStatusContent(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("operationIds".equals(fieldName)) { List operationIds = reader.readArray(reader1 -> reader1.getString()); - deserializedGetOperationStatusRequest.operationIds = operationIds; + deserializedGetOperationStatusContent.operationIds = operationIds; } else if ("correlationid".equals(fieldName)) { - deserializedGetOperationStatusRequest.correlationid = reader.getString(); + deserializedGetOperationStatusContent.correlationid = reader.getString(); } else { reader.skipChildren(); } } - return deserializedGetOperationStatusRequest; + return deserializedGetOperationStatusContent; }); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HostEndpointSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HostEndpointSettings.java new file mode 100644 index 000000000000..fac5e3f6c2f9 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HostEndpointSettings.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies particular host endpoint settings. + */ +@Fluent +public final class HostEndpointSettings implements JsonSerializable { + /* + * Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, + * including emitting access denial entries in the logs but it does not actually deny any requests to host + * endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of + * operation. + */ + private Modes mode; + + /* + * Specifies the InVMAccessControlProfileVersion resource id in the format of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{ + * galleryName}/inVMAccessControlProfiles/{profile}/versions/{version} + */ + private String inVMAccessControlProfileReferenceId; + + /** + * Creates an instance of HostEndpointSettings class. + */ + public HostEndpointSettings() { + } + + /** + * Get the mode property: Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the + * access control policy, including emitting access denial entries in the logs but it does not actually deny any + * requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended + * mode of operation. + * + * @return the mode value. + */ + public Modes mode() { + return this.mode; + } + + /** + * Set the mode property: Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the + * access control policy, including emitting access denial entries in the logs but it does not actually deny any + * requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended + * mode of operation. + * + * @param mode the mode value to set. + * @return the HostEndpointSettings object itself. + */ + public HostEndpointSettings withMode(Modes mode) { + this.mode = mode; + return this; + } + + /** + * Get the inVMAccessControlProfileReferenceId property: Specifies the InVMAccessControlProfileVersion resource id + * in the format of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}. + * + * @return the inVMAccessControlProfileReferenceId value. + */ + public String inVMAccessControlProfileReferenceId() { + return this.inVMAccessControlProfileReferenceId; + } + + /** + * Set the inVMAccessControlProfileReferenceId property: Specifies the InVMAccessControlProfileVersion resource id + * in the format of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}. + * + * @param inVMAccessControlProfileReferenceId the inVMAccessControlProfileReferenceId value to set. + * @return the HostEndpointSettings object itself. + */ + public HostEndpointSettings withInVMAccessControlProfileReferenceId(String inVMAccessControlProfileReferenceId) { + this.inVMAccessControlProfileReferenceId = inVMAccessControlProfileReferenceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("inVMAccessControlProfileReferenceId", this.inVMAccessControlProfileReferenceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HostEndpointSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HostEndpointSettings 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 HostEndpointSettings. + */ + public static HostEndpointSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HostEndpointSettings deserializedHostEndpointSettings = new HostEndpointSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedHostEndpointSettings.mode = Modes.fromString(reader.getString()); + } else if ("inVMAccessControlProfileReferenceId".equals(fieldName)) { + deserializedHostEndpointSettings.inVMAccessControlProfileReferenceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHostEndpointSettings; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/IPVersions.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/IPVersions.java new file mode 100644 index 000000000000..5eb3cce32fbc --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/IPVersions.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Available from compute Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or + * IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + */ +public final class IPVersions extends ExpandableStringEnum { + /** + * IPv4 version. + */ + public static final IPVersions IPV4 = fromString("IPv4"); + + /** + * IPv6 version. + */ + public static final IPVersions IPV6 = fromString("IPv6"); + + /** + * Creates a new instance of IPVersions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IPVersions() { + } + + /** + * Creates or finds a IPVersions from its string representation. + * + * @param name a name to look for. + * @return the corresponding IPVersions. + */ + public static IPVersions fromString(String name) { + return fromString(name, IPVersions.class); + } + + /** + * Gets known IPVersions values. + * + * @return known IPVersions values. + */ + public static Collection values() { + return values(IPVersions.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ImageReference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ImageReference.java new file mode 100644 index 000000000000..e224930fbe5d --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ImageReference.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies information about the image to use. You can specify information about platform images, marketplace images, + * or virtual machine images. This element is required when you want to use a platform image, marketplace image, or + * virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can + * only be set when you create the scale set. + */ +@Fluent +public final class ImageReference extends SubResource { + /* + * The image publisher. + */ + private String publisher; + + /* + * Specifies the offer of the platform image or marketplace image used to create the virtual machine. + */ + private String offer; + + /* + * The image SKU. + */ + private String sku; + + /* + * Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed + * formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use + * the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not + * automatically update after deploy time even if a new version becomes available. Please do not use field 'version' + * for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version + * of gallery image, just set + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{ + * galleryName}/images/{imageName}' in the 'id' field without version input. + */ + private String version; + + /* + * Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET + * call. + */ + private String sharedGalleryImageId; + + /* + * Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery + * image GET call. + */ + private String communityGalleryImageId; + + /** + * Creates an instance of ImageReference class. + */ + public ImageReference() { + } + + /** + * Get the publisher property: The image publisher. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: The image publisher. + * + * @param publisher the publisher value to set. + * @return the ImageReference object itself. + */ + public ImageReference withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the offer property: Specifies the offer of the platform image or marketplace image used to create the virtual + * machine. + * + * @return the offer value. + */ + public String offer() { + return this.offer; + } + + /** + * Set the offer property: Specifies the offer of the platform image or marketplace image used to create the virtual + * machine. + * + * @param offer the offer value to set. + * @return the ImageReference object itself. + */ + public ImageReference withOffer(String offer) { + this.offer = offer; + return this; + } + + /** + * Get the sku property: The image SKU. + * + * @return the sku value. + */ + public String sku() { + return this.sku; + } + + /** + * Set the sku property: The image SKU. + * + * @param sku the sku value to set. + * @return the ImageReference object itself. + */ + public ImageReference withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get the version property: Specifies the version of the platform image or marketplace image used to create the + * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + * numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use + * 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. + * Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for + * deployment, to use 'latest' version of gallery image, just set + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' + * in the 'id' field without version input. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Specifies the version of the platform image or marketplace image used to create the + * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal + * numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use + * 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. + * Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for + * deployment, to use 'latest' version of gallery image, just set + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' + * in the 'id' field without version input. + * + * @param version the version value to set. + * @return the ImageReference object itself. + */ + public ImageReference withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the sharedGalleryImageId property: Specified the shared gallery image unique id for vm deployment. This can + * be fetched from shared gallery image GET call. + * + * @return the sharedGalleryImageId value. + */ + public String sharedGalleryImageId() { + return this.sharedGalleryImageId; + } + + /** + * Set the sharedGalleryImageId property: Specified the shared gallery image unique id for vm deployment. This can + * be fetched from shared gallery image GET call. + * + * @param sharedGalleryImageId the sharedGalleryImageId value to set. + * @return the ImageReference object itself. + */ + public ImageReference withSharedGalleryImageId(String sharedGalleryImageId) { + this.sharedGalleryImageId = sharedGalleryImageId; + return this; + } + + /** + * Get the communityGalleryImageId property: Specified the community gallery image unique id for vm deployment. This + * can be fetched from community gallery image GET call. + * + * @return the communityGalleryImageId value. + */ + public String communityGalleryImageId() { + return this.communityGalleryImageId; + } + + /** + * Set the communityGalleryImageId property: Specified the community gallery image unique id for vm deployment. This + * can be fetched from community gallery image GET call. + * + * @param communityGalleryImageId the communityGalleryImageId value to set. + * @return the ImageReference object itself. + */ + public ImageReference withCommunityGalleryImageId(String communityGalleryImageId) { + this.communityGalleryImageId = communityGalleryImageId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ImageReference withId(String id) { + super.withId(id); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", id()); + jsonWriter.writeStringField("publisher", this.publisher); + jsonWriter.writeStringField("offer", this.offer); + jsonWriter.writeStringField("sku", this.sku); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("sharedGalleryImageId", this.sharedGalleryImageId); + jsonWriter.writeStringField("communityGalleryImageId", this.communityGalleryImageId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImageReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImageReference 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 ImageReference. + */ + public static ImageReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImageReference deserializedImageReference = new ImageReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedImageReference.withId(reader.getString()); + } else if ("publisher".equals(fieldName)) { + deserializedImageReference.publisher = reader.getString(); + } else if ("offer".equals(fieldName)) { + deserializedImageReference.offer = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedImageReference.sku = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedImageReference.version = reader.getString(); + } else if ("sharedGalleryImageId".equals(fieldName)) { + deserializedImageReference.sharedGalleryImageId = reader.getString(); + } else if ("communityGalleryImageId".equals(fieldName)) { + deserializedImageReference.communityGalleryImageId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedImageReference; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultKeyReference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultKeyReference.java new file mode 100644 index 000000000000..51d88a713ddc --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultKeyReference.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes a reference to Key Vault Key. + */ +@Fluent +public final class KeyVaultKeyReference implements JsonSerializable { + /* + * The URL referencing a key encryption key in Key Vault. + */ + private String keyUrl; + + /* + * The relative URL of the Key Vault containing the key. + */ + private SubResource sourceVault; + + /** + * Creates an instance of KeyVaultKeyReference class. + */ + public KeyVaultKeyReference() { + } + + /** + * Get the keyUrl property: The URL referencing a key encryption key in Key Vault. + * + * @return the keyUrl value. + */ + public String keyUrl() { + return this.keyUrl; + } + + /** + * Set the keyUrl property: The URL referencing a key encryption key in Key Vault. + * + * @param keyUrl the keyUrl value to set. + * @return the KeyVaultKeyReference object itself. + */ + public KeyVaultKeyReference withKeyUrl(String keyUrl) { + this.keyUrl = keyUrl; + return this; + } + + /** + * Get the sourceVault property: The relative URL of the Key Vault containing the key. + * + * @return the sourceVault value. + */ + public SubResource sourceVault() { + return this.sourceVault; + } + + /** + * Set the sourceVault property: The relative URL of the Key Vault containing the key. + * + * @param sourceVault the sourceVault value to set. + * @return the KeyVaultKeyReference object itself. + */ + public KeyVaultKeyReference withSourceVault(SubResource sourceVault) { + this.sourceVault = sourceVault; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyUrl", this.keyUrl); + jsonWriter.writeJsonField("sourceVault", this.sourceVault); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyVaultKeyReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyVaultKeyReference 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. + * @throws IOException If an error occurs while reading the KeyVaultKeyReference. + */ + public static KeyVaultKeyReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyVaultKeyReference deserializedKeyVaultKeyReference = new KeyVaultKeyReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyUrl".equals(fieldName)) { + deserializedKeyVaultKeyReference.keyUrl = reader.getString(); + } else if ("sourceVault".equals(fieldName)) { + deserializedKeyVaultKeyReference.sourceVault = SubResource.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyVaultKeyReference; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultSecretReference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultSecretReference.java new file mode 100644 index 000000000000..19ff34e07783 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultSecretReference.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes a reference to Key Vault Secret. + */ +@Fluent +public final class KeyVaultSecretReference implements JsonSerializable { + /* + * The URL referencing a secret in a Key Vault. + */ + private String secretUrl; + + /* + * The relative URL of the Key Vault containing the secret. + */ + private SubResource sourceVault; + + /** + * Creates an instance of KeyVaultSecretReference class. + */ + public KeyVaultSecretReference() { + } + + /** + * Get the secretUrl property: The URL referencing a secret in a Key Vault. + * + * @return the secretUrl value. + */ + public String secretUrl() { + return this.secretUrl; + } + + /** + * Set the secretUrl property: The URL referencing a secret in a Key Vault. + * + * @param secretUrl the secretUrl value to set. + * @return the KeyVaultSecretReference object itself. + */ + public KeyVaultSecretReference withSecretUrl(String secretUrl) { + this.secretUrl = secretUrl; + return this; + } + + /** + * Get the sourceVault property: The relative URL of the Key Vault containing the secret. + * + * @return the sourceVault value. + */ + public SubResource sourceVault() { + return this.sourceVault; + } + + /** + * Set the sourceVault property: The relative URL of the Key Vault containing the secret. + * + * @param sourceVault the sourceVault value to set. + * @return the KeyVaultSecretReference object itself. + */ + public KeyVaultSecretReference withSourceVault(SubResource sourceVault) { + this.sourceVault = sourceVault; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("secretUrl", this.secretUrl); + jsonWriter.writeJsonField("sourceVault", this.sourceVault); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyVaultSecretReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyVaultSecretReference 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. + * @throws IOException If an error occurs while reading the KeyVaultSecretReference. + */ + public static KeyVaultSecretReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyVaultSecretReference deserializedKeyVaultSecretReference = new KeyVaultSecretReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("secretUrl".equals(fieldName)) { + deserializedKeyVaultSecretReference.secretUrl = reader.getString(); + } else if ("sourceVault".equals(fieldName)) { + deserializedKeyVaultSecretReference.sourceVault = SubResource.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyVaultSecretReference; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxConfiguration.java new file mode 100644 index 000000000000..6e879d7048a4 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxConfiguration.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, + * see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + */ +@Fluent +public final class LinuxConfiguration implements JsonSerializable { + /* + * Specifies whether password authentication should be disabled. + */ + private Boolean disablePasswordAuthentication; + + /* + * Specifies the ssh key configuration for a Linux OS. + */ + private SshConfiguration ssh; + + /* + * Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not + * specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed + * on the VM so that extensions can be added to the VM later. + */ + private Boolean provisionVMAgent; + + /* + * [Preview Feature] Specifies settings related to VM Guest Patching on Linux. + */ + private LinuxPatchSettings patchSettings; + + /* + * Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default value is false. + */ + private Boolean enableVMAgentPlatformUpdates; + + /** + * Creates an instance of LinuxConfiguration class. + */ + public LinuxConfiguration() { + } + + /** + * Get the disablePasswordAuthentication property: Specifies whether password authentication should be disabled. + * + * @return the disablePasswordAuthentication value. + */ + public Boolean disablePasswordAuthentication() { + return this.disablePasswordAuthentication; + } + + /** + * Set the disablePasswordAuthentication property: Specifies whether password authentication should be disabled. + * + * @param disablePasswordAuthentication the disablePasswordAuthentication value to set. + * @return the LinuxConfiguration object itself. + */ + public LinuxConfiguration withDisablePasswordAuthentication(Boolean disablePasswordAuthentication) { + this.disablePasswordAuthentication = disablePasswordAuthentication; + return this; + } + + /** + * Get the ssh property: Specifies the ssh key configuration for a Linux OS. + * + * @return the ssh value. + */ + public SshConfiguration ssh() { + return this.ssh; + } + + /** + * Set the ssh property: Specifies the ssh key configuration for a Linux OS. + * + * @param ssh the ssh value to set. + * @return the LinuxConfiguration object itself. + */ + public LinuxConfiguration withSsh(SshConfiguration ssh) { + this.ssh = ssh; + return this; + } + + /** + * Get the provisionVMAgent property: Indicates whether virtual machine agent should be provisioned on the virtual + * machine. When this property is not specified in the request body, default behavior is to set it to true. This + * will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. + * + * @return the provisionVMAgent value. + */ + public Boolean provisionVMAgent() { + return this.provisionVMAgent; + } + + /** + * Set the provisionVMAgent property: Indicates whether virtual machine agent should be provisioned on the virtual + * machine. When this property is not specified in the request body, default behavior is to set it to true. This + * will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. + * + * @param provisionVMAgent the provisionVMAgent value to set. + * @return the LinuxConfiguration object itself. + */ + public LinuxConfiguration withProvisionVMAgent(Boolean provisionVMAgent) { + this.provisionVMAgent = provisionVMAgent; + return this; + } + + /** + * Get the patchSettings property: [Preview Feature] Specifies settings related to VM Guest Patching on Linux. + * + * @return the patchSettings value. + */ + public LinuxPatchSettings patchSettings() { + return this.patchSettings; + } + + /** + * Set the patchSettings property: [Preview Feature] Specifies settings related to VM Guest Patching on Linux. + * + * @param patchSettings the patchSettings value to set. + * @return the LinuxConfiguration object itself. + */ + public LinuxConfiguration withPatchSettings(LinuxPatchSettings patchSettings) { + this.patchSettings = patchSettings; + return this; + } + + /** + * Get the enableVMAgentPlatformUpdates property: Indicates whether VMAgent Platform Updates is enabled for the + * Linux virtual machine. Default value is false. + * + * @return the enableVMAgentPlatformUpdates value. + */ + public Boolean enableVMAgentPlatformUpdates() { + return this.enableVMAgentPlatformUpdates; + } + + /** + * Set the enableVMAgentPlatformUpdates property: Indicates whether VMAgent Platform Updates is enabled for the + * Linux virtual machine. Default value is false. + * + * @param enableVMAgentPlatformUpdates the enableVMAgentPlatformUpdates value to set. + * @return the LinuxConfiguration object itself. + */ + public LinuxConfiguration withEnableVMAgentPlatformUpdates(Boolean enableVMAgentPlatformUpdates) { + this.enableVMAgentPlatformUpdates = enableVMAgentPlatformUpdates; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("disablePasswordAuthentication", this.disablePasswordAuthentication); + jsonWriter.writeJsonField("ssh", this.ssh); + jsonWriter.writeBooleanField("provisionVMAgent", this.provisionVMAgent); + jsonWriter.writeJsonField("patchSettings", this.patchSettings); + jsonWriter.writeBooleanField("enableVMAgentPlatformUpdates", this.enableVMAgentPlatformUpdates); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LinuxConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LinuxConfiguration 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 LinuxConfiguration. + */ + public static LinuxConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LinuxConfiguration deserializedLinuxConfiguration = new LinuxConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("disablePasswordAuthentication".equals(fieldName)) { + deserializedLinuxConfiguration.disablePasswordAuthentication + = reader.getNullable(JsonReader::getBoolean); + } else if ("ssh".equals(fieldName)) { + deserializedLinuxConfiguration.ssh = SshConfiguration.fromJson(reader); + } else if ("provisionVMAgent".equals(fieldName)) { + deserializedLinuxConfiguration.provisionVMAgent = reader.getNullable(JsonReader::getBoolean); + } else if ("patchSettings".equals(fieldName)) { + deserializedLinuxConfiguration.patchSettings = LinuxPatchSettings.fromJson(reader); + } else if ("enableVMAgentPlatformUpdates".equals(fieldName)) { + deserializedLinuxConfiguration.enableVMAgentPlatformUpdates + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedLinuxConfiguration; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchAssessmentMode.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchAssessmentMode.java new file mode 100644 index 000000000000..4569fe248d5e --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchAssessmentMode.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.<br /><br /> Possible values + * are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual machine. + * <br /><br /> **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property + * provisionVMAgent must be true. + */ +public final class LinuxPatchAssessmentMode extends ExpandableStringEnum { + /** + * ImageDefault mode. + */ + public static final LinuxPatchAssessmentMode IMAGE_DEFAULT = fromString("ImageDefault"); + + /** + * AutomaticByPlatform mode. + */ + public static final LinuxPatchAssessmentMode AUTOMATIC_BY_PLATFORM = fromString("AutomaticByPlatform"); + + /** + * Creates a new instance of LinuxPatchAssessmentMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LinuxPatchAssessmentMode() { + } + + /** + * Creates or finds a LinuxPatchAssessmentMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding LinuxPatchAssessmentMode. + */ + public static LinuxPatchAssessmentMode fromString(String name) { + return fromString(name, LinuxPatchAssessmentMode.class); + } + + /** + * Gets known LinuxPatchAssessmentMode values. + * + * @return known LinuxPatchAssessmentMode values. + */ + public static Collection values() { + return values(LinuxPatchAssessmentMode.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchSettings.java new file mode 100644 index 000000000000..be04be6c7e3e --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchSettings.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies settings related to VM Guest Patching on Linux. + */ +@Fluent +public final class LinuxPatchSettings implements JsonSerializable { + /* + * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine + * scale set with OrchestrationMode as Flexible.

Possible values are:

**ImageDefault** - The + * virtual machine's default patching configuration is used.

**AutomaticByPlatform** - The virtual + * machine will be automatically updated by the platform. The property provisionVMAgent must be true + */ + private LinuxVMGuestPatchMode patchMode; + + /* + * Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

Possible values are:

**ImageDefault** - You control the timing of patch assessments on a virtual machine.

+ * **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent + * must be true. + */ + private LinuxPatchAssessmentMode assessmentMode; + + /* + * Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux. + */ + private LinuxVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings; + + /** + * Creates an instance of LinuxPatchSettings class. + */ + public LinuxPatchSettings() { + } + + /** + * Get the patchMode property: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines + * associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible + * values are:<br /><br /> **ImageDefault** - The virtual machine's default patching configuration is + * used. <br /><br /> **AutomaticByPlatform** - The virtual machine will be automatically updated by the + * platform. The property provisionVMAgent must be true. + * + * @return the patchMode value. + */ + public LinuxVMGuestPatchMode patchMode() { + return this.patchMode; + } + + /** + * Set the patchMode property: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines + * associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible + * values are:<br /><br /> **ImageDefault** - The virtual machine's default patching configuration is + * used. <br /><br /> **AutomaticByPlatform** - The virtual machine will be automatically updated by the + * platform. The property provisionVMAgent must be true. + * + * @param patchMode the patchMode value to set. + * @return the LinuxPatchSettings object itself. + */ + public LinuxPatchSettings withPatchMode(LinuxVMGuestPatchMode patchMode) { + this.patchMode = patchMode; + return this; + } + + /** + * Get the assessmentMode property: Specifies the mode of VM Guest Patch Assessment for the IaaS virtual + * machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the + * timing of patch assessments on a virtual machine. <br /><br /> **AutomaticByPlatform** - The platform + * will trigger periodic patch assessments. The property provisionVMAgent must be true. + * + * @return the assessmentMode value. + */ + public LinuxPatchAssessmentMode assessmentMode() { + return this.assessmentMode; + } + + /** + * Set the assessmentMode property: Specifies the mode of VM Guest Patch Assessment for the IaaS virtual + * machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the + * timing of patch assessments on a virtual machine. <br /><br /> **AutomaticByPlatform** - The platform + * will trigger periodic patch assessments. The property provisionVMAgent must be true. + * + * @param assessmentMode the assessmentMode value to set. + * @return the LinuxPatchSettings object itself. + */ + public LinuxPatchSettings withAssessmentMode(LinuxPatchAssessmentMode assessmentMode) { + this.assessmentMode = assessmentMode; + return this; + } + + /** + * Get the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in + * VM Guest Patching on Linux. + * + * @return the automaticByPlatformSettings value. + */ + public LinuxVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings() { + return this.automaticByPlatformSettings; + } + + /** + * Set the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in + * VM Guest Patching on Linux. + * + * @param automaticByPlatformSettings the automaticByPlatformSettings value to set. + * @return the LinuxPatchSettings object itself. + */ + public LinuxPatchSettings + withAutomaticByPlatformSettings(LinuxVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings) { + this.automaticByPlatformSettings = automaticByPlatformSettings; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("patchMode", this.patchMode == null ? null : this.patchMode.toString()); + jsonWriter.writeStringField("assessmentMode", + this.assessmentMode == null ? null : this.assessmentMode.toString()); + jsonWriter.writeJsonField("automaticByPlatformSettings", this.automaticByPlatformSettings); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LinuxPatchSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LinuxPatchSettings 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 LinuxPatchSettings. + */ + public static LinuxPatchSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LinuxPatchSettings deserializedLinuxPatchSettings = new LinuxPatchSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("patchMode".equals(fieldName)) { + deserializedLinuxPatchSettings.patchMode = LinuxVMGuestPatchMode.fromString(reader.getString()); + } else if ("assessmentMode".equals(fieldName)) { + deserializedLinuxPatchSettings.assessmentMode + = LinuxPatchAssessmentMode.fromString(reader.getString()); + } else if ("automaticByPlatformSettings".equals(fieldName)) { + deserializedLinuxPatchSettings.automaticByPlatformSettings + = LinuxVMGuestPatchAutomaticByPlatformSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLinuxPatchSettings; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformRebootSetting.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformRebootSetting.java new file mode 100644 index 000000000000..9d884367001b --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformRebootSetting.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the reboot setting for all AutomaticByPlatform patch installation operations. + */ +public final class LinuxVMGuestPatchAutomaticByPlatformRebootSetting + extends ExpandableStringEnum { + /** + * Unknown reboot setting. + */ + public static final LinuxVMGuestPatchAutomaticByPlatformRebootSetting UNKNOWN = fromString("Unknown"); + + /** + * Reboot if required. + */ + public static final LinuxVMGuestPatchAutomaticByPlatformRebootSetting IF_REQUIRED = fromString("IfRequired"); + + /** + * Never reboot. + */ + public static final LinuxVMGuestPatchAutomaticByPlatformRebootSetting NEVER = fromString("Never"); + + /** + * Always reboot. + */ + public static final LinuxVMGuestPatchAutomaticByPlatformRebootSetting ALWAYS = fromString("Always"); + + /** + * Creates a new instance of LinuxVMGuestPatchAutomaticByPlatformRebootSetting value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LinuxVMGuestPatchAutomaticByPlatformRebootSetting() { + } + + /** + * Creates or finds a LinuxVMGuestPatchAutomaticByPlatformRebootSetting from its string representation. + * + * @param name a name to look for. + * @return the corresponding LinuxVMGuestPatchAutomaticByPlatformRebootSetting. + */ + public static LinuxVMGuestPatchAutomaticByPlatformRebootSetting fromString(String name) { + return fromString(name, LinuxVMGuestPatchAutomaticByPlatformRebootSetting.class); + } + + /** + * Gets known LinuxVMGuestPatchAutomaticByPlatformRebootSetting values. + * + * @return known LinuxVMGuestPatchAutomaticByPlatformRebootSetting values. + */ + public static Collection values() { + return values(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformSettings.java new file mode 100644 index 000000000000..a648795899c0 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformSettings.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings. + */ +@Fluent +public final class LinuxVMGuestPatchAutomaticByPlatformSettings + implements JsonSerializable { + /* + * Specifies the reboot setting for all AutomaticByPlatform patch installation operations. + */ + private LinuxVMGuestPatchAutomaticByPlatformRebootSetting rebootSetting; + + /* + * Enables customer to schedule patching without accidental upgrades + */ + private Boolean bypassPlatformSafetyChecksOnUserSchedule; + + /** + * Creates an instance of LinuxVMGuestPatchAutomaticByPlatformSettings class. + */ + public LinuxVMGuestPatchAutomaticByPlatformSettings() { + } + + /** + * Get the rebootSetting property: Specifies the reboot setting for all AutomaticByPlatform patch installation + * operations. + * + * @return the rebootSetting value. + */ + public LinuxVMGuestPatchAutomaticByPlatformRebootSetting rebootSetting() { + return this.rebootSetting; + } + + /** + * Set the rebootSetting property: Specifies the reboot setting for all AutomaticByPlatform patch installation + * operations. + * + * @param rebootSetting the rebootSetting value to set. + * @return the LinuxVMGuestPatchAutomaticByPlatformSettings object itself. + */ + public LinuxVMGuestPatchAutomaticByPlatformSettings + withRebootSetting(LinuxVMGuestPatchAutomaticByPlatformRebootSetting rebootSetting) { + this.rebootSetting = rebootSetting; + return this; + } + + /** + * Get the bypassPlatformSafetyChecksOnUserSchedule property: Enables customer to schedule patching without + * accidental upgrades. + * + * @return the bypassPlatformSafetyChecksOnUserSchedule value. + */ + public Boolean bypassPlatformSafetyChecksOnUserSchedule() { + return this.bypassPlatformSafetyChecksOnUserSchedule; + } + + /** + * Set the bypassPlatformSafetyChecksOnUserSchedule property: Enables customer to schedule patching without + * accidental upgrades. + * + * @param bypassPlatformSafetyChecksOnUserSchedule the bypassPlatformSafetyChecksOnUserSchedule value to set. + * @return the LinuxVMGuestPatchAutomaticByPlatformSettings object itself. + */ + public LinuxVMGuestPatchAutomaticByPlatformSettings + withBypassPlatformSafetyChecksOnUserSchedule(Boolean bypassPlatformSafetyChecksOnUserSchedule) { + this.bypassPlatformSafetyChecksOnUserSchedule = bypassPlatformSafetyChecksOnUserSchedule; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("rebootSetting", this.rebootSetting == null ? null : this.rebootSetting.toString()); + jsonWriter.writeBooleanField("bypassPlatformSafetyChecksOnUserSchedule", + this.bypassPlatformSafetyChecksOnUserSchedule); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LinuxVMGuestPatchAutomaticByPlatformSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LinuxVMGuestPatchAutomaticByPlatformSettings 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 LinuxVMGuestPatchAutomaticByPlatformSettings. + */ + public static LinuxVMGuestPatchAutomaticByPlatformSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LinuxVMGuestPatchAutomaticByPlatformSettings deserializedLinuxVMGuestPatchAutomaticByPlatformSettings + = new LinuxVMGuestPatchAutomaticByPlatformSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rebootSetting".equals(fieldName)) { + deserializedLinuxVMGuestPatchAutomaticByPlatformSettings.rebootSetting + = LinuxVMGuestPatchAutomaticByPlatformRebootSetting.fromString(reader.getString()); + } else if ("bypassPlatformSafetyChecksOnUserSchedule".equals(fieldName)) { + deserializedLinuxVMGuestPatchAutomaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedLinuxVMGuestPatchAutomaticByPlatformSettings; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchMode.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchMode.java new file mode 100644 index 000000000000..f9a6cd84f4cf --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchMode.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine + * scale set with OrchestrationMode as Flexible.<br /><br /> Possible values are:<br /><br /> + * **ImageDefault** - The virtual machine's default patching configuration is used. <br /><br /> + * **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property + * provisionVMAgent must be true. + */ +public final class LinuxVMGuestPatchMode extends ExpandableStringEnum { + /** + * ImageDefault linux VM guest patch mode. + */ + public static final LinuxVMGuestPatchMode IMAGE_DEFAULT = fromString("ImageDefault"); + + /** + * AutomaticByPlatform linux VM guest patch mode. + */ + public static final LinuxVMGuestPatchMode AUTOMATIC_BY_PLATFORM = fromString("AutomaticByPlatform"); + + /** + * Creates a new instance of LinuxVMGuestPatchMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LinuxVMGuestPatchMode() { + } + + /** + * Creates or finds a LinuxVMGuestPatchMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding LinuxVMGuestPatchMode. + */ + public static LinuxVMGuestPatchMode fromString(String name) { + return fromString(name, LinuxVMGuestPatchMode.class); + } + + /** + * Gets known LinuxVMGuestPatchMode values. + * + * @return known LinuxVMGuestPatchMode values. + */ + public static Collection values() { + return values(LinuxVMGuestPatchMode.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ManagedDiskParameters.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ManagedDiskParameters.java new file mode 100644 index 000000000000..21b60fb3e8b5 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ManagedDiskParameters.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The parameters of a managed disk. + */ +@Fluent +public final class ManagedDiskParameters extends SubResource { + /* + * Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it + * cannot be used with OS Disk. + */ + private StorageAccountTypes storageAccountType; + + /* + * Specifies the customer managed disk encryption set resource id for the managed disk. + */ + private DiskEncryptionSetParameters diskEncryptionSet; + + /* + * Specifies the security profile for the managed disk. + */ + private VMDiskSecurityProfile securityProfile; + + /** + * Creates an instance of ManagedDiskParameters class. + */ + public ManagedDiskParameters() { + } + + /** + * Get the storageAccountType property: Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS + * can only be used with data disks, it cannot be used with OS Disk. + * + * @return the storageAccountType value. + */ + public StorageAccountTypes storageAccountType() { + return this.storageAccountType; + } + + /** + * Set the storageAccountType property: Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS + * can only be used with data disks, it cannot be used with OS Disk. + * + * @param storageAccountType the storageAccountType value to set. + * @return the ManagedDiskParameters object itself. + */ + public ManagedDiskParameters withStorageAccountType(StorageAccountTypes storageAccountType) { + this.storageAccountType = storageAccountType; + return this; + } + + /** + * Get the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the + * managed disk. + * + * @return the diskEncryptionSet value. + */ + public DiskEncryptionSetParameters diskEncryptionSet() { + return this.diskEncryptionSet; + } + + /** + * Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the + * managed disk. + * + * @param diskEncryptionSet the diskEncryptionSet value to set. + * @return the ManagedDiskParameters object itself. + */ + public ManagedDiskParameters withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet) { + this.diskEncryptionSet = diskEncryptionSet; + return this; + } + + /** + * Get the securityProfile property: Specifies the security profile for the managed disk. + * + * @return the securityProfile value. + */ + public VMDiskSecurityProfile securityProfile() { + return this.securityProfile; + } + + /** + * Set the securityProfile property: Specifies the security profile for the managed disk. + * + * @param securityProfile the securityProfile value to set. + * @return the ManagedDiskParameters object itself. + */ + public ManagedDiskParameters withSecurityProfile(VMDiskSecurityProfile securityProfile) { + this.securityProfile = securityProfile; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedDiskParameters withId(String id) { + super.withId(id); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", id()); + jsonWriter.writeStringField("storageAccountType", + this.storageAccountType == null ? null : this.storageAccountType.toString()); + jsonWriter.writeJsonField("diskEncryptionSet", this.diskEncryptionSet); + jsonWriter.writeJsonField("securityProfile", this.securityProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedDiskParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedDiskParameters 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 ManagedDiskParameters. + */ + public static ManagedDiskParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedDiskParameters deserializedManagedDiskParameters = new ManagedDiskParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedDiskParameters.withId(reader.getString()); + } else if ("storageAccountType".equals(fieldName)) { + deserializedManagedDiskParameters.storageAccountType + = StorageAccountTypes.fromString(reader.getString()); + } else if ("diskEncryptionSet".equals(fieldName)) { + deserializedManagedDiskParameters.diskEncryptionSet = DiskEncryptionSetParameters.fromJson(reader); + } else if ("securityProfile".equals(fieldName)) { + deserializedManagedDiskParameters.securityProfile = VMDiskSecurityProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedDiskParameters; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Mode.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Mode.java new file mode 100644 index 000000000000..a97b8448e89b --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Mode.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the mode that ProxyAgent will execute on if the feature is enabled. ProxyAgent will start to audit or + * monitor but not enforce access control over requests to host endpoints in Audit mode, while in Enforce mode it will + * enforce access control. The default value is Enforce mode. + */ +public final class Mode extends ExpandableStringEnum { + /** + * Audit mode. + */ + public static final Mode AUDIT = fromString("Audit"); + + /** + * Enforce mode. + */ + public static final Mode ENFORCE = fromString("Enforce"); + + /** + * Creates a new instance of Mode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Mode() { + } + + /** + * Creates or finds a Mode from its string representation. + * + * @param name a name to look for. + * @return the corresponding Mode. + */ + public static Mode fromString(String name) { + return fromString(name, Mode.class); + } + + /** + * Gets known Mode values. + * + * @return known Mode values. + */ + public static Collection values() { + return values(Mode.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Modes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Modes.java new file mode 100644 index 000000000000..4972fb74fb66 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Modes.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, + * including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In + * Enforce mode, the system will enforce the access control and it is the recommended mode of operation. + */ +public final class Modes extends ExpandableStringEnum { + /** + * Audit mode. + */ + public static final Modes AUDIT = fromString("Audit"); + + /** + * Enforce mode. + */ + public static final Modes ENFORCE = fromString("Enforce"); + + /** + * Disabled mode. + */ + public static final Modes DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of Modes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Modes() { + } + + /** + * Creates or finds a Modes from its string representation. + * + * @param name a name to look for. + * @return the corresponding Modes. + */ + public static Modes fromString(String name) { + return fromString(name, Modes.class); + } + + /** + * Gets known Modes values. + * + * @return known Modes values. + */ + public static Collection values() { + return values(Modes.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkApiVersion.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkApiVersion.java new file mode 100644 index 000000000000..34bc1ed7fe70 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkApiVersion.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the Microsoft.Network API version used when creating networking resources in the Network Interface + * Configurations. + */ +public final class NetworkApiVersion extends ExpandableStringEnum { + /** + * 2020-11-01 version. + */ + public static final NetworkApiVersion TWO_ZERO_TWO_ZERO_ONE_ONE_ZERO_ONE = fromString("2020-11-01"); + + /** + * 2022-11-01 version. + */ + public static final NetworkApiVersion TWO_ZERO_TWO_TWO_ONE_ONE_ZERO_ONE = fromString("2022-11-01"); + + /** + * Creates a new instance of NetworkApiVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkApiVersion() { + } + + /** + * Creates or finds a NetworkApiVersion from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkApiVersion. + */ + public static NetworkApiVersion fromString(String name) { + return fromString(name, NetworkApiVersion.class); + } + + /** + * Gets known NetworkApiVersion values. + * + * @return known NetworkApiVersion values. + */ + public static Collection values() { + return values(NetworkApiVersion.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliaryMode.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliaryMode.java new file mode 100644 index 000000000000..a2204241fa0c --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliaryMode.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies whether the Auxiliary mode is enabled for the Network Interface resource. + */ +public final class NetworkInterfaceAuxiliaryMode extends ExpandableStringEnum { + /** + * None mode. + */ + public static final NetworkInterfaceAuxiliaryMode NONE = fromString("None"); + + /** + * AcceleratedConnections mode. + */ + public static final NetworkInterfaceAuxiliaryMode ACCELERATED_CONNECTIONS = fromString("AcceleratedConnections"); + + /** + * Floating mode. + */ + public static final NetworkInterfaceAuxiliaryMode FLOATING = fromString("Floating"); + + /** + * Creates a new instance of NetworkInterfaceAuxiliaryMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkInterfaceAuxiliaryMode() { + } + + /** + * Creates or finds a NetworkInterfaceAuxiliaryMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkInterfaceAuxiliaryMode. + */ + public static NetworkInterfaceAuxiliaryMode fromString(String name) { + return fromString(name, NetworkInterfaceAuxiliaryMode.class); + } + + /** + * Gets known NetworkInterfaceAuxiliaryMode values. + * + * @return known NetworkInterfaceAuxiliaryMode values. + */ + public static Collection values() { + return values(NetworkInterfaceAuxiliaryMode.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliarySku.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliarySku.java new file mode 100644 index 000000000000..9712902b1848 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliarySku.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies whether the Auxiliary sku is enabled for the Network Interface resource. + */ +public final class NetworkInterfaceAuxiliarySku extends ExpandableStringEnum { + /** + * None: None sku. + */ + public static final NetworkInterfaceAuxiliarySku NONE = fromString("None"); + + /** + * A1 sku. + */ + public static final NetworkInterfaceAuxiliarySku A1 = fromString("A1"); + + /** + * A2 sku. + */ + public static final NetworkInterfaceAuxiliarySku A2 = fromString("A2"); + + /** + * A4 sku. + */ + public static final NetworkInterfaceAuxiliarySku A4 = fromString("A4"); + + /** + * A8 sku. + */ + public static final NetworkInterfaceAuxiliarySku A8 = fromString("A8"); + + /** + * Creates a new instance of NetworkInterfaceAuxiliarySku value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkInterfaceAuxiliarySku() { + } + + /** + * Creates or finds a NetworkInterfaceAuxiliarySku from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkInterfaceAuxiliarySku. + */ + public static NetworkInterfaceAuxiliarySku fromString(String name) { + return fromString(name, NetworkInterfaceAuxiliarySku.class); + } + + /** + * Gets known NetworkInterfaceAuxiliarySku values. + * + * @return known NetworkInterfaceAuxiliarySku values. + */ + public static Collection values() { + return values(NetworkInterfaceAuxiliarySku.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReference.java new file mode 100644 index 000000000000..ba28fc35453d --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReference.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes a network interface reference. + */ +@Fluent +public final class NetworkInterfaceReference extends SubResource { + /* + * Describes a network interface reference properties. + */ + private NetworkInterfaceReferenceProperties properties; + + /** + * Creates an instance of NetworkInterfaceReference class. + */ + public NetworkInterfaceReference() { + } + + /** + * Get the properties property: Describes a network interface reference properties. + * + * @return the properties value. + */ + public NetworkInterfaceReferenceProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Describes a network interface reference properties. + * + * @param properties the properties value to set. + * @return the NetworkInterfaceReference object itself. + */ + public NetworkInterfaceReference withProperties(NetworkInterfaceReferenceProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkInterfaceReference withId(String id) { + super.withId(id); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", id()); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkInterfaceReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkInterfaceReference 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 NetworkInterfaceReference. + */ + public static NetworkInterfaceReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkInterfaceReference deserializedNetworkInterfaceReference = new NetworkInterfaceReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNetworkInterfaceReference.withId(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedNetworkInterfaceReference.properties + = NetworkInterfaceReferenceProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkInterfaceReference; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReferenceProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReferenceProperties.java new file mode 100644 index 000000000000..cdd7c3d17be1 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReferenceProperties.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes a network interface reference properties. + */ +@Fluent +public final class NetworkInterfaceReferenceProperties + implements JsonSerializable { + /* + * Specifies the primary network interface in case the virtual machine has more than 1 network interface. + */ + private Boolean primary; + + /* + * Specify what happens to the network interface when the VM is deleted + */ + private DeleteOptions deleteOption; + + /** + * Creates an instance of NetworkInterfaceReferenceProperties class. + */ + public NetworkInterfaceReferenceProperties() { + } + + /** + * Get the primary property: Specifies the primary network interface in case the virtual machine has more than 1 + * network interface. + * + * @return the primary value. + */ + public Boolean primary() { + return this.primary; + } + + /** + * Set the primary property: Specifies the primary network interface in case the virtual machine has more than 1 + * network interface. + * + * @param primary the primary value to set. + * @return the NetworkInterfaceReferenceProperties object itself. + */ + public NetworkInterfaceReferenceProperties withPrimary(Boolean primary) { + this.primary = primary; + return this; + } + + /** + * Get the deleteOption property: Specify what happens to the network interface when the VM is deleted. + * + * @return the deleteOption value. + */ + public DeleteOptions deleteOption() { + return this.deleteOption; + } + + /** + * Set the deleteOption property: Specify what happens to the network interface when the VM is deleted. + * + * @param deleteOption the deleteOption value to set. + * @return the NetworkInterfaceReferenceProperties object itself. + */ + public NetworkInterfaceReferenceProperties withDeleteOption(DeleteOptions deleteOption) { + this.deleteOption = deleteOption; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("primary", this.primary); + jsonWriter.writeStringField("deleteOption", this.deleteOption == null ? null : this.deleteOption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkInterfaceReferenceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkInterfaceReferenceProperties 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 NetworkInterfaceReferenceProperties. + */ + public static NetworkInterfaceReferenceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkInterfaceReferenceProperties deserializedNetworkInterfaceReferenceProperties + = new NetworkInterfaceReferenceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primary".equals(fieldName)) { + deserializedNetworkInterfaceReferenceProperties.primary + = reader.getNullable(JsonReader::getBoolean); + } else if ("deleteOption".equals(fieldName)) { + deserializedNetworkInterfaceReferenceProperties.deleteOption + = DeleteOptions.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkInterfaceReferenceProperties; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkProfile.java new file mode 100644 index 000000000000..aad4090fb34c --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkProfile.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; + +/** + * Specifies the network interfaces or the networking configuration of the virtual machine. + */ +@Fluent +public final class NetworkProfile implements JsonSerializable { + /* + * Specifies the list of resource Ids for the network interfaces associated with the virtual machine. + */ + private List networkInterfaces; + + /* + * specifies the Microsoft.Network API version used when creating networking resources in the Network Interface + * Configurations + */ + private NetworkApiVersion networkApiVersion; + + /* + * Specifies the networking configurations that will be used to create the virtual machine networking resources. + */ + private List networkInterfaceConfigurations; + + /** + * Creates an instance of NetworkProfile class. + */ + public NetworkProfile() { + } + + /** + * Get the networkInterfaces property: Specifies the list of resource Ids for the network interfaces associated with + * the virtual machine. + * + * @return the networkInterfaces value. + */ + public List networkInterfaces() { + return this.networkInterfaces; + } + + /** + * Set the networkInterfaces property: Specifies the list of resource Ids for the network interfaces associated with + * the virtual machine. + * + * @param networkInterfaces the networkInterfaces value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withNetworkInterfaces(List networkInterfaces) { + this.networkInterfaces = networkInterfaces; + return this; + } + + /** + * Get the networkApiVersion property: specifies the Microsoft.Network API version used when creating networking + * resources in the Network Interface Configurations. + * + * @return the networkApiVersion value. + */ + public NetworkApiVersion networkApiVersion() { + return this.networkApiVersion; + } + + /** + * Set the networkApiVersion property: specifies the Microsoft.Network API version used when creating networking + * resources in the Network Interface Configurations. + * + * @param networkApiVersion the networkApiVersion value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withNetworkApiVersion(NetworkApiVersion networkApiVersion) { + this.networkApiVersion = networkApiVersion; + return this; + } + + /** + * Get the networkInterfaceConfigurations property: Specifies the networking configurations that will be used to + * create the virtual machine networking resources. + * + * @return the networkInterfaceConfigurations value. + */ + public List networkInterfaceConfigurations() { + return this.networkInterfaceConfigurations; + } + + /** + * Set the networkInterfaceConfigurations property: Specifies the networking configurations that will be used to + * create the virtual machine networking resources. + * + * @param networkInterfaceConfigurations the networkInterfaceConfigurations value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withNetworkInterfaceConfigurations( + List networkInterfaceConfigurations) { + this.networkInterfaceConfigurations = networkInterfaceConfigurations; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("networkInterfaces", this.networkInterfaces, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("networkApiVersion", + this.networkApiVersion == null ? null : this.networkApiVersion.toString()); + jsonWriter.writeArrayField("networkInterfaceConfigurations", this.networkInterfaceConfigurations, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkProfile 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 NetworkProfile. + */ + public static NetworkProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkProfile deserializedNetworkProfile = new NetworkProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkInterfaces".equals(fieldName)) { + List networkInterfaces + = reader.readArray(reader1 -> NetworkInterfaceReference.fromJson(reader1)); + deserializedNetworkProfile.networkInterfaces = networkInterfaces; + } else if ("networkApiVersion".equals(fieldName)) { + deserializedNetworkProfile.networkApiVersion = NetworkApiVersion.fromString(reader.getString()); + } else if ("networkInterfaceConfigurations".equals(fieldName)) { + List networkInterfaceConfigurations + = reader.readArray(reader1 -> VirtualMachineNetworkInterfaceConfiguration.fromJson(reader1)); + deserializedNetworkProfile.networkInterfaceConfigurations = networkInterfaceConfigurations; + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSDisk.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSDisk.java new file mode 100644 index 000000000000..81d1ab37db17 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSDisk.java @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies information about the operating system disk used by the virtual machine. For more information about disks, + * see [About disks and VHDs for Azure virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + */ +@Fluent +public final class OSDisk implements JsonSerializable { + /* + * This property allows you to specify the type of the OS that is included in the disk if creating a VM from + * user-image or a specialized VHD. Possible values are: Windows, Linux. + */ + private OperatingSystemTypes osType; + + /* + * Specifies the encryption settings for the OS Disk. Minimum compute api-version: 2015-06-15. + */ + private DiskEncryptionSettings encryptionSettings; + + /* + * The disk name. + */ + private String name; + + /* + * The virtual hard disk. + */ + private VirtualHardDisk vhd; + + /* + * The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the + * virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. + */ + private VirtualHardDisk image; + + /* + * Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: + * None for Standard storage. ReadOnly for Premium storage. + */ + private CachingTypes caching; + + /* + * Specifies whether writeAccelerator should be enabled or disabled on the disk. + */ + private Boolean writeAcceleratorEnabled; + + /* + * Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. + */ + private DiffDiskSettings diffDiskSettings; + + /* + * Specifies how the virtual machine disk should be created. Possible values are Attach, FromImage. If you are using + * a platform image, you should also use the imageReference element described above. If you are using a marketplace + * image, you should also use the plan element previously described. + */ + private DiskCreateOptionTypes createOption; + + /* + * Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk + * in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value + * cannot be larger than 1023. + */ + private Integer diskSizeGB; + + /* + * The managed disk parameters. + */ + private ManagedDiskParameters managedDisk; + + /* + * Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: Delete, Detach. + * The default value is set to Detach. For an ephemeral OS Disk, the default value is set to Delete. The user cannot + * change the delete option for an ephemeral OS Disk. + */ + private DiskDeleteOptionTypes deleteOption; + + /** + * Creates an instance of OSDisk class. + */ + public OSDisk() { + } + + /** + * Get the osType property: This property allows you to specify the type of the OS that is included in the disk if + * creating a VM from user-image or a specialized VHD. Possible values are: Windows, Linux. + * + * @return the osType value. + */ + public OperatingSystemTypes osType() { + return this.osType; + } + + /** + * Set the osType property: This property allows you to specify the type of the OS that is included in the disk if + * creating a VM from user-image or a specialized VHD. Possible values are: Windows, Linux. + * + * @param osType the osType value to set. + * @return the OSDisk object itself. + */ + public OSDisk withOsType(OperatingSystemTypes osType) { + this.osType = osType; + return this; + } + + /** + * Get the encryptionSettings property: Specifies the encryption settings for the OS Disk. Minimum compute + * api-version: 2015-06-15. + * + * @return the encryptionSettings value. + */ + public DiskEncryptionSettings encryptionSettings() { + return this.encryptionSettings; + } + + /** + * Set the encryptionSettings property: Specifies the encryption settings for the OS Disk. Minimum compute + * api-version: 2015-06-15. + * + * @param encryptionSettings the encryptionSettings value to set. + * @return the OSDisk object itself. + */ + public OSDisk withEncryptionSettings(DiskEncryptionSettings encryptionSettings) { + this.encryptionSettings = encryptionSettings; + return this; + } + + /** + * Get the name property: The disk name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The disk name. + * + * @param name the name value to set. + * @return the OSDisk object itself. + */ + public OSDisk withName(String name) { + this.name = name; + return this; + } + + /** + * Get the vhd property: The virtual hard disk. + * + * @return the vhd value. + */ + public VirtualHardDisk vhd() { + return this.vhd; + } + + /** + * Set the vhd property: The virtual hard disk. + * + * @param vhd the vhd value to set. + * @return the OSDisk object itself. + */ + public OSDisk withVhd(VirtualHardDisk vhd) { + this.vhd = vhd; + return this; + } + + /** + * Get the image property: The source user image virtual hard disk. The virtual hard disk will be copied before + * being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not + * exist. + * + * @return the image value. + */ + public VirtualHardDisk image() { + return this.image; + } + + /** + * Set the image property: The source user image virtual hard disk. The virtual hard disk will be copied before + * being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not + * exist. + * + * @param image the image value to set. + * @return the OSDisk object itself. + */ + public OSDisk withImage(VirtualHardDisk image) { + this.image = image; + return this; + } + + /** + * Get the caching property: Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The + * defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. + * + * @return the caching value. + */ + public CachingTypes caching() { + return this.caching; + } + + /** + * Set the caching property: Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The + * defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. + * + * @param caching the caching value to set. + * @return the OSDisk object itself. + */ + public OSDisk withCaching(CachingTypes caching) { + this.caching = caching; + return this; + } + + /** + * Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + * + * @return the writeAcceleratorEnabled value. + */ + public Boolean writeAcceleratorEnabled() { + return this.writeAcceleratorEnabled; + } + + /** + * Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + * + * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set. + * @return the OSDisk object itself. + */ + public OSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { + this.writeAcceleratorEnabled = writeAcceleratorEnabled; + return this; + } + + /** + * Get the diffDiskSettings property: Specifies the ephemeral Disk Settings for the operating system disk used by + * the virtual machine. + * + * @return the diffDiskSettings value. + */ + public DiffDiskSettings diffDiskSettings() { + return this.diffDiskSettings; + } + + /** + * Set the diffDiskSettings property: Specifies the ephemeral Disk Settings for the operating system disk used by + * the virtual machine. + * + * @param diffDiskSettings the diffDiskSettings value to set. + * @return the OSDisk object itself. + */ + public OSDisk withDiffDiskSettings(DiffDiskSettings diffDiskSettings) { + this.diffDiskSettings = diffDiskSettings; + return this; + } + + /** + * Get the createOption property: Specifies how the virtual machine disk should be created. Possible values are + * Attach, FromImage. If you are using a platform image, you should also use the imageReference element described + * above. If you are using a marketplace image, you should also use the plan element previously described. + * + * @return the createOption value. + */ + public DiskCreateOptionTypes createOption() { + return this.createOption; + } + + /** + * Set the createOption property: Specifies how the virtual machine disk should be created. Possible values are + * Attach, FromImage. If you are using a platform image, you should also use the imageReference element described + * above. If you are using a marketplace image, you should also use the plan element previously described. + * + * @param createOption the createOption value to set. + * @return the OSDisk object itself. + */ + public OSDisk withCreateOption(DiskCreateOptionTypes createOption) { + this.createOption = createOption; + return this; + } + + /** + * Get the diskSizeGB property: Specifies the size of an empty data disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x + * 1024^3 for the disk and the value cannot be larger than 1023. + * + * @return the diskSizeGB value. + */ + public Integer diskSizeGB() { + return this.diskSizeGB; + } + + /** + * Set the diskSizeGB property: Specifies the size of an empty data disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x + * 1024^3 for the disk and the value cannot be larger than 1023. + * + * @param diskSizeGB the diskSizeGB value to set. + * @return the OSDisk object itself. + */ + public OSDisk withDiskSizeGB(Integer diskSizeGB) { + this.diskSizeGB = diskSizeGB; + return this; + } + + /** + * Get the managedDisk property: The managed disk parameters. + * + * @return the managedDisk value. + */ + public ManagedDiskParameters managedDisk() { + return this.managedDisk; + } + + /** + * Set the managedDisk property: The managed disk parameters. + * + * @param managedDisk the managedDisk value to set. + * @return the OSDisk object itself. + */ + public OSDisk withManagedDisk(ManagedDiskParameters managedDisk) { + this.managedDisk = managedDisk; + return this; + } + + /** + * Get the deleteOption property: Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible + * values are: Delete, Detach. The default value is set to Detach. For an ephemeral OS Disk, the default value is + * set to Delete. The user cannot change the delete option for an ephemeral OS Disk. + * + * @return the deleteOption value. + */ + public DiskDeleteOptionTypes deleteOption() { + return this.deleteOption; + } + + /** + * Set the deleteOption property: Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible + * values are: Delete, Detach. The default value is set to Detach. For an ephemeral OS Disk, the default value is + * set to Delete. The user cannot change the delete option for an ephemeral OS Disk. + * + * @param deleteOption the deleteOption value to set. + * @return the OSDisk object itself. + */ + public OSDisk withDeleteOption(DiskDeleteOptionTypes deleteOption) { + this.deleteOption = deleteOption; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("createOption", this.createOption == null ? null : this.createOption.toString()); + jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); + jsonWriter.writeJsonField("encryptionSettings", this.encryptionSettings); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("vhd", this.vhd); + jsonWriter.writeJsonField("image", this.image); + jsonWriter.writeStringField("caching", this.caching == null ? null : this.caching.toString()); + jsonWriter.writeBooleanField("writeAcceleratorEnabled", this.writeAcceleratorEnabled); + jsonWriter.writeJsonField("diffDiskSettings", this.diffDiskSettings); + jsonWriter.writeNumberField("diskSizeGB", this.diskSizeGB); + jsonWriter.writeJsonField("managedDisk", this.managedDisk); + jsonWriter.writeStringField("deleteOption", this.deleteOption == null ? null : this.deleteOption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OSDisk from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OSDisk 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. + * @throws IOException If an error occurs while reading the OSDisk. + */ + public static OSDisk fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OSDisk deserializedOSDisk = new OSDisk(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("createOption".equals(fieldName)) { + deserializedOSDisk.createOption = DiskCreateOptionTypes.fromString(reader.getString()); + } else if ("osType".equals(fieldName)) { + deserializedOSDisk.osType = OperatingSystemTypes.fromString(reader.getString()); + } else if ("encryptionSettings".equals(fieldName)) { + deserializedOSDisk.encryptionSettings = DiskEncryptionSettings.fromJson(reader); + } else if ("name".equals(fieldName)) { + deserializedOSDisk.name = reader.getString(); + } else if ("vhd".equals(fieldName)) { + deserializedOSDisk.vhd = VirtualHardDisk.fromJson(reader); + } else if ("image".equals(fieldName)) { + deserializedOSDisk.image = VirtualHardDisk.fromJson(reader); + } else if ("caching".equals(fieldName)) { + deserializedOSDisk.caching = CachingTypes.fromString(reader.getString()); + } else if ("writeAcceleratorEnabled".equals(fieldName)) { + deserializedOSDisk.writeAcceleratorEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("diffDiskSettings".equals(fieldName)) { + deserializedOSDisk.diffDiskSettings = DiffDiskSettings.fromJson(reader); + } else if ("diskSizeGB".equals(fieldName)) { + deserializedOSDisk.diskSizeGB = reader.getNullable(JsonReader::getInt); + } else if ("managedDisk".equals(fieldName)) { + deserializedOSDisk.managedDisk = ManagedDiskParameters.fromJson(reader); + } else if ("deleteOption".equals(fieldName)) { + deserializedOSDisk.deleteOption = DiskDeleteOptionTypes.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedOSDisk; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSImageNotificationProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSImageNotificationProfile.java new file mode 100644 index 000000000000..aa4f8900a696 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSImageNotificationProfile.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Profile for the OS Image Scheduled event. + */ +@Fluent +public final class OSImageNotificationProfile implements JsonSerializable { + /* + * Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS + * Image Scheduled Event before the event is auto approved (timed out). The configuration is specified in ISO 8601 + * format, and the value must be 15 minutes (PT15M) + */ + private String notBeforeTimeout; + + /* + * Specifies whether the OS Image Scheduled event is enabled or disabled. + */ + private Boolean enable; + + /** + * Creates an instance of OSImageNotificationProfile class. + */ + public OSImageNotificationProfile() { + } + + /** + * Get the notBeforeTimeout property: Length of time a Virtual Machine being reimaged or having its OS upgraded will + * have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The + * configuration is specified in ISO 8601 format, and the value must be 15 minutes (PT15M). + * + * @return the notBeforeTimeout value. + */ + public String notBeforeTimeout() { + return this.notBeforeTimeout; + } + + /** + * Set the notBeforeTimeout property: Length of time a Virtual Machine being reimaged or having its OS upgraded will + * have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The + * configuration is specified in ISO 8601 format, and the value must be 15 minutes (PT15M). + * + * @param notBeforeTimeout the notBeforeTimeout value to set. + * @return the OSImageNotificationProfile object itself. + */ + public OSImageNotificationProfile withNotBeforeTimeout(String notBeforeTimeout) { + this.notBeforeTimeout = notBeforeTimeout; + return this; + } + + /** + * Get the enable property: Specifies whether the OS Image Scheduled event is enabled or disabled. + * + * @return the enable value. + */ + public Boolean enable() { + return this.enable; + } + + /** + * Set the enable property: Specifies whether the OS Image Scheduled event is enabled or disabled. + * + * @param enable the enable value to set. + * @return the OSImageNotificationProfile object itself. + */ + public OSImageNotificationProfile withEnable(Boolean enable) { + this.enable = enable; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("notBeforeTimeout", this.notBeforeTimeout); + jsonWriter.writeBooleanField("enable", this.enable); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OSImageNotificationProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OSImageNotificationProfile 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 OSImageNotificationProfile. + */ + public static OSImageNotificationProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OSImageNotificationProfile deserializedOSImageNotificationProfile = new OSImageNotificationProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("notBeforeTimeout".equals(fieldName)) { + deserializedOSImageNotificationProfile.notBeforeTimeout = reader.getString(); + } else if ("enable".equals(fieldName)) { + deserializedOSImageNotificationProfile.enable = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedOSImageNotificationProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSProfile.java new file mode 100644 index 000000000000..2da333456319 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSProfile.java @@ -0,0 +1,411 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; + +/** + * Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is + * provisioned. + */ +@Fluent +public final class OSProfile implements JsonSerializable { + /* + * Specifies the host OS name of the virtual machine. This name cannot be updated after the VM is created. + * **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For naming conventions and + * restrictions see [Azure infrastructure services implementation + * guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). + */ + private String computerName; + + /* + * Specifies the name of the administrator account.

This property cannot be updated after the VM is + * created.

**Windows-only restriction:** Cannot end in "."

**Disallowed values:** + * "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", + * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", + * "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

**Minimum-length + * (Linux):** 1 character

**Max-length (Linux):** 64 characters

**Max-length (Windows):** 20 + * characters. + */ + private String adminUsername; + + /* + * Specifies the password of the administrator account.

**Minimum-length (Windows):** 8 characters

+ * **Minimum-length (Linux):** 6 characters

**Max-length (Windows):** 123 characters

**Max-length + * (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled + *
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match + * [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", + * "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

For resetting the password, see [How + * to reset the Remote Desktop service or its login password in a Windows + * VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

For resetting root + * password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) + */ + private String adminPassword; + + /* + * Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that + * is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not + * pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. + * The property 'customData' is passed to the VM to be saved as a file, for more information see [Custom Data on + * Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init + * for your Linux VM, see [Using cloud-init to customize a Linux VM during + * creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). + */ + private String customData; + + /* + * Specifies Windows operating system settings on the virtual machine. + */ + private WindowsConfiguration windowsConfiguration; + + /* + * Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux + * distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + */ + private LinuxConfiguration linuxConfiguration; + + /* + * Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a + * virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for + * Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault + * virtual machine extension for + * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + */ + private List secrets; + + /* + * Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False + * when no extensions are present on the virtual machine. + */ + private Boolean allowExtensionOperations; + + /* + * Optional property which must either be set to True or omitted. + */ + private Boolean requireGuestProvisionSignal; + + /** + * Creates an instance of OSProfile class. + */ + public OSProfile() { + } + + /** + * Get the computerName property: Specifies the host OS name of the virtual machine. This name cannot be updated + * after the VM is created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For + * naming conventions and restrictions see [Azure infrastructure services implementation + * guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). + * + * @return the computerName value. + */ + public String computerName() { + return this.computerName; + } + + /** + * Set the computerName property: Specifies the host OS name of the virtual machine. This name cannot be updated + * after the VM is created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For + * naming conventions and restrictions see [Azure infrastructure services implementation + * guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). + * + * @param computerName the computerName value to set. + * @return the OSProfile object itself. + */ + public OSProfile withComputerName(String computerName) { + this.computerName = computerName; + return this; + } + + /** + * Get the adminUsername property: Specifies the name of the administrator account. <br><br> This + * property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end + * in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", + * "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", + * "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", + * "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length + * (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. + * + * @return the adminUsername value. + */ + public String adminUsername() { + return this.adminUsername; + } + + /** + * Set the adminUsername property: Specifies the name of the administrator account. <br><br> This + * property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end + * in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", + * "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", + * "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", + * "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length + * (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. + * + * @param adminUsername the adminUsername value to set. + * @return the OSProfile object itself. + */ + public OSProfile withAdminUsername(String adminUsername) { + this.adminUsername = adminUsername; + return this; + } + + /** + * Get the adminPassword property: Specifies the password of the administrator account. <br><br> + * **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters + * <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 + * characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled + * <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special + * character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", + * "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + * "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its + * login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) + * <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure + * Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). + * + * @return the adminPassword value. + */ + public String adminPassword() { + return this.adminPassword; + } + + /** + * Set the adminPassword property: Specifies the password of the administrator account. <br><br> + * **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters + * <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 + * characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled + * <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special + * character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", + * "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + * "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its + * login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) + * <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure + * Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). + * + * @param adminPassword the adminPassword value to set. + * @return the OSProfile object itself. + */ + public OSProfile withAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; + return this; + } + + /** + * Get the customData property: Specifies a base-64 encoded string of custom data. The base-64 encoded string is + * decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array + * is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be + * updated after the VM is created. The property 'customData' is passed to the VM to be saved as a file, for more + * information see [Custom Data on Azure + * VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init for + * your Linux VM, see [Using cloud-init to customize a Linux VM during + * creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). + * + * @return the customData value. + */ + public String customData() { + return this.customData; + } + + /** + * Set the customData property: Specifies a base-64 encoded string of custom data. The base-64 encoded string is + * decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array + * is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be + * updated after the VM is created. The property 'customData' is passed to the VM to be saved as a file, for more + * information see [Custom Data on Azure + * VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init for + * your Linux VM, see [Using cloud-init to customize a Linux VM during + * creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). + * + * @param customData the customData value to set. + * @return the OSProfile object itself. + */ + public OSProfile withCustomData(String customData) { + this.customData = customData; + return this; + } + + /** + * Get the windowsConfiguration property: Specifies Windows operating system settings on the virtual machine. + * + * @return the windowsConfiguration value. + */ + public WindowsConfiguration windowsConfiguration() { + return this.windowsConfiguration; + } + + /** + * Set the windowsConfiguration property: Specifies Windows operating system settings on the virtual machine. + * + * @param windowsConfiguration the windowsConfiguration value to set. + * @return the OSProfile object itself. + */ + public OSProfile withWindowsConfiguration(WindowsConfiguration windowsConfiguration) { + this.windowsConfiguration = windowsConfiguration; + return this; + } + + /** + * Get the linuxConfiguration property: Specifies the Linux operating system settings on the virtual machine. For a + * list of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + * + * @return the linuxConfiguration value. + */ + public LinuxConfiguration linuxConfiguration() { + return this.linuxConfiguration; + } + + /** + * Set the linuxConfiguration property: Specifies the Linux operating system settings on the virtual machine. For a + * list of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + * + * @param linuxConfiguration the linuxConfiguration value to set. + * @return the OSProfile object itself. + */ + public OSProfile withLinuxConfiguration(LinuxConfiguration linuxConfiguration) { + this.linuxConfiguration = linuxConfiguration; + return this; + } + + /** + * Get the secrets property: Specifies set of certificates that should be installed onto the virtual machine. To + * install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension + * for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault + * virtual machine extension for + * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + * + * @return the secrets value. + */ + public List secrets() { + return this.secrets; + } + + /** + * Set the secrets property: Specifies set of certificates that should be installed onto the virtual machine. To + * install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension + * for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault + * virtual machine extension for + * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + * + * @param secrets the secrets value to set. + * @return the OSProfile object itself. + */ + public OSProfile withSecrets(List secrets) { + this.secrets = secrets; + return this; + } + + /** + * Get the allowExtensionOperations property: Specifies whether extension operations should be allowed on the + * virtual machine. This may only be set to False when no extensions are present on the virtual machine. + * + * @return the allowExtensionOperations value. + */ + public Boolean allowExtensionOperations() { + return this.allowExtensionOperations; + } + + /** + * Set the allowExtensionOperations property: Specifies whether extension operations should be allowed on the + * virtual machine. This may only be set to False when no extensions are present on the virtual machine. + * + * @param allowExtensionOperations the allowExtensionOperations value to set. + * @return the OSProfile object itself. + */ + public OSProfile withAllowExtensionOperations(Boolean allowExtensionOperations) { + this.allowExtensionOperations = allowExtensionOperations; + return this; + } + + /** + * Get the requireGuestProvisionSignal property: Optional property which must either be set to True or omitted. + * + * @return the requireGuestProvisionSignal value. + */ + public Boolean requireGuestProvisionSignal() { + return this.requireGuestProvisionSignal; + } + + /** + * Set the requireGuestProvisionSignal property: Optional property which must either be set to True or omitted. + * + * @param requireGuestProvisionSignal the requireGuestProvisionSignal value to set. + * @return the OSProfile object itself. + */ + public OSProfile withRequireGuestProvisionSignal(Boolean requireGuestProvisionSignal) { + this.requireGuestProvisionSignal = requireGuestProvisionSignal; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("computerName", this.computerName); + jsonWriter.writeStringField("adminUsername", this.adminUsername); + jsonWriter.writeStringField("adminPassword", this.adminPassword); + jsonWriter.writeStringField("customData", this.customData); + jsonWriter.writeJsonField("windowsConfiguration", this.windowsConfiguration); + jsonWriter.writeJsonField("linuxConfiguration", this.linuxConfiguration); + jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("allowExtensionOperations", this.allowExtensionOperations); + jsonWriter.writeBooleanField("requireGuestProvisionSignal", this.requireGuestProvisionSignal); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OSProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OSProfile 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 OSProfile. + */ + public static OSProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OSProfile deserializedOSProfile = new OSProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("computerName".equals(fieldName)) { + deserializedOSProfile.computerName = reader.getString(); + } else if ("adminUsername".equals(fieldName)) { + deserializedOSProfile.adminUsername = reader.getString(); + } else if ("adminPassword".equals(fieldName)) { + deserializedOSProfile.adminPassword = reader.getString(); + } else if ("customData".equals(fieldName)) { + deserializedOSProfile.customData = reader.getString(); + } else if ("windowsConfiguration".equals(fieldName)) { + deserializedOSProfile.windowsConfiguration = WindowsConfiguration.fromJson(reader); + } else if ("linuxConfiguration".equals(fieldName)) { + deserializedOSProfile.linuxConfiguration = LinuxConfiguration.fromJson(reader); + } else if ("secrets".equals(fieldName)) { + List secrets = reader.readArray(reader1 -> VaultSecretGroup.fromJson(reader1)); + deserializedOSProfile.secrets = secrets; + } else if ("allowExtensionOperations".equals(fieldName)) { + deserializedOSProfile.allowExtensionOperations = reader.getNullable(JsonReader::getBoolean); + } else if ("requireGuestProvisionSignal".equals(fieldName)) { + deserializedOSProfile.requireGuestProvisionSignal = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedOSProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperatingSystemTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperatingSystemTypes.java new file mode 100644 index 000000000000..aa10c3aa1fe3 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperatingSystemTypes.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * This property allows you to specify the supported type of the OS that application is built for. Possible values are: + * **Windows,** **Linux.**. + */ +public final class OperatingSystemTypes extends ExpandableStringEnum { + /** + * Windows OS. + */ + public static final OperatingSystemTypes WINDOWS = fromString("Windows"); + + /** + * Linux OS. + */ + public static final OperatingSystemTypes LINUX = fromString("Linux"); + + /** + * Creates a new instance of OperatingSystemTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OperatingSystemTypes() { + } + + /** + * Creates or finds a OperatingSystemTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding OperatingSystemTypes. + */ + public static OperatingSystemTypes fromString(String name) { + return fromString(name, OperatingSystemTypes.class); + } + + /** + * Gets known OperatingSystemTypes values. + * + * @return known OperatingSystemTypes values. + */ + public static Collection values() { + return values(OperatingSystemTypes.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OsType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OsType.java new file mode 100644 index 000000000000..6fd682cef751 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OsType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The supported operating system types for flex VM creation. + */ +public final class OsType extends ExpandableStringEnum { + /** + * Windows operating system. + */ + public static final OsType WINDOWS = fromString("Windows"); + + /** + * Linux operating system. + */ + public static final OsType LINUX = fromString("Linux"); + + /** + * Creates a new instance of OsType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OsType() { + } + + /** + * Creates or finds a OsType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OsType. + */ + public static OsType fromString(String name) { + return fromString(name, OsType.class); + } + + /** + * Gets known OsType values. + * + * @return known OsType values. + */ + public static Collection values() { + return values(OsType.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PatchSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PatchSettings.java new file mode 100644 index 000000000000..b2a8797bcd70 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PatchSettings.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies settings related to VM Guest Patching on Windows. + */ +@Fluent +public final class PatchSettings implements JsonSerializable { + /* + * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine + * scale set with OrchestrationMode as Flexible.

Possible values are:

**Manual** - You + * control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. + * In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be + * false

**AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property + * WindowsConfiguration.enableAutomaticUpdates must be true.

**AutomaticByPlatform** - the virtual + * machine will automatically updated by the platform. The properties provisionVMAgent and + * WindowsConfiguration.enableAutomaticUpdates must be true + */ + private WindowsVMGuestPatchMode patchMode; + + /* + * Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the + * 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'. + */ + private Boolean enableHotpatching; + + /* + * Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

Possible values are:

**ImageDefault** - You control the timing of patch assessments on a virtual machine.

+ * **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent + * must be true. + */ + private WindowsPatchAssessmentMode assessmentMode; + + /* + * Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows. + */ + private WindowsVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings; + + /** + * Creates an instance of PatchSettings class. + */ + public PatchSettings() { + } + + /** + * Get the patchMode property: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines + * associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible + * values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine. You + * do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property + * WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual + * machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be + * true. <br /><br /> **AutomaticByPlatform** - the virtual machine will automatically updated by the + * platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. + * + * @return the patchMode value. + */ + public WindowsVMGuestPatchMode patchMode() { + return this.patchMode; + } + + /** + * Set the patchMode property: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines + * associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible + * values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine. You + * do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property + * WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual + * machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be + * true. <br /><br /> **AutomaticByPlatform** - the virtual machine will automatically updated by the + * platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. + * + * @param patchMode the patchMode value to set. + * @return the PatchSettings object itself. + */ + public PatchSettings withPatchMode(WindowsVMGuestPatchMode patchMode) { + this.patchMode = patchMode; + return this; + } + + /** + * Get the enableHotpatching property: Enables customers to patch their Azure VMs without requiring a reboot. For + * enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to + * 'AutomaticByPlatform'. + * + * @return the enableHotpatching value. + */ + public Boolean enableHotpatching() { + return this.enableHotpatching; + } + + /** + * Set the enableHotpatching property: Enables customers to patch their Azure VMs without requiring a reboot. For + * enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to + * 'AutomaticByPlatform'. + * + * @param enableHotpatching the enableHotpatching value to set. + * @return the PatchSettings object itself. + */ + public PatchSettings withEnableHotpatching(Boolean enableHotpatching) { + this.enableHotpatching = enableHotpatching; + return this; + } + + /** + * Get the assessmentMode property: Specifies the mode of VM Guest patch assessment for the IaaS virtual + * machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the + * timing of patch assessments on a virtual machine.<br /><br /> **AutomaticByPlatform** - The platform + * will trigger periodic patch assessments. The property provisionVMAgent must be true. + * + * @return the assessmentMode value. + */ + public WindowsPatchAssessmentMode assessmentMode() { + return this.assessmentMode; + } + + /** + * Set the assessmentMode property: Specifies the mode of VM Guest patch assessment for the IaaS virtual + * machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the + * timing of patch assessments on a virtual machine.<br /><br /> **AutomaticByPlatform** - The platform + * will trigger periodic patch assessments. The property provisionVMAgent must be true. + * + * @param assessmentMode the assessmentMode value to set. + * @return the PatchSettings object itself. + */ + public PatchSettings withAssessmentMode(WindowsPatchAssessmentMode assessmentMode) { + this.assessmentMode = assessmentMode; + return this; + } + + /** + * Get the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in + * VM Guest Patching on Windows. + * + * @return the automaticByPlatformSettings value. + */ + public WindowsVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings() { + return this.automaticByPlatformSettings; + } + + /** + * Set the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in + * VM Guest Patching on Windows. + * + * @param automaticByPlatformSettings the automaticByPlatformSettings value to set. + * @return the PatchSettings object itself. + */ + public PatchSettings + withAutomaticByPlatformSettings(WindowsVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings) { + this.automaticByPlatformSettings = automaticByPlatformSettings; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("patchMode", this.patchMode == null ? null : this.patchMode.toString()); + jsonWriter.writeBooleanField("enableHotpatching", this.enableHotpatching); + jsonWriter.writeStringField("assessmentMode", + this.assessmentMode == null ? null : this.assessmentMode.toString()); + jsonWriter.writeJsonField("automaticByPlatformSettings", this.automaticByPlatformSettings); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PatchSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PatchSettings 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 PatchSettings. + */ + public static PatchSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PatchSettings deserializedPatchSettings = new PatchSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("patchMode".equals(fieldName)) { + deserializedPatchSettings.patchMode = WindowsVMGuestPatchMode.fromString(reader.getString()); + } else if ("enableHotpatching".equals(fieldName)) { + deserializedPatchSettings.enableHotpatching = reader.getNullable(JsonReader::getBoolean); + } else if ("assessmentMode".equals(fieldName)) { + deserializedPatchSettings.assessmentMode + = WindowsPatchAssessmentMode.fromString(reader.getString()); + } else if ("automaticByPlatformSettings".equals(fieldName)) { + deserializedPatchSettings.automaticByPlatformSettings + = WindowsVMGuestPatchAutomaticByPlatformSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPatchSettings; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Placement.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Placement.java new file mode 100644 index 000000000000..eeae1e1a850f --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Placement.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; + +/** + * Describes the user-defined constraints for resource hardware placement. + */ +@Fluent +public final class Placement implements JsonSerializable { + /* + * Specifies the policy for resource's placement in availability zone. Possible values are: **Any** (used for + * Virtual Machines), **Auto** (used for Virtual Machine Scale Sets) - An availability zone will be automatically + * picked by system as part of resource creation. + */ + private ZonePlacementPolicyType zonePlacementPolicy; + + /* + * This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any'/'Auto', + * availability zone selected by the system must be present in the list of availability zones passed with + * 'includeZones'. If 'includeZones' is not provided, all availability zones in region will be considered for + * selection. + */ + private List includeZones; + + /* + * This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any'/'Auto', + * availability zone selected by the system must not be present in the list of availability zones passed with + * 'excludeZones'. If 'excludeZones' is not provided, all availability zones in region will be considered for + * selection. + */ + private List excludeZones; + + /** + * Creates an instance of Placement class. + */ + public Placement() { + } + + /** + * Get the zonePlacementPolicy property: Specifies the policy for resource's placement in availability zone. + * Possible values are: **Any** (used for Virtual Machines), **Auto** (used for Virtual Machine Scale Sets) - An + * availability zone will be automatically picked by system as part of resource creation. + * + * @return the zonePlacementPolicy value. + */ + public ZonePlacementPolicyType zonePlacementPolicy() { + return this.zonePlacementPolicy; + } + + /** + * Set the zonePlacementPolicy property: Specifies the policy for resource's placement in availability zone. + * Possible values are: **Any** (used for Virtual Machines), **Auto** (used for Virtual Machine Scale Sets) - An + * availability zone will be automatically picked by system as part of resource creation. + * + * @param zonePlacementPolicy the zonePlacementPolicy value to set. + * @return the Placement object itself. + */ + public Placement withZonePlacementPolicy(ZonePlacementPolicyType zonePlacementPolicy) { + this.zonePlacementPolicy = zonePlacementPolicy; + return this; + } + + /** + * Get the includeZones property: This property supplements the 'zonePlacementPolicy' property. If + * 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must be present in the + * list of availability zones passed with 'includeZones'. If 'includeZones' is not provided, all availability zones + * in region will be considered for selection. + * + * @return the includeZones value. + */ + public List includeZones() { + return this.includeZones; + } + + /** + * Set the includeZones property: This property supplements the 'zonePlacementPolicy' property. If + * 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must be present in the + * list of availability zones passed with 'includeZones'. If 'includeZones' is not provided, all availability zones + * in region will be considered for selection. + * + * @param includeZones the includeZones value to set. + * @return the Placement object itself. + */ + public Placement withIncludeZones(List includeZones) { + this.includeZones = includeZones; + return this; + } + + /** + * Get the excludeZones property: This property supplements the 'zonePlacementPolicy' property. If + * 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must not be present in the + * list of availability zones passed with 'excludeZones'. If 'excludeZones' is not provided, all availability zones + * in region will be considered for selection. + * + * @return the excludeZones value. + */ + public List excludeZones() { + return this.excludeZones; + } + + /** + * Set the excludeZones property: This property supplements the 'zonePlacementPolicy' property. If + * 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must not be present in the + * list of availability zones passed with 'excludeZones'. If 'excludeZones' is not provided, all availability zones + * in region will be considered for selection. + * + * @param excludeZones the excludeZones value to set. + * @return the Placement object itself. + */ + public Placement withExcludeZones(List excludeZones) { + this.excludeZones = excludeZones; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("zonePlacementPolicy", + this.zonePlacementPolicy == null ? null : this.zonePlacementPolicy.toString()); + jsonWriter.writeArrayField("includeZones", this.includeZones, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("excludeZones", this.excludeZones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Placement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Placement 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 Placement. + */ + public static Placement fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Placement deserializedPlacement = new Placement(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("zonePlacementPolicy".equals(fieldName)) { + deserializedPlacement.zonePlacementPolicy = ZonePlacementPolicyType.fromString(reader.getString()); + } else if ("includeZones".equals(fieldName)) { + List includeZones = reader.readArray(reader1 -> reader1.getString()); + deserializedPlacement.includeZones = includeZones; + } else if ("excludeZones".equals(fieldName)) { + List excludeZones = reader.readArray(reader1 -> reader1.getString()); + deserializedPlacement.excludeZones = excludeZones; + } else { + reader.skipChildren(); + } + } + + return deserializedPlacement; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Plan.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Plan.java new file mode 100644 index 000000000000..239740e0034b --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Plan.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Plan for the resource. + */ +@Fluent +public final class Plan implements JsonSerializable { + /* + * A user defined name of the 3rd Party Artifact that is being procured. + */ + private String name; + + /* + * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + */ + private String publisher; + + /* + * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the + * artifact at the time of Data Market onboarding. + */ + private String product; + + /* + * A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + */ + private String promotionCode; + + /* + * The version of the desired product/artifact. + */ + private String version; + + /** + * Creates an instance of Plan class. + */ + public Plan() { + } + + /** + * Get the name property: A user defined name of the 3rd Party Artifact that is being procured. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: A user defined name of the 3rd Party Artifact that is being procured. + * + * @param name the name value to set. + * @return the Plan object itself. + */ + public Plan withName(String name) { + this.name = name; + return this; + } + + /** + * Get the publisher property: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. + * + * @param publisher the publisher value to set. + * @return the Plan object itself. + */ + public Plan withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the product property: The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the + * OfferID specified for the artifact at the time of Data Market onboarding. + * + * @return the product value. + */ + public String product() { + return this.product; + } + + /** + * Set the product property: The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the + * OfferID specified for the artifact at the time of Data Market onboarding. + * + * @param product the product value to set. + * @return the Plan object itself. + */ + public Plan withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the promotionCode property: A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. + * + * @return the promotionCode value. + */ + public String promotionCode() { + return this.promotionCode; + } + + /** + * Set the promotionCode property: A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. + * + * @param promotionCode the promotionCode value to set. + * @return the Plan object itself. + */ + public Plan withPromotionCode(String promotionCode) { + this.promotionCode = promotionCode; + return this; + } + + /** + * Get the version property: The version of the desired product/artifact. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: The version of the desired product/artifact. + * + * @param version the version value to set. + * @return the Plan object itself. + */ + public Plan withVersion(String version) { + this.version = version; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("publisher", this.publisher); + jsonWriter.writeStringField("product", this.product); + jsonWriter.writeStringField("promotionCode", this.promotionCode); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Plan from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Plan 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. + * @throws IOException If an error occurs while reading the Plan. + */ + public static Plan fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Plan deserializedPlan = new Plan(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPlan.name = reader.getString(); + } else if ("publisher".equals(fieldName)) { + deserializedPlan.publisher = reader.getString(); + } else if ("product".equals(fieldName)) { + deserializedPlan.product = reader.getString(); + } else if ("promotionCode".equals(fieldName)) { + deserializedPlan.promotionCode = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedPlan.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPlan; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityProfile.java new file mode 100644 index 000000000000..52803cf537b1 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityProfile.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The priority profile for flex VM creation. + */ +@Fluent +public final class PriorityProfile implements JsonSerializable { + /* + * The priority type for VM allocation + */ + private PriorityType type; + + /* + * The allocation strategy for VM size selection + */ + private AllocationStrategy allocationStrategy; + + /** + * Creates an instance of PriorityProfile class. + */ + public PriorityProfile() { + } + + /** + * Get the type property: The priority type for VM allocation. + * + * @return the type value. + */ + public PriorityType type() { + return this.type; + } + + /** + * Set the type property: The priority type for VM allocation. + * + * @param type the type value to set. + * @return the PriorityProfile object itself. + */ + public PriorityProfile withType(PriorityType type) { + this.type = type; + return this; + } + + /** + * Get the allocationStrategy property: The allocation strategy for VM size selection. + * + * @return the allocationStrategy value. + */ + public AllocationStrategy allocationStrategy() { + return this.allocationStrategy; + } + + /** + * Set the allocationStrategy property: The allocation strategy for VM size selection. + * + * @param allocationStrategy the allocationStrategy value to set. + * @return the PriorityProfile object itself. + */ + public PriorityProfile withAllocationStrategy(AllocationStrategy allocationStrategy) { + this.allocationStrategy = allocationStrategy; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("allocationStrategy", + this.allocationStrategy == null ? null : this.allocationStrategy.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PriorityProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PriorityProfile 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 PriorityProfile. + */ + public static PriorityProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PriorityProfile deserializedPriorityProfile = new PriorityProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedPriorityProfile.type = PriorityType.fromString(reader.getString()); + } else if ("allocationStrategy".equals(fieldName)) { + deserializedPriorityProfile.allocationStrategy = AllocationStrategy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPriorityProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityType.java new file mode 100644 index 000000000000..8c0bd0109b40 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The priority type for VM allocation. + */ +public final class PriorityType extends ExpandableStringEnum { + /** + * Regular priority VMs. + */ + public static final PriorityType REGULAR = fromString("Regular"); + + /** + * Spot priority VMs. + */ + public static final PriorityType SPOT = fromString("Spot"); + + /** + * Creates a new instance of PriorityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PriorityType() { + } + + /** + * Creates or finds a PriorityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PriorityType. + */ + public static PriorityType fromString(String name) { + return fromString(name, PriorityType.class); + } + + /** + * Gets known PriorityType values. + * + * @return known PriorityType values. + */ + public static Collection values() { + return values(PriorityType.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProtocolTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProtocolTypes.java new file mode 100644 index 000000000000..c6af7d0c7008 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProtocolTypes.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. + */ +public final class ProtocolTypes extends ExpandableStringEnum { + /** + * Http protocol. + */ + public static final ProtocolTypes HTTP = fromString("Http"); + + /** + * Https protocol. + */ + public static final ProtocolTypes HTTPS = fromString("Https"); + + /** + * Creates a new instance of ProtocolTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProtocolTypes() { + } + + /** + * Creates or finds a ProtocolTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProtocolTypes. + */ + public static ProtocolTypes fromString(String name) { + return fromString(name, ProtocolTypes.class); + } + + /** + * Gets known ProtocolTypes values. + * + * @return known ProtocolTypes values. + */ + public static Collection values() { + return values(ProtocolTypes.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProxyAgentSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProxyAgentSettings.java new file mode 100644 index 000000000000..64fb6363d31a --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProxyAgentSettings.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies ProxyAgent settings for the virtual machine or virtual machine scale set. Minimum api-version: 2023-09-01. + */ +@Fluent +public final class ProxyAgentSettings implements JsonSerializable { + /* + * Specifies whether ProxyAgent feature should be enabled on the virtual machine or virtual machine scale set. + */ + private Boolean enabled; + + /* + * Specifies the mode that ProxyAgent will execute on. Warning: this property has been deprecated, please specify + * 'mode' under particular hostendpoint setting. + */ + private Mode mode; + + /* + * Increase the value of this property allows users to reset the key used for securing communication channel between + * guest and host. + */ + private Integer keyIncarnationId; + + /* + * Specifies the Wire Server endpoint settings while creating the virtual machine or virtual machine scale set. + * Minimum api-version: 2024-03-01. + */ + private HostEndpointSettings wireServer; + + /* + * Specifies the IMDS endpoint settings while creating the virtual machine or virtual machine scale set. Minimum + * api-version: 2024-03-01. + */ + private HostEndpointSettings imds; + + /* + * Specify whether to implicitly install the ProxyAgent Extension. This option is currently applicable only for + * Linux Os. + */ + private Boolean addProxyAgentExtension; + + /** + * Creates an instance of ProxyAgentSettings class. + */ + public ProxyAgentSettings() { + } + + /** + * Get the enabled property: Specifies whether ProxyAgent feature should be enabled on the virtual machine or + * virtual machine scale set. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Specifies whether ProxyAgent feature should be enabled on the virtual machine or + * virtual machine scale set. + * + * @param enabled the enabled value to set. + * @return the ProxyAgentSettings object itself. + */ + public ProxyAgentSettings withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the mode property: Specifies the mode that ProxyAgent will execute on. Warning: this property has been + * deprecated, please specify 'mode' under particular hostendpoint setting. + * + * @return the mode value. + */ + public Mode mode() { + return this.mode; + } + + /** + * Set the mode property: Specifies the mode that ProxyAgent will execute on. Warning: this property has been + * deprecated, please specify 'mode' under particular hostendpoint setting. + * + * @param mode the mode value to set. + * @return the ProxyAgentSettings object itself. + */ + public ProxyAgentSettings withMode(Mode mode) { + this.mode = mode; + return this; + } + + /** + * Get the keyIncarnationId property: Increase the value of this property allows users to reset the key used for + * securing communication channel between guest and host. + * + * @return the keyIncarnationId value. + */ + public Integer keyIncarnationId() { + return this.keyIncarnationId; + } + + /** + * Set the keyIncarnationId property: Increase the value of this property allows users to reset the key used for + * securing communication channel between guest and host. + * + * @param keyIncarnationId the keyIncarnationId value to set. + * @return the ProxyAgentSettings object itself. + */ + public ProxyAgentSettings withKeyIncarnationId(Integer keyIncarnationId) { + this.keyIncarnationId = keyIncarnationId; + return this; + } + + /** + * Get the wireServer property: Specifies the Wire Server endpoint settings while creating the virtual machine or + * virtual machine scale set. Minimum api-version: 2024-03-01. + * + * @return the wireServer value. + */ + public HostEndpointSettings wireServer() { + return this.wireServer; + } + + /** + * Set the wireServer property: Specifies the Wire Server endpoint settings while creating the virtual machine or + * virtual machine scale set. Minimum api-version: 2024-03-01. + * + * @param wireServer the wireServer value to set. + * @return the ProxyAgentSettings object itself. + */ + public ProxyAgentSettings withWireServer(HostEndpointSettings wireServer) { + this.wireServer = wireServer; + return this; + } + + /** + * Get the imds property: Specifies the IMDS endpoint settings while creating the virtual machine or virtual machine + * scale set. Minimum api-version: 2024-03-01. + * + * @return the imds value. + */ + public HostEndpointSettings imds() { + return this.imds; + } + + /** + * Set the imds property: Specifies the IMDS endpoint settings while creating the virtual machine or virtual machine + * scale set. Minimum api-version: 2024-03-01. + * + * @param imds the imds value to set. + * @return the ProxyAgentSettings object itself. + */ + public ProxyAgentSettings withImds(HostEndpointSettings imds) { + this.imds = imds; + return this; + } + + /** + * Get the addProxyAgentExtension property: Specify whether to implicitly install the ProxyAgent Extension. This + * option is currently applicable only for Linux Os. + * + * @return the addProxyAgentExtension value. + */ + public Boolean addProxyAgentExtension() { + return this.addProxyAgentExtension; + } + + /** + * Set the addProxyAgentExtension property: Specify whether to implicitly install the ProxyAgent Extension. This + * option is currently applicable only for Linux Os. + * + * @param addProxyAgentExtension the addProxyAgentExtension value to set. + * @return the ProxyAgentSettings object itself. + */ + public ProxyAgentSettings withAddProxyAgentExtension(Boolean addProxyAgentExtension) { + this.addProxyAgentExtension = addProxyAgentExtension; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeNumberField("keyIncarnationId", this.keyIncarnationId); + jsonWriter.writeJsonField("wireServer", this.wireServer); + jsonWriter.writeJsonField("imds", this.imds); + jsonWriter.writeBooleanField("addProxyAgentExtension", this.addProxyAgentExtension); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProxyAgentSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProxyAgentSettings 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 ProxyAgentSettings. + */ + public static ProxyAgentSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProxyAgentSettings deserializedProxyAgentSettings = new ProxyAgentSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedProxyAgentSettings.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("mode".equals(fieldName)) { + deserializedProxyAgentSettings.mode = Mode.fromString(reader.getString()); + } else if ("keyIncarnationId".equals(fieldName)) { + deserializedProxyAgentSettings.keyIncarnationId = reader.getNullable(JsonReader::getInt); + } else if ("wireServer".equals(fieldName)) { + deserializedProxyAgentSettings.wireServer = HostEndpointSettings.fromJson(reader); + } else if ("imds".equals(fieldName)) { + deserializedProxyAgentSettings.imds = HostEndpointSettings.fromJson(reader); + } else if ("addProxyAgentExtension".equals(fieldName)) { + deserializedProxyAgentSettings.addProxyAgentExtension = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedProxyAgentSettings; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSku.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSku.java new file mode 100644 index 000000000000..67be874c1564 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSku.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. + */ +@Fluent +public final class PublicIPAddressSku implements JsonSerializable { + /* + * Specify public IP sku name + */ + private PublicIPAddressSkuName name; + + /* + * Specify public IP sku tier + */ + private PublicIPAddressSkuTier tier; + + /** + * Creates an instance of PublicIPAddressSku class. + */ + public PublicIPAddressSku() { + } + + /** + * Get the name property: Specify public IP sku name. + * + * @return the name value. + */ + public PublicIPAddressSkuName name() { + return this.name; + } + + /** + * Set the name property: Specify public IP sku name. + * + * @param name the name value to set. + * @return the PublicIPAddressSku object itself. + */ + public PublicIPAddressSku withName(PublicIPAddressSkuName name) { + this.name = name; + return this; + } + + /** + * Get the tier property: Specify public IP sku tier. + * + * @return the tier value. + */ + public PublicIPAddressSkuTier tier() { + return this.tier; + } + + /** + * Set the tier property: Specify public IP sku tier. + * + * @param tier the tier value to set. + * @return the PublicIPAddressSku object itself. + */ + public PublicIPAddressSku withTier(PublicIPAddressSkuTier tier) { + this.tier = tier; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); + jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PublicIPAddressSku from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PublicIPAddressSku 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 PublicIPAddressSku. + */ + public static PublicIPAddressSku fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PublicIPAddressSku deserializedPublicIPAddressSku = new PublicIPAddressSku(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPublicIPAddressSku.name = PublicIPAddressSkuName.fromString(reader.getString()); + } else if ("tier".equals(fieldName)) { + deserializedPublicIPAddressSku.tier = PublicIPAddressSkuTier.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPublicIPAddressSku; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuName.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuName.java new file mode 100644 index 000000000000..cb730462672b --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuName.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specify public IP sku name. + */ +public final class PublicIPAddressSkuName extends ExpandableStringEnum { + /** + * Basic IP sku name. + */ + public static final PublicIPAddressSkuName BASIC = fromString("Basic"); + + /** + * Standard IP sku name. + */ + public static final PublicIPAddressSkuName STANDARD = fromString("Standard"); + + /** + * Creates a new instance of PublicIPAddressSkuName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PublicIPAddressSkuName() { + } + + /** + * Creates or finds a PublicIPAddressSkuName from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublicIPAddressSkuName. + */ + public static PublicIPAddressSkuName fromString(String name) { + return fromString(name, PublicIPAddressSkuName.class); + } + + /** + * Gets known PublicIPAddressSkuName values. + * + * @return known PublicIPAddressSkuName values. + */ + public static Collection values() { + return values(PublicIPAddressSkuName.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuTier.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuTier.java new file mode 100644 index 000000000000..6754b4a8edf4 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuTier.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specify public IP sku tier. + */ +public final class PublicIPAddressSkuTier extends ExpandableStringEnum { + /** + * Regional IP address sku tier. + */ + public static final PublicIPAddressSkuTier REGIONAL = fromString("Regional"); + + /** + * Global IP address sku tier. + */ + public static final PublicIPAddressSkuTier GLOBAL = fromString("Global"); + + /** + * Creates a new instance of PublicIPAddressSkuTier value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PublicIPAddressSkuTier() { + } + + /** + * Creates or finds a PublicIPAddressSkuTier from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublicIPAddressSkuTier. + */ + public static PublicIPAddressSkuTier fromString(String name) { + return fromString(name, PublicIPAddressSkuTier.class); + } + + /** + * Gets known PublicIPAddressSkuTier values. + * + * @return known PublicIPAddressSkuTier values. + */ + public static Collection values() { + return values(PublicIPAddressSkuTier.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAllocationMethod.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAllocationMethod.java new file mode 100644 index 000000000000..61b544d6ec31 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAllocationMethod.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specify the public IP allocation type. + */ +public final class PublicIPAllocationMethod extends ExpandableStringEnum { + /** + * Dynamic IP allocation. + */ + public static final PublicIPAllocationMethod DYNAMIC = fromString("Dynamic"); + + /** + * Static IP allocation. + */ + public static final PublicIPAllocationMethod STATIC = fromString("Static"); + + /** + * Creates a new instance of PublicIPAllocationMethod value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PublicIPAllocationMethod() { + } + + /** + * Creates or finds a PublicIPAllocationMethod from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublicIPAllocationMethod. + */ + public static PublicIPAllocationMethod fromString(String name) { + return fromString(name, PublicIPAllocationMethod.class); + } + + /** + * Gets known PublicIPAllocationMethod values. + * + * @return known PublicIPAllocationMethod values. + */ + public static Collection values() { + return values(PublicIPAllocationMethod.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceIdentityType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceIdentityType.java new file mode 100644 index 000000000000..f2ec0cbf4b56 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceIdentityType.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +/** + * The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an + * implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from + * the virtual machine scale set. + */ +public enum ResourceIdentityType { + /** + * Enum value SystemAssigned. + */ + SYSTEM_ASSIGNED("SystemAssigned"), + + /** + * Enum value UserAssigned. + */ + USER_ASSIGNED("UserAssigned"), + + /** + * Enum value SystemAssigned, UserAssigned. + */ + SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"), + + /** + * Enum value None. + */ + NONE("None"); + + /** + * The actual serialized value for a ResourceIdentityType instance. + */ + private final String value; + + ResourceIdentityType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ResourceIdentityType instance. + * + * @param value the serialized value to parse. + * @return the parsed ResourceIdentityType object, or null if unable to parse. + */ + public static ResourceIdentityType fromString(String value) { + if (value == null) { + return null; + } + ResourceIdentityType[] items = ResourceIdentityType.values(); + for (ResourceIdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java index 53b9fbf1d385..2b24ebb8eac6 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java @@ -69,6 +69,11 @@ public final class ResourceOperationDetails implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java index 53bfac62f4ce..e4fe9da5a924 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java @@ -31,6 +31,16 @@ public final class ResourceOperationType extends ExpandableStringEnum { + /* + * JSON object that contains VM properties that are common across all VMs in this batch + */ + private BulkVMConfiguration baseProfile; + + /* + * JSON array that contains VM properties that should be overridden for each VM in the batch + */ + private List resourceOverrides; + + /* + * Number of VMs to be created + */ + private int resourceCount; + + /* + * If resourceOverrides doesn't contain name, service will create name based on prefix and resourceCount + */ + private String resourcePrefix; + + /* + * The flex properties for flexible VM creation + */ + private FlexProperties flexProperties; + + /** + * Creates an instance of ResourceProvisionFlexPayload class. + */ + public ResourceProvisionFlexPayload() { + } + + /** + * Get the baseProfile property: JSON object that contains VM properties that are common across all VMs in this + * batch. + * + * @return the baseProfile value. + */ + public BulkVMConfiguration baseProfile() { + return this.baseProfile; + } + + /** + * Set the baseProfile property: JSON object that contains VM properties that are common across all VMs in this + * batch. + * + * @param baseProfile the baseProfile value to set. + * @return the ResourceProvisionFlexPayload object itself. + */ + public ResourceProvisionFlexPayload withBaseProfile(BulkVMConfiguration baseProfile) { + this.baseProfile = baseProfile; + return this; + } + + /** + * Get the resourceOverrides property: JSON array that contains VM properties that should be overridden for each VM + * in the batch. + * + * @return the resourceOverrides value. + */ + public List resourceOverrides() { + return this.resourceOverrides; + } + + /** + * Set the resourceOverrides property: JSON array that contains VM properties that should be overridden for each VM + * in the batch. + * + * @param resourceOverrides the resourceOverrides value to set. + * @return the ResourceProvisionFlexPayload object itself. + */ + public ResourceProvisionFlexPayload withResourceOverrides(List resourceOverrides) { + this.resourceOverrides = resourceOverrides; + return this; + } + + /** + * Get the resourceCount property: Number of VMs to be created. + * + * @return the resourceCount value. + */ + public int resourceCount() { + return this.resourceCount; + } + + /** + * Set the resourceCount property: Number of VMs to be created. + * + * @param resourceCount the resourceCount value to set. + * @return the ResourceProvisionFlexPayload object itself. + */ + public ResourceProvisionFlexPayload withResourceCount(int resourceCount) { + this.resourceCount = resourceCount; + return this; + } + + /** + * Get the resourcePrefix property: If resourceOverrides doesn't contain name, service will create name based on + * prefix and resourceCount. + * + * @return the resourcePrefix value. + */ + public String resourcePrefix() { + return this.resourcePrefix; + } + + /** + * Set the resourcePrefix property: If resourceOverrides doesn't contain name, service will create name based on + * prefix and resourceCount. + * + * @param resourcePrefix the resourcePrefix value to set. + * @return the ResourceProvisionFlexPayload object itself. + */ + public ResourceProvisionFlexPayload withResourcePrefix(String resourcePrefix) { + this.resourcePrefix = resourcePrefix; + return this; + } + + /** + * Get the flexProperties property: The flex properties for flexible VM creation. + * + * @return the flexProperties value. + */ + public FlexProperties flexProperties() { + return this.flexProperties; + } + + /** + * Set the flexProperties property: The flex properties for flexible VM creation. + * + * @param flexProperties the flexProperties value to set. + * @return the ResourceProvisionFlexPayload object itself. + */ + public ResourceProvisionFlexPayload withFlexProperties(FlexProperties flexProperties) { + this.flexProperties = flexProperties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("resourceCount", this.resourceCount); + jsonWriter.writeJsonField("flexProperties", this.flexProperties); + jsonWriter.writeJsonField("baseProfile", this.baseProfile); + jsonWriter.writeArrayField("resourceOverrides", this.resourceOverrides, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("resourcePrefix", this.resourcePrefix); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceProvisionFlexPayload from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceProvisionFlexPayload 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. + * @throws IOException If an error occurs while reading the ResourceProvisionFlexPayload. + */ + public static ResourceProvisionFlexPayload fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceProvisionFlexPayload deserializedResourceProvisionFlexPayload = new ResourceProvisionFlexPayload(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceCount".equals(fieldName)) { + deserializedResourceProvisionFlexPayload.resourceCount = reader.getInt(); + } else if ("flexProperties".equals(fieldName)) { + deserializedResourceProvisionFlexPayload.flexProperties = FlexProperties.fromJson(reader); + } else if ("baseProfile".equals(fieldName)) { + deserializedResourceProvisionFlexPayload.baseProfile = BulkVMConfiguration.fromJson(reader); + } else if ("resourceOverrides".equals(fieldName)) { + List resourceOverrides + = reader.readArray(reader1 -> BulkVMConfiguration.fromJson(reader1)); + deserializedResourceProvisionFlexPayload.resourceOverrides = resourceOverrides; + } else if ("resourcePrefix".equals(fieldName)) { + deserializedResourceProvisionFlexPayload.resourcePrefix = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceProvisionFlexPayload; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionPayload.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionPayload.java index 809c721e4281..e2634f8792b0 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionPayload.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionPayload.java @@ -5,14 +5,12 @@ package com.azure.resourcemanager.computeschedule.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.BinaryData; 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.util.List; -import java.util.Map; /** * Resource creation data model. @@ -20,17 +18,18 @@ @Fluent public final class ResourceProvisionPayload implements JsonSerializable { /* - * JSON object that contains VM properties that are common across all VMs in this batch (if you want to create 100 - * VMs in this request, and they all have same vmSize, then include vmSize in baseProfile) + * Virtual machine profile object that contains VM properties that are common across all VMs in this batch (if you + * want to create 100 VMs in this request, and they all have same vmSize, then include vmSize in baseProfile) */ - private Map baseProfile; + private BulkVMConfiguration baseProfile; /* - * JSON array, that contains VM properties that should to be overridden for each VM in the batch (if you want to - * create 100 VMs, they all need a distinct computerName property, you pass computerNames for each VM in batch in - * this array), service will merge baseProfile with VM specific overrides and create a merged VMProfile. + * Virtual machine profile array that contains VM properties that needs to be overridden for each VM in the batch + * (if you want to create 100 VMs, they all need a distinct computerName property, you pass computerNames for each + * VM in batch in this array), service will merge baseProfile with VM specific overrides and create a merged + * VMProfile. */ - private List> resourceOverrides; + private List resourceOverrides; /* * Number of VMs to be created @@ -50,51 +49,51 @@ public ResourceProvisionPayload() { } /** - * Get the baseProfile property: JSON object that contains VM properties that are common across all VMs in this - * batch (if you want to create 100 VMs in this request, and they all have same vmSize, then include vmSize in - * baseProfile). + * Get the baseProfile property: Virtual machine profile object that contains VM properties that are common across + * all VMs in this batch (if you want to create 100 VMs in this request, and they all have same vmSize, then include + * vmSize in baseProfile). * * @return the baseProfile value. */ - public Map baseProfile() { + public BulkVMConfiguration baseProfile() { return this.baseProfile; } /** - * Set the baseProfile property: JSON object that contains VM properties that are common across all VMs in this - * batch (if you want to create 100 VMs in this request, and they all have same vmSize, then include vmSize in - * baseProfile). + * Set the baseProfile property: Virtual machine profile object that contains VM properties that are common across + * all VMs in this batch (if you want to create 100 VMs in this request, and they all have same vmSize, then include + * vmSize in baseProfile). * * @param baseProfile the baseProfile value to set. * @return the ResourceProvisionPayload object itself. */ - public ResourceProvisionPayload withBaseProfile(Map baseProfile) { + public ResourceProvisionPayload withBaseProfile(BulkVMConfiguration baseProfile) { this.baseProfile = baseProfile; return this; } /** - * Get the resourceOverrides property: JSON array, that contains VM properties that should to be overridden for each - * VM in the batch (if you want to create 100 VMs, they all need a distinct computerName property, you pass - * computerNames for each VM in batch in this array), service will merge baseProfile with VM specific overrides and - * create a merged VMProfile. + * Get the resourceOverrides property: Virtual machine profile array that contains VM properties that needs to be + * overridden for each VM in the batch (if you want to create 100 VMs, they all need a distinct computerName + * property, you pass computerNames for each VM in batch in this array), service will merge baseProfile with VM + * specific overrides and create a merged VMProfile. * * @return the resourceOverrides value. */ - public List> resourceOverrides() { + public List resourceOverrides() { return this.resourceOverrides; } /** - * Set the resourceOverrides property: JSON array, that contains VM properties that should to be overridden for each - * VM in the batch (if you want to create 100 VMs, they all need a distinct computerName property, you pass - * computerNames for each VM in batch in this array), service will merge baseProfile with VM specific overrides and - * create a merged VMProfile. + * Set the resourceOverrides property: Virtual machine profile array that contains VM properties that needs to be + * overridden for each VM in the batch (if you want to create 100 VMs, they all need a distinct computerName + * property, you pass computerNames for each VM in batch in this array), service will merge baseProfile with VM + * specific overrides and create a merged VMProfile. * * @param resourceOverrides the resourceOverrides value to set. * @return the ResourceProvisionPayload object itself. */ - public ResourceProvisionPayload withResourceOverrides(List> resourceOverrides) { + public ResourceProvisionPayload withResourceOverrides(List resourceOverrides) { this.resourceOverrides = resourceOverrides; return this; } @@ -148,21 +147,9 @@ public ResourceProvisionPayload withResourcePrefix(String resourcePrefix) { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeIntField("resourceCount", this.resourceCount); - jsonWriter.writeMapField("baseProfile", this.baseProfile, (writer, element) -> { - if (element == null) { - writer.writeNull(); - } else { - element.writeTo(writer); - } - }); + jsonWriter.writeJsonField("baseProfile", this.baseProfile); jsonWriter.writeArrayField("resourceOverrides", this.resourceOverrides, - (writer, element) -> writer.writeMap(element, (writer1, element1) -> { - if (element1 == null) { - writer1.writeNull(); - } else { - element1.writeTo(writer1); - } - })); + (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("resourcePrefix", this.resourcePrefix); return jsonWriter.writeEndObject(); } @@ -186,13 +173,10 @@ public static ResourceProvisionPayload fromJson(JsonReader jsonReader) throws IO if ("resourceCount".equals(fieldName)) { deserializedResourceProvisionPayload.resourceCount = reader.getInt(); } else if ("baseProfile".equals(fieldName)) { - Map baseProfile = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); - deserializedResourceProvisionPayload.baseProfile = baseProfile; + deserializedResourceProvisionPayload.baseProfile = BulkVMConfiguration.fromJson(reader); } else if ("resourceOverrides".equals(fieldName)) { - List> resourceOverrides - = reader.readArray(reader1 -> reader1.readMap(reader2 -> reader2 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())))); + List resourceOverrides + = reader.readArray(reader1 -> BulkVMConfiguration.fromJson(reader1)); deserializedResourceProvisionPayload.resourceOverrides = resourceOverrides; } else if ("resourcePrefix".equals(fieldName)) { deserializedResourceProvisionPayload.resourcePrefix = reader.getString(); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/RetryPolicy.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/RetryPolicy.java index 2dbc9aa123de..d9f80a8e6803 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/RetryPolicy.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/RetryPolicy.java @@ -26,6 +26,11 @@ public final class RetryPolicy implements JsonSerializable { */ private Integer retryWindowInMinutes; + /* + * Action to take on failure + */ + private ResourceOperationType onFailureAction; + /** * Creates an instance of RetryPolicy class. */ @@ -72,6 +77,26 @@ public RetryPolicy withRetryWindowInMinutes(Integer retryWindowInMinutes) { return this; } + /** + * Get the onFailureAction property: Action to take on failure. + * + * @return the onFailureAction value. + */ + public ResourceOperationType onFailureAction() { + return this.onFailureAction; + } + + /** + * Set the onFailureAction property: Action to take on failure. + * + * @param onFailureAction the onFailureAction value to set. + * @return the RetryPolicy object itself. + */ + public RetryPolicy withOnFailureAction(ResourceOperationType onFailureAction) { + this.onFailureAction = onFailureAction; + return this; + } + /** * {@inheritDoc} */ @@ -80,6 +105,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeNumberField("retryCount", this.retryCount); jsonWriter.writeNumberField("retryWindowInMinutes", this.retryWindowInMinutes); + jsonWriter.writeStringField("onFailureAction", + this.onFailureAction == null ? null : this.onFailureAction.toString()); return jsonWriter.writeEndObject(); } @@ -102,6 +129,8 @@ public static RetryPolicy fromJson(JsonReader jsonReader) throws IOException { deserializedRetryPolicy.retryCount = reader.getNullable(JsonReader::getInt); } else if ("retryWindowInMinutes".equals(fieldName)) { deserializedRetryPolicy.retryWindowInMinutes = reader.getNullable(JsonReader::getInt); + } else if ("onFailureAction".equals(fieldName)) { + deserializedRetryPolicy.onFailureAction = ResourceOperationType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActions.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActions.java index 12ce3ca9fe31..51b350747d09 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActions.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActions.java @@ -25,7 +25,7 @@ public interface ScheduledActions { * @return the response from a deallocate request along with {@link Response}. */ Response virtualMachinesSubmitDeallocateWithResponse(String locationparameter, - SubmitDeallocateRequest requestBody, Context context); + SubmitDeallocateContent requestBody, Context context); /** * VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines at datetime in @@ -39,7 +39,7 @@ Response virtualMachinesSubmitDeallocateWit * @return the response from a deallocate request. */ DeallocateResourceOperationResponse virtualMachinesSubmitDeallocate(String locationparameter, - SubmitDeallocateRequest requestBody); + SubmitDeallocateContent requestBody); /** * VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in @@ -54,7 +54,7 @@ DeallocateResourceOperationResponse virtualMachinesSubmitDeallocate(String locat * @return the response from a Hibernate request along with {@link Response}. */ Response virtualMachinesSubmitHibernateWithResponse(String locationparameter, - SubmitHibernateRequest requestBody, Context context); + SubmitHibernateContent requestBody, Context context); /** * VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in @@ -68,7 +68,7 @@ Response virtualMachinesSubmitHibernateWithR * @return the response from a Hibernate request. */ HibernateResourceOperationResponse virtualMachinesSubmitHibernate(String locationparameter, - SubmitHibernateRequest requestBody); + SubmitHibernateContent requestBody); /** * VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future. @@ -82,7 +82,7 @@ HibernateResourceOperationResponse virtualMachinesSubmitHibernate(String locatio * @return the response from a start request along with {@link Response}. */ Response virtualMachinesSubmitStartWithResponse(String locationparameter, - SubmitStartRequest requestBody, Context context); + SubmitStartContent requestBody, Context context); /** * VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future. @@ -94,7 +94,7 @@ Response virtualMachinesSubmitStartWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response from a start request. */ - StartResourceOperationResponse virtualMachinesSubmitStart(String locationparameter, SubmitStartRequest requestBody); + StartResourceOperationResponse virtualMachinesSubmitStart(String locationparameter, SubmitStartContent requestBody); /** * VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is @@ -109,7 +109,7 @@ Response virtualMachinesSubmitStartWithResponse( * @return the response from a deallocate request along with {@link Response}. */ Response virtualMachinesExecuteDeallocateWithResponse(String locationparameter, - ExecuteDeallocateRequest requestBody, Context context); + ExecuteDeallocateContent requestBody, Context context); /** * VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is @@ -123,7 +123,7 @@ Response virtualMachinesExecuteDeallocateWi * @return the response from a deallocate request. */ DeallocateResourceOperationResponse virtualMachinesExecuteDeallocate(String locationparameter, - ExecuteDeallocateRequest requestBody); + ExecuteDeallocateContent requestBody); /** * VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, this operation is @@ -138,7 +138,7 @@ DeallocateResourceOperationResponse virtualMachinesExecuteDeallocate(String loca * @return the response from a Hibernate request along with {@link Response}. */ Response virtualMachinesExecuteHibernateWithResponse(String locationparameter, - ExecuteHibernateRequest requestBody, Context context); + ExecuteHibernateContent requestBody, Context context); /** * VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, this operation is @@ -152,7 +152,7 @@ Response virtualMachinesExecuteHibernateWith * @return the response from a Hibernate request. */ HibernateResourceOperationResponse virtualMachinesExecuteHibernate(String locationparameter, - ExecuteHibernateRequest requestBody); + ExecuteHibernateContent requestBody); /** * VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered @@ -167,7 +167,7 @@ HibernateResourceOperationResponse virtualMachinesExecuteHibernate(String locati * @return the response from a start request along with {@link Response}. */ Response virtualMachinesExecuteStartWithResponse(String locationparameter, - ExecuteStartRequest requestBody, Context context); + ExecuteStartContent requestBody, Context context); /** * VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered @@ -181,11 +181,40 @@ Response virtualMachinesExecuteStartWithResponse * @return the response from a start request. */ StartResourceOperationResponse virtualMachinesExecuteStart(String locationparameter, - ExecuteStartRequest requestBody); + ExecuteStartContent requestBody); /** - * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, + * this operation is triggered as soon as Computeschedule receives it. + * + * @param locationparameter The location name. + * @param body The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a create flex request along with {@link Response}. + */ + Response virtualMachinesExecuteCreateFlexWithResponse(String locationparameter, + ExecuteCreateFlexContent body, Context context); + + /** + * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, + * this operation is triggered as soon as Computeschedule receives it. + * + * @param locationparameter The location name. + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a create flex request. + */ + CreateFlexResourceOperationResponse virtualMachinesExecuteCreateFlex(String locationparameter, + ExecuteCreateFlexContent body); + + /** + * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -196,11 +225,11 @@ StartResourceOperationResponse virtualMachinesExecuteStart(String locationparame * @return the response from a create request along with {@link Response}. */ Response virtualMachinesExecuteCreateWithResponse(String locationparameter, - ExecuteCreateRequest requestBody, Context context); + ExecuteCreateContent requestBody, Context context); /** - * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -210,11 +239,11 @@ Response virtualMachinesExecuteCreateWithRespon * @return the response from a create request. */ CreateResourceOperationResponse virtualMachinesExecuteCreate(String locationparameter, - ExecuteCreateRequest requestBody); + ExecuteCreateContent requestBody); /** - * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -225,11 +254,11 @@ CreateResourceOperationResponse virtualMachinesExecuteCreate(String locationpara * @return the response from a delete request along with {@link Response}. */ Response virtualMachinesExecuteDeleteWithResponse(String locationparameter, - ExecuteDeleteRequest requestBody, Context context); + ExecuteDeleteContent requestBody, Context context); /** - * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is - * triggered as soon as Computeschedule receives it. + * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this + * operation is triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -239,7 +268,7 @@ Response virtualMachinesExecuteDeleteWithRespon * @return the response from a delete request. */ DeleteResourceOperationResponse virtualMachinesExecuteDelete(String locationparameter, - ExecuteDeleteRequest requestBody); + ExecuteDeleteContent requestBody); /** * VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines. @@ -253,7 +282,7 @@ DeleteResourceOperationResponse virtualMachinesExecuteDelete(String locationpara * @return this is the response from a get operations status request along with {@link Response}. */ Response virtualMachinesGetOperationStatusWithResponse(String locationparameter, - GetOperationStatusRequest requestBody, Context context); + GetOperationStatusContent requestBody, Context context); /** * VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines. @@ -266,7 +295,7 @@ Response virtualMachinesGetOperationStatusWithRespon * @return this is the response from a get operations status request. */ GetOperationStatusResponse virtualMachinesGetOperationStatus(String locationparameter, - GetOperationStatusRequest requestBody); + GetOperationStatusContent requestBody); /** * VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. @@ -280,7 +309,7 @@ GetOperationStatusResponse virtualMachinesGetOperationStatus(String locationpara * @return this is the response from a cancel operations request along with {@link Response}. */ Response virtualMachinesCancelOperationsWithResponse(String locationparameter, - CancelOperationsRequest requestBody, Context context); + CancelOperationsContent requestBody, Context context); /** * VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. @@ -293,7 +322,7 @@ Response virtualMachinesCancelOperationsWithResponse(S * @return this is the response from a cancel operations request. */ CancelOperationsResponse virtualMachinesCancelOperations(String locationparameter, - CancelOperationsRequest requestBody); + CancelOperationsContent requestBody); /** * VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors encountered, @@ -308,7 +337,7 @@ CancelOperationsResponse virtualMachinesCancelOperations(String locationparamete * @return this is the response from a get operations errors request along with {@link Response}. */ Response virtualMachinesGetOperationErrorsWithResponse(String locationparameter, - GetOperationErrorsRequest requestBody, Context context); + GetOperationErrorsContent requestBody, Context context); /** * VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors encountered, @@ -322,7 +351,7 @@ Response virtualMachinesGetOperationErrorsWithRespon * @return this is the response from a get operations errors request. */ GetOperationErrorsResponse virtualMachinesGetOperationErrors(String locationparameter, - GetOperationErrorsRequest requestBody); + GetOperationErrorsContent requestBody); /** * Get a ScheduledAction. diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsAdditionalPublishingTargets.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsAdditionalPublishingTargets.java new file mode 100644 index 000000000000..b859e1538c50 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsAdditionalPublishingTargets.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies additional publishing targets for scheduled events. + */ +@Fluent +public final class ScheduledEventsAdditionalPublishingTargets + implements JsonSerializable { + /* + * The configuration parameters used while creating eventGridAndResourceGraph Scheduled Event setting. + */ + private EventGridAndResourceGraph eventGridAndResourceGraph; + + /** + * Creates an instance of ScheduledEventsAdditionalPublishingTargets class. + */ + public ScheduledEventsAdditionalPublishingTargets() { + } + + /** + * Get the eventGridAndResourceGraph property: The configuration parameters used while creating + * eventGridAndResourceGraph Scheduled Event setting. + * + * @return the eventGridAndResourceGraph value. + */ + public EventGridAndResourceGraph eventGridAndResourceGraph() { + return this.eventGridAndResourceGraph; + } + + /** + * Set the eventGridAndResourceGraph property: The configuration parameters used while creating + * eventGridAndResourceGraph Scheduled Event setting. + * + * @param eventGridAndResourceGraph the eventGridAndResourceGraph value to set. + * @return the ScheduledEventsAdditionalPublishingTargets object itself. + */ + public ScheduledEventsAdditionalPublishingTargets + withEventGridAndResourceGraph(EventGridAndResourceGraph eventGridAndResourceGraph) { + this.eventGridAndResourceGraph = eventGridAndResourceGraph; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("eventGridAndResourceGraph", this.eventGridAndResourceGraph); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScheduledEventsAdditionalPublishingTargets from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScheduledEventsAdditionalPublishingTargets 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 ScheduledEventsAdditionalPublishingTargets. + */ + public static ScheduledEventsAdditionalPublishingTargets fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScheduledEventsAdditionalPublishingTargets deserializedScheduledEventsAdditionalPublishingTargets + = new ScheduledEventsAdditionalPublishingTargets(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("eventGridAndResourceGraph".equals(fieldName)) { + deserializedScheduledEventsAdditionalPublishingTargets.eventGridAndResourceGraph + = EventGridAndResourceGraph.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScheduledEventsAdditionalPublishingTargets; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsPolicy.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsPolicy.java new file mode 100644 index 000000000000..f6499c0ddf46 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsPolicy.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations. + */ +@Fluent +public final class ScheduledEventsPolicy implements JsonSerializable { + /* + * The configuration parameters used while creating userInitiatedRedeploy scheduled event setting creation. + */ + private UserInitiatedRedeploy userInitiatedRedeploy; + + /* + * The configuration parameters used while creating userInitiatedReboot scheduled event setting creation. + */ + private UserInitiatedReboot userInitiatedReboot; + + /* + * The configuration parameters used while publishing scheduledEventsAdditionalPublishingTargets. + */ + private ScheduledEventsAdditionalPublishingTargets scheduledEventsAdditionalPublishingTargets; + + /* + * The configuration parameters used while creating AllInstancesDown scheduled event setting creation. + */ + private AllInstancesDown allInstancesDown; + + /** + * Creates an instance of ScheduledEventsPolicy class. + */ + public ScheduledEventsPolicy() { + } + + /** + * Get the userInitiatedRedeploy property: The configuration parameters used while creating userInitiatedRedeploy + * scheduled event setting creation. + * + * @return the userInitiatedRedeploy value. + */ + public UserInitiatedRedeploy userInitiatedRedeploy() { + return this.userInitiatedRedeploy; + } + + /** + * Set the userInitiatedRedeploy property: The configuration parameters used while creating userInitiatedRedeploy + * scheduled event setting creation. + * + * @param userInitiatedRedeploy the userInitiatedRedeploy value to set. + * @return the ScheduledEventsPolicy object itself. + */ + public ScheduledEventsPolicy withUserInitiatedRedeploy(UserInitiatedRedeploy userInitiatedRedeploy) { + this.userInitiatedRedeploy = userInitiatedRedeploy; + return this; + } + + /** + * Get the userInitiatedReboot property: The configuration parameters used while creating userInitiatedReboot + * scheduled event setting creation. + * + * @return the userInitiatedReboot value. + */ + public UserInitiatedReboot userInitiatedReboot() { + return this.userInitiatedReboot; + } + + /** + * Set the userInitiatedReboot property: The configuration parameters used while creating userInitiatedReboot + * scheduled event setting creation. + * + * @param userInitiatedReboot the userInitiatedReboot value to set. + * @return the ScheduledEventsPolicy object itself. + */ + public ScheduledEventsPolicy withUserInitiatedReboot(UserInitiatedReboot userInitiatedReboot) { + this.userInitiatedReboot = userInitiatedReboot; + return this; + } + + /** + * Get the scheduledEventsAdditionalPublishingTargets property: The configuration parameters used while publishing + * scheduledEventsAdditionalPublishingTargets. + * + * @return the scheduledEventsAdditionalPublishingTargets value. + */ + public ScheduledEventsAdditionalPublishingTargets scheduledEventsAdditionalPublishingTargets() { + return this.scheduledEventsAdditionalPublishingTargets; + } + + /** + * Set the scheduledEventsAdditionalPublishingTargets property: The configuration parameters used while publishing + * scheduledEventsAdditionalPublishingTargets. + * + * @param scheduledEventsAdditionalPublishingTargets the scheduledEventsAdditionalPublishingTargets value to set. + * @return the ScheduledEventsPolicy object itself. + */ + public ScheduledEventsPolicy withScheduledEventsAdditionalPublishingTargets( + ScheduledEventsAdditionalPublishingTargets scheduledEventsAdditionalPublishingTargets) { + this.scheduledEventsAdditionalPublishingTargets = scheduledEventsAdditionalPublishingTargets; + return this; + } + + /** + * Get the allInstancesDown property: The configuration parameters used while creating AllInstancesDown scheduled + * event setting creation. + * + * @return the allInstancesDown value. + */ + public AllInstancesDown allInstancesDown() { + return this.allInstancesDown; + } + + /** + * Set the allInstancesDown property: The configuration parameters used while creating AllInstancesDown scheduled + * event setting creation. + * + * @param allInstancesDown the allInstancesDown value to set. + * @return the ScheduledEventsPolicy object itself. + */ + public ScheduledEventsPolicy withAllInstancesDown(AllInstancesDown allInstancesDown) { + this.allInstancesDown = allInstancesDown; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("userInitiatedRedeploy", this.userInitiatedRedeploy); + jsonWriter.writeJsonField("userInitiatedReboot", this.userInitiatedReboot); + jsonWriter.writeJsonField("scheduledEventsAdditionalPublishingTargets", + this.scheduledEventsAdditionalPublishingTargets); + jsonWriter.writeJsonField("allInstancesDown", this.allInstancesDown); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScheduledEventsPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScheduledEventsPolicy 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 ScheduledEventsPolicy. + */ + public static ScheduledEventsPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScheduledEventsPolicy deserializedScheduledEventsPolicy = new ScheduledEventsPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userInitiatedRedeploy".equals(fieldName)) { + deserializedScheduledEventsPolicy.userInitiatedRedeploy = UserInitiatedRedeploy.fromJson(reader); + } else if ("userInitiatedReboot".equals(fieldName)) { + deserializedScheduledEventsPolicy.userInitiatedReboot = UserInitiatedReboot.fromJson(reader); + } else if ("scheduledEventsAdditionalPublishingTargets".equals(fieldName)) { + deserializedScheduledEventsPolicy.scheduledEventsAdditionalPublishingTargets + = ScheduledEventsAdditionalPublishingTargets.fromJson(reader); + } else if ("allInstancesDown".equals(fieldName)) { + deserializedScheduledEventsPolicy.allInstancesDown = AllInstancesDown.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScheduledEventsPolicy; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsProfile.java new file mode 100644 index 000000000000..35d26daa40bc --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsProfile.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Profile for the scheduled events. + */ +@Fluent +public final class ScheduledEventsProfile implements JsonSerializable { + /* + * Specifies Terminate Scheduled Event related configurations. + */ + private TerminateNotificationProfile terminateNotificationProfile; + + /* + * Specifies OS Image Scheduled Event related configurations. + */ + private OSImageNotificationProfile osImageNotificationProfile; + + /** + * Creates an instance of ScheduledEventsProfile class. + */ + public ScheduledEventsProfile() { + } + + /** + * Get the terminateNotificationProfile property: Specifies Terminate Scheduled Event related configurations. + * + * @return the terminateNotificationProfile value. + */ + public TerminateNotificationProfile terminateNotificationProfile() { + return this.terminateNotificationProfile; + } + + /** + * Set the terminateNotificationProfile property: Specifies Terminate Scheduled Event related configurations. + * + * @param terminateNotificationProfile the terminateNotificationProfile value to set. + * @return the ScheduledEventsProfile object itself. + */ + public ScheduledEventsProfile + withTerminateNotificationProfile(TerminateNotificationProfile terminateNotificationProfile) { + this.terminateNotificationProfile = terminateNotificationProfile; + return this; + } + + /** + * Get the osImageNotificationProfile property: Specifies OS Image Scheduled Event related configurations. + * + * @return the osImageNotificationProfile value. + */ + public OSImageNotificationProfile osImageNotificationProfile() { + return this.osImageNotificationProfile; + } + + /** + * Set the osImageNotificationProfile property: Specifies OS Image Scheduled Event related configurations. + * + * @param osImageNotificationProfile the osImageNotificationProfile value to set. + * @return the ScheduledEventsProfile object itself. + */ + public ScheduledEventsProfile + withOsImageNotificationProfile(OSImageNotificationProfile osImageNotificationProfile) { + this.osImageNotificationProfile = osImageNotificationProfile; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("terminateNotificationProfile", this.terminateNotificationProfile); + jsonWriter.writeJsonField("osImageNotificationProfile", this.osImageNotificationProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScheduledEventsProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScheduledEventsProfile 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 ScheduledEventsProfile. + */ + public static ScheduledEventsProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScheduledEventsProfile deserializedScheduledEventsProfile = new ScheduledEventsProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("terminateNotificationProfile".equals(fieldName)) { + deserializedScheduledEventsProfile.terminateNotificationProfile + = TerminateNotificationProfile.fromJson(reader); + } else if ("osImageNotificationProfile".equals(fieldName)) { + deserializedScheduledEventsProfile.osImageNotificationProfile + = OSImageNotificationProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScheduledEventsProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityEncryptionTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityEncryptionTypes.java new file mode 100644 index 000000000000..2bc812a6b72f --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityEncryptionTypes.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed + * disk along with VMGuestState blob, VMGuestStateOnly for encryption of just the VMGuestState blob, and NonPersistedTPM + * for not persisting firmware state in the VMGuestState blob.. **Note:** It can be set for only Confidential VMs. + */ +public final class SecurityEncryptionTypes extends ExpandableStringEnum { + /** + * VMGuestStateOnly encryption. + */ + public static final SecurityEncryptionTypes VMGUEST_STATE_ONLY = fromString("VMGuestStateOnly"); + + /** + * DiskWithVMGuestState encryption. + */ + public static final SecurityEncryptionTypes DISK_WITH_VMGUEST_STATE = fromString("DiskWithVMGuestState"); + + /** + * NonPersistedTPM encryption. + */ + public static final SecurityEncryptionTypes NON_PERSISTED_TPM = fromString("NonPersistedTPM"); + + /** + * Creates a new instance of SecurityEncryptionTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecurityEncryptionTypes() { + } + + /** + * Creates or finds a SecurityEncryptionTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding SecurityEncryptionTypes. + */ + public static SecurityEncryptionTypes fromString(String name) { + return fromString(name, SecurityEncryptionTypes.class); + } + + /** + * Gets known SecurityEncryptionTypes values. + * + * @return known SecurityEncryptionTypes values. + */ + public static Collection values() { + return values(SecurityEncryptionTypes.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityProfile.java new file mode 100644 index 000000000000..086e4b62afcf --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityProfile.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies the Security profile settings for the virtual machine or virtual machine scale set. + */ +@Fluent +public final class SecurityProfile implements JsonSerializable { + /* + * Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum + * compute api-version: 2020-12-01. + */ + private UefiSettings uefiSettings; + + /* + * This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine + * or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at + * host itself. The default behavior is: The Encryption at host will be disabled unless this property is set to true + * for the resource. + */ + private Boolean encryptionAtHost; + + /* + * Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable + * UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set. + */ + private SecurityTypes securityType; + + /* + * Specifies the Managed Identity used by ADE to get access token for keyvault operations. + */ + private EncryptionIdentity encryptionIdentity; + + /* + * Specifies ProxyAgent settings while creating the virtual machine. Minimum compute api-version: 2023-09-01. + */ + private ProxyAgentSettings proxyAgentSettings; + + /** + * Creates an instance of SecurityProfile class. + */ + public SecurityProfile() { + } + + /** + * Get the uefiSettings property: Specifies the security settings like secure boot and vTPM used while creating the + * virtual machine. Minimum compute api-version: 2020-12-01. + * + * @return the uefiSettings value. + */ + public UefiSettings uefiSettings() { + return this.uefiSettings; + } + + /** + * Set the uefiSettings property: Specifies the security settings like secure boot and vTPM used while creating the + * virtual machine. Minimum compute api-version: 2020-12-01. + * + * @param uefiSettings the uefiSettings value to set. + * @return the SecurityProfile object itself. + */ + public SecurityProfile withUefiSettings(UefiSettings uefiSettings) { + this.uefiSettings = uefiSettings; + return this; + } + + /** + * Get the encryptionAtHost property: This property can be used by user in the request to enable or disable the Host + * Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the + * disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be + * disabled unless this property is set to true for the resource. + * + * @return the encryptionAtHost value. + */ + public Boolean encryptionAtHost() { + return this.encryptionAtHost; + } + + /** + * Set the encryptionAtHost property: This property can be used by user in the request to enable or disable the Host + * Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the + * disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be + * disabled unless this property is set to true for the resource. + * + * @param encryptionAtHost the encryptionAtHost value to set. + * @return the SecurityProfile object itself. + */ + public SecurityProfile withEncryptionAtHost(Boolean encryptionAtHost) { + this.encryptionAtHost = encryptionAtHost; + return this; + } + + /** + * Get the securityType property: Specifies the SecurityType of the virtual machine. It has to be set to any + * specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this + * property is set. + * + * @return the securityType value. + */ + public SecurityTypes securityType() { + return this.securityType; + } + + /** + * Set the securityType property: Specifies the SecurityType of the virtual machine. It has to be set to any + * specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this + * property is set. + * + * @param securityType the securityType value to set. + * @return the SecurityProfile object itself. + */ + public SecurityProfile withSecurityType(SecurityTypes securityType) { + this.securityType = securityType; + return this; + } + + /** + * Get the encryptionIdentity property: Specifies the Managed Identity used by ADE to get access token for keyvault + * operations. + * + * @return the encryptionIdentity value. + */ + public EncryptionIdentity encryptionIdentity() { + return this.encryptionIdentity; + } + + /** + * Set the encryptionIdentity property: Specifies the Managed Identity used by ADE to get access token for keyvault + * operations. + * + * @param encryptionIdentity the encryptionIdentity value to set. + * @return the SecurityProfile object itself. + */ + public SecurityProfile withEncryptionIdentity(EncryptionIdentity encryptionIdentity) { + this.encryptionIdentity = encryptionIdentity; + return this; + } + + /** + * Get the proxyAgentSettings property: Specifies ProxyAgent settings while creating the virtual machine. Minimum + * compute api-version: 2023-09-01. + * + * @return the proxyAgentSettings value. + */ + public ProxyAgentSettings proxyAgentSettings() { + return this.proxyAgentSettings; + } + + /** + * Set the proxyAgentSettings property: Specifies ProxyAgent settings while creating the virtual machine. Minimum + * compute api-version: 2023-09-01. + * + * @param proxyAgentSettings the proxyAgentSettings value to set. + * @return the SecurityProfile object itself. + */ + public SecurityProfile withProxyAgentSettings(ProxyAgentSettings proxyAgentSettings) { + this.proxyAgentSettings = proxyAgentSettings; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("uefiSettings", this.uefiSettings); + jsonWriter.writeBooleanField("encryptionAtHost", this.encryptionAtHost); + jsonWriter.writeStringField("securityType", this.securityType == null ? null : this.securityType.toString()); + jsonWriter.writeJsonField("encryptionIdentity", this.encryptionIdentity); + jsonWriter.writeJsonField("proxyAgentSettings", this.proxyAgentSettings); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecurityProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecurityProfile 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 SecurityProfile. + */ + public static SecurityProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecurityProfile deserializedSecurityProfile = new SecurityProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uefiSettings".equals(fieldName)) { + deserializedSecurityProfile.uefiSettings = UefiSettings.fromJson(reader); + } else if ("encryptionAtHost".equals(fieldName)) { + deserializedSecurityProfile.encryptionAtHost = reader.getNullable(JsonReader::getBoolean); + } else if ("securityType".equals(fieldName)) { + deserializedSecurityProfile.securityType = SecurityTypes.fromString(reader.getString()); + } else if ("encryptionIdentity".equals(fieldName)) { + deserializedSecurityProfile.encryptionIdentity = EncryptionIdentity.fromJson(reader); + } else if ("proxyAgentSettings".equals(fieldName)) { + deserializedSecurityProfile.proxyAgentSettings = ProxyAgentSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSecurityProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityTypes.java new file mode 100644 index 000000000000..cdc8ec820eac --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityTypes.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. + * The default behavior is: UefiSettings will not be enabled unless this property is set. + */ +public final class SecurityTypes extends ExpandableStringEnum { + /** + * TrustedLaunch security type. + */ + public static final SecurityTypes TRUSTED_LAUNCH = fromString("TrustedLaunch"); + + /** + * ConfidentialVM security type. + */ + public static final SecurityTypes CONFIDENTIAL_VM = fromString("ConfidentialVM"); + + /** + * Creates a new instance of SecurityTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecurityTypes() { + } + + /** + * Creates or finds a SecurityTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding SecurityTypes. + */ + public static SecurityTypes fromString(String name) { + return fromString(name, SecurityTypes.class); + } + + /** + * Gets known SecurityTypes values. + * + * @return known SecurityTypes values. + */ + public static Collection values() { + return values(SecurityTypes.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SettingNames.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SettingNames.java new file mode 100644 index 000000000000..025cf12e3598 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SettingNames.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and + * AutoLogon. + */ +public final class SettingNames extends ExpandableStringEnum { + /** + * AutoLogon mode. + */ + public static final SettingNames AUTO_LOGON = fromString("AutoLogon"); + + /** + * FirstLogonCommands mode. + */ + public static final SettingNames FIRST_LOGON_COMMANDS = fromString("FirstLogonCommands"); + + /** + * Creates a new instance of SettingNames value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SettingNames() { + } + + /** + * Creates or finds a SettingNames from its string representation. + * + * @param name a name to look for. + * @return the corresponding SettingNames. + */ + public static SettingNames fromString(String name) { + return fromString(name, SettingNames.class); + } + + /** + * Gets known SettingNames values. + * + * @return known SettingNames values. + */ + public static Collection values() { + return values(SettingNames.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshConfiguration.java new file mode 100644 index 000000000000..7a931a7bb743 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshConfiguration.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; + +/** + * SSH configuration for Linux based VMs running on Azure. + */ +@Fluent +public final class SshConfiguration implements JsonSerializable { + /* + * The list of SSH public keys used to authenticate with linux based VMs. + */ + private List publicKeys; + + /** + * Creates an instance of SshConfiguration class. + */ + public SshConfiguration() { + } + + /** + * Get the publicKeys property: The list of SSH public keys used to authenticate with linux based VMs. + * + * @return the publicKeys value. + */ + public List publicKeys() { + return this.publicKeys; + } + + /** + * Set the publicKeys property: The list of SSH public keys used to authenticate with linux based VMs. + * + * @param publicKeys the publicKeys value to set. + * @return the SshConfiguration object itself. + */ + public SshConfiguration withPublicKeys(List publicKeys) { + this.publicKeys = publicKeys; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("publicKeys", this.publicKeys, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SshConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SshConfiguration 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 SshConfiguration. + */ + public static SshConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SshConfiguration deserializedSshConfiguration = new SshConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicKeys".equals(fieldName)) { + List publicKeys = reader.readArray(reader1 -> SshPublicKey.fromJson(reader1)); + deserializedSshConfiguration.publicKeys = publicKeys; + } else { + reader.skipChildren(); + } + } + + return deserializedSshConfiguration; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshPublicKey.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshPublicKey.java new file mode 100644 index 000000000000..4f57f7abc5c9 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshPublicKey.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. + */ +@Fluent +public final class SshPublicKey implements JsonSerializable { + /* + * Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the + * specified key is appended to the file. Example: /home/user/.ssh/authorized_keys + */ + private String path; + + /* + * SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit + * and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in + * Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + */ + private String keyData; + + /** + * Creates an instance of SshPublicKey class. + */ + public SshPublicKey() { + } + + /** + * Get the path property: Specifies the full path on the created VM where ssh public key is stored. If the file + * already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: Specifies the full path on the created VM where ssh public key is stored. If the file + * already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys. + * + * @param path the path value to set. + * @return the SshPublicKey object itself. + */ + public SshPublicKey withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the keyData property: SSH public key certificate used to authenticate with the VM through ssh. The key needs + * to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for + * Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + * + * @return the keyData value. + */ + public String keyData() { + return this.keyData; + } + + /** + * Set the keyData property: SSH public key certificate used to authenticate with the VM through ssh. The key needs + * to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for + * Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + * + * @param keyData the keyData value to set. + * @return the SshPublicKey object itself. + */ + public SshPublicKey withKeyData(String keyData) { + this.keyData = keyData; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeStringField("keyData", this.keyData); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SshPublicKey from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SshPublicKey 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 SshPublicKey. + */ + public static SshPublicKey fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SshPublicKey deserializedSshPublicKey = new SshPublicKey(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("path".equals(fieldName)) { + deserializedSshPublicKey.path = reader.getString(); + } else if ("keyData".equals(fieldName)) { + deserializedSshPublicKey.keyData = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSshPublicKey; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageAccountTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageAccountTypes.java new file mode 100644 index 000000000000..f943b6745b21 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageAccountTypes.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when + * you create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. + * Standard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses + * Ultra disk. Premium_ZRS uses Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant + * storage. For more information regarding disks supported for Windows Virtual Machines, refer to + * https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to + * https://docs.microsoft.com/azure/virtual-machines/linux/disks-types. + */ +public final class StorageAccountTypes extends ExpandableStringEnum { + /** + * Standard_LRS storage account type. + */ + public static final StorageAccountTypes STANDARD_LRS = fromString("Standard_LRS"); + + /** + * Premium_LRS storage account type. + */ + public static final StorageAccountTypes PREMIUM_LRS = fromString("Premium_LRS"); + + /** + * StandardSSD_LRS storage account type. + */ + public static final StorageAccountTypes STANDARD_SSD_LRS = fromString("StandardSSD_LRS"); + + /** + * UltraSSD_LRS storage account type. + */ + public static final StorageAccountTypes ULTRA_SSD_LRS = fromString("UltraSSD_LRS"); + + /** + * Premium_ZRS storage account type. + */ + public static final StorageAccountTypes PREMIUM_ZRS = fromString("Premium_ZRS"); + + /** + * StandardSSD_ZRS storage account type. + */ + public static final StorageAccountTypes STANDARD_SSD_ZRS = fromString("StandardSSD_ZRS"); + + /** + * PremiumV2_LRS storage account type. + */ + public static final StorageAccountTypes PREMIUM_V2_LRS = fromString("PremiumV2_LRS"); + + /** + * Creates a new instance of StorageAccountTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StorageAccountTypes() { + } + + /** + * Creates or finds a StorageAccountTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding StorageAccountTypes. + */ + public static StorageAccountTypes fromString(String name) { + return fromString(name, StorageAccountTypes.class); + } + + /** + * Gets known StorageAccountTypes values. + * + * @return known StorageAccountTypes values. + */ + public static Collection values() { + return values(StorageAccountTypes.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageProfile.java new file mode 100644 index 000000000000..ee02b3b5d86f --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageProfile.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; + +/** + * Specifies the storage settings for the virtual machine disks. + */ +@Fluent +public final class StorageProfile implements JsonSerializable { + /* + * Specifies information about the image to use. You can specify information about platform images, marketplace + * images, or virtual machine images. This element is required when you want to use a platform image, marketplace + * image, or virtual machine image, but is not used in other creation operations. + */ + private ImageReference imageReference; + + /* + * Specifies information about the operating system disk used by the virtual machine. For more information about + * disks, see [About disks and VHDs for Azure virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + */ + private OSDisk osDisk; + + /* + * Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, + * see [About disks and VHDs for Azure virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + */ + private List dataDisks; + + /* + * Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk + * controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 + * based on the capabilities of the operating system disk and VM size from the the specified minimum api version. + * You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the + * VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01. + */ + private DiskControllerTypes diskControllerType; + + /** + * Creates an instance of StorageProfile class. + */ + public StorageProfile() { + } + + /** + * Get the imageReference property: Specifies information about the image to use. You can specify information about + * platform images, marketplace images, or virtual machine images. This element is required when you want to use a + * platform image, marketplace image, or virtual machine image, but is not used in other creation operations. + * + * @return the imageReference value. + */ + public ImageReference imageReference() { + return this.imageReference; + } + + /** + * Set the imageReference property: Specifies information about the image to use. You can specify information about + * platform images, marketplace images, or virtual machine images. This element is required when you want to use a + * platform image, marketplace image, or virtual machine image, but is not used in other creation operations. + * + * @param imageReference the imageReference value to set. + * @return the StorageProfile object itself. + */ + public StorageProfile withImageReference(ImageReference imageReference) { + this.imageReference = imageReference; + return this; + } + + /** + * Get the osDisk property: Specifies information about the operating system disk used by the virtual machine. For + * more information about disks, see [About disks and VHDs for Azure virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + * + * @return the osDisk value. + */ + public OSDisk osDisk() { + return this.osDisk; + } + + /** + * Set the osDisk property: Specifies information about the operating system disk used by the virtual machine. For + * more information about disks, see [About disks and VHDs for Azure virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + * + * @param osDisk the osDisk value to set. + * @return the StorageProfile object itself. + */ + public StorageProfile withOsDisk(OSDisk osDisk) { + this.osDisk = osDisk; + return this; + } + + /** + * Get the dataDisks property: Specifies the parameters that are used to add a data disk to a virtual machine. For + * more information about disks, see [About disks and VHDs for Azure virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + * + * @return the dataDisks value. + */ + public List dataDisks() { + return this.dataDisks; + } + + /** + * Set the dataDisks property: Specifies the parameters that are used to add a data disk to a virtual machine. For + * more information about disks, see [About disks and VHDs for Azure virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + * + * @param dataDisks the dataDisks value to set. + * @return the StorageProfile object itself. + */ + public StorageProfile withDataDisks(List dataDisks) { + this.dataDisks = dataDisks; + return this; + } + + /** + * Get the diskControllerType property: Specifies the disk controller type configured for the VM. **Note:** This + * property will be set to the default disk controller type if not specified provided virtual machine is being + * created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from + * the the specified minimum api version. You need to deallocate the VM before updating its disk controller type + * unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. + * Minimum api-version: 2022-08-01. + * + * @return the diskControllerType value. + */ + public DiskControllerTypes diskControllerType() { + return this.diskControllerType; + } + + /** + * Set the diskControllerType property: Specifies the disk controller type configured for the VM. **Note:** This + * property will be set to the default disk controller type if not specified provided virtual machine is being + * created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from + * the the specified minimum api version. You need to deallocate the VM before updating its disk controller type + * unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. + * Minimum api-version: 2022-08-01. + * + * @param diskControllerType the diskControllerType value to set. + * @return the StorageProfile object itself. + */ + public StorageProfile withDiskControllerType(DiskControllerTypes diskControllerType) { + this.diskControllerType = diskControllerType; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("imageReference", this.imageReference); + jsonWriter.writeJsonField("osDisk", this.osDisk); + jsonWriter.writeArrayField("dataDisks", this.dataDisks, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("diskControllerType", + this.diskControllerType == null ? null : this.diskControllerType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageProfile 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 StorageProfile. + */ + public static StorageProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageProfile deserializedStorageProfile = new StorageProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("imageReference".equals(fieldName)) { + deserializedStorageProfile.imageReference = ImageReference.fromJson(reader); + } else if ("osDisk".equals(fieldName)) { + deserializedStorageProfile.osDisk = OSDisk.fromJson(reader); + } else if ("dataDisks".equals(fieldName)) { + List dataDisks = reader.readArray(reader1 -> DataDisk.fromJson(reader1)); + deserializedStorageProfile.dataDisks = dataDisks; + } else if ("diskControllerType".equals(fieldName)) { + deserializedStorageProfile.diskControllerType = DiskControllerTypes.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitDeallocateRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitDeallocateContent.java similarity index 76% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitDeallocateRequest.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitDeallocateContent.java index 34f92ccc0298..e0924d9bb11d 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitDeallocateRequest.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitDeallocateContent.java @@ -15,7 +15,7 @@ * The deallocate request for resources. */ @Fluent -public final class SubmitDeallocateRequest implements JsonSerializable { +public final class SubmitDeallocateContent implements JsonSerializable { /* * The schedule for the request */ @@ -37,9 +37,9 @@ public final class SubmitDeallocateRequest implements JsonSerializable { - SubmitDeallocateRequest deserializedSubmitDeallocateRequest = new SubmitDeallocateRequest(); + SubmitDeallocateContent deserializedSubmitDeallocateContent = new SubmitDeallocateContent(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("schedule".equals(fieldName)) { - deserializedSubmitDeallocateRequest.schedule = Schedule.fromJson(reader); + deserializedSubmitDeallocateContent.schedule = Schedule.fromJson(reader); } else if ("executionParameters".equals(fieldName)) { - deserializedSubmitDeallocateRequest.executionParameters = ExecutionParameters.fromJson(reader); + deserializedSubmitDeallocateContent.executionParameters = ExecutionParameters.fromJson(reader); } else if ("resources".equals(fieldName)) { - deserializedSubmitDeallocateRequest.resources = Resources.fromJson(reader); + deserializedSubmitDeallocateContent.resources = Resources.fromJson(reader); } else if ("correlationid".equals(fieldName)) { - deserializedSubmitDeallocateRequest.correlationid = reader.getString(); + deserializedSubmitDeallocateContent.correlationid = reader.getString(); } else { reader.skipChildren(); } } - return deserializedSubmitDeallocateRequest; + return deserializedSubmitDeallocateContent; }); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitHibernateRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitHibernateContent.java similarity index 76% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitHibernateRequest.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitHibernateContent.java index 83ada39ca824..ceb9b98ec356 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitHibernateRequest.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitHibernateContent.java @@ -15,7 +15,7 @@ * This is the request for hibernate. */ @Fluent -public final class SubmitHibernateRequest implements JsonSerializable { +public final class SubmitHibernateContent implements JsonSerializable { /* * The schedule for the request */ @@ -37,9 +37,9 @@ public final class SubmitHibernateRequest implements JsonSerializable { - SubmitHibernateRequest deserializedSubmitHibernateRequest = new SubmitHibernateRequest(); + SubmitHibernateContent deserializedSubmitHibernateContent = new SubmitHibernateContent(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("schedule".equals(fieldName)) { - deserializedSubmitHibernateRequest.schedule = Schedule.fromJson(reader); + deserializedSubmitHibernateContent.schedule = Schedule.fromJson(reader); } else if ("executionParameters".equals(fieldName)) { - deserializedSubmitHibernateRequest.executionParameters = ExecutionParameters.fromJson(reader); + deserializedSubmitHibernateContent.executionParameters = ExecutionParameters.fromJson(reader); } else if ("resources".equals(fieldName)) { - deserializedSubmitHibernateRequest.resources = Resources.fromJson(reader); + deserializedSubmitHibernateContent.resources = Resources.fromJson(reader); } else if ("correlationid".equals(fieldName)) { - deserializedSubmitHibernateRequest.correlationid = reader.getString(); + deserializedSubmitHibernateContent.correlationid = reader.getString(); } else { reader.skipChildren(); } } - return deserializedSubmitHibernateRequest; + return deserializedSubmitHibernateContent; }); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitStartRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitStartContent.java similarity index 77% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitStartRequest.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitStartContent.java index f20589ea754f..96b7bab98788 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitStartRequest.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitStartContent.java @@ -15,7 +15,7 @@ * This is the request for start. */ @Fluent -public final class SubmitStartRequest implements JsonSerializable { +public final class SubmitStartContent implements JsonSerializable { /* * The schedule for the request */ @@ -37,9 +37,9 @@ public final class SubmitStartRequest implements JsonSerializable { - SubmitStartRequest deserializedSubmitStartRequest = new SubmitStartRequest(); + SubmitStartContent deserializedSubmitStartContent = new SubmitStartContent(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("schedule".equals(fieldName)) { - deserializedSubmitStartRequest.schedule = Schedule.fromJson(reader); + deserializedSubmitStartContent.schedule = Schedule.fromJson(reader); } else if ("executionParameters".equals(fieldName)) { - deserializedSubmitStartRequest.executionParameters = ExecutionParameters.fromJson(reader); + deserializedSubmitStartContent.executionParameters = ExecutionParameters.fromJson(reader); } else if ("resources".equals(fieldName)) { - deserializedSubmitStartRequest.resources = Resources.fromJson(reader); + deserializedSubmitStartContent.resources = Resources.fromJson(reader); } else if ("correlationid".equals(fieldName)) { - deserializedSubmitStartRequest.correlationid = reader.getString(); + deserializedSubmitStartContent.correlationid = reader.getString(); } else { reader.skipChildren(); } } - return deserializedSubmitStartRequest; + return deserializedSubmitStartContent; }); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/TerminateNotificationProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/TerminateNotificationProfile.java new file mode 100644 index 000000000000..3cb5b90aef5c --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/TerminateNotificationProfile.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Profile properties for the Terminate Scheduled event. + */ +@Fluent +public final class TerminateNotificationProfile implements JsonSerializable { + /* + * Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate + * Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 + * format, the default value is 5 minutes (PT5M) + */ + private String notBeforeTimeout; + + /* + * Specifies whether the Terminate Scheduled event is enabled or disabled. + */ + private Boolean enable; + + /** + * Creates an instance of TerminateNotificationProfile class. + */ + public TerminateNotificationProfile() { + } + + /** + * Get the notBeforeTimeout property: Configurable length of time a Virtual Machine being deleted will have to + * potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The + * configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M). + * + * @return the notBeforeTimeout value. + */ + public String notBeforeTimeout() { + return this.notBeforeTimeout; + } + + /** + * Set the notBeforeTimeout property: Configurable length of time a Virtual Machine being deleted will have to + * potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The + * configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M). + * + * @param notBeforeTimeout the notBeforeTimeout value to set. + * @return the TerminateNotificationProfile object itself. + */ + public TerminateNotificationProfile withNotBeforeTimeout(String notBeforeTimeout) { + this.notBeforeTimeout = notBeforeTimeout; + return this; + } + + /** + * Get the enable property: Specifies whether the Terminate Scheduled event is enabled or disabled. + * + * @return the enable value. + */ + public Boolean enable() { + return this.enable; + } + + /** + * Set the enable property: Specifies whether the Terminate Scheduled event is enabled or disabled. + * + * @param enable the enable value to set. + * @return the TerminateNotificationProfile object itself. + */ + public TerminateNotificationProfile withEnable(Boolean enable) { + this.enable = enable; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("notBeforeTimeout", this.notBeforeTimeout); + jsonWriter.writeBooleanField("enable", this.enable); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TerminateNotificationProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TerminateNotificationProfile 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 TerminateNotificationProfile. + */ + public static TerminateNotificationProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TerminateNotificationProfile deserializedTerminateNotificationProfile = new TerminateNotificationProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("notBeforeTimeout".equals(fieldName)) { + deserializedTerminateNotificationProfile.notBeforeTimeout = reader.getString(); + } else if ("enable".equals(fieldName)) { + deserializedTerminateNotificationProfile.enable = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedTerminateNotificationProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UefiSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UefiSettings.java new file mode 100644 index 000000000000..cc0662da73da --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UefiSettings.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum + * api-version: 2020-12-01. + */ +@Fluent +public final class UefiSettings implements JsonSerializable { + /* + * Specifies whether secure boot should be enabled on the virtual machine. Minimum compute api-version: 2020-12-01. + */ + private Boolean secureBootEnabled; + + /* + * Specifies whether vTPM should be enabled on the virtual machine. Minimum compute api-version: 2020-12-01. + */ + private Boolean vTpmEnabled; + + /** + * Creates an instance of UefiSettings class. + */ + public UefiSettings() { + } + + /** + * Get the secureBootEnabled property: Specifies whether secure boot should be enabled on the virtual machine. + * Minimum compute api-version: 2020-12-01. + * + * @return the secureBootEnabled value. + */ + public Boolean secureBootEnabled() { + return this.secureBootEnabled; + } + + /** + * Set the secureBootEnabled property: Specifies whether secure boot should be enabled on the virtual machine. + * Minimum compute api-version: 2020-12-01. + * + * @param secureBootEnabled the secureBootEnabled value to set. + * @return the UefiSettings object itself. + */ + public UefiSettings withSecureBootEnabled(Boolean secureBootEnabled) { + this.secureBootEnabled = secureBootEnabled; + return this; + } + + /** + * Get the vTpmEnabled property: Specifies whether vTPM should be enabled on the virtual machine. Minimum compute + * api-version: 2020-12-01. + * + * @return the vTpmEnabled value. + */ + public Boolean vTpmEnabled() { + return this.vTpmEnabled; + } + + /** + * Set the vTpmEnabled property: Specifies whether vTPM should be enabled on the virtual machine. Minimum compute + * api-version: 2020-12-01. + * + * @param vTpmEnabled the vTpmEnabled value to set. + * @return the UefiSettings object itself. + */ + public UefiSettings withVTpmEnabled(Boolean vTpmEnabled) { + this.vTpmEnabled = vTpmEnabled; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("secureBootEnabled", this.secureBootEnabled); + jsonWriter.writeBooleanField("vTpmEnabled", this.vTpmEnabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UefiSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UefiSettings 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 UefiSettings. + */ + public static UefiSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UefiSettings deserializedUefiSettings = new UefiSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("secureBootEnabled".equals(fieldName)) { + deserializedUefiSettings.secureBootEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("vTpmEnabled".equals(fieldName)) { + deserializedUefiSettings.vTpmEnabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedUefiSettings; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserAssignedIdentitiesValue.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserAssignedIdentitiesValue.java new file mode 100644 index 000000000000..953e377da09c --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserAssignedIdentitiesValue.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The UserAssignedIdentitiesValue model. + */ +@Immutable +public final class UserAssignedIdentitiesValue implements JsonSerializable { + /* + * The principal id of user assigned identity. + */ + private String principalId; + + /* + * The client id of user assigned identity. + */ + private String clientId; + + /** + * Creates an instance of UserAssignedIdentitiesValue class. + */ + public UserAssignedIdentitiesValue() { + } + + /** + * Get the principalId property: The principal id of user assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the clientId property: The client id of user assigned identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserAssignedIdentitiesValue from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserAssignedIdentitiesValue 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 UserAssignedIdentitiesValue. + */ + public static UserAssignedIdentitiesValue fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserAssignedIdentitiesValue deserializedUserAssignedIdentitiesValue = new UserAssignedIdentitiesValue(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedUserAssignedIdentitiesValue.principalId = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedUserAssignedIdentitiesValue.clientId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUserAssignedIdentitiesValue; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedReboot.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedReboot.java new file mode 100644 index 000000000000..047b264efedc --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedReboot.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies Reboot related Scheduled Event related configurations. + */ +@Fluent +public final class UserInitiatedReboot implements JsonSerializable { + /* + * Specifies Reboot Scheduled Event related configurations. + */ + private Boolean automaticallyApprove; + + /** + * Creates an instance of UserInitiatedReboot class. + */ + public UserInitiatedReboot() { + } + + /** + * Get the automaticallyApprove property: Specifies Reboot Scheduled Event related configurations. + * + * @return the automaticallyApprove value. + */ + public Boolean automaticallyApprove() { + return this.automaticallyApprove; + } + + /** + * Set the automaticallyApprove property: Specifies Reboot Scheduled Event related configurations. + * + * @param automaticallyApprove the automaticallyApprove value to set. + * @return the UserInitiatedReboot object itself. + */ + public UserInitiatedReboot withAutomaticallyApprove(Boolean automaticallyApprove) { + this.automaticallyApprove = automaticallyApprove; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("automaticallyApprove", this.automaticallyApprove); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserInitiatedReboot from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserInitiatedReboot 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 UserInitiatedReboot. + */ + public static UserInitiatedReboot fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserInitiatedReboot deserializedUserInitiatedReboot = new UserInitiatedReboot(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("automaticallyApprove".equals(fieldName)) { + deserializedUserInitiatedReboot.automaticallyApprove = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedUserInitiatedReboot; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedRedeploy.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedRedeploy.java new file mode 100644 index 000000000000..10977ad31be8 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedRedeploy.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies Redeploy related Scheduled Event related configurations. + */ +@Fluent +public final class UserInitiatedRedeploy implements JsonSerializable { + /* + * Specifies Redeploy Scheduled Event related configurations. + */ + private Boolean automaticallyApprove; + + /** + * Creates an instance of UserInitiatedRedeploy class. + */ + public UserInitiatedRedeploy() { + } + + /** + * Get the automaticallyApprove property: Specifies Redeploy Scheduled Event related configurations. + * + * @return the automaticallyApprove value. + */ + public Boolean automaticallyApprove() { + return this.automaticallyApprove; + } + + /** + * Set the automaticallyApprove property: Specifies Redeploy Scheduled Event related configurations. + * + * @param automaticallyApprove the automaticallyApprove value to set. + * @return the UserInitiatedRedeploy object itself. + */ + public UserInitiatedRedeploy withAutomaticallyApprove(Boolean automaticallyApprove) { + this.automaticallyApprove = automaticallyApprove; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("automaticallyApprove", this.automaticallyApprove); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserInitiatedRedeploy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserInitiatedRedeploy 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 UserInitiatedRedeploy. + */ + public static UserInitiatedRedeploy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserInitiatedRedeploy deserializedUserInitiatedRedeploy = new UserInitiatedRedeploy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("automaticallyApprove".equals(fieldName)) { + deserializedUserInitiatedRedeploy.automaticallyApprove = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedUserInitiatedRedeploy; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMDiskSecurityProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMDiskSecurityProfile.java new file mode 100644 index 000000000000..5716a38f0889 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMDiskSecurityProfile.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies the security profile settings for the managed disk. **Note:** It can only be set for Confidential VMs. + */ +@Fluent +public final class VMDiskSecurityProfile implements JsonSerializable { + /* + * Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed + * disk along with VMGuestState blob, VMGuestStateOnly for encryption of just the VMGuestState blob, and + * NonPersistedTPM for not persisting firmware state in the VMGuestState blob.. **Note:** It can be set for only + * Confidential VMs. + */ + private SecurityEncryptionTypes securityEncryptionType; + + /* + * Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer + * Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob. + */ + private DiskEncryptionSetParameters diskEncryptionSet; + + /** + * Creates an instance of VMDiskSecurityProfile class. + */ + public VMDiskSecurityProfile() { + } + + /** + * Get the securityEncryptionType property: Specifies the EncryptionType of the managed disk. It is set to + * DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, VMGuestStateOnly for + * encryption of just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the + * VMGuestState blob.. **Note:** It can be set for only Confidential VMs. + * + * @return the securityEncryptionType value. + */ + public SecurityEncryptionTypes securityEncryptionType() { + return this.securityEncryptionType; + } + + /** + * Set the securityEncryptionType property: Specifies the EncryptionType of the managed disk. It is set to + * DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, VMGuestStateOnly for + * encryption of just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the + * VMGuestState blob.. **Note:** It can be set for only Confidential VMs. + * + * @param securityEncryptionType the securityEncryptionType value to set. + * @return the VMDiskSecurityProfile object itself. + */ + public VMDiskSecurityProfile withSecurityEncryptionType(SecurityEncryptionTypes securityEncryptionType) { + this.securityEncryptionType = securityEncryptionType; + return this; + } + + /** + * Get the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the + * managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob. + * + * @return the diskEncryptionSet value. + */ + public DiskEncryptionSetParameters diskEncryptionSet() { + return this.diskEncryptionSet; + } + + /** + * Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the + * managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob. + * + * @param diskEncryptionSet the diskEncryptionSet value to set. + * @return the VMDiskSecurityProfile object itself. + */ + public VMDiskSecurityProfile withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet) { + this.diskEncryptionSet = diskEncryptionSet; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("securityEncryptionType", + this.securityEncryptionType == null ? null : this.securityEncryptionType.toString()); + jsonWriter.writeJsonField("diskEncryptionSet", this.diskEncryptionSet); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VMDiskSecurityProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMDiskSecurityProfile 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 VMDiskSecurityProfile. + */ + public static VMDiskSecurityProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMDiskSecurityProfile deserializedVMDiskSecurityProfile = new VMDiskSecurityProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("securityEncryptionType".equals(fieldName)) { + deserializedVMDiskSecurityProfile.securityEncryptionType + = SecurityEncryptionTypes.fromString(reader.getString()); + } else if ("diskEncryptionSet".equals(fieldName)) { + deserializedVMDiskSecurityProfile.diskEncryptionSet = DiskEncryptionSetParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVMDiskSecurityProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMGalleryApplication.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMGalleryApplication.java new file mode 100644 index 000000000000..671dca75ba4e --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMGalleryApplication.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies the required information to reference a compute gallery application version. + */ +@Fluent +public final class VMGalleryApplication implements JsonSerializable { + /* + * Optional, Specifies a passthrough value for more generic context. + */ + private String tags; + + /* + * Optional, Specifies the order in which the packages have to be installed + */ + private Integer order; + + /* + * Specifies the GalleryApplicationVersion resource id on the form of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{ + * galleryName}/applications/{application}/versions/{version} + */ + private String packageReferenceId; + + /* + * Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if + * provided + */ + private String configurationReference; + + /* + * Optional, If true, any failure for any operation in the VmApplication will fail the deployment + */ + private Boolean treatFailureAsDeploymentFailure; + + /* + * If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated + * for the VM/VMSS + */ + private Boolean enableAutomaticUpgrade; + + /** + * Creates an instance of VMGalleryApplication class. + */ + public VMGalleryApplication() { + } + + /** + * Get the tags property: Optional, Specifies a passthrough value for more generic context. + * + * @return the tags value. + */ + public String tags() { + return this.tags; + } + + /** + * Set the tags property: Optional, Specifies a passthrough value for more generic context. + * + * @param tags the tags value to set. + * @return the VMGalleryApplication object itself. + */ + public VMGalleryApplication withTags(String tags) { + this.tags = tags; + return this; + } + + /** + * Get the order property: Optional, Specifies the order in which the packages have to be installed. + * + * @return the order value. + */ + public Integer order() { + return this.order; + } + + /** + * Set the order property: Optional, Specifies the order in which the packages have to be installed. + * + * @param order the order value to set. + * @return the VMGalleryApplication object itself. + */ + public VMGalleryApplication withOrder(Integer order) { + this.order = order; + return this; + } + + /** + * Get the packageReferenceId property: Specifies the GalleryApplicationVersion resource id on the form of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. + * + * @return the packageReferenceId value. + */ + public String packageReferenceId() { + return this.packageReferenceId; + } + + /** + * Set the packageReferenceId property: Specifies the GalleryApplicationVersion resource id on the form of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. + * + * @param packageReferenceId the packageReferenceId value to set. + * @return the VMGalleryApplication object itself. + */ + public VMGalleryApplication withPackageReferenceId(String packageReferenceId) { + this.packageReferenceId = packageReferenceId; + return this; + } + + /** + * Get the configurationReference property: Optional, Specifies the uri to an azure blob that will replace the + * default configuration for the package if provided. + * + * @return the configurationReference value. + */ + public String configurationReference() { + return this.configurationReference; + } + + /** + * Set the configurationReference property: Optional, Specifies the uri to an azure blob that will replace the + * default configuration for the package if provided. + * + * @param configurationReference the configurationReference value to set. + * @return the VMGalleryApplication object itself. + */ + public VMGalleryApplication withConfigurationReference(String configurationReference) { + this.configurationReference = configurationReference; + return this; + } + + /** + * Get the treatFailureAsDeploymentFailure property: Optional, If true, any failure for any operation in the + * VmApplication will fail the deployment. + * + * @return the treatFailureAsDeploymentFailure value. + */ + public Boolean treatFailureAsDeploymentFailure() { + return this.treatFailureAsDeploymentFailure; + } + + /** + * Set the treatFailureAsDeploymentFailure property: Optional, If true, any failure for any operation in the + * VmApplication will fail the deployment. + * + * @param treatFailureAsDeploymentFailure the treatFailureAsDeploymentFailure value to set. + * @return the VMGalleryApplication object itself. + */ + public VMGalleryApplication withTreatFailureAsDeploymentFailure(Boolean treatFailureAsDeploymentFailure) { + this.treatFailureAsDeploymentFailure = treatFailureAsDeploymentFailure; + return this; + } + + /** + * Get the enableAutomaticUpgrade property: If set to true, when a new Gallery Application version is available in + * PIR/SIG, it will be automatically updated for the VM/VMSS. + * + * @return the enableAutomaticUpgrade value. + */ + public Boolean enableAutomaticUpgrade() { + return this.enableAutomaticUpgrade; + } + + /** + * Set the enableAutomaticUpgrade property: If set to true, when a new Gallery Application version is available in + * PIR/SIG, it will be automatically updated for the VM/VMSS. + * + * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. + * @return the VMGalleryApplication object itself. + */ + public VMGalleryApplication withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { + this.enableAutomaticUpgrade = enableAutomaticUpgrade; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("packageReferenceId", this.packageReferenceId); + jsonWriter.writeStringField("tags", this.tags); + jsonWriter.writeNumberField("order", this.order); + jsonWriter.writeStringField("configurationReference", this.configurationReference); + jsonWriter.writeBooleanField("treatFailureAsDeploymentFailure", this.treatFailureAsDeploymentFailure); + jsonWriter.writeBooleanField("enableAutomaticUpgrade", this.enableAutomaticUpgrade); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VMGalleryApplication from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMGalleryApplication 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. + * @throws IOException If an error occurs while reading the VMGalleryApplication. + */ + public static VMGalleryApplication fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMGalleryApplication deserializedVMGalleryApplication = new VMGalleryApplication(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("packageReferenceId".equals(fieldName)) { + deserializedVMGalleryApplication.packageReferenceId = reader.getString(); + } else if ("tags".equals(fieldName)) { + deserializedVMGalleryApplication.tags = reader.getString(); + } else if ("order".equals(fieldName)) { + deserializedVMGalleryApplication.order = reader.getNullable(JsonReader::getInt); + } else if ("configurationReference".equals(fieldName)) { + deserializedVMGalleryApplication.configurationReference = reader.getString(); + } else if ("treatFailureAsDeploymentFailure".equals(fieldName)) { + deserializedVMGalleryApplication.treatFailureAsDeploymentFailure + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableAutomaticUpgrade".equals(fieldName)) { + deserializedVMGalleryApplication.enableAutomaticUpgrade + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedVMGalleryApplication; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultCertificate.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultCertificate.java new file mode 100644 index 000000000000..f1dbdb58ae8a --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultCertificate.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM. + */ +@Fluent +public final class VaultCertificate implements JsonSerializable { + /* + * This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key + * Vault, see [Add a key or secret to the key + * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate + * needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
+ * 'data':'',
'dataType':'pfx',
'password':''
}
To + * install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension + * for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault + * virtual machine extension for + * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + */ + private String certificateUrl; + + /* + * For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. + * The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is + * placed under the /var/lib/waagent directory, with the file name .crt for the X509 + * certificate file and .prv for private key. Both of these files are .pem formatted. + */ + private String certificateStore; + + /** + * Creates an instance of VaultCertificate class. + */ + public VaultCertificate() { + } + + /** + * Get the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a + * secret. For adding a secret to the Key Vault, see [Add a key or secret to the key + * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate + * needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: + * <br><br> {<br> 'data':'<Base64-encoded-certificate>',<br> + * 'dataType':'pfx',<br> 'password':'<pfx-file-password>'<br>} <br> To install certificates + * on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for + * Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault + * virtual machine extension for + * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + * + * @return the certificateUrl value. + */ + public String certificateUrl() { + return this.certificateUrl; + } + + /** + * Set the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a + * secret. For adding a secret to the Key Vault, see [Add a key or secret to the key + * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate + * needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: + * <br><br> {<br> 'data':'<Base64-encoded-certificate>',<br> + * 'dataType':'pfx',<br> 'password':'<pfx-file-password>'<br>} <br> To install certificates + * on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for + * Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault + * virtual machine extension for + * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + * + * @param certificateUrl the certificateUrl value to set. + * @return the VaultCertificate object itself. + */ + public VaultCertificate withCertificateUrl(String certificateUrl) { + this.certificateUrl = certificateUrl; + return this; + } + + /** + * Get the certificateStore property: For Windows VMs, specifies the certificate store on the Virtual Machine to + * which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. + * For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name + * <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private + * key. Both of these files are .pem formatted. + * + * @return the certificateStore value. + */ + public String certificateStore() { + return this.certificateStore; + } + + /** + * Set the certificateStore property: For Windows VMs, specifies the certificate store on the Virtual Machine to + * which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. + * For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name + * <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private + * key. Both of these files are .pem formatted. + * + * @param certificateStore the certificateStore value to set. + * @return the VaultCertificate object itself. + */ + public VaultCertificate withCertificateStore(String certificateStore) { + this.certificateStore = certificateStore; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("certificateUrl", this.certificateUrl); + jsonWriter.writeStringField("certificateStore", this.certificateStore); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VaultCertificate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VaultCertificate 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 VaultCertificate. + */ + public static VaultCertificate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VaultCertificate deserializedVaultCertificate = new VaultCertificate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("certificateUrl".equals(fieldName)) { + deserializedVaultCertificate.certificateUrl = reader.getString(); + } else if ("certificateStore".equals(fieldName)) { + deserializedVaultCertificate.certificateStore = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVaultCertificate; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultSecretGroup.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultSecretGroup.java new file mode 100644 index 000000000000..ba07ab6fb964 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultSecretGroup.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +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.util.List; + +/** + * Describes a set of certificates which are all in the same Key Vault. + */ +@Fluent +public final class VaultSecretGroup implements JsonSerializable { + /* + * The relative URL of the Key Vault containing all of the certificates in VaultCertificates. + */ + private SubResource sourceVault; + + /* + * The list of key vault references in SourceVault which contain certificates. + */ + private List vaultCertificates; + + /** + * Creates an instance of VaultSecretGroup class. + */ + public VaultSecretGroup() { + } + + /** + * Get the sourceVault property: The relative URL of the Key Vault containing all of the certificates in + * VaultCertificates. + * + * @return the sourceVault value. + */ + public SubResource sourceVault() { + return this.sourceVault; + } + + /** + * Set the sourceVault property: The relative URL of the Key Vault containing all of the certificates in + * VaultCertificates. + * + * @param sourceVault the sourceVault value to set. + * @return the VaultSecretGroup object itself. + */ + public VaultSecretGroup withSourceVault(SubResource sourceVault) { + this.sourceVault = sourceVault; + return this; + } + + /** + * Get the vaultCertificates property: The list of key vault references in SourceVault which contain certificates. + * + * @return the vaultCertificates value. + */ + public List vaultCertificates() { + return this.vaultCertificates; + } + + /** + * Set the vaultCertificates property: The list of key vault references in SourceVault which contain certificates. + * + * @param vaultCertificates the vaultCertificates value to set. + * @return the VaultSecretGroup object itself. + */ + public VaultSecretGroup withVaultCertificates(List vaultCertificates) { + this.vaultCertificates = vaultCertificates; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sourceVault", this.sourceVault); + jsonWriter.writeArrayField("vaultCertificates", this.vaultCertificates, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VaultSecretGroup from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VaultSecretGroup 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 VaultSecretGroup. + */ + public static VaultSecretGroup fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VaultSecretGroup deserializedVaultSecretGroup = new VaultSecretGroup(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceVault".equals(fieldName)) { + deserializedVaultSecretGroup.sourceVault = SubResource.fromJson(reader); + } else if ("vaultCertificates".equals(fieldName)) { + List vaultCertificates + = reader.readArray(reader1 -> VaultCertificate.fromJson(reader1)); + deserializedVaultSecretGroup.vaultCertificates = vaultCertificates; + } else { + reader.skipChildren(); + } + } + + return deserializedVaultSecretGroup; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualHardDisk.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualHardDisk.java new file mode 100644 index 000000000000..1b5f73419a76 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualHardDisk.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the uri of a disk. + */ +@Fluent +public final class VirtualHardDisk implements JsonSerializable { + /* + * Specifies the virtual hard disk's uri. + */ + private String uri; + + /** + * Creates an instance of VirtualHardDisk class. + */ + public VirtualHardDisk() { + } + + /** + * Get the uri property: Specifies the virtual hard disk's uri. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: Specifies the virtual hard disk's uri. + * + * @param uri the uri value to set. + * @return the VirtualHardDisk object itself. + */ + public VirtualHardDisk withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("uri", this.uri); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualHardDisk from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualHardDisk 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 VirtualHardDisk. + */ + public static VirtualHardDisk fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualHardDisk deserializedVirtualHardDisk = new VirtualHardDisk(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uri".equals(fieldName)) { + deserializedVirtualHardDisk.uri = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualHardDisk; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIdentity.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIdentity.java new file mode 100644 index 000000000000..7788880050a5 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIdentity.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.Map; + +/** + * Identity for the virtual machine. + */ +@Fluent +public final class VirtualMachineIdentity implements JsonSerializable { + /* + * The principal id of virtual machine identity. This property will only be provided for a system assigned identity. + */ + private String principalId; + + /* + * The tenant id associated with the virtual machine. This property will only be provided for a system assigned + * identity. + */ + private String tenantId; + + /* + * The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an + * implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities + * from the virtual machine. + */ + private ResourceIdentityType type; + + /* + * The list of user identities associated with the Virtual Machine. The user identity dictionary key references will + * be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}'. + */ + private Map userAssignedIdentities; + + /** + * Creates an instance of VirtualMachineIdentity class. + */ + public VirtualMachineIdentity() { + } + + /** + * Get the principalId property: The principal id of virtual machine identity. This property will only be provided + * for a system assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant id associated with the virtual machine. This property will only be provided + * for a system assigned identity. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the type property: The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' + * includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove + * any identities from the virtual machine. + * + * @return the type value. + */ + public ResourceIdentityType type() { + return this.type; + } + + /** + * Set the type property: The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' + * includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove + * any identities from the virtual machine. + * + * @param type the type value to set. + * @return the VirtualMachineIdentity object itself. + */ + public VirtualMachineIdentity withType(ResourceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The list of user identities associated with the Virtual Machine. The + * user identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The list of user identities associated with the Virtual Machine. The + * user identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the VirtualMachineIdentity object itself. + */ + public VirtualMachineIdentity + withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachineIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachineIdentity 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 VirtualMachineIdentity. + */ + public static VirtualMachineIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachineIdentity deserializedVirtualMachineIdentity = new VirtualMachineIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedVirtualMachineIdentity.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedVirtualMachineIdentity.tenantId = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVirtualMachineIdentity.type = ResourceIdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserAssignedIdentitiesValue.fromJson(reader1)); + deserializedVirtualMachineIdentity.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachineIdentity; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIpTag.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIpTag.java new file mode 100644 index 000000000000..de8eb9175491 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIpTag.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains the IP tag associated with the public IP address. + */ +@Fluent +public final class VirtualMachineIpTag implements JsonSerializable { + /* + * IP tag type. Example: FirstPartyUsage. + */ + private String ipTagType; + + /* + * IP tag associated with the public IP. Example: SQL, Storage etc. + */ + private String tag; + + /** + * Creates an instance of VirtualMachineIpTag class. + */ + public VirtualMachineIpTag() { + } + + /** + * Get the ipTagType property: IP tag type. Example: FirstPartyUsage. + * + * @return the ipTagType value. + */ + public String ipTagType() { + return this.ipTagType; + } + + /** + * Set the ipTagType property: IP tag type. Example: FirstPartyUsage. + * + * @param ipTagType the ipTagType value to set. + * @return the VirtualMachineIpTag object itself. + */ + public VirtualMachineIpTag withIpTagType(String ipTagType) { + this.ipTagType = ipTagType; + return this; + } + + /** + * Get the tag property: IP tag associated with the public IP. Example: SQL, Storage etc. + * + * @return the tag value. + */ + public String tag() { + return this.tag; + } + + /** + * Set the tag property: IP tag associated with the public IP. Example: SQL, Storage etc. + * + * @param tag the tag value to set. + * @return the VirtualMachineIpTag object itself. + */ + public VirtualMachineIpTag withTag(String tag) { + this.tag = tag; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ipTagType", this.ipTagType); + jsonWriter.writeStringField("tag", this.tag); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachineIpTag from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachineIpTag 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 VirtualMachineIpTag. + */ + public static VirtualMachineIpTag fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachineIpTag deserializedVirtualMachineIpTag = new VirtualMachineIpTag(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipTagType".equals(fieldName)) { + deserializedVirtualMachineIpTag.ipTagType = reader.getString(); + } else if ("tag".equals(fieldName)) { + deserializedVirtualMachineIpTag.tag = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachineIpTag; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfiguration.java new file mode 100644 index 000000000000..fedebf332e09 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfiguration.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.Map; + +/** + * Describes a virtual machine network interface configurations. + */ +@Fluent +public final class VirtualMachineNetworkInterfaceConfiguration + implements JsonSerializable { + /* + * The network interface configuration name. + */ + private String name; + + /* + * Describes a virtual machine network profile's IP configuration. + */ + private VirtualMachineNetworkInterfaceConfigurationProperties properties; + + /* + * Resource tags applied to the networkInterface address created by this NetworkInterfaceConfiguration + */ + private Map tags; + + /** + * Creates an instance of VirtualMachineNetworkInterfaceConfiguration class. + */ + public VirtualMachineNetworkInterfaceConfiguration() { + } + + /** + * Get the name property: The network interface configuration name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The network interface configuration name. + * + * @param name the name value to set. + * @return the VirtualMachineNetworkInterfaceConfiguration object itself. + */ + public VirtualMachineNetworkInterfaceConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties property: Describes a virtual machine network profile's IP configuration. + * + * @return the properties value. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Describes a virtual machine network profile's IP configuration. + * + * @param properties the properties value to set. + * @return the VirtualMachineNetworkInterfaceConfiguration object itself. + */ + public VirtualMachineNetworkInterfaceConfiguration + withProperties(VirtualMachineNetworkInterfaceConfigurationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the tags property: Resource tags applied to the networkInterface address created by this + * NetworkInterfaceConfiguration. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags applied to the networkInterface address created by this + * NetworkInterfaceConfiguration. + * + * @param tags the tags value to set. + * @return the VirtualMachineNetworkInterfaceConfiguration object itself. + */ + public VirtualMachineNetworkInterfaceConfiguration withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachineNetworkInterfaceConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachineNetworkInterfaceConfiguration 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. + * @throws IOException If an error occurs while reading the VirtualMachineNetworkInterfaceConfiguration. + */ + public static VirtualMachineNetworkInterfaceConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachineNetworkInterfaceConfiguration deserializedVirtualMachineNetworkInterfaceConfiguration + = new VirtualMachineNetworkInterfaceConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfiguration.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfiguration.properties + = VirtualMachineNetworkInterfaceConfigurationProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVirtualMachineNetworkInterfaceConfiguration.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachineNetworkInterfaceConfiguration; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfigurationProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfigurationProperties.java new file mode 100644 index 000000000000..5e407d60ca6b --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfigurationProperties.java @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +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.util.List; + +/** + * Describes a virtual machine network profile's IP configuration. + */ +@Fluent +public final class VirtualMachineNetworkInterfaceConfigurationProperties + implements JsonSerializable { + /* + * Specifies the primary network interface in case the virtual machine has more than 1 network interface. + */ + private Boolean primary; + + /* + * Specify what happens to the network interface when the VM is deleted + */ + private DeleteOptions deleteOption; + + /* + * Specifies whether the network interface is accelerated networking-enabled. + */ + private Boolean enableAcceleratedNetworking; + + /* + * Specifies whether the network interface is disabled for tcp state tracking. + */ + private Boolean disableTcpStateTracking; + + /* + * Specifies whether the network interface is FPGA networking-enabled. + */ + private Boolean enableFpga; + + /* + * Whether IP forwarding enabled on this NIC. + */ + private Boolean enableIPForwarding; + + /* + * The network security group. + */ + private SubResource networkSecurityGroup; + + /* + * The dns settings to be applied on the network interfaces. + */ + private VirtualMachineNetworkInterfaceDnsSettingsConfiguration dnsSettings; + + /* + * Specifies the IP configurations of the network interface. + */ + private List ipConfigurations; + + /* + * The DSCP configuration for the network interface. + */ + private SubResource dscpConfiguration; + + /* + * Specifies whether the Auxiliary mode is enabled for the Network Interface resource. + */ + private NetworkInterfaceAuxiliaryMode auxiliaryMode; + + /* + * Specifies whether the Auxiliary sku is enabled for the Network Interface resource. + */ + private NetworkInterfaceAuxiliarySku auxiliarySku; + + /** + * Creates an instance of VirtualMachineNetworkInterfaceConfigurationProperties class. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties() { + } + + /** + * Get the primary property: Specifies the primary network interface in case the virtual machine has more than 1 + * network interface. + * + * @return the primary value. + */ + public Boolean primary() { + return this.primary; + } + + /** + * Set the primary property: Specifies the primary network interface in case the virtual machine has more than 1 + * network interface. + * + * @param primary the primary value to set. + * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties withPrimary(Boolean primary) { + this.primary = primary; + return this; + } + + /** + * Get the deleteOption property: Specify what happens to the network interface when the VM is deleted. + * + * @return the deleteOption value. + */ + public DeleteOptions deleteOption() { + return this.deleteOption; + } + + /** + * Set the deleteOption property: Specify what happens to the network interface when the VM is deleted. + * + * @param deleteOption the deleteOption value to set. + * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties withDeleteOption(DeleteOptions deleteOption) { + this.deleteOption = deleteOption; + return this; + } + + /** + * Get the enableAcceleratedNetworking property: Specifies whether the network interface is accelerated + * networking-enabled. + * + * @return the enableAcceleratedNetworking value. + */ + public Boolean enableAcceleratedNetworking() { + return this.enableAcceleratedNetworking; + } + + /** + * Set the enableAcceleratedNetworking property: Specifies whether the network interface is accelerated + * networking-enabled. + * + * @param enableAcceleratedNetworking the enableAcceleratedNetworking value to set. + * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties + withEnableAcceleratedNetworking(Boolean enableAcceleratedNetworking) { + this.enableAcceleratedNetworking = enableAcceleratedNetworking; + return this; + } + + /** + * Get the disableTcpStateTracking property: Specifies whether the network interface is disabled for tcp state + * tracking. + * + * @return the disableTcpStateTracking value. + */ + public Boolean disableTcpStateTracking() { + return this.disableTcpStateTracking; + } + + /** + * Set the disableTcpStateTracking property: Specifies whether the network interface is disabled for tcp state + * tracking. + * + * @param disableTcpStateTracking the disableTcpStateTracking value to set. + * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties + withDisableTcpStateTracking(Boolean disableTcpStateTracking) { + this.disableTcpStateTracking = disableTcpStateTracking; + return this; + } + + /** + * Get the enableFpga property: Specifies whether the network interface is FPGA networking-enabled. + * + * @return the enableFpga value. + */ + public Boolean enableFpga() { + return this.enableFpga; + } + + /** + * Set the enableFpga property: Specifies whether the network interface is FPGA networking-enabled. + * + * @param enableFpga the enableFpga value to set. + * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties withEnableFpga(Boolean enableFpga) { + this.enableFpga = enableFpga; + return this; + } + + /** + * Get the enableIPForwarding property: Whether IP forwarding enabled on this NIC. + * + * @return the enableIPForwarding value. + */ + public Boolean enableIPForwarding() { + return this.enableIPForwarding; + } + + /** + * Set the enableIPForwarding property: Whether IP forwarding enabled on this NIC. + * + * @param enableIPForwarding the enableIPForwarding value to set. + * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties withEnableIPForwarding(Boolean enableIPForwarding) { + this.enableIPForwarding = enableIPForwarding; + return this; + } + + /** + * Get the networkSecurityGroup property: The network security group. + * + * @return the networkSecurityGroup value. + */ + public SubResource networkSecurityGroup() { + return this.networkSecurityGroup; + } + + /** + * Set the networkSecurityGroup property: The network security group. + * + * @param networkSecurityGroup the networkSecurityGroup value to set. + * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties + withNetworkSecurityGroup(SubResource networkSecurityGroup) { + this.networkSecurityGroup = networkSecurityGroup; + return this; + } + + /** + * Get the dnsSettings property: The dns settings to be applied on the network interfaces. + * + * @return the dnsSettings value. + */ + public VirtualMachineNetworkInterfaceDnsSettingsConfiguration dnsSettings() { + return this.dnsSettings; + } + + /** + * Set the dnsSettings property: The dns settings to be applied on the network interfaces. + * + * @param dnsSettings the dnsSettings value to set. + * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties + withDnsSettings(VirtualMachineNetworkInterfaceDnsSettingsConfiguration dnsSettings) { + this.dnsSettings = dnsSettings; + return this; + } + + /** + * Get the ipConfigurations property: Specifies the IP configurations of the network interface. + * + * @return the ipConfigurations value. + */ + public List ipConfigurations() { + return this.ipConfigurations; + } + + /** + * Set the ipConfigurations property: Specifies the IP configurations of the network interface. + * + * @param ipConfigurations the ipConfigurations value to set. + * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties + withIpConfigurations(List ipConfigurations) { + this.ipConfigurations = ipConfigurations; + return this; + } + + /** + * Get the dscpConfiguration property: The DSCP configuration for the network interface. + * + * @return the dscpConfiguration value. + */ + public SubResource dscpConfiguration() { + return this.dscpConfiguration; + } + + /** + * Set the dscpConfiguration property: The DSCP configuration for the network interface. + * + * @param dscpConfiguration the dscpConfiguration value to set. + * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties withDscpConfiguration(SubResource dscpConfiguration) { + this.dscpConfiguration = dscpConfiguration; + return this; + } + + /** + * Get the auxiliaryMode property: Specifies whether the Auxiliary mode is enabled for the Network Interface + * resource. + * + * @return the auxiliaryMode value. + */ + public NetworkInterfaceAuxiliaryMode auxiliaryMode() { + return this.auxiliaryMode; + } + + /** + * Set the auxiliaryMode property: Specifies whether the Auxiliary mode is enabled for the Network Interface + * resource. + * + * @param auxiliaryMode the auxiliaryMode value to set. + * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties + withAuxiliaryMode(NetworkInterfaceAuxiliaryMode auxiliaryMode) { + this.auxiliaryMode = auxiliaryMode; + return this; + } + + /** + * Get the auxiliarySku property: Specifies whether the Auxiliary sku is enabled for the Network Interface resource. + * + * @return the auxiliarySku value. + */ + public NetworkInterfaceAuxiliarySku auxiliarySku() { + return this.auxiliarySku; + } + + /** + * Set the auxiliarySku property: Specifies whether the Auxiliary sku is enabled for the Network Interface resource. + * + * @param auxiliarySku the auxiliarySku value to set. + * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceConfigurationProperties + withAuxiliarySku(NetworkInterfaceAuxiliarySku auxiliarySku) { + this.auxiliarySku = auxiliarySku; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ipConfigurations", this.ipConfigurations, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("primary", this.primary); + jsonWriter.writeStringField("deleteOption", this.deleteOption == null ? null : this.deleteOption.toString()); + jsonWriter.writeBooleanField("enableAcceleratedNetworking", this.enableAcceleratedNetworking); + jsonWriter.writeBooleanField("disableTcpStateTracking", this.disableTcpStateTracking); + jsonWriter.writeBooleanField("enableFpga", this.enableFpga); + jsonWriter.writeBooleanField("enableIPForwarding", this.enableIPForwarding); + jsonWriter.writeJsonField("networkSecurityGroup", this.networkSecurityGroup); + jsonWriter.writeJsonField("dnsSettings", this.dnsSettings); + jsonWriter.writeJsonField("dscpConfiguration", this.dscpConfiguration); + jsonWriter.writeStringField("auxiliaryMode", this.auxiliaryMode == null ? null : this.auxiliaryMode.toString()); + jsonWriter.writeStringField("auxiliarySku", this.auxiliarySku == null ? null : this.auxiliarySku.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachineNetworkInterfaceConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachineNetworkInterfaceConfigurationProperties 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. + * @throws IOException If an error occurs while reading the VirtualMachineNetworkInterfaceConfigurationProperties. + */ + public static VirtualMachineNetworkInterfaceConfigurationProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachineNetworkInterfaceConfigurationProperties deserializedVirtualMachineNetworkInterfaceConfigurationProperties + = new VirtualMachineNetworkInterfaceConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipConfigurations".equals(fieldName)) { + List ipConfigurations + = reader.readArray(reader1 -> VirtualMachineNetworkInterfaceIPConfiguration.fromJson(reader1)); + deserializedVirtualMachineNetworkInterfaceConfigurationProperties.ipConfigurations + = ipConfigurations; + } else if ("primary".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfigurationProperties.primary + = reader.getNullable(JsonReader::getBoolean); + } else if ("deleteOption".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfigurationProperties.deleteOption + = DeleteOptions.fromString(reader.getString()); + } else if ("enableAcceleratedNetworking".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfigurationProperties.enableAcceleratedNetworking + = reader.getNullable(JsonReader::getBoolean); + } else if ("disableTcpStateTracking".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfigurationProperties.disableTcpStateTracking + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableFpga".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfigurationProperties.enableFpga + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableIPForwarding".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfigurationProperties.enableIPForwarding + = reader.getNullable(JsonReader::getBoolean); + } else if ("networkSecurityGroup".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfigurationProperties.networkSecurityGroup + = SubResource.fromJson(reader); + } else if ("dnsSettings".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfigurationProperties.dnsSettings + = VirtualMachineNetworkInterfaceDnsSettingsConfiguration.fromJson(reader); + } else if ("dscpConfiguration".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfigurationProperties.dscpConfiguration + = SubResource.fromJson(reader); + } else if ("auxiliaryMode".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfigurationProperties.auxiliaryMode + = NetworkInterfaceAuxiliaryMode.fromString(reader.getString()); + } else if ("auxiliarySku".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceConfigurationProperties.auxiliarySku + = NetworkInterfaceAuxiliarySku.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachineNetworkInterfaceConfigurationProperties; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.java new file mode 100644 index 000000000000..f8e90d32564d --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; + +/** + * Describes a virtual machines network configuration's DNS settings. + */ +@Fluent +public final class VirtualMachineNetworkInterfaceDnsSettingsConfiguration + implements JsonSerializable { + /* + * List of DNS servers IP addresses + */ + private List dnsServers; + + /** + * Creates an instance of VirtualMachineNetworkInterfaceDnsSettingsConfiguration class. + */ + public VirtualMachineNetworkInterfaceDnsSettingsConfiguration() { + } + + /** + * Get the dnsServers property: List of DNS servers IP addresses. + * + * @return the dnsServers value. + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Set the dnsServers property: List of DNS servers IP addresses. + * + * @param dnsServers the dnsServers value to set. + * @return the VirtualMachineNetworkInterfaceDnsSettingsConfiguration object itself. + */ + public VirtualMachineNetworkInterfaceDnsSettingsConfiguration withDnsServers(List dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("dnsServers", this.dnsServers, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachineNetworkInterfaceDnsSettingsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachineNetworkInterfaceDnsSettingsConfiguration 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 VirtualMachineNetworkInterfaceDnsSettingsConfiguration. + */ + public static VirtualMachineNetworkInterfaceDnsSettingsConfiguration fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachineNetworkInterfaceDnsSettingsConfiguration deserializedVirtualMachineNetworkInterfaceDnsSettingsConfiguration + = new VirtualMachineNetworkInterfaceDnsSettingsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dnsServers".equals(fieldName)) { + List dnsServers = reader.readArray(reader1 -> reader1.getString()); + deserializedVirtualMachineNetworkInterfaceDnsSettingsConfiguration.dnsServers = dnsServers; + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachineNetworkInterfaceDnsSettingsConfiguration; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfiguration.java new file mode 100644 index 000000000000..7bcb5198ea57 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfiguration.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes a virtual machine network profile's IP configuration. + */ +@Fluent +public final class VirtualMachineNetworkInterfaceIPConfiguration + implements JsonSerializable { + /* + * The IP configuration name. + */ + private String name; + + /* + * Describes a virtual machine network interface IP configuration properties. + */ + private VirtualMachineNetworkInterfaceIPConfigurationProperties properties; + + /** + * Creates an instance of VirtualMachineNetworkInterfaceIPConfiguration class. + */ + public VirtualMachineNetworkInterfaceIPConfiguration() { + } + + /** + * Get the name property: The IP configuration name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The IP configuration name. + * + * @param name the name value to set. + * @return the VirtualMachineNetworkInterfaceIPConfiguration object itself. + */ + public VirtualMachineNetworkInterfaceIPConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties property: Describes a virtual machine network interface IP configuration properties. + * + * @return the properties value. + */ + public VirtualMachineNetworkInterfaceIPConfigurationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Describes a virtual machine network interface IP configuration properties. + * + * @param properties the properties value to set. + * @return the VirtualMachineNetworkInterfaceIPConfiguration object itself. + */ + public VirtualMachineNetworkInterfaceIPConfiguration + withProperties(VirtualMachineNetworkInterfaceIPConfigurationProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachineNetworkInterfaceIPConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachineNetworkInterfaceIPConfiguration 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. + * @throws IOException If an error occurs while reading the VirtualMachineNetworkInterfaceIPConfiguration. + */ + public static VirtualMachineNetworkInterfaceIPConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachineNetworkInterfaceIPConfiguration deserializedVirtualMachineNetworkInterfaceIPConfiguration + = new VirtualMachineNetworkInterfaceIPConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceIPConfiguration.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceIPConfiguration.properties + = VirtualMachineNetworkInterfaceIPConfigurationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachineNetworkInterfaceIPConfiguration; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java new file mode 100644 index 000000000000..1e1497819ffc --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +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.util.List; + +/** + * Describes a virtual machine network interface IP configuration properties. + */ +@Fluent +public final class VirtualMachineNetworkInterfaceIPConfigurationProperties + implements JsonSerializable { + /* + * Specifies the identifier of the subnet. + */ + private SubResource subnet; + + /* + * Specifies the primary network interface in case the virtual machine has more than 1 network interface. + */ + private Boolean primary; + + /* + * The publicIPAddressConfiguration. + */ + private VirtualMachinePublicIPAddressConfiguration publicIPAddressConfiguration; + + /* + * Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or + * IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + */ + private IPVersions privateIPAddressVersion; + + /* + * Specifies an array of references to application security group. + */ + private List applicationSecurityGroups; + + /* + * Specifies an array of references to backend address pools of application gateways. A virtual machine can + * reference backend address pools of multiple application gateways. Multiple virtual machines cannot use the same + * application gateway. + */ + private List applicationGatewayBackendAddressPools; + + /* + * Specifies an array of references to backend address pools of load balancers. A virtual machine can reference + * backend address pools of one public and one internal load balancer. [Multiple virtual machines cannot use the + * same basic sku load balancer]. + */ + private List loadBalancerBackendAddressPools; + + /** + * Creates an instance of VirtualMachineNetworkInterfaceIPConfigurationProperties class. + */ + public VirtualMachineNetworkInterfaceIPConfigurationProperties() { + } + + /** + * Get the subnet property: Specifies the identifier of the subnet. + * + * @return the subnet value. + */ + public SubResource subnet() { + return this.subnet; + } + + /** + * Set the subnet property: Specifies the identifier of the subnet. + * + * @param subnet the subnet value to set. + * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceIPConfigurationProperties withSubnet(SubResource subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get the primary property: Specifies the primary network interface in case the virtual machine has more than 1 + * network interface. + * + * @return the primary value. + */ + public Boolean primary() { + return this.primary; + } + + /** + * Set the primary property: Specifies the primary network interface in case the virtual machine has more than 1 + * network interface. + * + * @param primary the primary value to set. + * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceIPConfigurationProperties withPrimary(Boolean primary) { + this.primary = primary; + return this; + } + + /** + * Get the publicIPAddressConfiguration property: The publicIPAddressConfiguration. + * + * @return the publicIPAddressConfiguration value. + */ + public VirtualMachinePublicIPAddressConfiguration publicIPAddressConfiguration() { + return this.publicIPAddressConfiguration; + } + + /** + * Set the publicIPAddressConfiguration property: The publicIPAddressConfiguration. + * + * @param publicIPAddressConfiguration the publicIPAddressConfiguration value to set. + * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceIPConfigurationProperties + withPublicIPAddressConfiguration(VirtualMachinePublicIPAddressConfiguration publicIPAddressConfiguration) { + this.publicIPAddressConfiguration = publicIPAddressConfiguration; + return this; + } + + /** + * Get the privateIPAddressVersion property: Available from Api-Version 2017-03-30 onwards, it represents whether + * the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + * + * @return the privateIPAddressVersion value. + */ + public IPVersions privateIPAddressVersion() { + return this.privateIPAddressVersion; + } + + /** + * Set the privateIPAddressVersion property: Available from Api-Version 2017-03-30 onwards, it represents whether + * the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + * + * @param privateIPAddressVersion the privateIPAddressVersion value to set. + * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceIPConfigurationProperties + withPrivateIPAddressVersion(IPVersions privateIPAddressVersion) { + this.privateIPAddressVersion = privateIPAddressVersion; + return this; + } + + /** + * Get the applicationSecurityGroups property: Specifies an array of references to application security group. + * + * @return the applicationSecurityGroups value. + */ + public List applicationSecurityGroups() { + return this.applicationSecurityGroups; + } + + /** + * Set the applicationSecurityGroups property: Specifies an array of references to application security group. + * + * @param applicationSecurityGroups the applicationSecurityGroups value to set. + * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceIPConfigurationProperties + withApplicationSecurityGroups(List applicationSecurityGroups) { + this.applicationSecurityGroups = applicationSecurityGroups; + return this; + } + + /** + * Get the applicationGatewayBackendAddressPools property: Specifies an array of references to backend address pools + * of application gateways. A virtual machine can reference backend address pools of multiple application gateways. + * Multiple virtual machines cannot use the same application gateway. + * + * @return the applicationGatewayBackendAddressPools value. + */ + public List applicationGatewayBackendAddressPools() { + return this.applicationGatewayBackendAddressPools; + } + + /** + * Set the applicationGatewayBackendAddressPools property: Specifies an array of references to backend address pools + * of application gateways. A virtual machine can reference backend address pools of multiple application gateways. + * Multiple virtual machines cannot use the same application gateway. + * + * @param applicationGatewayBackendAddressPools the applicationGatewayBackendAddressPools value to set. + * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceIPConfigurationProperties + withApplicationGatewayBackendAddressPools(List applicationGatewayBackendAddressPools) { + this.applicationGatewayBackendAddressPools = applicationGatewayBackendAddressPools; + return this; + } + + /** + * Get the loadBalancerBackendAddressPools property: Specifies an array of references to backend address pools of + * load balancers. A virtual machine can reference backend address pools of one public and one internal load + * balancer. [Multiple virtual machines cannot use the same basic sku load balancer]. + * + * @return the loadBalancerBackendAddressPools value. + */ + public List loadBalancerBackendAddressPools() { + return this.loadBalancerBackendAddressPools; + } + + /** + * Set the loadBalancerBackendAddressPools property: Specifies an array of references to backend address pools of + * load balancers. A virtual machine can reference backend address pools of one public and one internal load + * balancer. [Multiple virtual machines cannot use the same basic sku load balancer]. + * + * @param loadBalancerBackendAddressPools the loadBalancerBackendAddressPools value to set. + * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. + */ + public VirtualMachineNetworkInterfaceIPConfigurationProperties + withLoadBalancerBackendAddressPools(List loadBalancerBackendAddressPools) { + this.loadBalancerBackendAddressPools = loadBalancerBackendAddressPools; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("subnet", this.subnet); + jsonWriter.writeBooleanField("primary", this.primary); + jsonWriter.writeJsonField("publicIPAddressConfiguration", this.publicIPAddressConfiguration); + jsonWriter.writeStringField("privateIPAddressVersion", + this.privateIPAddressVersion == null ? null : this.privateIPAddressVersion.toString()); + jsonWriter.writeArrayField("applicationSecurityGroups", this.applicationSecurityGroups, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("applicationGatewayBackendAddressPools", this.applicationGatewayBackendAddressPools, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("loadBalancerBackendAddressPools", this.loadBalancerBackendAddressPools, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachineNetworkInterfaceIPConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachineNetworkInterfaceIPConfigurationProperties 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 VirtualMachineNetworkInterfaceIPConfigurationProperties. + */ + public static VirtualMachineNetworkInterfaceIPConfigurationProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachineNetworkInterfaceIPConfigurationProperties deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties + = new VirtualMachineNetworkInterfaceIPConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("subnet".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.subnet + = SubResource.fromJson(reader); + } else if ("primary".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.primary + = reader.getNullable(JsonReader::getBoolean); + } else if ("publicIPAddressConfiguration".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.publicIPAddressConfiguration + = VirtualMachinePublicIPAddressConfiguration.fromJson(reader); + } else if ("privateIPAddressVersion".equals(fieldName)) { + deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.privateIPAddressVersion + = IPVersions.fromString(reader.getString()); + } else if ("applicationSecurityGroups".equals(fieldName)) { + List applicationSecurityGroups + = reader.readArray(reader1 -> SubResource.fromJson(reader1)); + deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.applicationSecurityGroups + = applicationSecurityGroups; + } else if ("applicationGatewayBackendAddressPools".equals(fieldName)) { + List applicationGatewayBackendAddressPools + = reader.readArray(reader1 -> SubResource.fromJson(reader1)); + deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.applicationGatewayBackendAddressPools + = applicationGatewayBackendAddressPools; + } else if ("loadBalancerBackendAddressPools".equals(fieldName)) { + List loadBalancerBackendAddressPools + = reader.readArray(reader1 -> SubResource.fromJson(reader1)); + deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.loadBalancerBackendAddressPools + = loadBalancerBackendAddressPools; + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfiguration.java new file mode 100644 index 000000000000..fc537fccdac2 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfiguration.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.Map; + +/** + * Describes a virtual machines IP Configuration's PublicIPAddress configuration. + */ +@Fluent +public final class VirtualMachinePublicIPAddressConfiguration + implements JsonSerializable { + /* + * The publicIP address configuration name. + */ + private String name; + + /* + * Describes a virtual machines IP Configuration's PublicIPAddress configuration + */ + private VirtualMachinePublicIPAddressConfigurationProperties properties; + + /* + * Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. + */ + private PublicIPAddressSku sku; + + /* + * Resource tags applied to the publicIP address created by this PublicIPAddressConfiguration + */ + private Map tags; + + /** + * Creates an instance of VirtualMachinePublicIPAddressConfiguration class. + */ + public VirtualMachinePublicIPAddressConfiguration() { + } + + /** + * Get the name property: The publicIP address configuration name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The publicIP address configuration name. + * + * @param name the name value to set. + * @return the VirtualMachinePublicIPAddressConfiguration object itself. + */ + public VirtualMachinePublicIPAddressConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties property: Describes a virtual machines IP Configuration's PublicIPAddress configuration. + * + * @return the properties value. + */ + public VirtualMachinePublicIPAddressConfigurationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Describes a virtual machines IP Configuration's PublicIPAddress configuration. + * + * @param properties the properties value to set. + * @return the VirtualMachinePublicIPAddressConfiguration object itself. + */ + public VirtualMachinePublicIPAddressConfiguration + withProperties(VirtualMachinePublicIPAddressConfigurationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the sku property: Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. + * + * @return the sku value. + */ + public PublicIPAddressSku sku() { + return this.sku; + } + + /** + * Set the sku property: Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. + * + * @param sku the sku value to set. + * @return the VirtualMachinePublicIPAddressConfiguration object itself. + */ + public VirtualMachinePublicIPAddressConfiguration withSku(PublicIPAddressSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the tags property: Resource tags applied to the publicIP address created by this + * PublicIPAddressConfiguration. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags applied to the publicIP address created by this + * PublicIPAddressConfiguration. + * + * @param tags the tags value to set. + * @return the VirtualMachinePublicIPAddressConfiguration object itself. + */ + public VirtualMachinePublicIPAddressConfiguration withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachinePublicIPAddressConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachinePublicIPAddressConfiguration 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. + * @throws IOException If an error occurs while reading the VirtualMachinePublicIPAddressConfiguration. + */ + public static VirtualMachinePublicIPAddressConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachinePublicIPAddressConfiguration deserializedVirtualMachinePublicIPAddressConfiguration + = new VirtualMachinePublicIPAddressConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedVirtualMachinePublicIPAddressConfiguration.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVirtualMachinePublicIPAddressConfiguration.properties + = VirtualMachinePublicIPAddressConfigurationProperties.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedVirtualMachinePublicIPAddressConfiguration.sku = PublicIPAddressSku.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVirtualMachinePublicIPAddressConfiguration.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachinePublicIPAddressConfiguration; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfigurationProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfigurationProperties.java new file mode 100644 index 000000000000..0dd566aa3e6a --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfigurationProperties.java @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +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.util.List; + +/** + * Describes a virtual machines IP Configuration's PublicIPAddress configuration. + */ +@Fluent +public final class VirtualMachinePublicIPAddressConfigurationProperties + implements JsonSerializable { + /* + * The idle timeout of the public IP address. + */ + private Integer idleTimeoutInMinutes; + + /* + * Specify what happens to the public IP address when the VM is deleted + */ + private DeleteOptions deleteOption; + + /* + * The dns settings to be applied on the publicIP addresses . + */ + private VirtualMachinePublicIPAddressDnsSettingsConfiguration dnsSettings; + + /* + * The list of IP tags associated with the public IP address. + */ + private List ipTags; + + /* + * The PublicIPPrefix from which to allocate publicIP addresses. + */ + private SubResource publicIPPrefix; + + /* + * Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or + * IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + */ + private IPVersions publicIPAddressVersion; + + /* + * Specify the public IP allocation type + */ + private PublicIPAllocationMethod publicIPAllocationMethod; + + /** + * Creates an instance of VirtualMachinePublicIPAddressConfigurationProperties class. + */ + public VirtualMachinePublicIPAddressConfigurationProperties() { + } + + /** + * Get the idleTimeoutInMinutes property: The idle timeout of the public IP address. + * + * @return the idleTimeoutInMinutes value. + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the idleTimeoutInMinutes property: The idle timeout of the public IP address. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set. + * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. + */ + public VirtualMachinePublicIPAddressConfigurationProperties withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * Get the deleteOption property: Specify what happens to the public IP address when the VM is deleted. + * + * @return the deleteOption value. + */ + public DeleteOptions deleteOption() { + return this.deleteOption; + } + + /** + * Set the deleteOption property: Specify what happens to the public IP address when the VM is deleted. + * + * @param deleteOption the deleteOption value to set. + * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. + */ + public VirtualMachinePublicIPAddressConfigurationProperties withDeleteOption(DeleteOptions deleteOption) { + this.deleteOption = deleteOption; + return this; + } + + /** + * Get the dnsSettings property: The dns settings to be applied on the publicIP addresses . + * + * @return the dnsSettings value. + */ + public VirtualMachinePublicIPAddressDnsSettingsConfiguration dnsSettings() { + return this.dnsSettings; + } + + /** + * Set the dnsSettings property: The dns settings to be applied on the publicIP addresses . + * + * @param dnsSettings the dnsSettings value to set. + * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. + */ + public VirtualMachinePublicIPAddressConfigurationProperties + withDnsSettings(VirtualMachinePublicIPAddressDnsSettingsConfiguration dnsSettings) { + this.dnsSettings = dnsSettings; + return this; + } + + /** + * Get the ipTags property: The list of IP tags associated with the public IP address. + * + * @return the ipTags value. + */ + public List ipTags() { + return this.ipTags; + } + + /** + * Set the ipTags property: The list of IP tags associated with the public IP address. + * + * @param ipTags the ipTags value to set. + * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. + */ + public VirtualMachinePublicIPAddressConfigurationProperties withIpTags(List ipTags) { + this.ipTags = ipTags; + return this; + } + + /** + * Get the publicIPPrefix property: The PublicIPPrefix from which to allocate publicIP addresses. + * + * @return the publicIPPrefix value. + */ + public SubResource publicIPPrefix() { + return this.publicIPPrefix; + } + + /** + * Set the publicIPPrefix property: The PublicIPPrefix from which to allocate publicIP addresses. + * + * @param publicIPPrefix the publicIPPrefix value to set. + * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. + */ + public VirtualMachinePublicIPAddressConfigurationProperties withPublicIPPrefix(SubResource publicIPPrefix) { + this.publicIPPrefix = publicIPPrefix; + return this; + } + + /** + * Get the publicIPAddressVersion property: Available from Api-Version 2019-07-01 onwards, it represents whether the + * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + * + * @return the publicIPAddressVersion value. + */ + public IPVersions publicIPAddressVersion() { + return this.publicIPAddressVersion; + } + + /** + * Set the publicIPAddressVersion property: Available from Api-Version 2019-07-01 onwards, it represents whether the + * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + * + * @param publicIPAddressVersion the publicIPAddressVersion value to set. + * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. + */ + public VirtualMachinePublicIPAddressConfigurationProperties + withPublicIPAddressVersion(IPVersions publicIPAddressVersion) { + this.publicIPAddressVersion = publicIPAddressVersion; + return this; + } + + /** + * Get the publicIPAllocationMethod property: Specify the public IP allocation type. + * + * @return the publicIPAllocationMethod value. + */ + public PublicIPAllocationMethod publicIPAllocationMethod() { + return this.publicIPAllocationMethod; + } + + /** + * Set the publicIPAllocationMethod property: Specify the public IP allocation type. + * + * @param publicIPAllocationMethod the publicIPAllocationMethod value to set. + * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. + */ + public VirtualMachinePublicIPAddressConfigurationProperties + withPublicIPAllocationMethod(PublicIPAllocationMethod publicIPAllocationMethod) { + this.publicIPAllocationMethod = publicIPAllocationMethod; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("idleTimeoutInMinutes", this.idleTimeoutInMinutes); + jsonWriter.writeStringField("deleteOption", this.deleteOption == null ? null : this.deleteOption.toString()); + jsonWriter.writeJsonField("dnsSettings", this.dnsSettings); + jsonWriter.writeArrayField("ipTags", this.ipTags, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("publicIPPrefix", this.publicIPPrefix); + jsonWriter.writeStringField("publicIPAddressVersion", + this.publicIPAddressVersion == null ? null : this.publicIPAddressVersion.toString()); + jsonWriter.writeStringField("publicIPAllocationMethod", + this.publicIPAllocationMethod == null ? null : this.publicIPAllocationMethod.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachinePublicIPAddressConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachinePublicIPAddressConfigurationProperties 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 VirtualMachinePublicIPAddressConfigurationProperties. + */ + public static VirtualMachinePublicIPAddressConfigurationProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachinePublicIPAddressConfigurationProperties deserializedVirtualMachinePublicIPAddressConfigurationProperties + = new VirtualMachinePublicIPAddressConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("idleTimeoutInMinutes".equals(fieldName)) { + deserializedVirtualMachinePublicIPAddressConfigurationProperties.idleTimeoutInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("deleteOption".equals(fieldName)) { + deserializedVirtualMachinePublicIPAddressConfigurationProperties.deleteOption + = DeleteOptions.fromString(reader.getString()); + } else if ("dnsSettings".equals(fieldName)) { + deserializedVirtualMachinePublicIPAddressConfigurationProperties.dnsSettings + = VirtualMachinePublicIPAddressDnsSettingsConfiguration.fromJson(reader); + } else if ("ipTags".equals(fieldName)) { + List ipTags + = reader.readArray(reader1 -> VirtualMachineIpTag.fromJson(reader1)); + deserializedVirtualMachinePublicIPAddressConfigurationProperties.ipTags = ipTags; + } else if ("publicIPPrefix".equals(fieldName)) { + deserializedVirtualMachinePublicIPAddressConfigurationProperties.publicIPPrefix + = SubResource.fromJson(reader); + } else if ("publicIPAddressVersion".equals(fieldName)) { + deserializedVirtualMachinePublicIPAddressConfigurationProperties.publicIPAddressVersion + = IPVersions.fromString(reader.getString()); + } else if ("publicIPAllocationMethod".equals(fieldName)) { + deserializedVirtualMachinePublicIPAddressConfigurationProperties.publicIPAllocationMethod + = PublicIPAllocationMethod.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachinePublicIPAddressConfigurationProperties; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.java new file mode 100644 index 000000000000..fc84a93fb5ae --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes a virtual machines network configuration's DNS settings. + */ +@Fluent +public final class VirtualMachinePublicIPAddressDnsSettingsConfiguration + implements JsonSerializable { + /* + * The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label is + * the concatenation of the domain name label and vm network profile unique ID. + */ + private String domainNameLabel; + + /* + * The Domain name label scope of the PublicIPAddress resources that will be created. The generated name label is + * the concatenation of the hashed domain name label with policy according to the domain name label scope and vm + * network profile unique ID. + */ + private DomainNameLabelScopeTypes domainNameLabelScope; + + /** + * Creates an instance of VirtualMachinePublicIPAddressDnsSettingsConfiguration class. + */ + public VirtualMachinePublicIPAddressDnsSettingsConfiguration() { + } + + /** + * Get the domainNameLabel property: The Domain name label prefix of the PublicIPAddress resources that will be + * created. The generated name label is the concatenation of the domain name label and vm network profile unique ID. + * + * @return the domainNameLabel value. + */ + public String domainNameLabel() { + return this.domainNameLabel; + } + + /** + * Set the domainNameLabel property: The Domain name label prefix of the PublicIPAddress resources that will be + * created. The generated name label is the concatenation of the domain name label and vm network profile unique ID. + * + * @param domainNameLabel the domainNameLabel value to set. + * @return the VirtualMachinePublicIPAddressDnsSettingsConfiguration object itself. + */ + public VirtualMachinePublicIPAddressDnsSettingsConfiguration withDomainNameLabel(String domainNameLabel) { + this.domainNameLabel = domainNameLabel; + return this; + } + + /** + * Get the domainNameLabelScope property: The Domain name label scope of the PublicIPAddress resources that will be + * created. The generated name label is the concatenation of the hashed domain name label with policy according to + * the domain name label scope and vm network profile unique ID. + * + * @return the domainNameLabelScope value. + */ + public DomainNameLabelScopeTypes domainNameLabelScope() { + return this.domainNameLabelScope; + } + + /** + * Set the domainNameLabelScope property: The Domain name label scope of the PublicIPAddress resources that will be + * created. The generated name label is the concatenation of the hashed domain name label with policy according to + * the domain name label scope and vm network profile unique ID. + * + * @param domainNameLabelScope the domainNameLabelScope value to set. + * @return the VirtualMachinePublicIPAddressDnsSettingsConfiguration object itself. + */ + public VirtualMachinePublicIPAddressDnsSettingsConfiguration + withDomainNameLabelScope(DomainNameLabelScopeTypes domainNameLabelScope) { + this.domainNameLabelScope = domainNameLabelScope; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("domainNameLabel", this.domainNameLabel); + jsonWriter.writeStringField("domainNameLabelScope", + this.domainNameLabelScope == null ? null : this.domainNameLabelScope.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachinePublicIPAddressDnsSettingsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachinePublicIPAddressDnsSettingsConfiguration 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. + * @throws IOException If an error occurs while reading the VirtualMachinePublicIPAddressDnsSettingsConfiguration. + */ + public static VirtualMachinePublicIPAddressDnsSettingsConfiguration fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachinePublicIPAddressDnsSettingsConfiguration deserializedVirtualMachinePublicIPAddressDnsSettingsConfiguration + = new VirtualMachinePublicIPAddressDnsSettingsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("domainNameLabel".equals(fieldName)) { + deserializedVirtualMachinePublicIPAddressDnsSettingsConfiguration.domainNameLabel + = reader.getString(); + } else if ("domainNameLabelScope".equals(fieldName)) { + deserializedVirtualMachinePublicIPAddressDnsSettingsConfiguration.domainNameLabelScope + = DomainNameLabelScopeTypes.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachinePublicIPAddressDnsSettingsConfiguration; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProfile.java new file mode 100644 index 000000000000..514ff32d92b7 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProfile.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A VM size profile with a name and rank for flex VM creation. + */ +@Fluent +public final class VmSizeProfile implements JsonSerializable { + /* + * The name of the VM size, eg Standard_D2ads_v5 + */ + private String name; + + /* + * The rank of this VM size in the priority order + */ + private int rank; + + /** + * Creates an instance of VmSizeProfile class. + */ + public VmSizeProfile() { + } + + /** + * Get the name property: The name of the VM size, eg Standard_D2ads_v5. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the VM size, eg Standard_D2ads_v5. + * + * @param name the name value to set. + * @return the VmSizeProfile object itself. + */ + public VmSizeProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get the rank property: The rank of this VM size in the priority order. + * + * @return the rank value. + */ + public int rank() { + return this.rank; + } + + /** + * Set the rank property: The rank of this VM size in the priority order. + * + * @param rank the rank value to set. + * @return the VmSizeProfile object itself. + */ + public VmSizeProfile withRank(int rank) { + this.rank = rank; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeIntField("rank", this.rank); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VmSizeProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VmSizeProfile 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. + * @throws IOException If an error occurs while reading the VmSizeProfile. + */ + public static VmSizeProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VmSizeProfile deserializedVmSizeProfile = new VmSizeProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedVmSizeProfile.name = reader.getString(); + } else if ("rank".equals(fieldName)) { + deserializedVmSizeProfile.rank = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedVmSizeProfile; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMConfiguration.java new file mode 100644 index 000000000000..8159cf105db8 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMConfiguration.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; + +/** + * Describes Windows Remote Management configuration of the VM. + */ +@Fluent +public final class WinRMConfiguration implements JsonSerializable { + /* + * The list of Windows Remote Management listeners + */ + private List listeners; + + /** + * Creates an instance of WinRMConfiguration class. + */ + public WinRMConfiguration() { + } + + /** + * Get the listeners property: The list of Windows Remote Management listeners. + * + * @return the listeners value. + */ + public List listeners() { + return this.listeners; + } + + /** + * Set the listeners property: The list of Windows Remote Management listeners. + * + * @param listeners the listeners value to set. + * @return the WinRMConfiguration object itself. + */ + public WinRMConfiguration withListeners(List listeners) { + this.listeners = listeners; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("listeners", this.listeners, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WinRMConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WinRMConfiguration 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 WinRMConfiguration. + */ + public static WinRMConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WinRMConfiguration deserializedWinRMConfiguration = new WinRMConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("listeners".equals(fieldName)) { + List listeners = reader.readArray(reader1 -> WinRMListener.fromJson(reader1)); + deserializedWinRMConfiguration.listeners = listeners; + } else { + reader.skipChildren(); + } + } + + return deserializedWinRMConfiguration; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMListener.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMListener.java new file mode 100644 index 000000000000..2e12a1973375 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMListener.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes Protocol and thumbprint of Windows Remote Management listener. + */ +@Fluent +public final class WinRMListener implements JsonSerializable { + /* + * Specifies the protocol of WinRM listener. Possible values are: **http,** **https.** + */ + private ProtocolTypes protocol; + + /* + * This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key + * Vault, see [Add a key or secret to the key + * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate + * needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
+ * "data":"",
"dataType":"pfx",
"password":""
}
To + * install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension + * for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault + * virtual machine extension for + * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + */ + private String certificateUrl; + + /** + * Creates an instance of WinRMListener class. + */ + public WinRMListener() { + } + + /** + * Get the protocol property: Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. + * + * @return the protocol value. + */ + public ProtocolTypes protocol() { + return this.protocol; + } + + /** + * Set the protocol property: Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. + * + * @param protocol the protocol value to set. + * @return the WinRMListener object itself. + */ + public WinRMListener withProtocol(ProtocolTypes protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a + * secret. For adding a secret to the Key Vault, see [Add a key or secret to the key + * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate + * needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> + * {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> + * "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is + * recommended to use the [Azure Key Vault virtual machine extension for + * Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault + * virtual machine extension for + * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + * + * @return the certificateUrl value. + */ + public String certificateUrl() { + return this.certificateUrl; + } + + /** + * Set the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a + * secret. For adding a secret to the Key Vault, see [Add a key or secret to the key + * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate + * needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> + * {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> + * "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is + * recommended to use the [Azure Key Vault virtual machine extension for + * Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault + * virtual machine extension for + * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + * + * @param certificateUrl the certificateUrl value to set. + * @return the WinRMListener object itself. + */ + public WinRMListener withCertificateUrl(String certificateUrl) { + this.certificateUrl = certificateUrl; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); + jsonWriter.writeStringField("certificateUrl", this.certificateUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WinRMListener from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WinRMListener 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 WinRMListener. + */ + public static WinRMListener fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WinRMListener deserializedWinRMListener = new WinRMListener(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("protocol".equals(fieldName)) { + deserializedWinRMListener.protocol = ProtocolTypes.fromString(reader.getString()); + } else if ("certificateUrl".equals(fieldName)) { + deserializedWinRMListener.certificateUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWinRMListener; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsConfiguration.java new file mode 100644 index 000000000000..73f8d2ed77f9 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsConfiguration.java @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; + +/** + * Specifies Windows operating system settings on the virtual machine. + */ +@Fluent +public final class WindowsConfiguration implements JsonSerializable { + /* + * Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not + * specified in the request body, it is set to true by default. This will ensure that VM Agent is installed on the + * VM so that extensions can be added to the VM later. + */ + private Boolean provisionVMAgent; + + /* + * Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For + * virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. + */ + private Boolean enableAutomaticUpdates; + + /* + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Possible values can be + * [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value + * from time zones returned by + * [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). + */ + private String timeZone; + + /* + * Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, + * which is used by Windows Setup. + */ + private List additionalUnattendContent; + + /* + * [Preview Feature] Specifies settings related to VM Guest Patching on Windows. + */ + private PatchSettings patchSettings; + + /* + * Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. + */ + private WinRMConfiguration winRM; + + /** + * Creates an instance of WindowsConfiguration class. + */ + public WindowsConfiguration() { + } + + /** + * Get the provisionVMAgent property: Indicates whether virtual machine agent should be provisioned on the virtual + * machine. When this property is not specified in the request body, it is set to true by default. This will ensure + * that VM Agent is installed on the VM so that extensions can be added to the VM later. + * + * @return the provisionVMAgent value. + */ + public Boolean provisionVMAgent() { + return this.provisionVMAgent; + } + + /** + * Set the provisionVMAgent property: Indicates whether virtual machine agent should be provisioned on the virtual + * machine. When this property is not specified in the request body, it is set to true by default. This will ensure + * that VM Agent is installed on the VM so that extensions can be added to the VM later. + * + * @param provisionVMAgent the provisionVMAgent value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withProvisionVMAgent(Boolean provisionVMAgent) { + this.provisionVMAgent = provisionVMAgent; + return this; + } + + /** + * Get the enableAutomaticUpdates property: Indicates whether Automatic Updates is enabled for the Windows virtual + * machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will + * take effect on OS reprovisioning. + * + * @return the enableAutomaticUpdates value. + */ + public Boolean enableAutomaticUpdates() { + return this.enableAutomaticUpdates; + } + + /** + * Set the enableAutomaticUpdates property: Indicates whether Automatic Updates is enabled for the Windows virtual + * machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will + * take effect on OS reprovisioning. + * + * @param enableAutomaticUpdates the enableAutomaticUpdates value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withEnableAutomaticUpdates(Boolean enableAutomaticUpdates) { + this.enableAutomaticUpdates = enableAutomaticUpdates; + return this; + } + + /** + * Get the timeZone property: Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Possible + * values can be + * [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value + * from time zones returned by + * [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Possible + * values can be + * [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value + * from time zones returned by + * [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). + * + * @param timeZone the timeZone value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the additionalUnattendContent property: Specifies additional base-64 encoded XML formatted information that + * can be included in the Unattend.xml file, which is used by Windows Setup. + * + * @return the additionalUnattendContent value. + */ + public List additionalUnattendContent() { + return this.additionalUnattendContent; + } + + /** + * Set the additionalUnattendContent property: Specifies additional base-64 encoded XML formatted information that + * can be included in the Unattend.xml file, which is used by Windows Setup. + * + * @param additionalUnattendContent the additionalUnattendContent value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration + withAdditionalUnattendContent(List additionalUnattendContent) { + this.additionalUnattendContent = additionalUnattendContent; + return this; + } + + /** + * Get the patchSettings property: [Preview Feature] Specifies settings related to VM Guest Patching on Windows. + * + * @return the patchSettings value. + */ + public PatchSettings patchSettings() { + return this.patchSettings; + } + + /** + * Set the patchSettings property: [Preview Feature] Specifies settings related to VM Guest Patching on Windows. + * + * @param patchSettings the patchSettings value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withPatchSettings(PatchSettings patchSettings) { + this.patchSettings = patchSettings; + return this; + } + + /** + * Get the winRM property: Specifies the Windows Remote Management listeners. This enables remote Windows + * PowerShell. + * + * @return the winRM value. + */ + public WinRMConfiguration winRM() { + return this.winRM; + } + + /** + * Set the winRM property: Specifies the Windows Remote Management listeners. This enables remote Windows + * PowerShell. + * + * @param winRM the winRM value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withWinRM(WinRMConfiguration winRM) { + this.winRM = winRM; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("provisionVMAgent", this.provisionVMAgent); + jsonWriter.writeBooleanField("enableAutomaticUpdates", this.enableAutomaticUpdates); + jsonWriter.writeStringField("timeZone", this.timeZone); + jsonWriter.writeArrayField("additionalUnattendContent", this.additionalUnattendContent, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("patchSettings", this.patchSettings); + jsonWriter.writeJsonField("winRM", this.winRM); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WindowsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WindowsConfiguration 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 WindowsConfiguration. + */ + public static WindowsConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WindowsConfiguration deserializedWindowsConfiguration = new WindowsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisionVMAgent".equals(fieldName)) { + deserializedWindowsConfiguration.provisionVMAgent = reader.getNullable(JsonReader::getBoolean); + } else if ("enableAutomaticUpdates".equals(fieldName)) { + deserializedWindowsConfiguration.enableAutomaticUpdates + = reader.getNullable(JsonReader::getBoolean); + } else if ("timeZone".equals(fieldName)) { + deserializedWindowsConfiguration.timeZone = reader.getString(); + } else if ("additionalUnattendContent".equals(fieldName)) { + List additionalUnattendContent + = reader.readArray(reader1 -> AdditionalUnattendContent.fromJson(reader1)); + deserializedWindowsConfiguration.additionalUnattendContent = additionalUnattendContent; + } else if ("patchSettings".equals(fieldName)) { + deserializedWindowsConfiguration.patchSettings = PatchSettings.fromJson(reader); + } else if ("winRM".equals(fieldName)) { + deserializedWindowsConfiguration.winRM = WinRMConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWindowsConfiguration; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsPatchAssessmentMode.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsPatchAssessmentMode.java new file mode 100644 index 000000000000..6c62bc81a24d --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsPatchAssessmentMode.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.<br /><br /> Possible values + * are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual + * machine.<br /><br /> **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The + * property provisionVMAgent must be true. + */ +public final class WindowsPatchAssessmentMode extends ExpandableStringEnum { + /** + * ImageDefault patch assessment mode. + */ + public static final WindowsPatchAssessmentMode IMAGE_DEFAULT = fromString("ImageDefault"); + + /** + * AutomaticByPlatform patch assessment mode. + */ + public static final WindowsPatchAssessmentMode AUTOMATIC_BY_PLATFORM = fromString("AutomaticByPlatform"); + + /** + * Creates a new instance of WindowsPatchAssessmentMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WindowsPatchAssessmentMode() { + } + + /** + * Creates or finds a WindowsPatchAssessmentMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding WindowsPatchAssessmentMode. + */ + public static WindowsPatchAssessmentMode fromString(String name) { + return fromString(name, WindowsPatchAssessmentMode.class); + } + + /** + * Gets known WindowsPatchAssessmentMode values. + * + * @return known WindowsPatchAssessmentMode values. + */ + public static Collection values() { + return values(WindowsPatchAssessmentMode.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformRebootSetting.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformRebootSetting.java new file mode 100644 index 000000000000..900036bc9b6b --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformRebootSetting.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the reboot setting for all AutomaticByPlatform patch installation operations. + */ +public final class WindowsVMGuestPatchAutomaticByPlatformRebootSetting + extends ExpandableStringEnum { + /** + * Reboot setting for Unknown. + */ + public static final WindowsVMGuestPatchAutomaticByPlatformRebootSetting UNKNOWN = fromString("Unknown"); + + /** + * Reboot setting for IfRequired. + */ + public static final WindowsVMGuestPatchAutomaticByPlatformRebootSetting IF_REQUIRED = fromString("IfRequired"); + + /** + * Reboot setting for Never. + */ + public static final WindowsVMGuestPatchAutomaticByPlatformRebootSetting NEVER = fromString("Never"); + + /** + * Reboot setting for Always. + */ + public static final WindowsVMGuestPatchAutomaticByPlatformRebootSetting ALWAYS = fromString("Always"); + + /** + * Creates a new instance of WindowsVMGuestPatchAutomaticByPlatformRebootSetting value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WindowsVMGuestPatchAutomaticByPlatformRebootSetting() { + } + + /** + * Creates or finds a WindowsVMGuestPatchAutomaticByPlatformRebootSetting from its string representation. + * + * @param name a name to look for. + * @return the corresponding WindowsVMGuestPatchAutomaticByPlatformRebootSetting. + */ + public static WindowsVMGuestPatchAutomaticByPlatformRebootSetting fromString(String name) { + return fromString(name, WindowsVMGuestPatchAutomaticByPlatformRebootSetting.class); + } + + /** + * Gets known WindowsVMGuestPatchAutomaticByPlatformRebootSetting values. + * + * @return known WindowsVMGuestPatchAutomaticByPlatformRebootSetting values. + */ + public static Collection values() { + return values(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformSettings.java new file mode 100644 index 000000000000..2a4982d8da3b --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformSettings.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch + * settings. + */ +@Fluent +public final class WindowsVMGuestPatchAutomaticByPlatformSettings + implements JsonSerializable { + /* + * Specifies the reboot setting for all AutomaticByPlatform patch installation operations. + */ + private WindowsVMGuestPatchAutomaticByPlatformRebootSetting rebootSetting; + + /* + * Enables customer to schedule patching without accidental upgrades + */ + private Boolean bypassPlatformSafetyChecksOnUserSchedule; + + /** + * Creates an instance of WindowsVMGuestPatchAutomaticByPlatformSettings class. + */ + public WindowsVMGuestPatchAutomaticByPlatformSettings() { + } + + /** + * Get the rebootSetting property: Specifies the reboot setting for all AutomaticByPlatform patch installation + * operations. + * + * @return the rebootSetting value. + */ + public WindowsVMGuestPatchAutomaticByPlatformRebootSetting rebootSetting() { + return this.rebootSetting; + } + + /** + * Set the rebootSetting property: Specifies the reboot setting for all AutomaticByPlatform patch installation + * operations. + * + * @param rebootSetting the rebootSetting value to set. + * @return the WindowsVMGuestPatchAutomaticByPlatformSettings object itself. + */ + public WindowsVMGuestPatchAutomaticByPlatformSettings + withRebootSetting(WindowsVMGuestPatchAutomaticByPlatformRebootSetting rebootSetting) { + this.rebootSetting = rebootSetting; + return this; + } + + /** + * Get the bypassPlatformSafetyChecksOnUserSchedule property: Enables customer to schedule patching without + * accidental upgrades. + * + * @return the bypassPlatformSafetyChecksOnUserSchedule value. + */ + public Boolean bypassPlatformSafetyChecksOnUserSchedule() { + return this.bypassPlatformSafetyChecksOnUserSchedule; + } + + /** + * Set the bypassPlatformSafetyChecksOnUserSchedule property: Enables customer to schedule patching without + * accidental upgrades. + * + * @param bypassPlatformSafetyChecksOnUserSchedule the bypassPlatformSafetyChecksOnUserSchedule value to set. + * @return the WindowsVMGuestPatchAutomaticByPlatformSettings object itself. + */ + public WindowsVMGuestPatchAutomaticByPlatformSettings + withBypassPlatformSafetyChecksOnUserSchedule(Boolean bypassPlatformSafetyChecksOnUserSchedule) { + this.bypassPlatformSafetyChecksOnUserSchedule = bypassPlatformSafetyChecksOnUserSchedule; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("rebootSetting", this.rebootSetting == null ? null : this.rebootSetting.toString()); + jsonWriter.writeBooleanField("bypassPlatformSafetyChecksOnUserSchedule", + this.bypassPlatformSafetyChecksOnUserSchedule); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WindowsVMGuestPatchAutomaticByPlatformSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WindowsVMGuestPatchAutomaticByPlatformSettings 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 WindowsVMGuestPatchAutomaticByPlatformSettings. + */ + public static WindowsVMGuestPatchAutomaticByPlatformSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WindowsVMGuestPatchAutomaticByPlatformSettings deserializedWindowsVMGuestPatchAutomaticByPlatformSettings + = new WindowsVMGuestPatchAutomaticByPlatformSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rebootSetting".equals(fieldName)) { + deserializedWindowsVMGuestPatchAutomaticByPlatformSettings.rebootSetting + = WindowsVMGuestPatchAutomaticByPlatformRebootSetting.fromString(reader.getString()); + } else if ("bypassPlatformSafetyChecksOnUserSchedule".equals(fieldName)) { + deserializedWindowsVMGuestPatchAutomaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedWindowsVMGuestPatchAutomaticByPlatformSettings; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchMode.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchMode.java new file mode 100644 index 000000000000..a12217a9a6f7 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchMode.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine + * scale set with OrchestrationMode as Flexible.<br /><br /> Possible values are:<br /><br /> + * **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually + * inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates + * must be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the + * OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> + * **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties + * provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. + */ +public final class WindowsVMGuestPatchMode extends ExpandableStringEnum { + /** + * Manual VM guest patch mode. + */ + public static final WindowsVMGuestPatchMode MANUAL = fromString("Manual"); + + /** + * AutomaticByOS VM guest patch mode. + */ + public static final WindowsVMGuestPatchMode AUTOMATIC_BY_OS = fromString("AutomaticByOS"); + + /** + * AutomaticByPlatform VM guest patch mode. + */ + public static final WindowsVMGuestPatchMode AUTOMATIC_BY_PLATFORM = fromString("AutomaticByPlatform"); + + /** + * Creates a new instance of WindowsVMGuestPatchMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WindowsVMGuestPatchMode() { + } + + /** + * Creates or finds a WindowsVMGuestPatchMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding WindowsVMGuestPatchMode. + */ + public static WindowsVMGuestPatchMode fromString(String name) { + return fromString(name, WindowsVMGuestPatchMode.class); + } + + /** + * Gets known WindowsVMGuestPatchMode values. + * + * @return known WindowsVMGuestPatchMode values. + */ + public static Collection values() { + return values(WindowsVMGuestPatchMode.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZoneAllocationPolicy.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZoneAllocationPolicy.java new file mode 100644 index 000000000000..aa851abf2196 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZoneAllocationPolicy.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +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.util.List; + +/** + * The zone allocation policy for distributing VMs across availability zones. + */ +@Fluent +public final class ZoneAllocationPolicy implements JsonSerializable { + /* + * The distribution strategy for zone allocation + */ + private DistributionStrategy distributionStrategy; + + /* + * The zone preferences for allocation priority + */ + private List zonePreferences; + + /** + * Creates an instance of ZoneAllocationPolicy class. + */ + public ZoneAllocationPolicy() { + } + + /** + * Get the distributionStrategy property: The distribution strategy for zone allocation. + * + * @return the distributionStrategy value. + */ + public DistributionStrategy distributionStrategy() { + return this.distributionStrategy; + } + + /** + * Set the distributionStrategy property: The distribution strategy for zone allocation. + * + * @param distributionStrategy the distributionStrategy value to set. + * @return the ZoneAllocationPolicy object itself. + */ + public ZoneAllocationPolicy withDistributionStrategy(DistributionStrategy distributionStrategy) { + this.distributionStrategy = distributionStrategy; + return this; + } + + /** + * Get the zonePreferences property: The zone preferences for allocation priority. + * + * @return the zonePreferences value. + */ + public List zonePreferences() { + return this.zonePreferences; + } + + /** + * Set the zonePreferences property: The zone preferences for allocation priority. + * + * @param zonePreferences the zonePreferences value to set. + * @return the ZoneAllocationPolicy object itself. + */ + public ZoneAllocationPolicy withZonePreferences(List zonePreferences) { + this.zonePreferences = zonePreferences; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("distributionStrategy", + this.distributionStrategy == null ? null : this.distributionStrategy.toString()); + jsonWriter.writeArrayField("zonePreferences", this.zonePreferences, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ZoneAllocationPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ZoneAllocationPolicy 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 ZoneAllocationPolicy. + */ + public static ZoneAllocationPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ZoneAllocationPolicy deserializedZoneAllocationPolicy = new ZoneAllocationPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("distributionStrategy".equals(fieldName)) { + deserializedZoneAllocationPolicy.distributionStrategy + = DistributionStrategy.fromString(reader.getString()); + } else if ("zonePreferences".equals(fieldName)) { + List zonePreferences + = reader.readArray(reader1 -> ZonePreference.fromJson(reader1)); + deserializedZoneAllocationPolicy.zonePreferences = zonePreferences; + } else { + reader.skipChildren(); + } + } + + return deserializedZoneAllocationPolicy; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePlacementPolicyType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePlacementPolicyType.java new file mode 100644 index 000000000000..247d447c7a79 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePlacementPolicyType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the policy for resource's placement in availability zone. Possible values are: **Any** (used for Virtual + * Machines), **Auto** (used for Virtual Machine Scale Sets) - An availability zone will be automatically picked by + * system as part of resource creation. + */ +public final class ZonePlacementPolicyType extends ExpandableStringEnum { + /** + * Static value Any for ZonePlacementPolicyType. + */ + public static final ZonePlacementPolicyType ANY = fromString("Any"); + + /** + * The platform automatically selects an availability zone based on the request. + */ + public static final ZonePlacementPolicyType AUTO = fromString("Auto"); + + /** + * Creates a new instance of ZonePlacementPolicyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ZonePlacementPolicyType() { + } + + /** + * Creates or finds a ZonePlacementPolicyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ZonePlacementPolicyType. + */ + public static ZonePlacementPolicyType fromString(String name) { + return fromString(name, ZonePlacementPolicyType.class); + } + + /** + * Gets known ZonePlacementPolicyType values. + * + * @return known ZonePlacementPolicyType values. + */ + public static Collection values() { + return values(ZonePlacementPolicyType.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePreference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePreference.java new file mode 100644 index 000000000000..a5d5b5df9a8c --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePreference.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A zone preference with a zone identifier and rank. + */ +@Fluent +public final class ZonePreference implements JsonSerializable { + /* + * The zone identifier + */ + private String zone; + + /* + * The rank of this zone in the priority order + */ + private int rank; + + /** + * Creates an instance of ZonePreference class. + */ + public ZonePreference() { + } + + /** + * Get the zone property: The zone identifier. + * + * @return the zone value. + */ + public String zone() { + return this.zone; + } + + /** + * Set the zone property: The zone identifier. + * + * @param zone the zone value to set. + * @return the ZonePreference object itself. + */ + public ZonePreference withZone(String zone) { + this.zone = zone; + return this; + } + + /** + * Get the rank property: The rank of this zone in the priority order. + * + * @return the rank value. + */ + public int rank() { + return this.rank; + } + + /** + * Set the rank property: The rank of this zone in the priority order. + * + * @param rank the rank value to set. + * @return the ZonePreference object itself. + */ + public ZonePreference withRank(int rank) { + this.rank = rank; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("zone", this.zone); + jsonWriter.writeIntField("rank", this.rank); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ZonePreference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ZonePreference 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. + * @throws IOException If an error occurs while reading the ZonePreference. + */ + public static ZonePreference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ZonePreference deserializedZonePreference = new ZonePreference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("zone".equals(fieldName)) { + deserializedZonePreference.zone = reader.getString(); + } else if ("rank".equals(fieldName)) { + deserializedZonePreference.rank = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedZonePreference; + }); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/resources/META-INF/azure-resourcemanager-computeschedule_metadata.json b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/resources/META-INF/azure-resourcemanager-computeschedule_metadata.json index 47aeb6912715..dc5a87557170 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/resources/META-INF/azure-resourcemanager-computeschedule_metadata.json +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/resources/META-INF/azure-resourcemanager-computeschedule_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.ComputeSchedule":"2025-04-15-preview"},"crossLanguageDefinitions":{"com.azure.resourcemanager.computeschedule.fluent.ComputeScheduleMgmtClient":"Microsoft.ComputeSchedule","com.azure.resourcemanager.computeschedule.fluent.OccurrenceExtensionsClient":"Microsoft.ComputeSchedule.OccurrenceExtension","com.azure.resourcemanager.computeschedule.fluent.OccurrenceExtensionsClient.listOccurrenceByVms":"Microsoft.ComputeSchedule.OccurrenceExtension.listOccurrenceByVms","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient":"Microsoft.ComputeSchedule.Occurrences","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.beginDelay":"Microsoft.ComputeSchedule.Occurrences.delay","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.cancel":"Microsoft.ComputeSchedule.Occurrences.cancel","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.cancelWithResponse":"Microsoft.ComputeSchedule.Occurrences.cancel","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.delay":"Microsoft.ComputeSchedule.Occurrences.delay","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.get":"Microsoft.ComputeSchedule.Occurrences.get","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.getWithResponse":"Microsoft.ComputeSchedule.Occurrences.get","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.listByScheduledAction":"Microsoft.ComputeSchedule.Occurrences.listByScheduledAction","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.listResources":"Microsoft.ComputeSchedule.Occurrences.listResources","com.azure.resourcemanager.computeschedule.fluent.OperationsClient":"Microsoft.ComputeSchedule.Operations","com.azure.resourcemanager.computeschedule.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionExtensionsClient":"Microsoft.ComputeSchedule.ScheduledActionExtension","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionExtensionsClient.listByVms":"Microsoft.ComputeSchedule.ScheduledActionExtension.listByVms","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient":"Microsoft.ComputeSchedule.ScheduledActions","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.attachResources":"Microsoft.ComputeSchedule.ScheduledActions.attachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.attachResourcesWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.attachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.beginCreateOrUpdate":"Microsoft.ComputeSchedule.ScheduledActions.createOrUpdate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.beginDelete":"Microsoft.ComputeSchedule.ScheduledActions.delete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.cancelNextOccurrence":"Microsoft.ComputeSchedule.ScheduledActions.cancelNextOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.cancelNextOccurrenceWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.cancelNextOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.createOrUpdate":"Microsoft.ComputeSchedule.ScheduledActions.createOrUpdate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.delete":"Microsoft.ComputeSchedule.ScheduledActions.delete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.detachResources":"Microsoft.ComputeSchedule.ScheduledActions.detachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.detachResourcesWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.detachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.disable":"Microsoft.ComputeSchedule.ScheduledActions.disable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.disableWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.disable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.enable":"Microsoft.ComputeSchedule.ScheduledActions.enable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.enableWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.enable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.getByResourceGroup":"Microsoft.ComputeSchedule.ScheduledActions.get","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.getByResourceGroupWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.get","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.list":"Microsoft.ComputeSchedule.ScheduledActions.listBySubscription","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.listByResourceGroup":"Microsoft.ComputeSchedule.ScheduledActions.listByResourceGroup","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.listResources":"Microsoft.ComputeSchedule.ScheduledActions.listResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.patchResources":"Microsoft.ComputeSchedule.ScheduledActions.patchResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.patchResourcesWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.patchResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.triggerManualOccurrence":"Microsoft.ComputeSchedule.ScheduledActions.triggerManualOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.triggerManualOccurrenceWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.triggerManualOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.update":"Microsoft.ComputeSchedule.ScheduledActions.update","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.updateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.update","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesCancelOperations":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesCancelOperationsWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteCreate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteCreateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDeallocate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDeallocateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDelete":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDeleteWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteHibernate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteHibernateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteStart":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteStartWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationErrors":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationErrorsWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationStatus":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationStatusWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitDeallocate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitDeallocateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitHibernate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitHibernateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitStart":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitStartWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart","com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner":"Microsoft.ComputeSchedule.CancelOperationsResponse","com.azure.resourcemanager.computeschedule.fluent.models.CreateResourceOperationResponseInner":"Microsoft.ComputeSchedule.CreateResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner":"Microsoft.ComputeSchedule.DeallocateResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.DeleteResourceOperationResponseInner":"Microsoft.ComputeSchedule.DeleteResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.GetOperationErrorsResponseInner":"Microsoft.ComputeSchedule.GetOperationErrorsResponse","com.azure.resourcemanager.computeschedule.fluent.models.GetOperationStatusResponseInner":"Microsoft.ComputeSchedule.GetOperationStatusResponse","com.azure.resourcemanager.computeschedule.fluent.models.HibernateResourceOperationResponseInner":"Microsoft.ComputeSchedule.HibernateResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.OccurrenceExtensionResourceInner":"Microsoft.ComputeSchedule.OccurrenceExtensionResource","com.azure.resourcemanager.computeschedule.fluent.models.OccurrenceInner":"Microsoft.ComputeSchedule.Occurrence","com.azure.resourcemanager.computeschedule.fluent.models.OccurrenceResourceInner":"Microsoft.ComputeSchedule.OccurrenceResource","com.azure.resourcemanager.computeschedule.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.computeschedule.fluent.models.RecurringActionsResourceOperationResultInner":"Microsoft.ComputeSchedule.ResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionInner":"Microsoft.ComputeSchedule.ScheduledAction","com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionResourceInner":"Microsoft.ComputeSchedule.ScheduledActionResource","com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionResourcesInner":"Microsoft.ComputeSchedule.ScheduledActionResources","com.azure.resourcemanager.computeschedule.fluent.models.StartResourceOperationResponseInner":"Microsoft.ComputeSchedule.StartResourceOperationResponse","com.azure.resourcemanager.computeschedule.implementation.ComputeScheduleMgmtClientBuilder":"Microsoft.ComputeSchedule","com.azure.resourcemanager.computeschedule.implementation.models.OccurrenceExtensionResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.implementation.models.OccurrenceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.implementation.models.OccurrenceResourceListResponse":"Microsoft.ComputeSchedule.OccurrenceResourceListResponse","com.azure.resourcemanager.computeschedule.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.computeschedule.implementation.models.ResourceListResponse":"Microsoft.ComputeSchedule.ResourceListResponse","com.azure.resourcemanager.computeschedule.implementation.models.ScheduledActionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.implementation.models.ScheduledActionResourcesListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.computeschedule.models.CancelOccurrenceRequest":"Microsoft.ComputeSchedule.CancelOccurrenceRequest","com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest":"Microsoft.ComputeSchedule.CancelOperationsRequest","com.azure.resourcemanager.computeschedule.models.DeadlineType":"Microsoft.ComputeSchedule.DeadlineType","com.azure.resourcemanager.computeschedule.models.DelayRequest":"Microsoft.ComputeSchedule.DelayRequest","com.azure.resourcemanager.computeschedule.models.Error":"Azure.Core.Foundations.Error","com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest":"Microsoft.ComputeSchedule.ExecuteCreateRequest","com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest":"Microsoft.ComputeSchedule.ExecuteDeallocateRequest","com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest":"Microsoft.ComputeSchedule.ExecuteDeleteRequest","com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest":"Microsoft.ComputeSchedule.ExecuteHibernateRequest","com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest":"Microsoft.ComputeSchedule.ExecuteStartRequest","com.azure.resourcemanager.computeschedule.models.ExecutionParameters":"Microsoft.ComputeSchedule.ExecutionParameters","com.azure.resourcemanager.computeschedule.models.GetOperationErrorsRequest":"Microsoft.ComputeSchedule.GetOperationErrorsRequest","com.azure.resourcemanager.computeschedule.models.GetOperationStatusRequest":"Microsoft.ComputeSchedule.GetOperationStatusRequest","com.azure.resourcemanager.computeschedule.models.InnerError":"Azure.Core.Foundations.InnerError","com.azure.resourcemanager.computeschedule.models.Language":"Microsoft.ComputeSchedule.Language","com.azure.resourcemanager.computeschedule.models.Month":"Microsoft.ComputeSchedule.Month","com.azure.resourcemanager.computeschedule.models.NotificationProperties":"Microsoft.ComputeSchedule.NotificationProperties","com.azure.resourcemanager.computeschedule.models.NotificationType":"Microsoft.ComputeSchedule.NotificationType","com.azure.resourcemanager.computeschedule.models.OccurrenceExtensionProperties":"Microsoft.ComputeSchedule.OccurrenceExtensionProperties","com.azure.resourcemanager.computeschedule.models.OccurrenceProperties":"Microsoft.ComputeSchedule.OccurrenceProperties","com.azure.resourcemanager.computeschedule.models.OccurrenceResultSummary":"Microsoft.ComputeSchedule.OccurrenceResultSummary","com.azure.resourcemanager.computeschedule.models.OccurrenceState":"Microsoft.ComputeSchedule.OccurrenceState","com.azure.resourcemanager.computeschedule.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.computeschedule.models.OperationErrorDetails":"Microsoft.ComputeSchedule.OperationErrorDetails","com.azure.resourcemanager.computeschedule.models.OperationErrorsResult":"Microsoft.ComputeSchedule.OperationErrorsResult","com.azure.resourcemanager.computeschedule.models.OperationState":"Microsoft.ComputeSchedule.OperationState","com.azure.resourcemanager.computeschedule.models.OptimizationPreference":"Microsoft.ComputeSchedule.OptimizationPreference","com.azure.resourcemanager.computeschedule.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.computeschedule.models.ProvisioningState":"Microsoft.ComputeSchedule.ProvisioningState","com.azure.resourcemanager.computeschedule.models.ResourceAttachRequest":"Microsoft.ComputeSchedule.ResourceAttachRequest","com.azure.resourcemanager.computeschedule.models.ResourceDetachRequest":"Microsoft.ComputeSchedule.ResourceDetachRequest","com.azure.resourcemanager.computeschedule.models.ResourceOperation":"Microsoft.ComputeSchedule.ResourceOperation","com.azure.resourcemanager.computeschedule.models.ResourceOperationDetails":"Microsoft.ComputeSchedule.ResourceOperationDetails","com.azure.resourcemanager.computeschedule.models.ResourceOperationError":"Microsoft.ComputeSchedule.ResourceOperationError","com.azure.resourcemanager.computeschedule.models.ResourceOperationStatus":"Microsoft.ComputeSchedule.ResourceOperationStatus","com.azure.resourcemanager.computeschedule.models.ResourceOperationType":"Microsoft.ComputeSchedule.ResourceOperationType","com.azure.resourcemanager.computeschedule.models.ResourcePatchRequest":"Microsoft.ComputeSchedule.ResourcePatchRequest","com.azure.resourcemanager.computeschedule.models.ResourceProvisionPayload":"Microsoft.ComputeSchedule.ResourceProvisionPayload","com.azure.resourcemanager.computeschedule.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.computeschedule.models.ResourceResultSummary":"Microsoft.ComputeSchedule.ResourceResultSummary","com.azure.resourcemanager.computeschedule.models.ResourceStatus":"Microsoft.ComputeSchedule.ResourceStatus","com.azure.resourcemanager.computeschedule.models.ResourceType":"Microsoft.ComputeSchedule.ResourceType","com.azure.resourcemanager.computeschedule.models.Resources":"Microsoft.ComputeSchedule.Resources","com.azure.resourcemanager.computeschedule.models.RetryPolicy":"Microsoft.ComputeSchedule.RetryPolicy","com.azure.resourcemanager.computeschedule.models.Schedule":"Microsoft.ComputeSchedule.Schedule","com.azure.resourcemanager.computeschedule.models.ScheduledActionProperties":"Microsoft.ComputeSchedule.ScheduledActionProperties","com.azure.resourcemanager.computeschedule.models.ScheduledActionType":"Microsoft.ComputeSchedule.ActionType","com.azure.resourcemanager.computeschedule.models.ScheduledActionUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.computeschedule.models.ScheduledActionUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.computeschedule.models.ScheduledActionsExtensionProperties":"Microsoft.ComputeSchedule.ScheduledActionsExtensionProperties","com.azure.resourcemanager.computeschedule.models.ScheduledActionsSchedule":"Microsoft.ComputeSchedule.ScheduledActionsSchedule","com.azure.resourcemanager.computeschedule.models.SubmitDeallocateRequest":"Microsoft.ComputeSchedule.SubmitDeallocateRequest","com.azure.resourcemanager.computeschedule.models.SubmitHibernateRequest":"Microsoft.ComputeSchedule.SubmitHibernateRequest","com.azure.resourcemanager.computeschedule.models.SubmitStartRequest":"Microsoft.ComputeSchedule.SubmitStartRequest","com.azure.resourcemanager.computeschedule.models.WeekDay":"Microsoft.ComputeSchedule.WeekDay"},"generatedFiles":["src/main/java/com/azure/resourcemanager/computeschedule/ComputeScheduleManager.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/ComputeScheduleMgmtClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/OccurrenceExtensionsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/OccurrencesClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionExtensionsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CancelOperationsResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/DeallocateResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/DeleteResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationErrorsResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationStatusResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/HibernateResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OccurrenceExtensionResourceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OccurrenceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OccurrenceResourceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/RecurringActionsResourceOperationResultInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/ScheduledActionInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/ScheduledActionResourceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/ScheduledActionResourcesInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/StartResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/CancelOperationsResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/DeallocateResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/DeleteResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationErrorsResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/HibernateResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceExtensionResourceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceExtensionsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceResourceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrencesClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrencesImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/RecurringActionsResourceOperationResultImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionExtensionsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionResourceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionResourcesImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/StartResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OccurrenceExtensionResourceListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OccurrenceListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OccurrenceResourceListResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/ResourceListResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/ScheduledActionListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/ScheduledActionResourcesListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ActionType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOccurrenceRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CreateResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeadlineType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeallocateResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DelayRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Error.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeleteRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecutionParameters.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/HibernateResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/InnerError.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Language.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Month.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NotificationProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NotificationType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Occurrence.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceExtensionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceExtensionResource.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceExtensions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceResource.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceResultSummary.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Occurrences.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Operation.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorDetails.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorsResult.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Operations.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OptimizationPreference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Origin.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/RecurringActionsResourceOperationResult.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceAttachRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceDetachRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperation.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationError.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationStatus.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourcePatchRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionPayload.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceResultSummary.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceStatus.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Resources.java","src/main/java/com/azure/resourcemanager/computeschedule/models/RetryPolicy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Schedule.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledAction.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionExtensions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionResource.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionResources.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionUpdate.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionUpdateProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionsExtensionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionsSchedule.java","src/main/java/com/azure/resourcemanager/computeschedule/models/StartResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitDeallocateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitHibernateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitStartRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WeekDay.java","src/main/java/com/azure/resourcemanager/computeschedule/models/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.ComputeSchedule":"2026-04-15-preview"},"crossLanguageDefinitions":{"com.azure.resourcemanager.computeschedule.fluent.ComputeScheduleMgmtClient":"Microsoft.ComputeSchedule","com.azure.resourcemanager.computeschedule.fluent.OccurrenceExtensionsClient":"Microsoft.ComputeSchedule.OccurrenceExtension","com.azure.resourcemanager.computeschedule.fluent.OccurrenceExtensionsClient.listOccurrenceByVms":"Microsoft.ComputeSchedule.OccurrenceExtension.listOccurrenceByVms","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient":"Microsoft.ComputeSchedule.Occurrences","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.beginDelay":"Microsoft.ComputeSchedule.Occurrences.delay","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.cancel":"Microsoft.ComputeSchedule.Occurrences.cancel","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.cancelWithResponse":"Microsoft.ComputeSchedule.Occurrences.cancel","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.delay":"Microsoft.ComputeSchedule.Occurrences.delay","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.get":"Microsoft.ComputeSchedule.Occurrences.get","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.getWithResponse":"Microsoft.ComputeSchedule.Occurrences.get","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.listByScheduledAction":"Microsoft.ComputeSchedule.Occurrences.listByScheduledAction","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.listResources":"Microsoft.ComputeSchedule.Occurrences.listResources","com.azure.resourcemanager.computeschedule.fluent.OperationsClient":"Microsoft.ComputeSchedule.Operations","com.azure.resourcemanager.computeschedule.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionExtensionsClient":"Microsoft.ComputeSchedule.ScheduledActionExtension","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionExtensionsClient.listByVms":"Microsoft.ComputeSchedule.ScheduledActionExtension.listByVms","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient":"Microsoft.ComputeSchedule.ScheduledActions","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.attachResources":"Microsoft.ComputeSchedule.ScheduledActions.attachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.attachResourcesWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.attachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.beginCreateOrUpdate":"Microsoft.ComputeSchedule.ScheduledActions.createOrUpdate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.beginDelete":"Microsoft.ComputeSchedule.ScheduledActions.delete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.cancelNextOccurrence":"Microsoft.ComputeSchedule.ScheduledActions.cancelNextOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.cancelNextOccurrenceWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.cancelNextOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.createOrUpdate":"Microsoft.ComputeSchedule.ScheduledActions.createOrUpdate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.delete":"Microsoft.ComputeSchedule.ScheduledActions.delete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.detachResources":"Microsoft.ComputeSchedule.ScheduledActions.detachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.detachResourcesWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.detachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.disable":"Microsoft.ComputeSchedule.ScheduledActions.disable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.disableWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.disable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.enable":"Microsoft.ComputeSchedule.ScheduledActions.enable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.enableWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.enable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.getByResourceGroup":"Microsoft.ComputeSchedule.ScheduledActions.get","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.getByResourceGroupWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.get","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.list":"Microsoft.ComputeSchedule.ScheduledActions.listBySubscription","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.listByResourceGroup":"Microsoft.ComputeSchedule.ScheduledActions.listByResourceGroup","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.listResources":"Microsoft.ComputeSchedule.ScheduledActions.listResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.patchResources":"Microsoft.ComputeSchedule.ScheduledActions.patchResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.patchResourcesWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.patchResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.triggerManualOccurrence":"Microsoft.ComputeSchedule.ScheduledActions.triggerManualOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.triggerManualOccurrenceWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.triggerManualOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.update":"Microsoft.ComputeSchedule.ScheduledActions.update","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.updateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.update","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesCancelOperations":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesCancelOperationsWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteCreate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteCreateFlex":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreateFlex","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteCreateFlexWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreateFlex","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteCreateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDeallocate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDeallocateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDelete":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDeleteWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteHibernate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteHibernateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteStart":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteStartWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationErrors":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationErrorsWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationStatus":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationStatusWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitDeallocate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitDeallocateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitHibernate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitHibernateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitStart":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitStartWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart","com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner":"Microsoft.ComputeSchedule.CancelOperationsResponse","com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner":"Microsoft.ComputeSchedule.CreateFlexResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.CreateResourceOperationResponseInner":"Microsoft.ComputeSchedule.CreateResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner":"Microsoft.ComputeSchedule.DeallocateResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.DeleteResourceOperationResponseInner":"Microsoft.ComputeSchedule.DeleteResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.GetOperationErrorsResponseInner":"Microsoft.ComputeSchedule.GetOperationErrorsResponse","com.azure.resourcemanager.computeschedule.fluent.models.GetOperationStatusResponseInner":"Microsoft.ComputeSchedule.GetOperationStatusResponse","com.azure.resourcemanager.computeschedule.fluent.models.HibernateResourceOperationResponseInner":"Microsoft.ComputeSchedule.HibernateResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.OccurrenceExtensionResourceInner":"Microsoft.ComputeSchedule.OccurrenceExtensionResource","com.azure.resourcemanager.computeschedule.fluent.models.OccurrenceInner":"Microsoft.ComputeSchedule.Occurrence","com.azure.resourcemanager.computeschedule.fluent.models.OccurrenceResourceInner":"Microsoft.ComputeSchedule.OccurrenceResource","com.azure.resourcemanager.computeschedule.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.computeschedule.fluent.models.RecurringActionsResourceOperationResultInner":"Microsoft.ComputeSchedule.ResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionInner":"Microsoft.ComputeSchedule.ScheduledAction","com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionResourceInner":"Microsoft.ComputeSchedule.ScheduledActionResource","com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionResourcesInner":"Microsoft.ComputeSchedule.ScheduledActionResources","com.azure.resourcemanager.computeschedule.fluent.models.StartResourceOperationResponseInner":"Microsoft.ComputeSchedule.StartResourceOperationResponse","com.azure.resourcemanager.computeschedule.implementation.ComputeScheduleMgmtClientBuilder":"Microsoft.ComputeSchedule","com.azure.resourcemanager.computeschedule.implementation.models.OccurrenceExtensionResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.implementation.models.OccurrenceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.implementation.models.OccurrenceResourceListResponse":"Microsoft.ComputeSchedule.OccurrenceResourceListResponse","com.azure.resourcemanager.computeschedule.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.computeschedule.implementation.models.ResourceListResponse":"Microsoft.ComputeSchedule.ResourceListResponse","com.azure.resourcemanager.computeschedule.implementation.models.ScheduledActionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.implementation.models.ScheduledActionResourcesListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.computeschedule.models.AdditionalCapabilities":"Microsoft.ComputeSchedule.AdditionalCapabilities","com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContent":"Microsoft.ComputeSchedule.AdditionalUnattendContent","com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContentComponentName":null,"com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContentPassName":null,"com.azure.resourcemanager.computeschedule.models.AllInstancesDown":"Microsoft.ComputeSchedule.AllInstancesDown","com.azure.resourcemanager.computeschedule.models.AllocationStrategy":"Microsoft.ComputeSchedule.AllocationStrategy","com.azure.resourcemanager.computeschedule.models.ApiEntityReference":"Microsoft.ComputeSchedule.ApiEntityReference","com.azure.resourcemanager.computeschedule.models.ApplicationProfile":"Microsoft.ComputeSchedule.ApplicationProfile","com.azure.resourcemanager.computeschedule.models.BootDiagnostics":"Microsoft.ComputeSchedule.BootDiagnostics","com.azure.resourcemanager.computeschedule.models.BulkActionVMExtension":"Microsoft.ComputeSchedule.BulkActionVMExtension","com.azure.resourcemanager.computeschedule.models.BulkActionVMProfile":"Microsoft.ComputeSchedule.BulkActionVMProfile","com.azure.resourcemanager.computeschedule.models.BulkActionVMSpec":"Microsoft.ComputeSchedule.BulkActionVMSpec","com.azure.resourcemanager.computeschedule.models.BulkActionVmExtensionProperties":"Microsoft.ComputeSchedule.BulkActionVmExtensionProperties","com.azure.resourcemanager.computeschedule.models.BulkVMConfiguration":"Microsoft.ComputeSchedule.BulkVMConfiguration","com.azure.resourcemanager.computeschedule.models.CachingTypes":"Microsoft.ComputeSchedule.CachingTypes","com.azure.resourcemanager.computeschedule.models.CancelOccurrenceRequest":"Microsoft.ComputeSchedule.CancelOccurrenceRequest","com.azure.resourcemanager.computeschedule.models.CancelOperationsContent":"Microsoft.ComputeSchedule.CancelOperationsRequest","com.azure.resourcemanager.computeschedule.models.CapacityReservationProfile":"Microsoft.ComputeSchedule.CapacityReservationProfile","com.azure.resourcemanager.computeschedule.models.DataDisk":"Microsoft.ComputeSchedule.DataDisk","com.azure.resourcemanager.computeschedule.models.DeadlineType":"Microsoft.ComputeSchedule.DeadlineType","com.azure.resourcemanager.computeschedule.models.DelayRequest":"Microsoft.ComputeSchedule.DelayRequest","com.azure.resourcemanager.computeschedule.models.DeleteOptions":"Microsoft.ComputeSchedule.DeleteOptions","com.azure.resourcemanager.computeschedule.models.DiagnosticsProfile":"Microsoft.ComputeSchedule.DiagnosticsProfile","com.azure.resourcemanager.computeschedule.models.DiffDiskOptions":"Microsoft.ComputeSchedule.DiffDiskOptions","com.azure.resourcemanager.computeschedule.models.DiffDiskPlacement":"Microsoft.ComputeSchedule.DiffDiskPlacement","com.azure.resourcemanager.computeschedule.models.DiffDiskSettings":"Microsoft.ComputeSchedule.DiffDiskSettings","com.azure.resourcemanager.computeschedule.models.DiskControllerTypes":"Microsoft.ComputeSchedule.DiskControllerTypes","com.azure.resourcemanager.computeschedule.models.DiskCreateOptionTypes":"Microsoft.ComputeSchedule.DiskCreateOptionTypes","com.azure.resourcemanager.computeschedule.models.DiskDeleteOptionTypes":"Microsoft.ComputeSchedule.DiskDeleteOptionTypes","com.azure.resourcemanager.computeschedule.models.DiskDetachOptionTypes":"Microsoft.ComputeSchedule.DiskDetachOptionTypes","com.azure.resourcemanager.computeschedule.models.DiskEncryptionSetParameters":"Microsoft.ComputeSchedule.DiskEncryptionSetParameters","com.azure.resourcemanager.computeschedule.models.DiskEncryptionSettings":"Microsoft.ComputeSchedule.DiskEncryptionSettings","com.azure.resourcemanager.computeschedule.models.DistributionStrategy":"Microsoft.ComputeSchedule.DistributionStrategy","com.azure.resourcemanager.computeschedule.models.DomainNameLabelScopeTypes":"Microsoft.ComputeSchedule.DomainNameLabelScopeTypes","com.azure.resourcemanager.computeschedule.models.EncryptionIdentity":"Microsoft.ComputeSchedule.EncryptionIdentity","com.azure.resourcemanager.computeschedule.models.Error":"Azure.Core.Foundations.Error","com.azure.resourcemanager.computeschedule.models.EventGridAndResourceGraph":"Microsoft.ComputeSchedule.EventGridAndResourceGraph","com.azure.resourcemanager.computeschedule.models.ExecuteCreateContent":"Microsoft.ComputeSchedule.ExecuteCreateRequest","com.azure.resourcemanager.computeschedule.models.ExecuteCreateFlexContent":"Microsoft.ComputeSchedule.ExecuteCreateFlexRequest","com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateContent":"Microsoft.ComputeSchedule.ExecuteDeallocateRequest","com.azure.resourcemanager.computeschedule.models.ExecuteDeleteContent":"Microsoft.ComputeSchedule.ExecuteDeleteRequest","com.azure.resourcemanager.computeschedule.models.ExecuteHibernateContent":"Microsoft.ComputeSchedule.ExecuteHibernateRequest","com.azure.resourcemanager.computeschedule.models.ExecuteStartContent":"Microsoft.ComputeSchedule.ExecuteStartRequest","com.azure.resourcemanager.computeschedule.models.ExecutionParameters":"Microsoft.ComputeSchedule.ExecutionParameters","com.azure.resourcemanager.computeschedule.models.ExtendedLocation":"Azure.ResourceManager.CommonTypes.ExtendedLocation","com.azure.resourcemanager.computeschedule.models.ExtendedLocationType":"Azure.ResourceManager.CommonTypes.ExtendedLocationType","com.azure.resourcemanager.computeschedule.models.FallbackOperationInfo":"Microsoft.ComputeSchedule.FallbackOperationInfo","com.azure.resourcemanager.computeschedule.models.FlexProperties":"Microsoft.ComputeSchedule.FlexProperties","com.azure.resourcemanager.computeschedule.models.GetOperationErrorsContent":"Microsoft.ComputeSchedule.GetOperationErrorsRequest","com.azure.resourcemanager.computeschedule.models.GetOperationStatusContent":"Microsoft.ComputeSchedule.GetOperationStatusRequest","com.azure.resourcemanager.computeschedule.models.HostEndpointSettings":"Microsoft.ComputeSchedule.HostEndpointSettings","com.azure.resourcemanager.computeschedule.models.IPVersions":"Microsoft.ComputeSchedule.IPVersions","com.azure.resourcemanager.computeschedule.models.ImageReference":"Microsoft.ComputeSchedule.ImageReference","com.azure.resourcemanager.computeschedule.models.InnerError":"Azure.Core.Foundations.InnerError","com.azure.resourcemanager.computeschedule.models.KeyVaultKeyReference":"Microsoft.ComputeSchedule.KeyVaultKeyReference","com.azure.resourcemanager.computeschedule.models.KeyVaultSecretReference":"Microsoft.ComputeSchedule.KeyVaultSecretReference","com.azure.resourcemanager.computeschedule.models.Language":"Microsoft.ComputeSchedule.Language","com.azure.resourcemanager.computeschedule.models.LinuxConfiguration":"Microsoft.ComputeSchedule.LinuxConfiguration","com.azure.resourcemanager.computeschedule.models.LinuxPatchAssessmentMode":"Microsoft.ComputeSchedule.LinuxPatchAssessmentMode","com.azure.resourcemanager.computeschedule.models.LinuxPatchSettings":"Microsoft.ComputeSchedule.LinuxPatchSettings","com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting":"Microsoft.ComputeSchedule.LinuxVMGuestPatchAutomaticByPlatformRebootSetting","com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformSettings":"Microsoft.ComputeSchedule.LinuxVMGuestPatchAutomaticByPlatformSettings","com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchMode":"Microsoft.ComputeSchedule.LinuxVMGuestPatchMode","com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters":"Microsoft.ComputeSchedule.ManagedDiskParameters","com.azure.resourcemanager.computeschedule.models.Mode":"Microsoft.ComputeSchedule.Mode","com.azure.resourcemanager.computeschedule.models.Modes":"Microsoft.ComputeSchedule.Modes","com.azure.resourcemanager.computeschedule.models.Month":"Microsoft.ComputeSchedule.Month","com.azure.resourcemanager.computeschedule.models.NetworkApiVersion":"Microsoft.ComputeSchedule.NetworkApiVersion","com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliaryMode":"Microsoft.ComputeSchedule.NetworkInterfaceAuxiliaryMode","com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliarySku":"Microsoft.ComputeSchedule.NetworkInterfaceAuxiliarySku","com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference":"Microsoft.ComputeSchedule.NetworkInterfaceReference","com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties":"Microsoft.ComputeSchedule.NetworkInterfaceReferenceProperties","com.azure.resourcemanager.computeschedule.models.NetworkProfile":"Microsoft.ComputeSchedule.NetworkProfile","com.azure.resourcemanager.computeschedule.models.NotificationProperties":"Microsoft.ComputeSchedule.NotificationProperties","com.azure.resourcemanager.computeschedule.models.NotificationType":"Microsoft.ComputeSchedule.NotificationType","com.azure.resourcemanager.computeschedule.models.OSDisk":"Microsoft.ComputeSchedule.OSDisk","com.azure.resourcemanager.computeschedule.models.OSImageNotificationProfile":"Microsoft.ComputeSchedule.OSImageNotificationProfile","com.azure.resourcemanager.computeschedule.models.OSProfile":"Microsoft.ComputeSchedule.OSProfile","com.azure.resourcemanager.computeschedule.models.OccurrenceExtensionProperties":"Microsoft.ComputeSchedule.OccurrenceExtensionProperties","com.azure.resourcemanager.computeschedule.models.OccurrenceProperties":"Microsoft.ComputeSchedule.OccurrenceProperties","com.azure.resourcemanager.computeschedule.models.OccurrenceResultSummary":"Microsoft.ComputeSchedule.OccurrenceResultSummary","com.azure.resourcemanager.computeschedule.models.OccurrenceState":"Microsoft.ComputeSchedule.OccurrenceState","com.azure.resourcemanager.computeschedule.models.OperatingSystemTypes":"Microsoft.ComputeSchedule.OperatingSystemTypes","com.azure.resourcemanager.computeschedule.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.computeschedule.models.OperationErrorDetails":"Microsoft.ComputeSchedule.OperationErrorDetails","com.azure.resourcemanager.computeschedule.models.OperationErrorsResult":"Microsoft.ComputeSchedule.OperationErrorsResult","com.azure.resourcemanager.computeschedule.models.OperationState":"Microsoft.ComputeSchedule.OperationState","com.azure.resourcemanager.computeschedule.models.OptimizationPreference":"Microsoft.ComputeSchedule.OptimizationPreference","com.azure.resourcemanager.computeschedule.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.computeschedule.models.OsType":"Microsoft.ComputeSchedule.OsType","com.azure.resourcemanager.computeschedule.models.PatchSettings":"Microsoft.ComputeSchedule.PatchSettings","com.azure.resourcemanager.computeschedule.models.Placement":"Microsoft.ComputeSchedule.Placement","com.azure.resourcemanager.computeschedule.models.Plan":"Azure.ResourceManager.CommonTypes.Plan","com.azure.resourcemanager.computeschedule.models.PriorityProfile":"Microsoft.ComputeSchedule.PriorityProfile","com.azure.resourcemanager.computeschedule.models.PriorityType":"Microsoft.ComputeSchedule.PriorityType","com.azure.resourcemanager.computeschedule.models.ProtocolTypes":"Microsoft.ComputeSchedule.ProtocolTypes","com.azure.resourcemanager.computeschedule.models.ProvisioningState":"Microsoft.ComputeSchedule.ProvisioningState","com.azure.resourcemanager.computeschedule.models.ProxyAgentSettings":"Microsoft.ComputeSchedule.ProxyAgentSettings","com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku":"Microsoft.ComputeSchedule.PublicIPAddressSku","com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuName":"Microsoft.ComputeSchedule.PublicIPAddressSkuName","com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuTier":"Microsoft.ComputeSchedule.PublicIPAddressSkuTier","com.azure.resourcemanager.computeschedule.models.PublicIPAllocationMethod":"Microsoft.ComputeSchedule.PublicIPAllocationMethod","com.azure.resourcemanager.computeschedule.models.ResourceAttachRequest":"Microsoft.ComputeSchedule.ResourceAttachRequest","com.azure.resourcemanager.computeschedule.models.ResourceDetachRequest":"Microsoft.ComputeSchedule.ResourceDetachRequest","com.azure.resourcemanager.computeschedule.models.ResourceIdentityType":"Microsoft.ComputeSchedule.ResourceIdentityType","com.azure.resourcemanager.computeschedule.models.ResourceOperation":"Microsoft.ComputeSchedule.ResourceOperation","com.azure.resourcemanager.computeschedule.models.ResourceOperationDetails":"Microsoft.ComputeSchedule.ResourceOperationDetails","com.azure.resourcemanager.computeschedule.models.ResourceOperationError":"Microsoft.ComputeSchedule.ResourceOperationError","com.azure.resourcemanager.computeschedule.models.ResourceOperationStatus":"Microsoft.ComputeSchedule.ResourceOperationStatus","com.azure.resourcemanager.computeschedule.models.ResourceOperationType":"Microsoft.ComputeSchedule.ResourceOperationType","com.azure.resourcemanager.computeschedule.models.ResourcePatchRequest":"Microsoft.ComputeSchedule.ResourcePatchRequest","com.azure.resourcemanager.computeschedule.models.ResourceProvisionFlexPayload":"Microsoft.ComputeSchedule.ResourceProvisionFlexPayload","com.azure.resourcemanager.computeschedule.models.ResourceProvisionPayload":"Microsoft.ComputeSchedule.ResourceProvisionPayload","com.azure.resourcemanager.computeschedule.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.computeschedule.models.ResourceResultSummary":"Microsoft.ComputeSchedule.ResourceResultSummary","com.azure.resourcemanager.computeschedule.models.ResourceStatus":"Microsoft.ComputeSchedule.ResourceStatus","com.azure.resourcemanager.computeschedule.models.ResourceType":"Microsoft.ComputeSchedule.ResourceType","com.azure.resourcemanager.computeschedule.models.Resources":"Microsoft.ComputeSchedule.Resources","com.azure.resourcemanager.computeschedule.models.RetryPolicy":"Microsoft.ComputeSchedule.RetryPolicy","com.azure.resourcemanager.computeschedule.models.Schedule":"Microsoft.ComputeSchedule.Schedule","com.azure.resourcemanager.computeschedule.models.ScheduledActionProperties":"Microsoft.ComputeSchedule.ScheduledActionProperties","com.azure.resourcemanager.computeschedule.models.ScheduledActionType":"Microsoft.ComputeSchedule.ActionType","com.azure.resourcemanager.computeschedule.models.ScheduledActionUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.computeschedule.models.ScheduledActionUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.computeschedule.models.ScheduledActionsExtensionProperties":"Microsoft.ComputeSchedule.ScheduledActionsExtensionProperties","com.azure.resourcemanager.computeschedule.models.ScheduledActionsSchedule":"Microsoft.ComputeSchedule.ScheduledActionsSchedule","com.azure.resourcemanager.computeschedule.models.ScheduledEventsAdditionalPublishingTargets":"Microsoft.ComputeSchedule.ScheduledEventsAdditionalPublishingTargets","com.azure.resourcemanager.computeschedule.models.ScheduledEventsPolicy":"Microsoft.ComputeSchedule.ScheduledEventsPolicy","com.azure.resourcemanager.computeschedule.models.ScheduledEventsProfile":"Microsoft.ComputeSchedule.ScheduledEventsProfile","com.azure.resourcemanager.computeschedule.models.SecurityEncryptionTypes":"Microsoft.ComputeSchedule.SecurityEncryptionTypes","com.azure.resourcemanager.computeschedule.models.SecurityProfile":"Microsoft.ComputeSchedule.SecurityProfile","com.azure.resourcemanager.computeschedule.models.SecurityTypes":"Microsoft.ComputeSchedule.SecurityTypes","com.azure.resourcemanager.computeschedule.models.SettingNames":"Microsoft.ComputeSchedule.SettingNames","com.azure.resourcemanager.computeschedule.models.SshConfiguration":"Microsoft.ComputeSchedule.SshConfiguration","com.azure.resourcemanager.computeschedule.models.SshPublicKey":"Microsoft.ComputeSchedule.SshPublicKey","com.azure.resourcemanager.computeschedule.models.StorageAccountTypes":"Microsoft.ComputeSchedule.StorageAccountTypes","com.azure.resourcemanager.computeschedule.models.StorageProfile":"Microsoft.ComputeSchedule.StorageProfile","com.azure.resourcemanager.computeschedule.models.SubmitDeallocateContent":"Microsoft.ComputeSchedule.SubmitDeallocateRequest","com.azure.resourcemanager.computeschedule.models.SubmitHibernateContent":"Microsoft.ComputeSchedule.SubmitHibernateRequest","com.azure.resourcemanager.computeschedule.models.SubmitStartContent":"Microsoft.ComputeSchedule.SubmitStartRequest","com.azure.resourcemanager.computeschedule.models.TerminateNotificationProfile":"Microsoft.ComputeSchedule.TerminateNotificationProfile","com.azure.resourcemanager.computeschedule.models.UefiSettings":"Microsoft.ComputeSchedule.UefiSettings","com.azure.resourcemanager.computeschedule.models.UserAssignedIdentitiesValue":"Microsoft.ComputeSchedule.UserAssignedIdentitiesValue","com.azure.resourcemanager.computeschedule.models.UserInitiatedReboot":"Microsoft.ComputeSchedule.UserInitiatedReboot","com.azure.resourcemanager.computeschedule.models.UserInitiatedRedeploy":"Microsoft.ComputeSchedule.UserInitiatedRedeploy","com.azure.resourcemanager.computeschedule.models.VMDiskSecurityProfile":"Microsoft.ComputeSchedule.VMDiskSecurityProfile","com.azure.resourcemanager.computeschedule.models.VMGalleryApplication":"Microsoft.ComputeSchedule.VMGalleryApplication","com.azure.resourcemanager.computeschedule.models.VaultCertificate":"Microsoft.ComputeSchedule.VaultCertificate","com.azure.resourcemanager.computeschedule.models.VaultSecretGroup":"Microsoft.ComputeSchedule.VaultSecretGroup","com.azure.resourcemanager.computeschedule.models.VirtualHardDisk":"Microsoft.ComputeSchedule.VirtualHardDisk","com.azure.resourcemanager.computeschedule.models.VirtualMachineIdentity":"Microsoft.ComputeSchedule.VirtualMachineIdentity","com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag":"Microsoft.ComputeSchedule.VirtualMachineIpTag","com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfiguration":"Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceConfiguration","com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfigurationProperties":"Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceConfigurationProperties","com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration":"Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceDnsSettingsConfiguration","com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfiguration":"Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceIPConfiguration","com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties":"Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceIPConfigurationProperties","com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfiguration":"Microsoft.ComputeSchedule.VirtualMachinePublicIPAddressConfiguration","com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties":"Microsoft.ComputeSchedule.VirtualMachinePublicIPAddressConfigurationProperties","com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration":"Microsoft.ComputeSchedule.VirtualMachinePublicIPAddressDnsSettingsConfiguration","com.azure.resourcemanager.computeschedule.models.VmSizeProfile":"Microsoft.ComputeSchedule.VmSizeProfile","com.azure.resourcemanager.computeschedule.models.WeekDay":"Microsoft.ComputeSchedule.WeekDay","com.azure.resourcemanager.computeschedule.models.WinRMConfiguration":"Microsoft.ComputeSchedule.WinRMConfiguration","com.azure.resourcemanager.computeschedule.models.WinRMListener":"Microsoft.ComputeSchedule.WinRMListener","com.azure.resourcemanager.computeschedule.models.WindowsConfiguration":"Microsoft.ComputeSchedule.WindowsConfiguration","com.azure.resourcemanager.computeschedule.models.WindowsPatchAssessmentMode":"Microsoft.ComputeSchedule.WindowsPatchAssessmentMode","com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting":"Microsoft.ComputeSchedule.WindowsVMGuestPatchAutomaticByPlatformRebootSetting","com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformSettings":"Microsoft.ComputeSchedule.WindowsVMGuestPatchAutomaticByPlatformSettings","com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchMode":"Microsoft.ComputeSchedule.WindowsVMGuestPatchMode","com.azure.resourcemanager.computeschedule.models.ZoneAllocationPolicy":"Microsoft.ComputeSchedule.ZoneAllocationPolicy","com.azure.resourcemanager.computeschedule.models.ZonePlacementPolicyType":"Microsoft.ComputeSchedule.ZonePlacementPolicyType","com.azure.resourcemanager.computeschedule.models.ZonePreference":"Microsoft.ComputeSchedule.ZonePreference"},"generatedFiles":["src/main/java/com/azure/resourcemanager/computeschedule/ComputeScheduleManager.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/ComputeScheduleMgmtClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/OccurrenceExtensionsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/OccurrencesClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionExtensionsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CancelOperationsResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateFlexResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/DeallocateResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/DeleteResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationErrorsResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationStatusResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/HibernateResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OccurrenceExtensionResourceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OccurrenceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OccurrenceResourceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/RecurringActionsResourceOperationResultInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/ScheduledActionInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/ScheduledActionResourceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/ScheduledActionResourcesInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/StartResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/CancelOperationsResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateFlexResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/DeallocateResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/DeleteResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationErrorsResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/HibernateResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceExtensionResourceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceExtensionsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceResourceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrencesClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrencesImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/RecurringActionsResourceOperationResultImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionExtensionsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionResourceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionResourcesImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/StartResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OccurrenceExtensionResourceListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OccurrenceListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OccurrenceResourceListResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/ResourceListResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/ScheduledActionListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/ScheduledActionResourcesListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ActionType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalCapabilities.java","src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentComponentName.java","src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentPassName.java","src/main/java/com/azure/resourcemanager/computeschedule/models/AllInstancesDown.java","src/main/java/com/azure/resourcemanager/computeschedule/models/AllocationStrategy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ApiEntityReference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ApplicationProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/BootDiagnostics.java","src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMExtension.java","src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMSpec.java","src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVmExtensionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/BulkVMConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CachingTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOccurrenceRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CapacityReservationProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CreateFlexResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CreateResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DataDisk.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeadlineType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeallocateResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DelayRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteOptions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiagnosticsProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskOptions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskPlacement.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiskControllerTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiskCreateOptionTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDeleteOptionTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDetachOptionTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSetParameters.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DistributionStrategy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DomainNameLabelScopeTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Error.java","src/main/java/com/azure/resourcemanager/computeschedule/models/EventGridAndResourceGraph.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateFlexContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeleteContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecutionParameters.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocationType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/FallbackOperationInfo.java","src/main/java/com/azure/resourcemanager/computeschedule/models/FlexProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/HibernateResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/HostEndpointSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/IPVersions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ImageReference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/InnerError.java","src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultKeyReference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultSecretReference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Language.java","src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchAssessmentMode.java","src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformRebootSetting.java","src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchMode.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ManagedDiskParameters.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Mode.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Modes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Month.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkApiVersion.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliaryMode.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliarySku.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReferenceProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NotificationProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NotificationType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OSDisk.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OSImageNotificationProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OSProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Occurrence.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceExtensionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceExtensionResource.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceExtensions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceResource.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceResultSummary.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Occurrences.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperatingSystemTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Operation.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorDetails.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorsResult.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Operations.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OptimizationPreference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Origin.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OsType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PatchSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Placement.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Plan.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ProtocolTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ProxyAgentSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSku.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuName.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuTier.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAllocationMethod.java","src/main/java/com/azure/resourcemanager/computeschedule/models/RecurringActionsResourceOperationResult.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceAttachRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceDetachRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperation.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationError.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationStatus.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourcePatchRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionFlexPayload.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionPayload.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceResultSummary.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceStatus.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Resources.java","src/main/java/com/azure/resourcemanager/computeschedule/models/RetryPolicy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Schedule.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledAction.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionExtensions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionResource.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionResources.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionUpdate.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionUpdateProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionsExtensionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionsSchedule.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsAdditionalPublishingTargets.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsPolicy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityEncryptionTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SettingNames.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SshConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SshPublicKey.java","src/main/java/com/azure/resourcemanager/computeschedule/models/StartResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/StorageAccountTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/StorageProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitDeallocateContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitHibernateContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitStartContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/TerminateNotificationProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/UefiSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/UserAssignedIdentitiesValue.java","src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedReboot.java","src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedRedeploy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VMDiskSecurityProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VMGalleryApplication.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VaultCertificate.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VaultSecretGroup.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualHardDisk.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIdentity.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIpTag.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfigurationProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfigurationProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WeekDay.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMListener.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsPatchAssessmentMode.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformRebootSetting.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchMode.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ZoneAllocationPolicy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePlacementPolicyType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePreference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrenceExtensionListOccurrenceByVmsSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrenceExtensionListOccurrenceByVmsSamples.java index 2ecd9ac83a62..11f1cf4cd66d 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrenceExtensionListOccurrenceByVmsSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrenceExtensionListOccurrenceByVmsSamples.java @@ -9,7 +9,23 @@ */ public final class OccurrenceExtensionListOccurrenceByVmsSamples { /* - * x-ms-original-file: 2025-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MinimumSet_Gen.json + */ + /** + * Sample code: OccurrenceExtension_ListOccurrenceByVms_MinimumSet. + * + * @param manager Entry point to ComputeScheduleManager. + */ + public static void occurrenceExtensionListOccurrenceByVmsMinimumSet( + com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { + manager.occurrenceExtensions() + .listOccurrenceByVms( + "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MaximumSet_Gen.json */ /** * Sample code: OccurrenceExtension_ListOccurrenceByVms_MaximumSet. @@ -18,6 +34,9 @@ public final class OccurrenceExtensionListOccurrenceByVmsSamples { */ public static void occurrenceExtensionListOccurrenceByVmsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.occurrenceExtensions().listOccurrenceByVms("sazvpabfud", com.azure.core.util.Context.NONE); + manager.occurrenceExtensions() + .listOccurrenceByVms( + "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesCancelSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesCancelSamples.java index f58689516e1a..fb19c5dec428 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesCancelSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesCancelSamples.java @@ -12,7 +12,7 @@ */ public final class OccurrencesCancelSamples { /* - * x-ms-original-file: 2025-04-15-preview/Occurrences_Cancel_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Occurrences_Cancel_MaximumSet_Gen.json */ /** * Sample code: Occurrences_Cancel_MaximumSet. @@ -22,9 +22,9 @@ public final class OccurrencesCancelSamples { public static void occurrencesCancelMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .cancelWithResponse("rgcomputeschedule", "myScheduledAction", "CB26D7CB-3E27-465F-99C8-EAF7A4118245", + .cancelWithResponse("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", new CancelOccurrenceRequest().withResourceIds(Arrays.asList( - "/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesDelaySamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesDelaySamples.java index 733df23be869..5b94b553759f 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesDelaySamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesDelaySamples.java @@ -13,7 +13,7 @@ */ public final class OccurrencesDelaySamples { /* - * x-ms-original-file: 2025-04-15-preview/Occurrences_Delay_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Occurrences_Delay_MaximumSet_Gen.json */ /** * Sample code: Occurrences_Delay_MaximumSet. @@ -23,10 +23,10 @@ public final class OccurrencesDelaySamples { public static void occurrencesDelayMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .delay("rgcomputeschedule", "myScheduledAction", "CB26D7CB-3E27-465F-99C8-EAF7A4118245", new DelayRequest() - .withDelay(OffsetDateTime.parse("2025-05-22T17:00:00.000-07:00")) - .withResourceIds(Arrays.asList( - "/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), + .delay("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", + new DelayRequest().withDelay(OffsetDateTime.parse("2026-03-12T02:39:48.148Z")) + .withResourceIds(Arrays.asList( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesGetSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesGetSamples.java index 6cb0eb132da8..52493bd9cfc5 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesGetSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesGetSamples.java @@ -9,7 +9,7 @@ */ public final class OccurrencesGetSamples { /* - * x-ms-original-file: 2025-04-15-preview/Occurrences_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Occurrences_Get_MaximumSet_Gen.json */ /** * Sample code: Occurrences_Get_MaximumSet. @@ -19,7 +19,7 @@ public final class OccurrencesGetSamples { public static void occurrencesGetMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .getWithResponse("rgcomputeschedule", "myScheduledAction", "67b5bada-4772-43fc-8dbb-402476d98a45", + .getWithResponse("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListByScheduledActionSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListByScheduledActionSamples.java index 92dd181527c5..40b3f8e91f0d 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListByScheduledActionSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListByScheduledActionSamples.java @@ -9,7 +9,7 @@ */ public final class OccurrencesListByScheduledActionSamples { /* - * x-ms-original-file: 2025-04-15-preview/Occurrences_ListByScheduledAction_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Occurrences_ListByScheduledAction_MaximumSet_Gen.json */ /** * Sample code: Occurrences_ListByScheduledAction_MaximumSet. @@ -19,6 +19,6 @@ public final class OccurrencesListByScheduledActionSamples { public static void occurrencesListByScheduledActionMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .listByScheduledAction("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); + .listByScheduledAction("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListResourcesSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListResourcesSamples.java index e259bd5b5c02..cc61a84ffc52 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListResourcesSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListResourcesSamples.java @@ -9,7 +9,7 @@ */ public final class OccurrencesListResourcesSamples { /* - * x-ms-original-file: 2025-04-15-preview/Occurrences_ListResources_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Occurrences_ListResources_MaximumSet_Gen.json */ /** * Sample code: Occurrences_ListResources_MaximumSet. @@ -19,7 +19,7 @@ public final class OccurrencesListResourcesSamples { public static void occurrencesListResourcesMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .listResources("rgcomputeschedule", "myScheduledAction", "CB26D7CB-3E27-465F-99C8-EAF7A4118245", + .listResources("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OperationsListSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OperationsListSamples.java index 896ac158d38e..e8aedf45935f 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OperationsListSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-04-15-preview/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Operations_List_MinimumSet_Gen.json */ /** * Sample code: Operations_List_MinimumSet. @@ -22,7 +22,7 @@ public final class OperationsListSamples { } /* - * x-ms-original-file: 2025-04-15-preview/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List_MaximumSet. diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionListByVmsSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionListByVmsSamples.java index 7aa9fb7fce7e..6d1574c3b682 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionListByVmsSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionListByVmsSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionExtensionListByVmsSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActionExtension_ListByVms_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActionExtension_ListByVms_MaximumSet_Gen.json */ /** * Sample code: ScheduledActionExtension_ListByVms_MaximumSet. @@ -18,11 +18,14 @@ public final class ScheduledActionExtensionListByVmsSamples { */ public static void scheduledActionExtensionListByVmsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActionExtensions().listByVms("sazvpabfud", com.azure.core.util.Context.NONE); + manager.scheduledActionExtensions() + .listByVms( + "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActionExtension_ListByVms_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActionExtension_ListByVms_MinimumSet_Gen.json */ /** * Sample code: ScheduledActionExtension_ListByVms_MinimumSet. @@ -31,6 +34,9 @@ public static void scheduledActionExtensionListByVmsMaximumSet( */ public static void scheduledActionExtensionListByVmsMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActionExtensions().listByVms("sazvpabfud", com.azure.core.util.Context.NONE); + manager.scheduledActionExtensions() + .listByVms( + "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsAttachResourcesSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsAttachResourcesSamples.java index e89b4b1acc67..f9ddb9ec79ad 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsAttachResourcesSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsAttachResourcesSamples.java @@ -16,7 +16,7 @@ */ public final class ScheduledActionsAttachResourcesSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_AttachResources_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_AttachResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_AttachResources_MaximumSet. @@ -26,11 +26,11 @@ public final class ScheduledActionsAttachResourcesSamples { public static void scheduledActionsAttachResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .attachResourcesWithResponse("rgcomputeschedule", "myScheduledAction", new ResourceAttachRequest() + .attachResourcesWithResponse("rgcomputeschedule", "scheduled-action-01", new ResourceAttachRequest() .withResources(Arrays.asList(new ScheduledActionResourceInner().withResourceId( "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm") .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") + Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))))), diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCancelNextOccurrenceSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCancelNextOccurrenceSamples.java index 98daefc84b5e..34226b4a2408 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCancelNextOccurrenceSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCancelNextOccurrenceSamples.java @@ -12,7 +12,7 @@ */ public final class ScheduledActionsCancelNextOccurrenceSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_CancelNextOccurrence_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_CancelNextOccurrence_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_CancelNextOccurrence_MaximumSet. @@ -22,9 +22,9 @@ public final class ScheduledActionsCancelNextOccurrenceSamples { public static void scheduledActionsCancelNextOccurrenceMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .cancelNextOccurrenceWithResponse("rgcomputeschedule", "myScheduledAction", + .cancelNextOccurrenceWithResponse("rgcomputeschedule", "scheduled-action-01", new CancelOccurrenceRequest().withResourceIds(Arrays.asList( - "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateSamples.java index 40b0ec095c6a..1ca8c520c9c5 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateSamples.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionProperties; @@ -27,7 +28,7 @@ */ public final class ScheduledActionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_CreateOrUpdate_MaximumSet. @@ -37,25 +38,27 @@ public final class ScheduledActionsCreateOrUpdateSamples { public static void scheduledActionsCreateOrUpdateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .define("myScheduledAction") - .withRegion("vmuhgdgipeypkcv") + .define("scheduled-action-01") + .withRegion("eastus2") .withExistingResourceGroup("rgcomputeschedule") - .withTags(mapOf("key2102", "fakeTokenPlaceholder")) + .withTags(mapOf("environment", "production")) .withProperties(new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2025-04-17T00:23:55.281Z")) - .withEndTime(OffsetDateTime.parse("2025-04-17T00:23:55.286Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("19:00:00") - .withTimeZone("g") + .withStartTime(OffsetDateTime.parse("2026-03-12T02:39:45.061Z")) + .withEndTime(OffsetDateTime.parse("2026-03-12T02:39:45.062Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("12:00:00") + .withTimeZone("America/Los_Angeles") .withRequestedWeekDays(Arrays.asList(WeekDay.MONDAY)) .withRequestedMonths(Arrays.asList(Month.JANUARY)) - .withRequestedDaysOfTheMonth(Arrays.asList(15)) + .withRequestedDaysOfTheMonth(Arrays.asList(1)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withDeadlineType(DeadlineType.UNKNOWN)) .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") + Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))) diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDeleteSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDeleteSamples.java index a3c077a3b392..f1e1133a86d7 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDeleteSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsDeleteSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Delete_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Delete_MaximumSet. @@ -18,6 +18,6 @@ public final class ScheduledActionsDeleteSamples { */ public static void scheduledActionsDeleteMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActions().delete("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); + manager.scheduledActions().delete("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDetachResourcesSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDetachResourcesSamples.java index 6808b7e60b14..e4ccd2e1c707 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDetachResourcesSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDetachResourcesSamples.java @@ -12,7 +12,7 @@ */ public final class ScheduledActionsDetachResourcesSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_DetachResources_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_DetachResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_DetachResources_MaximumSet. @@ -22,9 +22,9 @@ public final class ScheduledActionsDetachResourcesSamples { public static void scheduledActionsDetachResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .detachResourcesWithResponse("rgcomputeschedule", "myScheduledAction", + .detachResourcesWithResponse("rgcomputeschedule", "scheduled-action-01", new ResourceDetachRequest().withResources(Arrays.asList( - "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableSamples.java index 9014702ebd93..541b0ecc24c9 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsDisableSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Disable_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Disable_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Disable_MaximumSet. @@ -19,6 +19,6 @@ public final class ScheduledActionsDisableSamples { public static void scheduledActionsDisableMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .disableWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); + .disableWithResponse("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableSamples.java index a8eab723c23a..ef2b78c8df95 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsEnableSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Enable_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Enable_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Enable_MaximumSet. @@ -19,6 +19,6 @@ public final class ScheduledActionsEnableSamples { public static void scheduledActionsEnableMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .enableWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); + .enableWithResponse("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupSamples.java index 7f1cf4ff3db8..6e7debac4332 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Get_MaximumSet. @@ -19,6 +19,7 @@ public final class ScheduledActionsGetByResourceGroupSamples { public static void scheduledActionsGetMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .getByResourceGroupWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("rgcomputeschedule", "scheduled-action-01", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupSamples.java index dec17df19a46..3b9356fe8abd 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_ListByResourceGroup_MaximumSet. @@ -22,7 +22,7 @@ public static void scheduledActionsListByResourceGroupMaximumSet( } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListByResourceGroup_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_ListByResourceGroup_MinimumSet. diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesSamples.java index 14ca5c64fc4d..67c0afebe922 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsListResourcesSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListResources_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_ListResources_MaximumSet. @@ -19,6 +19,6 @@ public final class ScheduledActionsListResourcesSamples { public static void scheduledActionsListResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .listResources("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); + .listResources("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListSamples.java index 5e2275defbc4..827a9efc6580 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsListSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_ListBySubscription_MaximumSet. @@ -22,7 +22,7 @@ public static void scheduledActionsListBySubscriptionMaximumSet( } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListBySubscription_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListBySubscription_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_ListBySubscription_MinimumSet. diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsPatchResourcesSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsPatchResourcesSamples.java index bd366195a363..258742cfad4c 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsPatchResourcesSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsPatchResourcesSamples.java @@ -16,7 +16,7 @@ */ public final class ScheduledActionsPatchResourcesSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_PatchResources_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_PatchResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_PatchResources_MaximumSet. @@ -26,11 +26,11 @@ public final class ScheduledActionsPatchResourcesSamples { public static void scheduledActionsPatchResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .patchResourcesWithResponse("rgcomputeschedule", "myScheduledAction", new ResourcePatchRequest() + .patchResourcesWithResponse("rgcomputeschedule", "scheduled-action-01", new ResourcePatchRequest() .withResources(Arrays.asList(new ScheduledActionResourceInner().withResourceId( "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm") .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") + Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))))), diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsTriggerManualOccurrenceSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsTriggerManualOccurrenceSamples.java index 0190d99631c6..12717ebca478 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsTriggerManualOccurrenceSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsTriggerManualOccurrenceSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsTriggerManualOccurrenceSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_TriggerManualOccurrence_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_TriggerManualOccurrence_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_TriggerManualOccurrence_MaximumSet. @@ -19,7 +19,7 @@ public final class ScheduledActionsTriggerManualOccurrenceSamples { public static void scheduledActionsTriggerManualOccurrenceMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .triggerManualOccurrenceWithResponse("rgcomputeschedule", "myScheduledAction", + .triggerManualOccurrenceWithResponse("rgcomputeschedule", "my-scheduled-action", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsUpdateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsUpdateSamples.java index 47b0a26f26c0..c79b2672087a 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsUpdateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsUpdateSamples.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledAction; @@ -28,7 +29,7 @@ */ public final class ScheduledActionsUpdateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Update_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Update_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Update_MaximumSet. @@ -38,25 +39,28 @@ public final class ScheduledActionsUpdateSamples { public static void scheduledActionsUpdateMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { ScheduledAction resource = manager.scheduledActions() - .getByResourceGroupWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("rgcomputeschedule", "scheduled-action-01", + com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key9989", "fakeTokenPlaceholder")) + .withTags(mapOf("environment", "staging")) .withProperties(new ScheduledActionUpdateProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2025-04-17T00:23:58.149Z")) - .withEndTime(OffsetDateTime.parse("2025-04-17T00:23:58.149Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("19:00:00") - .withTimeZone("bni") + .withStartTime(OffsetDateTime.parse("2026-03-12T02:39:45.818Z")) + .withEndTime(OffsetDateTime.parse("2026-03-12T02:39:45.818Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("12:00:00") + .withTimeZone("America/Los_Angeles") .withRequestedWeekDays(Arrays.asList(WeekDay.MONDAY)) .withRequestedMonths(Arrays.asList(Month.JANUARY)) - .withRequestedDaysOfTheMonth(Arrays.asList(15)) + .withRequestedDaysOfTheMonth(Arrays.asList(1)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withDeadlineType(DeadlineType.UNKNOWN)) .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") + Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))) diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesCancelOperationsSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesCancelOperationsSamples.java index 8347823d8de6..3819e751e7e8 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesCancelOperationsSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesCancelOperationsSamples.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.computeschedule.generated; -import com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest; +import com.azure.resourcemanager.computeschedule.models.CancelOperationsContent; import java.util.Arrays; /** @@ -12,7 +12,7 @@ */ public final class ScheduledActionsVirtualMachinesCancelOperationsSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesCancelOperations_MinimumSet. @@ -22,14 +22,14 @@ public final class ScheduledActionsVirtualMachinesCancelOperationsSamples { public static void scheduledActionsVirtualMachinesCancelOperationsMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesCancelOperationsWithResponse("fhdunfivmjiltaiakwhhwdgemfcld", - new CancelOperationsRequest().withOperationIds(Arrays.asList("b211f086-4b91-4686-a453-2f5c012e4d80")) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), + .virtualMachinesCancelOperationsWithResponse("eastus2", + new CancelOperationsContent().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesCancelOperations_MaximumSet. @@ -39,9 +39,9 @@ public static void scheduledActionsVirtualMachinesCancelOperationsMinimumSet( public static void scheduledActionsVirtualMachinesCancelOperationsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesCancelOperationsWithResponse("nivsvluajruxhmsfgmxjnl", - new CancelOperationsRequest().withOperationIds(Arrays.asList("b211f086-4b91-4686-a453-2f5c012e4d80")) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), + .virtualMachinesCancelOperationsWithResponse("eastus2", + new CancelOperationsContent().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateFlexSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateFlexSamples.java new file mode 100644 index 000000000000..6de9f5781a7a --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateFlexSamples.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.resourcemanager.computeschedule.models.AdditionalCapabilities; +import com.azure.resourcemanager.computeschedule.models.AllocationStrategy; +import com.azure.resourcemanager.computeschedule.models.BootDiagnostics; +import com.azure.resourcemanager.computeschedule.models.BulkActionVMExtension; +import com.azure.resourcemanager.computeschedule.models.BulkActionVMProfile; +import com.azure.resourcemanager.computeschedule.models.BulkActionVMSpec; +import com.azure.resourcemanager.computeschedule.models.BulkActionVmExtensionProperties; +import com.azure.resourcemanager.computeschedule.models.BulkVMConfiguration; +import com.azure.resourcemanager.computeschedule.models.CachingTypes; +import com.azure.resourcemanager.computeschedule.models.DataDisk; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.DiagnosticsProfile; +import com.azure.resourcemanager.computeschedule.models.DiskControllerTypes; +import com.azure.resourcemanager.computeschedule.models.DiskCreateOptionTypes; +import com.azure.resourcemanager.computeschedule.models.DiskDeleteOptionTypes; +import com.azure.resourcemanager.computeschedule.models.DistributionStrategy; +import com.azure.resourcemanager.computeschedule.models.ExecuteCreateFlexContent; +import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.FlexProperties; +import com.azure.resourcemanager.computeschedule.models.ImageReference; +import com.azure.resourcemanager.computeschedule.models.LinuxConfiguration; +import com.azure.resourcemanager.computeschedule.models.LinuxPatchAssessmentMode; +import com.azure.resourcemanager.computeschedule.models.LinuxPatchSettings; +import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchMode; +import com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; +import com.azure.resourcemanager.computeschedule.models.NetworkProfile; +import com.azure.resourcemanager.computeschedule.models.OSDisk; +import com.azure.resourcemanager.computeschedule.models.OSProfile; +import com.azure.resourcemanager.computeschedule.models.OperatingSystemTypes; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.OsType; +import com.azure.resourcemanager.computeschedule.models.PriorityProfile; +import com.azure.resourcemanager.computeschedule.models.PriorityType; +import com.azure.resourcemanager.computeschedule.models.ResourceIdentityType; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; +import com.azure.resourcemanager.computeschedule.models.ResourceProvisionFlexPayload; +import com.azure.resourcemanager.computeschedule.models.RetryPolicy; +import com.azure.resourcemanager.computeschedule.models.SecurityProfile; +import com.azure.resourcemanager.computeschedule.models.SecurityTypes; +import com.azure.resourcemanager.computeschedule.models.SshConfiguration; +import com.azure.resourcemanager.computeschedule.models.SshPublicKey; +import com.azure.resourcemanager.computeschedule.models.StorageAccountTypes; +import com.azure.resourcemanager.computeschedule.models.StorageProfile; +import com.azure.resourcemanager.computeschedule.models.UefiSettings; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineIdentity; +import com.azure.resourcemanager.computeschedule.models.VmSizeProfile; +import com.azure.resourcemanager.computeschedule.models.ZoneAllocationPolicy; +import com.azure.resourcemanager.computeschedule.models.ZonePreference; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ScheduledActions VirtualMachinesExecuteCreateFlex. + */ +public final class ScheduledActionsVirtualMachinesExecuteCreateFlexSamples { + /* + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreateFlex_MaximumSet_Gen.json + */ + /** + * Sample code: ScheduledActions_VirtualMachinesExecuteCreateFlex_MaximumSet. + * + * @param manager Entry point to ComputeScheduleManager. + */ + public static void scheduledActionsVirtualMachinesExecuteCreateFlexMaximumSet( + com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { + manager.scheduledActions() + .virtualMachinesExecuteCreateFlexWithResponse("eastus2", + new ExecuteCreateFlexContent() + .withResourceConfigParameters( + new ResourceProvisionFlexPayload() + .withBaseProfile( + new BulkVMConfiguration() + .withVmProperties(new BulkActionVMSpec().withZones(Arrays.asList("1")) + .withIdentity( + new VirtualMachineIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .withTags(mapOf("environment", "production", "department", "engineering")) + .withVmProperties(new BulkActionVMProfile() + .withStorageProfile(new StorageProfile() + .withImageReference(new ImageReference().withPublisher("Canonical") + .withOffer("0001-com-ubuntu-server-jammy") + .withSku("22_04-lts-gen2") + .withVersion("latest")) + .withOsDisk(new OSDisk().withOsType(OperatingSystemTypes.LINUX) + .withName("myOsDisk") + .withCaching(CachingTypes.READ_WRITE) + .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) + .withDiskSizeGB(128) + .withManagedDisk(new ManagedDiskParameters() + .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) + .withDeleteOption(DiskDeleteOptionTypes.DELETE)) + .withDataDisks( + Arrays.asList(new DataDisk().withLun(0) + .withName("myDataDisk-0") + .withCaching(CachingTypes.READ_ONLY) + .withCreateOption(DiskCreateOptionTypes.EMPTY) + .withDiskSizeGB(256) + .withManagedDisk( + new ManagedDiskParameters().withStorageAccountType( + StorageAccountTypes.PREMIUM_LRS)) + .withDeleteOption(DiskDeleteOptionTypes.DELETE))) + .withDiskControllerType(DiskControllerTypes.SCSI)) + .withAdditionalCapabilities( + new AdditionalCapabilities().withUltraSSDEnabled(false) + .withHibernationEnabled(false)) + .withOsProfile(new OSProfile().withComputerName("myFlexVM") + .withAdminUsername("azureuser") + .withLinuxConfiguration( + new LinuxConfiguration().withDisablePasswordAuthentication(true) + .withSsh(new SshConfiguration() + .withPublicKeys(Arrays.asList(new SshPublicKey() + .withPath("/home/azureuser/.ssh/authorized_keys") + .withKeyData("fakeTokenPlaceholder")))) + .withProvisionVMAgent(true) + .withPatchSettings(new LinuxPatchSettings() + .withPatchMode(LinuxVMGuestPatchMode.AUTOMATIC_BY_PLATFORM) + .withAssessmentMode( + LinuxPatchAssessmentMode.AUTOMATIC_BY_PLATFORM))) + .withAllowExtensionOperations(true)) + .withNetworkProfile(new NetworkProfile().withNetworkInterfaces( + Arrays.asList(new NetworkInterfaceReference().withId( + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic") + .withProperties( + new NetworkInterfaceReferenceProperties().withPrimary(true) + .withDeleteOption(DeleteOptions.DELETE))))) + .withSecurityProfile(new SecurityProfile() + .withUefiSettings(new UefiSettings().withSecureBootEnabled(true) + .withVTpmEnabled(true)) + .withSecurityType(SecurityTypes.TRUSTED_LAUNCH)) + .withDiagnosticsProfile(new DiagnosticsProfile() + .withBootDiagnostics(new BootDiagnostics().withEnabled(true))))) + .withExtensions( + Arrays.asList(new BulkActionVMExtension().withName("AzureMonitorLinuxAgent") + .withProperties(new BulkActionVmExtensionProperties() + .withPublisher("Microsoft.Azure.Monitor") + .withType("AzureMonitorLinuxAgent") + .withTypeHandlerVersion("1.0") + .withAutoUpgradeMinorVersion(true) + .withEnableAutomaticUpgrade(true) + .withSettings(mapOf()) + .withSuppressFailures(false)))) + .withComputeApiVersion("2024-07-01") + .withName("baseFlexVmConfig")) + .withResourceOverrides(Arrays.asList(new BulkVMConfiguration() + .withVmProperties(new BulkActionVMSpec().withZones(Arrays.asList("2")) + .withTags(mapOf("environment", "production", "department", "engineering", "role", + "web-server")) + .withVmProperties(new BulkActionVMProfile() + .withStorageProfile(new StorageProfile().withOsDisk( + new OSDisk() + .withOsType(OperatingSystemTypes.LINUX) + .withName("overrideOsDisk") + .withCaching(CachingTypes.READ_WRITE) + .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) + .withDiskSizeGB(256) + .withManagedDisk(new ManagedDiskParameters() + .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) + .withDeleteOption(DiskDeleteOptionTypes.DELETE))) + .withNetworkProfile(new NetworkProfile() + .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceReference().withId( + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic-override") + .withProperties( + new NetworkInterfaceReferenceProperties().withPrimary(true) + .withDeleteOption(DeleteOptions.DELETE))))))) + .withComputeApiVersion("2024-07-01") + .withName("overrideFlexVmConfig-0"))) + .withResourceCount(24) + .withResourcePrefix("myFlexVm") + .withFlexProperties(new FlexProperties() + .withVmSizeProfiles( + Arrays.asList(new VmSizeProfile().withName("Standard_D2s_v3").withRank(24), + new VmSizeProfile().withName("Standard_D2s_v3").withRank(24))) + .withOsType(OsType.WINDOWS) + .withPriorityProfile(new PriorityProfile().withType(PriorityType.REGULAR) + .withAllocationStrategy(AllocationStrategy.LOWEST_PRICE)) + .withZoneAllocationPolicy(new ZoneAllocationPolicy() + .withDistributionStrategy(DistributionStrategy.BEST_EFFORT_SINGLE_ZONE) + .withZonePreferences( + Arrays.asList(new ZonePreference().withZone("1").withRank(21)))))) + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreateFlex_MinimumSet_Gen.json + */ + /** + * Sample code: ScheduledActions_VirtualMachinesExecuteCreateFlex_MinimumSet. + * + * @param manager Entry point to ComputeScheduleManager. + */ + public static void scheduledActionsVirtualMachinesExecuteCreateFlexMinimumSet( + com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { + manager.scheduledActions() + .virtualMachinesExecuteCreateFlexWithResponse("eastus2", new ExecuteCreateFlexContent() + .withResourceConfigParameters(new ResourceProvisionFlexPayload().withResourceCount(24) + .withFlexProperties(new FlexProperties() + .withVmSizeProfiles(Arrays.asList(new VmSizeProfile().withName("Standard_D2s_v3").withRank(24), + new VmSizeProfile().withName("Standard_D2s_v3").withRank(24))) + .withOsType(OsType.WINDOWS) + .withPriorityProfile(new PriorityProfile()))) + .withExecutionParameters(new ExecutionParameters()), com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateSamples.java index 4387cc68101d..b256f1620ada 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateSamples.java @@ -4,12 +4,47 @@ package com.azure.resourcemanager.computeschedule.generated; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest; +import com.azure.resourcemanager.computeschedule.models.AdditionalCapabilities; +import com.azure.resourcemanager.computeschedule.models.BootDiagnostics; +import com.azure.resourcemanager.computeschedule.models.BulkActionVMExtension; +import com.azure.resourcemanager.computeschedule.models.BulkActionVMProfile; +import com.azure.resourcemanager.computeschedule.models.BulkActionVMSpec; +import com.azure.resourcemanager.computeschedule.models.BulkActionVmExtensionProperties; +import com.azure.resourcemanager.computeschedule.models.BulkVMConfiguration; +import com.azure.resourcemanager.computeschedule.models.CachingTypes; +import com.azure.resourcemanager.computeschedule.models.DataDisk; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.DiagnosticsProfile; +import com.azure.resourcemanager.computeschedule.models.DiskControllerTypes; +import com.azure.resourcemanager.computeschedule.models.DiskCreateOptionTypes; +import com.azure.resourcemanager.computeschedule.models.DiskDeleteOptionTypes; +import com.azure.resourcemanager.computeschedule.models.ExecuteCreateContent; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.ImageReference; +import com.azure.resourcemanager.computeschedule.models.LinuxConfiguration; +import com.azure.resourcemanager.computeschedule.models.LinuxPatchAssessmentMode; +import com.azure.resourcemanager.computeschedule.models.LinuxPatchSettings; +import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchMode; +import com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; +import com.azure.resourcemanager.computeschedule.models.NetworkProfile; +import com.azure.resourcemanager.computeschedule.models.OSDisk; +import com.azure.resourcemanager.computeschedule.models.OSProfile; +import com.azure.resourcemanager.computeschedule.models.OperatingSystemTypes; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceIdentityType; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceProvisionPayload; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import java.nio.charset.StandardCharsets; +import com.azure.resourcemanager.computeschedule.models.SecurityProfile; +import com.azure.resourcemanager.computeschedule.models.SecurityTypes; +import com.azure.resourcemanager.computeschedule.models.SshConfiguration; +import com.azure.resourcemanager.computeschedule.models.SshPublicKey; +import com.azure.resourcemanager.computeschedule.models.StorageAccountTypes; +import com.azure.resourcemanager.computeschedule.models.StorageProfile; +import com.azure.resourcemanager.computeschedule.models.UefiSettings; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -19,84 +54,142 @@ */ public final class ScheduledActionsVirtualMachinesExecuteCreateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen - generated by [MaximumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteCreateMaximumSetGenGeneratedByMaximumSetRule( + public static void scheduledActionsVirtualMachinesExecuteCreateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteCreateWithResponse("oslhbouzgevzpeydssyelhw", new ExecuteCreateRequest() - .withResourceConfigParameters(new ResourceProvisionPayload().withBaseProfile(mapOf("hardwareProfile", - BinaryData.fromBytes("{name=F1}".getBytes(StandardCharsets.UTF_8)), "provisioningState", - BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "storageProfile", - BinaryData.fromBytes("{osDisk={osType=0}}".getBytes(StandardCharsets.UTF_8)), "vmExtensions", - BinaryData.fromBytes( - "[{autoUpgradeMinorVersion=true, protectedSettings=SomeDecryptedSecretValue, provisioningState=0, enableAutomaticUpgrade=true, publisher=Microsoft.Azure.Monitor, type=AzureMonitorLinuxAgent, typeHandlerVersion=1.0}, {name=myExtensionName}]" - .getBytes(StandardCharsets.UTF_8)), - "resourcegroupName", - BinaryData.fromBytes("RG5ABF491C-3164-42A6-8CB5-BF3CB53B018B".getBytes(StandardCharsets.UTF_8)), - "computeApiVersion", BinaryData.fromBytes("2024-07-01".getBytes(StandardCharsets.UTF_8)))) - .withResourceOverrides(Arrays.asList(mapOf("name", - BinaryData.fromBytes("myFleet_523".getBytes(StandardCharsets.UTF_8)), "location", - BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", - BinaryData.fromBytes( - "{hardwareProfile={vmSize=Standard_F1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" - .getBytes(StandardCharsets.UTF_8)), - "zones", BinaryData.fromBytes("[1]".getBytes(StandardCharsets.UTF_8))), - mapOf("name", BinaryData.fromBytes("myFleet_524".getBytes(StandardCharsets.UTF_8)), "location", - BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", - BinaryData.fromBytes( - "{hardwareProfile={vmSize=Standard_G1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" - .getBytes(StandardCharsets.UTF_8)), - "zones", BinaryData.fromBytes("[2]".getBytes(StandardCharsets.UTF_8))))) - .withResourceCount(2) - .withResourcePrefix("TL1")) - .withExecutionParameters(new ExecutionParameters() - .withRetryPolicy(new RetryPolicy().withRetryCount(5).withRetryWindowInMinutes(40))) - .withCorrelationid("dfe927c5-16a6-40b7-a0f7-8524975ed642"), com.azure.core.util.Context.NONE); + .virtualMachinesExecuteCreateWithResponse("eastus2", + new ExecuteCreateContent() + .withResourceConfigParameters( + new ResourceProvisionPayload() + .withBaseProfile( + new BulkVMConfiguration() + .withVmProperties(new BulkActionVMSpec().withZones(Arrays.asList("1")) + .withIdentity( + new VirtualMachineIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .withTags(mapOf("environment", "production", "department", "engineering")) + .withVmProperties(new BulkActionVMProfile() + .withStorageProfile(new StorageProfile() + .withImageReference(new ImageReference().withPublisher("Canonical") + .withOffer("0001-com-ubuntu-server-jammy") + .withSku("22_04-lts-gen2") + .withVersion("latest")) + .withOsDisk(new OSDisk().withOsType(OperatingSystemTypes.LINUX) + .withName("myOsDisk") + .withCaching(CachingTypes.READ_WRITE) + .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) + .withDiskSizeGB(128) + .withManagedDisk(new ManagedDiskParameters() + .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) + .withDeleteOption(DiskDeleteOptionTypes.DELETE)) + .withDataDisks( + Arrays.asList(new DataDisk().withLun(0) + .withName("myDataDisk-0") + .withCaching(CachingTypes.READ_ONLY) + .withCreateOption(DiskCreateOptionTypes.EMPTY) + .withDiskSizeGB(256) + .withManagedDisk( + new ManagedDiskParameters().withStorageAccountType( + StorageAccountTypes.PREMIUM_LRS)) + .withDeleteOption(DiskDeleteOptionTypes.DELETE))) + .withDiskControllerType(DiskControllerTypes.SCSI)) + .withAdditionalCapabilities( + new AdditionalCapabilities().withUltraSSDEnabled(false) + .withHibernationEnabled(false)) + .withOsProfile(new OSProfile().withComputerName("myVM") + .withAdminUsername("azureuser") + .withLinuxConfiguration( + new LinuxConfiguration().withDisablePasswordAuthentication(true) + .withSsh(new SshConfiguration() + .withPublicKeys(Arrays.asList(new SshPublicKey() + .withPath("/home/azureuser/.ssh/authorized_keys") + .withKeyData("fakeTokenPlaceholder")))) + .withProvisionVMAgent(true) + .withPatchSettings(new LinuxPatchSettings() + .withPatchMode(LinuxVMGuestPatchMode.AUTOMATIC_BY_PLATFORM) + .withAssessmentMode( + LinuxPatchAssessmentMode.AUTOMATIC_BY_PLATFORM))) + .withAllowExtensionOperations(true)) + .withNetworkProfile(new NetworkProfile().withNetworkInterfaces( + Arrays.asList(new NetworkInterfaceReference().withId( + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic") + .withProperties( + new NetworkInterfaceReferenceProperties().withPrimary(true) + .withDeleteOption(DeleteOptions.DELETE))))) + .withSecurityProfile(new SecurityProfile() + .withUefiSettings(new UefiSettings().withSecureBootEnabled(true) + .withVTpmEnabled(true)) + .withSecurityType(SecurityTypes.TRUSTED_LAUNCH)) + .withDiagnosticsProfile(new DiagnosticsProfile() + .withBootDiagnostics(new BootDiagnostics().withEnabled(true))))) + .withExtensions( + Arrays.asList(new BulkActionVMExtension().withName("AzureMonitorLinuxAgent") + .withProperties(new BulkActionVmExtensionProperties() + .withPublisher("Microsoft.Azure.Monitor") + .withType("AzureMonitorLinuxAgent") + .withTypeHandlerVersion("1.0") + .withAutoUpgradeMinorVersion(true) + .withEnableAutomaticUpgrade(true) + .withSettings(mapOf()) + .withSuppressFailures(false)))) + .withComputeApiVersion("2024-07-01") + .withName("baseVmConfig")) + .withResourceOverrides(Arrays.asList(new BulkVMConfiguration() + .withVmProperties(new BulkActionVMSpec().withZones(Arrays.asList("2")) + .withTags(mapOf("environment", "production", "department", "engineering", "role", + "web-server")) + .withVmProperties(new BulkActionVMProfile() + .withStorageProfile(new StorageProfile().withOsDisk( + new OSDisk() + .withOsType(OperatingSystemTypes.LINUX) + .withName("overrideOsDisk") + .withCaching(CachingTypes.READ_WRITE) + .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) + .withDiskSizeGB(256) + .withManagedDisk(new ManagedDiskParameters() + .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) + .withDeleteOption(DiskDeleteOptionTypes.DELETE))) + .withNetworkProfile(new NetworkProfile() + .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceReference().withId( + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic-override") + .withProperties( + new NetworkInterfaceReferenceProperties().withPrimary(true) + .withDeleteOption(DeleteOptions.DELETE))))))) + .withComputeApiVersion("2024-07-01") + .withName("overrideVmConfig-0"))) + .withResourceCount(3) + .withResourcePrefix("myBulkVm")) + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withCorrelationid("01234567-89ab-cdef-0123-456789abcdef"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteCreateMinimumSetGenGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesExecuteCreateMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteCreateWithResponse("useast", new ExecuteCreateRequest() - .withResourceConfigParameters(new ResourceProvisionPayload().withBaseProfile(mapOf("hardwareProfile", - BinaryData.fromBytes("{name=F1}".getBytes(StandardCharsets.UTF_8)), "provisioningState", - BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "storageProfile", - BinaryData.fromBytes("{osDisk={osType=0}}".getBytes(StandardCharsets.UTF_8)), "vmExtensions", - BinaryData.fromBytes( - "[{autoUpgradeMinorVersion=true, protectedSettings=SomeDecryptedSecretValue, provisioningState=0, enableAutomaticUpgrade=true, publisher=Microsoft.Azure.Monitor, type=AzureMonitorLinuxAgent, typeHandlerVersion=1.0}, {name=myExtensionName}]" - .getBytes(StandardCharsets.UTF_8)), - "resourcegroupName", - BinaryData.fromBytes("RG5ABF491C-3164-42A6-8CB5-BF3CB53B018B".getBytes(StandardCharsets.UTF_8)), - "computeApiVersion", BinaryData.fromBytes("2024-07-01".getBytes(StandardCharsets.UTF_8)))) - .withResourceOverrides(Arrays.asList(mapOf("name", - BinaryData.fromBytes("myFleet_523".getBytes(StandardCharsets.UTF_8)), "location", - BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", - BinaryData.fromBytes( - "{hardwareProfile={vmSize=Standard_F1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" - .getBytes(StandardCharsets.UTF_8)), - "zones", BinaryData.fromBytes("[1]".getBytes(StandardCharsets.UTF_8))), - mapOf("name", BinaryData.fromBytes("myFleet_524".getBytes(StandardCharsets.UTF_8)), "location", - BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", - BinaryData.fromBytes( - "{hardwareProfile={vmSize=Standard_G1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" - .getBytes(StandardCharsets.UTF_8)), - "zones", BinaryData.fromBytes("[2]".getBytes(StandardCharsets.UTF_8))))) - .withResourceCount(2)) - .withExecutionParameters(new ExecutionParameters()), com.azure.core.util.Context.NONE); + .virtualMachinesExecuteCreateWithResponse("eastus2", + new ExecuteCreateContent() + .withResourceConfigParameters(new ResourceProvisionPayload().withResourceCount(3)) + .withExecutionParameters(new ExecutionParameters()), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeallocateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeallocateSamples.java index 21f2207352cd..3c040e3e37ce 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeallocateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeallocateSamples.java @@ -4,9 +4,10 @@ package com.azure.resourcemanager.computeschedule.generated; -import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest; +import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateContent; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -16,7 +17,7 @@ */ public final class ScheduledActionsVirtualMachinesExecuteDeallocateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet. @@ -26,15 +27,15 @@ public final class ScheduledActionsVirtualMachinesExecuteDeallocateSamples { public static void scheduledActionsVirtualMachinesExecuteDeallocateMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeallocateWithResponse("qqfrkswrovcice", new ExecuteDeallocateRequest() + .virtualMachinesExecuteDeallocateWithResponse("eastus2", new ExecuteDeallocateContent() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet. @@ -44,12 +45,14 @@ public static void scheduledActionsVirtualMachinesExecuteDeallocateMinimumSet( public static void scheduledActionsVirtualMachinesExecuteDeallocateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeallocateWithResponse("ykcaptgboliddcfyaiuimj", new ExecuteDeallocateRequest() + .virtualMachinesExecuteDeallocateWithResponse("eastus2", new ExecuteDeallocateContent() .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeleteSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeleteSamples.java index 7bac9d6ccd01..b3c4a158e3fc 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeleteSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeleteSamples.java @@ -4,8 +4,10 @@ package com.azure.resourcemanager.computeschedule.generated; -import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest; +import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteContent; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -15,42 +17,43 @@ */ public final class ScheduledActionsVirtualMachinesExecuteDeleteSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteDeleteMinimumSetGenGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesExecuteDeleteMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeleteWithResponse("east", new ExecuteDeleteRequest() + .virtualMachinesExecuteDeleteWithResponse("eastus2", new ExecuteDeleteContent() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3", - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))), + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen - generated by [MaximumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteDeleteMaximumSetGenGeneratedByMaximumSetRule( + public static void scheduledActionsVirtualMachinesExecuteDeleteMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeleteWithResponse("east", new ExecuteDeleteRequest() - .withExecutionParameters(new ExecutionParameters() - .withRetryPolicy(new RetryPolicy().withRetryCount(2).withRetryWindowInMinutes(4))) + .virtualMachinesExecuteDeleteWithResponse("eastus2", new ExecuteDeleteContent() + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3", - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("dfe927c5-16a6-40b7-a0f7-8524975ed642") - .withForceDeletion(false), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890") + .withForceDeletion(true), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteHibernateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteHibernateSamples.java index 87ec5caae790..854376f509b4 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteHibernateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteHibernateSamples.java @@ -4,9 +4,10 @@ package com.azure.resourcemanager.computeschedule.generated; -import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest; +import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateContent; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -16,25 +17,25 @@ */ public final class ScheduledActionsVirtualMachinesExecuteHibernateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteHibernateMinimumSet( + public static void scheduledActionsVirtualMachinesExecuteHibernateMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteHibernateWithResponse("xtmm", new ExecuteHibernateRequest() + .virtualMachinesExecuteHibernateWithResponse("eastus2", new ExecuteHibernateContent() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet. @@ -44,12 +45,14 @@ public static void scheduledActionsVirtualMachinesExecuteHibernateMinimumSet( public static void scheduledActionsVirtualMachinesExecuteHibernateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteHibernateWithResponse("gztd", new ExecuteHibernateRequest() + .virtualMachinesExecuteHibernateWithResponse("eastus2", new ExecuteHibernateContent() .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteStartSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteStartSamples.java index 559c682e2a3e..02329126e620 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteStartSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteStartSamples.java @@ -4,9 +4,10 @@ package com.azure.resourcemanager.computeschedule.generated; -import com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest; +import com.azure.resourcemanager.computeschedule.models.ExecuteStartContent; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -16,7 +17,7 @@ */ public final class ScheduledActionsVirtualMachinesExecuteStartSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteStart_MaximumSet. @@ -26,30 +27,32 @@ public final class ScheduledActionsVirtualMachinesExecuteStartSamples { public static void scheduledActionsVirtualMachinesExecuteStartMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteStartWithResponse("qk", new ExecuteStartRequest() + .virtualMachinesExecuteStartWithResponse("eastus2", new ExecuteStartContent() .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteStart_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesExecuteStart_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteStartMinimumSet( + public static void scheduledActionsVirtualMachinesExecuteStartMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteStartWithResponse("fbdewllahrteoavajbomjc", new ExecuteStartRequest() + .virtualMachinesExecuteStartWithResponse("eastus2", new ExecuteStartContent() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationErrorsSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationErrorsSamples.java index c48c86f30a4c..f8a6e3435bae 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationErrorsSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationErrorsSamples.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.computeschedule.generated; -import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsRequest; +import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsContent; import java.util.Arrays; /** @@ -12,34 +12,34 @@ */ public final class ScheduledActionsVirtualMachinesGetOperationErrorsSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen - generated by [MaximumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesGetOperationErrorsMaximumSetGenGeneratedByMaximumSetRule( + public static void scheduledActionsVirtualMachinesGetOperationErrorsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationErrorsWithResponse("ennweqswbghorrgzbet", - new GetOperationErrorsRequest().withOperationIds(Arrays.asList("ksufjznokhsbowdupyt")), + .virtualMachinesGetOperationErrorsWithResponse("eastus2", + new GetOperationErrorsContent().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesGetOperationErrorsMinimumSetGenGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesGetOperationErrorsMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationErrorsWithResponse("gcdqwzmxtcn", - new GetOperationErrorsRequest().withOperationIds(Arrays.asList("ksufjznokhsbowdupyt")), + .virtualMachinesGetOperationErrorsWithResponse("eastus2", + new GetOperationErrorsContent().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationStatusSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationStatusSamples.java index 00d7c3c74024..e79195be26ba 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationStatusSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationStatusSamples.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.computeschedule.generated; -import com.azure.resourcemanager.computeschedule.models.GetOperationStatusRequest; +import com.azure.resourcemanager.computeschedule.models.GetOperationStatusContent; import java.util.Arrays; /** @@ -12,7 +12,7 @@ */ public final class ScheduledActionsVirtualMachinesGetOperationStatusSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet. @@ -22,26 +22,26 @@ public final class ScheduledActionsVirtualMachinesGetOperationStatusSamples { public static void scheduledActionsVirtualMachinesGetOperationStatusMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationStatusWithResponse("ntfcikxsmthfkdhdcjpevmydzu", - new GetOperationStatusRequest().withOperationIds(Arrays.asList("b211f086-4b91-4686-a453-2f5c012e4d80")) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), + .virtualMachinesGetOperationStatusWithResponse("eastus2", + new GetOperationStatusContent().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesGetOperationStatusMinimumSet( + public static void scheduledActionsVirtualMachinesGetOperationStatusMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationStatusWithResponse("ykvvjfoopmkwznctgaiblzvea", - new GetOperationStatusRequest().withOperationIds(Arrays.asList("duhqnwosjzexcfwfhryvy")) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), + .virtualMachinesGetOperationStatusWithResponse("eastus2", + new GetOperationStatusContent().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitDeallocateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitDeallocateSamples.java index 2b814ba7e29f..e3fc6ee5f1ac 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitDeallocateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitDeallocateSamples.java @@ -7,10 +7,11 @@ import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; -import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateRequest; +import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateContent; import java.time.OffsetDateTime; import java.util.Arrays; @@ -19,7 +20,7 @@ */ public final class ScheduledActionsVirtualMachinesSubmitDeallocateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet. @@ -29,36 +30,38 @@ public final class ScheduledActionsVirtualMachinesSubmitDeallocateSamples { public static void scheduledActionsVirtualMachinesSubmitDeallocateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitDeallocateWithResponse("ycipx", new SubmitDeallocateRequest() - .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) - .withTimeZone("aigbjdnldtzkteqi") + .virtualMachinesSubmitDeallocateWithResponse("eastus2", new SubmitDeallocateContent() + .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) + .withDeadLine(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) + .withTimezone("America/Los_Angeles") + .withTimeZone("America/Los_Angeles") .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesSubmitDeallocateMinimumSet( + public static void scheduledActionsVirtualMachinesSubmitDeallocateMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitDeallocateWithResponse("zrcmkxsbuxsxxulky", new SubmitDeallocateRequest() - .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) - .withTimeZone("aigbjdnldtzkteqi") - .withDeadlineType(DeadlineType.UNKNOWN)) + .virtualMachinesSubmitDeallocateWithResponse("eastus2", new SubmitDeallocateContent() + .withSchedule(new Schedule().withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitHibernateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitHibernateSamples.java index 309248ee7e59..11997d833dbd 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitHibernateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitHibernateSamples.java @@ -7,10 +7,11 @@ import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; -import com.azure.resourcemanager.computeschedule.models.SubmitHibernateRequest; +import com.azure.resourcemanager.computeschedule.models.SubmitHibernateContent; import java.time.OffsetDateTime; import java.util.Arrays; @@ -19,28 +20,26 @@ */ public final class ScheduledActionsVirtualMachinesSubmitHibernateSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesSubmitHibernateMinimumSet( + public static void scheduledActionsVirtualMachinesSubmitHibernateMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitHibernateWithResponse("zuevcqpgdohzbjodhachtr", new SubmitHibernateRequest() - .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) - .withTimeZone("aigbjdnldtzkteqi") - .withDeadlineType(DeadlineType.UNKNOWN)) + .virtualMachinesSubmitHibernateWithResponse("eastus2", new SubmitHibernateContent() + .withSchedule(new Schedule().withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet. @@ -50,15 +49,19 @@ public static void scheduledActionsVirtualMachinesSubmitHibernateMinimumSet( public static void scheduledActionsVirtualMachinesSubmitHibernateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitHibernateWithResponse("rhadyapnyvmobwg", new SubmitHibernateRequest() - .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) - .withTimeZone("aigbjdnldtzkteqi") + .virtualMachinesSubmitHibernateWithResponse("eastus2", new SubmitHibernateContent() + .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) + .withDeadLine(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) + .withTimezone("America/Los_Angeles") + .withTimeZone("America/Los_Angeles") .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitStartSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitStartSamples.java index a79109fb53af..2a675defd71a 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitStartSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitStartSamples.java @@ -7,10 +7,11 @@ import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; -import com.azure.resourcemanager.computeschedule.models.SubmitStartRequest; +import com.azure.resourcemanager.computeschedule.models.SubmitStartContent; import java.time.OffsetDateTime; import java.util.Arrays; @@ -19,7 +20,7 @@ */ public final class ScheduledActionsVirtualMachinesSubmitStartSamples { /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesSubmitStart_MaximumSet. @@ -29,36 +30,38 @@ public final class ScheduledActionsVirtualMachinesSubmitStartSamples { public static void scheduledActionsVirtualMachinesSubmitStartMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitStartWithResponse("pxtvvk", new SubmitStartRequest() - .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) - .withTimeZone("aigbjdnldtzkteqi") + .virtualMachinesSubmitStartWithResponse("eastus2", new SubmitStartContent() + .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) + .withDeadLine(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) + .withTimezone("America/Los_Angeles") + .withTimeZone("America/Los_Angeles") .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) + .withRetryPolicy(new RetryPolicy().withRetryCount(3) + .withRetryWindowInMinutes(30) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json + * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesSubmitStart_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesSubmitStart_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesSubmitStartMinimumSet( + public static void scheduledActionsVirtualMachinesSubmitStartMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitStartWithResponse("ufrcsuw", new SubmitStartRequest() - .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) - .withTimeZone("aigbjdnldtzkteqi") - .withDeadlineType(DeadlineType.UNKNOWN)) + .virtualMachinesSubmitStartWithResponse("eastus2", new SubmitStartContent() + .withSchedule(new Schedule().withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) - .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) + .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalCapabilitiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalCapabilitiesTests.java new file mode 100644 index 000000000000..1c085a74a86e --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalCapabilitiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.AdditionalCapabilities; +import org.junit.jupiter.api.Assertions; + +public final class AdditionalCapabilitiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdditionalCapabilities model = BinaryData.fromString("{\"ultraSSDEnabled\":true,\"hibernationEnabled\":false}") + .toObject(AdditionalCapabilities.class); + Assertions.assertTrue(model.ultraSSDEnabled()); + Assertions.assertFalse(model.hibernationEnabled()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdditionalCapabilities model + = new AdditionalCapabilities().withUltraSSDEnabled(true).withHibernationEnabled(false); + model = BinaryData.fromObject(model).toObject(AdditionalCapabilities.class); + Assertions.assertTrue(model.ultraSSDEnabled()); + Assertions.assertFalse(model.hibernationEnabled()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalUnattendContentTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalUnattendContentTests.java new file mode 100644 index 000000000000..422fde332838 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalUnattendContentTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContent; +import com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContentComponentName; +import com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContentPassName; +import com.azure.resourcemanager.computeschedule.models.SettingNames; +import org.junit.jupiter.api.Assertions; + +public final class AdditionalUnattendContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdditionalUnattendContent model = BinaryData.fromString( + "{\"passName\":\"OobeSystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"AutoLogon\",\"content\":\"ybcibvyvdcsit\"}") + .toObject(AdditionalUnattendContent.class); + Assertions.assertEquals(AdditionalUnattendContentPassName.OOBE_SYSTEM, model.passName()); + Assertions.assertEquals(AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP, + model.componentName()); + Assertions.assertEquals(SettingNames.AUTO_LOGON, model.settingName()); + Assertions.assertEquals("ybcibvyvdcsit", model.content()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdditionalUnattendContent model + = new AdditionalUnattendContent().withPassName(AdditionalUnattendContentPassName.OOBE_SYSTEM) + .withComponentName(AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP) + .withSettingName(SettingNames.AUTO_LOGON) + .withContent("ybcibvyvdcsit"); + model = BinaryData.fromObject(model).toObject(AdditionalUnattendContent.class); + Assertions.assertEquals(AdditionalUnattendContentPassName.OOBE_SYSTEM, model.passName()); + Assertions.assertEquals(AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP, + model.componentName()); + Assertions.assertEquals(SettingNames.AUTO_LOGON, model.settingName()); + Assertions.assertEquals("ybcibvyvdcsit", model.content()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AllInstancesDownTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AllInstancesDownTests.java new file mode 100644 index 000000000000..b58d5d9661d6 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AllInstancesDownTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.AllInstancesDown; +import org.junit.jupiter.api.Assertions; + +public final class AllInstancesDownTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AllInstancesDown model + = BinaryData.fromString("{\"automaticallyApprove\":true}").toObject(AllInstancesDown.class); + Assertions.assertTrue(model.automaticallyApprove()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AllInstancesDown model = new AllInstancesDown().withAutomaticallyApprove(true); + model = BinaryData.fromObject(model).toObject(AllInstancesDown.class); + Assertions.assertTrue(model.automaticallyApprove()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApiEntityReferenceTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApiEntityReferenceTests.java new file mode 100644 index 000000000000..51ac3729a343 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApiEntityReferenceTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ApiEntityReference; +import org.junit.jupiter.api.Assertions; + +public final class ApiEntityReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ApiEntityReference model = BinaryData.fromString("{\"id\":\"dslfhotwmcy\"}").toObject(ApiEntityReference.class); + Assertions.assertEquals("dslfhotwmcy", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ApiEntityReference model = new ApiEntityReference().withId("dslfhotwmcy"); + model = BinaryData.fromObject(model).toObject(ApiEntityReference.class); + Assertions.assertEquals("dslfhotwmcy", model.id()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApplicationProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApplicationProfileTests.java new file mode 100644 index 000000000000..75d2fc752df7 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApplicationProfileTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ApplicationProfile; +import com.azure.resourcemanager.computeschedule.models.VMGalleryApplication; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ApplicationProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ApplicationProfile model = BinaryData.fromString( + "{\"galleryApplications\":[{\"tags\":\"sotftpvj\",\"order\":1933405011,\"packageReferenceId\":\"xilzznf\",\"configurationReference\":\"nvwpmqtaruouj\",\"treatFailureAsDeploymentFailure\":false,\"enableAutomaticUpgrade\":false}]}") + .toObject(ApplicationProfile.class); + Assertions.assertEquals("sotftpvj", model.galleryApplications().get(0).tags()); + Assertions.assertEquals(1933405011, model.galleryApplications().get(0).order()); + Assertions.assertEquals("xilzznf", model.galleryApplications().get(0).packageReferenceId()); + Assertions.assertEquals("nvwpmqtaruouj", model.galleryApplications().get(0).configurationReference()); + Assertions.assertFalse(model.galleryApplications().get(0).treatFailureAsDeploymentFailure()); + Assertions.assertFalse(model.galleryApplications().get(0).enableAutomaticUpgrade()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ApplicationProfile model = new ApplicationProfile() + .withGalleryApplications(Arrays.asList(new VMGalleryApplication().withTags("sotftpvj") + .withOrder(1933405011) + .withPackageReferenceId("xilzznf") + .withConfigurationReference("nvwpmqtaruouj") + .withTreatFailureAsDeploymentFailure(false) + .withEnableAutomaticUpgrade(false))); + model = BinaryData.fromObject(model).toObject(ApplicationProfile.class); + Assertions.assertEquals("sotftpvj", model.galleryApplications().get(0).tags()); + Assertions.assertEquals(1933405011, model.galleryApplications().get(0).order()); + Assertions.assertEquals("xilzznf", model.galleryApplications().get(0).packageReferenceId()); + Assertions.assertEquals("nvwpmqtaruouj", model.galleryApplications().get(0).configurationReference()); + Assertions.assertFalse(model.galleryApplications().get(0).treatFailureAsDeploymentFailure()); + Assertions.assertFalse(model.galleryApplications().get(0).enableAutomaticUpgrade()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/BootDiagnosticsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/BootDiagnosticsTests.java new file mode 100644 index 000000000000..fea2d15c95d5 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/BootDiagnosticsTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.BootDiagnostics; +import org.junit.jupiter.api.Assertions; + +public final class BootDiagnosticsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BootDiagnostics model + = BinaryData.fromString("{\"enabled\":false,\"storageUri\":\"yslqbhsfx\"}").toObject(BootDiagnostics.class); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("yslqbhsfx", model.storageUri()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BootDiagnostics model = new BootDiagnostics().withEnabled(false).withStorageUri("yslqbhsfx"); + model = BinaryData.fromObject(model).toObject(BootDiagnostics.class); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("yslqbhsfx", model.storageUri()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOccurrenceRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOccurrenceRequestTests.java index bab3a02a3d80..81eb02ef9108 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOccurrenceRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOccurrenceRequestTests.java @@ -12,16 +12,17 @@ public final class CancelOccurrenceRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CancelOccurrenceRequest model = BinaryData.fromString("{\"resourceIds\":[\"axibxujw\",\"hqwa\"]}") - .toObject(CancelOccurrenceRequest.class); - Assertions.assertEquals("axibxujw", model.resourceIds().get(0)); + CancelOccurrenceRequest model + = BinaryData.fromString("{\"resourceIds\":[\"ggicccnxqhue\",\"mkttlstvlzywem\",\"zrncsdt\",\"lusiy\"]}") + .toObject(CancelOccurrenceRequest.class); + Assertions.assertEquals("ggicccnxqhue", model.resourceIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CancelOccurrenceRequest model - = new CancelOccurrenceRequest().withResourceIds(Arrays.asList("axibxujw", "hqwa")); + CancelOccurrenceRequest model = new CancelOccurrenceRequest() + .withResourceIds(Arrays.asList("ggicccnxqhue", "mkttlstvlzywem", "zrncsdt", "lusiy")); model = BinaryData.fromObject(model).toObject(CancelOccurrenceRequest.class); - Assertions.assertEquals("axibxujw", model.resourceIds().get(0)); + Assertions.assertEquals("ggicccnxqhue", model.resourceIds().get(0)); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOperationsContentTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOperationsContentTests.java new file mode 100644 index 000000000000..d549206d99b3 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOperationsContentTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.CancelOperationsContent; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class CancelOperationsContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CancelOperationsContent model + = BinaryData.fromString("{\"operationIds\":[\"washr\",\"dtkcnqxwbpokulp\"],\"correlationid\":\"ujw\"}") + .toObject(CancelOperationsContent.class); + Assertions.assertEquals("washr", model.operationIds().get(0)); + Assertions.assertEquals("ujw", model.correlationid()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CancelOperationsContent model + = new CancelOperationsContent().withOperationIds(Arrays.asList("washr", "dtkcnqxwbpokulp")) + .withCorrelationid("ujw"); + model = BinaryData.fromObject(model).toObject(CancelOperationsContent.class); + Assertions.assertEquals("washr", model.operationIds().get(0)); + Assertions.assertEquals("ujw", model.correlationid()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOperationsRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOperationsRequestTests.java deleted file mode 100644 index e2a478a0d8cc..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOperationsRequestTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CancelOperationsRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CancelOperationsRequest model - = BinaryData.fromString("{\"operationIds\":[\"ilnerkujysvlejuv\",\"qawrlyxwj\"],\"correlationid\":\"cpr\"}") - .toObject(CancelOperationsRequest.class); - Assertions.assertEquals("ilnerkujysvlejuv", model.operationIds().get(0)); - Assertions.assertEquals("cpr", model.correlationid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CancelOperationsRequest model - = new CancelOperationsRequest().withOperationIds(Arrays.asList("ilnerkujysvlejuv", "qawrlyxwj")) - .withCorrelationid("cpr"); - model = BinaryData.fromObject(model).toObject(CancelOperationsRequest.class); - Assertions.assertEquals("ilnerkujysvlejuv", model.operationIds().get(0)); - Assertions.assertEquals("cpr", model.correlationid()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CapacityReservationProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CapacityReservationProfileTests.java new file mode 100644 index 000000000000..6cf3bfb954b6 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CapacityReservationProfileTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.management.SubResource; +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.CapacityReservationProfile; +import org.junit.jupiter.api.Assertions; + +public final class CapacityReservationProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapacityReservationProfile model = BinaryData.fromString("{\"capacityReservationGroup\":{\"id\":\"rfbjf\"}}") + .toObject(CapacityReservationProfile.class); + Assertions.assertEquals("rfbjf", model.capacityReservationGroup().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapacityReservationProfile model + = new CapacityReservationProfile().withCapacityReservationGroup(new SubResource().withId("rfbjf")); + model = BinaryData.fromObject(model).toObject(CapacityReservationProfile.class); + Assertions.assertEquals("rfbjf", model.capacityReservationGroup().id()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DataDiskTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DataDiskTests.java new file mode 100644 index 000000000000..086c5539413a --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DataDiskTests.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ApiEntityReference; +import com.azure.resourcemanager.computeschedule.models.CachingTypes; +import com.azure.resourcemanager.computeschedule.models.DataDisk; +import com.azure.resourcemanager.computeschedule.models.DiskCreateOptionTypes; +import com.azure.resourcemanager.computeschedule.models.DiskDeleteOptionTypes; +import com.azure.resourcemanager.computeschedule.models.DiskDetachOptionTypes; +import com.azure.resourcemanager.computeschedule.models.DiskEncryptionSetParameters; +import com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters; +import com.azure.resourcemanager.computeschedule.models.SecurityEncryptionTypes; +import com.azure.resourcemanager.computeschedule.models.StorageAccountTypes; +import com.azure.resourcemanager.computeschedule.models.VMDiskSecurityProfile; +import com.azure.resourcemanager.computeschedule.models.VirtualHardDisk; +import org.junit.jupiter.api.Assertions; + +public final class DataDiskTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataDisk model = BinaryData.fromString( + "{\"lun\":141642169,\"name\":\"jampmngnzscxaqw\",\"vhd\":{\"uri\":\"hcbonqvpkvlr\"},\"image\":{\"uri\":\"ea\"},\"caching\":\"None\",\"writeAcceleratorEnabled\":true,\"createOption\":\"Restore\",\"diskSizeGB\":10648381,\"managedDisk\":{\"storageAccountType\":\"Premium_LRS\",\"diskEncryptionSet\":{\"id\":\"y\"},\"securityProfile\":{\"securityEncryptionType\":\"VMGuestStateOnly\",\"diskEncryptionSet\":{\"id\":\"lwtgrhpdj\"}},\"id\":\"umasxazjpq\"},\"sourceResource\":{\"id\":\"ualhbxxhejj\"},\"toBeDetached\":false,\"detachOption\":\"ForceDetach\",\"deleteOption\":\"Detach\"}") + .toObject(DataDisk.class); + Assertions.assertEquals(141642169, model.lun()); + Assertions.assertEquals("jampmngnzscxaqw", model.name()); + Assertions.assertEquals("hcbonqvpkvlr", model.vhd().uri()); + Assertions.assertEquals("ea", model.image().uri()); + Assertions.assertEquals(CachingTypes.NONE, model.caching()); + Assertions.assertTrue(model.writeAcceleratorEnabled()); + Assertions.assertEquals(DiskCreateOptionTypes.RESTORE, model.createOption()); + Assertions.assertEquals(10648381, model.diskSizeGB()); + Assertions.assertEquals("umasxazjpq", model.managedDisk().id()); + Assertions.assertEquals(StorageAccountTypes.PREMIUM_LRS, model.managedDisk().storageAccountType()); + Assertions.assertEquals("y", model.managedDisk().diskEncryptionSet().id()); + Assertions.assertEquals(SecurityEncryptionTypes.VMGUEST_STATE_ONLY, + model.managedDisk().securityProfile().securityEncryptionType()); + Assertions.assertEquals("lwtgrhpdj", model.managedDisk().securityProfile().diskEncryptionSet().id()); + Assertions.assertEquals("ualhbxxhejj", model.sourceResource().id()); + Assertions.assertFalse(model.toBeDetached()); + Assertions.assertEquals(DiskDetachOptionTypes.FORCE_DETACH, model.detachOption()); + Assertions.assertEquals(DiskDeleteOptionTypes.DETACH, model.deleteOption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataDisk model + = new DataDisk().withLun(141642169) + .withName("jampmngnzscxaqw") + .withVhd(new VirtualHardDisk().withUri("hcbonqvpkvlr")) + .withImage(new VirtualHardDisk().withUri("ea")) + .withCaching(CachingTypes.NONE) + .withWriteAcceleratorEnabled(true) + .withCreateOption(DiskCreateOptionTypes.RESTORE) + .withDiskSizeGB(10648381) + .withManagedDisk(new ManagedDiskParameters().withId("umasxazjpq") + .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("y")) + .withSecurityProfile(new VMDiskSecurityProfile() + .withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("lwtgrhpdj")))) + .withSourceResource(new ApiEntityReference().withId("ualhbxxhejj")) + .withToBeDetached(false) + .withDetachOption(DiskDetachOptionTypes.FORCE_DETACH) + .withDeleteOption(DiskDeleteOptionTypes.DETACH); + model = BinaryData.fromObject(model).toObject(DataDisk.class); + Assertions.assertEquals(141642169, model.lun()); + Assertions.assertEquals("jampmngnzscxaqw", model.name()); + Assertions.assertEquals("hcbonqvpkvlr", model.vhd().uri()); + Assertions.assertEquals("ea", model.image().uri()); + Assertions.assertEquals(CachingTypes.NONE, model.caching()); + Assertions.assertTrue(model.writeAcceleratorEnabled()); + Assertions.assertEquals(DiskCreateOptionTypes.RESTORE, model.createOption()); + Assertions.assertEquals(10648381, model.diskSizeGB()); + Assertions.assertEquals("umasxazjpq", model.managedDisk().id()); + Assertions.assertEquals(StorageAccountTypes.PREMIUM_LRS, model.managedDisk().storageAccountType()); + Assertions.assertEquals("y", model.managedDisk().diskEncryptionSet().id()); + Assertions.assertEquals(SecurityEncryptionTypes.VMGUEST_STATE_ONLY, + model.managedDisk().securityProfile().securityEncryptionType()); + Assertions.assertEquals("lwtgrhpdj", model.managedDisk().securityProfile().diskEncryptionSet().id()); + Assertions.assertEquals("ualhbxxhejj", model.sourceResource().id()); + Assertions.assertFalse(model.toBeDetached()); + Assertions.assertEquals(DiskDetachOptionTypes.FORCE_DETACH, model.detachOption()); + Assertions.assertEquals(DiskDeleteOptionTypes.DETACH, model.deleteOption()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DelayRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DelayRequestTests.java index 4258438e244b..dce4050dbb58 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DelayRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DelayRequestTests.java @@ -13,18 +13,19 @@ public final class DelayRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DelayRequest model = BinaryData.fromString("{\"delay\":\"2021-10-10T15:46:25Z\",\"resourceIds\":[\"isk\"]}") - .toObject(DelayRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T15:46:25Z"), model.delay()); - Assertions.assertEquals("isk", model.resourceIds().get(0)); + DelayRequest model + = BinaryData.fromString("{\"delay\":\"2021-07-11T10:33:14Z\",\"resourceIds\":[\"birryuzhl\"]}") + .toObject(DelayRequest.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-11T10:33:14Z"), model.delay()); + Assertions.assertEquals("birryuzhl", model.resourceIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DelayRequest model = new DelayRequest().withDelay(OffsetDateTime.parse("2021-10-10T15:46:25Z")) - .withResourceIds(Arrays.asList("isk")); + DelayRequest model = new DelayRequest().withDelay(OffsetDateTime.parse("2021-07-11T10:33:14Z")) + .withResourceIds(Arrays.asList("birryuzhl")); model = BinaryData.fromObject(model).toObject(DelayRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T15:46:25Z"), model.delay()); - Assertions.assertEquals("isk", model.resourceIds().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-11T10:33:14Z"), model.delay()); + Assertions.assertEquals("birryuzhl", model.resourceIds().get(0)); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiagnosticsProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiagnosticsProfileTests.java new file mode 100644 index 000000000000..b0f901e91ad8 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiagnosticsProfileTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.BootDiagnostics; +import com.azure.resourcemanager.computeschedule.models.DiagnosticsProfile; +import org.junit.jupiter.api.Assertions; + +public final class DiagnosticsProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiagnosticsProfile model + = BinaryData.fromString("{\"bootDiagnostics\":{\"enabled\":true,\"storageUri\":\"cqaqtdoqmcbx\"}}") + .toObject(DiagnosticsProfile.class); + Assertions.assertTrue(model.bootDiagnostics().enabled()); + Assertions.assertEquals("cqaqtdoqmcbx", model.bootDiagnostics().storageUri()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DiagnosticsProfile model = new DiagnosticsProfile() + .withBootDiagnostics(new BootDiagnostics().withEnabled(true).withStorageUri("cqaqtdoqmcbx")); + model = BinaryData.fromObject(model).toObject(DiagnosticsProfile.class); + Assertions.assertTrue(model.bootDiagnostics().enabled()); + Assertions.assertEquals("cqaqtdoqmcbx", model.bootDiagnostics().storageUri()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiffDiskSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiffDiskSettingsTests.java new file mode 100644 index 000000000000..134df9be6711 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiffDiskSettingsTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DiffDiskOptions; +import com.azure.resourcemanager.computeschedule.models.DiffDiskPlacement; +import com.azure.resourcemanager.computeschedule.models.DiffDiskSettings; +import org.junit.jupiter.api.Assertions; + +public final class DiffDiskSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiffDiskSettings model = BinaryData.fromString("{\"option\":\"Local\",\"placement\":\"NvmeDisk\"}") + .toObject(DiffDiskSettings.class); + Assertions.assertEquals(DiffDiskOptions.LOCAL, model.option()); + Assertions.assertEquals(DiffDiskPlacement.NVME_DISK, model.placement()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DiffDiskSettings model + = new DiffDiskSettings().withOption(DiffDiskOptions.LOCAL).withPlacement(DiffDiskPlacement.NVME_DISK); + model = BinaryData.fromObject(model).toObject(DiffDiskSettings.class); + Assertions.assertEquals(DiffDiskOptions.LOCAL, model.option()); + Assertions.assertEquals(DiffDiskPlacement.NVME_DISK, model.placement()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiskEncryptionSetParametersTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiskEncryptionSetParametersTests.java new file mode 100644 index 000000000000..03f33e30917b --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiskEncryptionSetParametersTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DiskEncryptionSetParameters; +import org.junit.jupiter.api.Assertions; + +public final class DiskEncryptionSetParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiskEncryptionSetParameters model + = BinaryData.fromString("{\"id\":\"gtzxdpn\"}").toObject(DiskEncryptionSetParameters.class); + Assertions.assertEquals("gtzxdpn", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DiskEncryptionSetParameters model = new DiskEncryptionSetParameters().withId("gtzxdpn"); + model = BinaryData.fromObject(model).toObject(DiskEncryptionSetParameters.class); + Assertions.assertEquals("gtzxdpn", model.id()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EncryptionIdentityTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EncryptionIdentityTests.java new file mode 100644 index 000000000000..40da9f6f7a87 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EncryptionIdentityTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.EncryptionIdentity; +import org.junit.jupiter.api.Assertions; + +public final class EncryptionIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EncryptionIdentity model + = BinaryData.fromString("{\"userAssignedIdentityResourceId\":\"vkr\"}").toObject(EncryptionIdentity.class); + Assertions.assertEquals("vkr", model.userAssignedIdentityResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EncryptionIdentity model = new EncryptionIdentity().withUserAssignedIdentityResourceId("vkr"); + model = BinaryData.fromObject(model).toObject(EncryptionIdentity.class); + Assertions.assertEquals("vkr", model.userAssignedIdentityResourceId()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EventGridAndResourceGraphTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EventGridAndResourceGraphTests.java new file mode 100644 index 000000000000..93ce34a9e4da --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EventGridAndResourceGraphTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.EventGridAndResourceGraph; +import org.junit.jupiter.api.Assertions; + +public final class EventGridAndResourceGraphTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EventGridAndResourceGraph model + = BinaryData.fromString("{\"enable\":false,\"scheduledEventsApiVersion\":\"kexxppof\"}") + .toObject(EventGridAndResourceGraph.class); + Assertions.assertFalse(model.enable()); + Assertions.assertEquals("kexxppof", model.scheduledEventsApiVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EventGridAndResourceGraph model + = new EventGridAndResourceGraph().withEnable(false).withScheduledEventsApiVersion("kexxppof"); + model = BinaryData.fromObject(model).toObject(EventGridAndResourceGraph.class); + Assertions.assertFalse(model.enable()); + Assertions.assertEquals("kexxppof", model.scheduledEventsApiVersion()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteCreateRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteCreateRequestTests.java deleted file mode 100644 index 0f2bf06c0d7d..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteCreateRequestTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest; -import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceProvisionPayload; -import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ExecuteCreateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExecuteCreateRequest model = BinaryData.fromString( - "{\"resourceConfigParameters\":{\"baseProfile\":{},\"resourceOverrides\":[{},{},{}],\"resourceCount\":488407258,\"resourcePrefix\":\"dgeablgphu\"},\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":1906017395,\"retryWindowInMinutes\":1237091800}},\"correlationid\":\"zwyiftyhxhur\"}") - .toObject(ExecuteCreateRequest.class); - Assertions.assertEquals(488407258, model.resourceConfigParameters().resourceCount()); - Assertions.assertEquals("dgeablgphu", model.resourceConfigParameters().resourcePrefix()); - Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1906017395, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1237091800, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("zwyiftyhxhur", model.correlationid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExecuteCreateRequest model = new ExecuteCreateRequest() - .withResourceConfigParameters(new ResourceProvisionPayload().withBaseProfile(mapOf()) - .withResourceOverrides(Arrays.asList(mapOf(), mapOf(), mapOf())) - .withResourceCount(488407258) - .withResourcePrefix("dgeablgphu")) - .withExecutionParameters(new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(1906017395).withRetryWindowInMinutes(1237091800))) - .withCorrelationid("zwyiftyhxhur"); - model = BinaryData.fromObject(model).toObject(ExecuteCreateRequest.class); - Assertions.assertEquals(488407258, model.resourceConfigParameters().resourceCount()); - Assertions.assertEquals("dgeablgphu", model.resourceConfigParameters().resourcePrefix()); - Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1906017395, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1237091800, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("zwyiftyhxhur", model.correlationid()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeallocateContentTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeallocateContentTests.java new file mode 100644 index 000000000000..eaeafaf67283 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeallocateContentTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateContent; +import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; +import com.azure.resourcemanager.computeschedule.models.Resources; +import com.azure.resourcemanager.computeschedule.models.RetryPolicy; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ExecuteDeallocateContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExecuteDeallocateContent model = BinaryData.fromString( + "{\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":775754231,\"retryWindowInMinutes\":1098993569,\"onFailureAction\":\"Start\"}},\"resources\":{\"ids\":[\"gxsabkyq\",\"uujitcjc\"]},\"correlationid\":\"dzevndhkrw\"}") + .toObject(ExecuteDeallocateContent.class); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(775754231, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1098993569, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.START, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("gxsabkyq", model.resources().ids().get(0)); + Assertions.assertEquals("dzevndhkrw", model.correlationid()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExecuteDeallocateContent model = new ExecuteDeallocateContent() + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) + .withRetryPolicy(new RetryPolicy().withRetryCount(775754231) + .withRetryWindowInMinutes(1098993569) + .withOnFailureAction(ResourceOperationType.START))) + .withResources(new Resources().withIds(Arrays.asList("gxsabkyq", "uujitcjc"))) + .withCorrelationid("dzevndhkrw"); + model = BinaryData.fromObject(model).toObject(ExecuteDeallocateContent.class); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(775754231, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1098993569, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.START, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("gxsabkyq", model.resources().ids().get(0)); + Assertions.assertEquals("dzevndhkrw", model.correlationid()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeallocateRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeallocateRequestTests.java deleted file mode 100644 index 199c1a4c670a..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeallocateRequestTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest; -import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.Resources; -import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExecuteDeallocateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExecuteDeallocateRequest model = BinaryData.fromString( - "{\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":2070892597,\"retryWindowInMinutes\":412158498}},\"resources\":{\"ids\":[\"sntnbybkzgcw\",\"wclxxwrl\",\"douskcqvkocrcjdk\",\"tnhxbn\"]},\"correlationid\":\"biksq\"}") - .toObject(ExecuteDeallocateRequest.class); - Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(2070892597, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(412158498, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("sntnbybkzgcw", model.resources().ids().get(0)); - Assertions.assertEquals("biksq", model.correlationid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExecuteDeallocateRequest model = new ExecuteDeallocateRequest() - .withExecutionParameters(new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(2070892597).withRetryWindowInMinutes(412158498))) - .withResources( - new Resources().withIds(Arrays.asList("sntnbybkzgcw", "wclxxwrl", "douskcqvkocrcjdk", "tnhxbn"))) - .withCorrelationid("biksq"); - model = BinaryData.fromObject(model).toObject(ExecuteDeallocateRequest.class); - Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(2070892597, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(412158498, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("sntnbybkzgcw", model.resources().ids().get(0)); - Assertions.assertEquals("biksq", model.correlationid()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeleteContentTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeleteContentTests.java new file mode 100644 index 000000000000..6fcf0c5c36e9 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeleteContentTests.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteContent; +import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; +import com.azure.resourcemanager.computeschedule.models.Resources; +import com.azure.resourcemanager.computeschedule.models.RetryPolicy; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ExecuteDeleteContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExecuteDeleteContent model = BinaryData.fromString( + "{\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":1679264198,\"retryWindowInMinutes\":876098210,\"onFailureAction\":\"Start\"}},\"resources\":{\"ids\":[\"kpzksmondjmq\"]},\"correlationid\":\"vypomgkopkwho\",\"forceDeletion\":true}") + .toObject(ExecuteDeleteContent.class); + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(1679264198, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(876098210, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.START, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("kpzksmondjmq", model.resources().ids().get(0)); + Assertions.assertEquals("vypomgkopkwho", model.correlationid()); + Assertions.assertTrue(model.forceDeletion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExecuteDeleteContent model = new ExecuteDeleteContent() + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) + .withRetryPolicy(new RetryPolicy().withRetryCount(1679264198) + .withRetryWindowInMinutes(876098210) + .withOnFailureAction(ResourceOperationType.START))) + .withResources(new Resources().withIds(Arrays.asList("kpzksmondjmq"))) + .withCorrelationid("vypomgkopkwho") + .withForceDeletion(true); + model = BinaryData.fromObject(model).toObject(ExecuteDeleteContent.class); + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(1679264198, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(876098210, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.START, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("kpzksmondjmq", model.resources().ids().get(0)); + Assertions.assertEquals("vypomgkopkwho", model.correlationid()); + Assertions.assertTrue(model.forceDeletion()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeleteRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeleteRequestTests.java deleted file mode 100644 index 570afa01ca1e..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeleteRequestTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest; -import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.Resources; -import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExecuteDeleteRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExecuteDeleteRequest model = BinaryData.fromString( - "{\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":265485,\"retryWindowInMinutes\":1581994668}},\"resources\":{\"ids\":[\"gibma\",\"gakeqsr\",\"yb\"]},\"correlationid\":\"qedqytbciqfoufl\",\"forceDeletion\":true}") - .toObject(ExecuteDeleteRequest.class); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, - model.executionParameters().optimizationPreference()); - Assertions.assertEquals(265485, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1581994668, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("gibma", model.resources().ids().get(0)); - Assertions.assertEquals("qedqytbciqfoufl", model.correlationid()); - Assertions.assertTrue(model.forceDeletion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExecuteDeleteRequest model = new ExecuteDeleteRequest() - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) - .withRetryPolicy(new RetryPolicy().withRetryCount(265485).withRetryWindowInMinutes(1581994668))) - .withResources(new Resources().withIds(Arrays.asList("gibma", "gakeqsr", "yb"))) - .withCorrelationid("qedqytbciqfoufl") - .withForceDeletion(true); - model = BinaryData.fromObject(model).toObject(ExecuteDeleteRequest.class); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, - model.executionParameters().optimizationPreference()); - Assertions.assertEquals(265485, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1581994668, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("gibma", model.resources().ids().get(0)); - Assertions.assertEquals("qedqytbciqfoufl", model.correlationid()); - Assertions.assertTrue(model.forceDeletion()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteHibernateContentTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteHibernateContentTests.java new file mode 100644 index 000000000000..2805272abbf7 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteHibernateContentTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateContent; +import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; +import com.azure.resourcemanager.computeschedule.models.Resources; +import com.azure.resourcemanager.computeschedule.models.RetryPolicy; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ExecuteHibernateContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExecuteHibernateContent model = BinaryData.fromString( + "{\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":681393134,\"retryWindowInMinutes\":264024813,\"onFailureAction\":\"Hibernate\"}},\"resources\":{\"ids\":[\"wrwjfeu\",\"nhutjeltmrldhugj\"]},\"correlationid\":\"zdatqxhocdg\"}") + .toObject(ExecuteHibernateContent.class); + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(681393134, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(264024813, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.HIBERNATE, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("wrwjfeu", model.resources().ids().get(0)); + Assertions.assertEquals("zdatqxhocdg", model.correlationid()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExecuteHibernateContent model = new ExecuteHibernateContent() + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) + .withRetryPolicy(new RetryPolicy().withRetryCount(681393134) + .withRetryWindowInMinutes(264024813) + .withOnFailureAction(ResourceOperationType.HIBERNATE))) + .withResources(new Resources().withIds(Arrays.asList("wrwjfeu", "nhutjeltmrldhugj"))) + .withCorrelationid("zdatqxhocdg"); + model = BinaryData.fromObject(model).toObject(ExecuteHibernateContent.class); + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(681393134, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(264024813, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.HIBERNATE, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("wrwjfeu", model.resources().ids().get(0)); + Assertions.assertEquals("zdatqxhocdg", model.correlationid()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteHibernateRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteHibernateRequestTests.java deleted file mode 100644 index fca7242ef7bf..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteHibernateRequestTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest; -import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.Resources; -import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExecuteHibernateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExecuteHibernateRequest model = BinaryData.fromString( - "{\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1356626713,\"retryWindowInMinutes\":1437691312}},\"resources\":{\"ids\":[\"p\",\"wnzlljfmppeeb\",\"mgxsab\"]},\"correlationid\":\"yqduujit\"}") - .toObject(ExecuteHibernateRequest.class); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, - model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1356626713, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1437691312, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("p", model.resources().ids().get(0)); - Assertions.assertEquals("yqduujit", model.correlationid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExecuteHibernateRequest model = new ExecuteHibernateRequest() - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(1356626713).withRetryWindowInMinutes(1437691312))) - .withResources(new Resources().withIds(Arrays.asList("p", "wnzlljfmppeeb", "mgxsab"))) - .withCorrelationid("yqduujit"); - model = BinaryData.fromObject(model).toObject(ExecuteHibernateRequest.class); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, - model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1356626713, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1437691312, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("p", model.resources().ids().get(0)); - Assertions.assertEquals("yqduujit", model.correlationid()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteStartContentTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteStartContentTests.java new file mode 100644 index 000000000000..d732377227c5 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteStartContentTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ExecuteStartContent; +import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; +import com.azure.resourcemanager.computeschedule.models.Resources; +import com.azure.resourcemanager.computeschedule.models.RetryPolicy; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ExecuteStartContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExecuteStartContent model = BinaryData.fromString( + "{\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":950218840,\"retryWindowInMinutes\":1780121294,\"onFailureAction\":\"Hibernate\"}},\"resources\":{\"ids\":[\"ndv\",\"aozwyiftyhxhu\",\"okftyxolniwpwcuk\",\"fkgiawxk\"]},\"correlationid\":\"ryplwckbasyypn\"}") + .toObject(ExecuteStartContent.class); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(950218840, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1780121294, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.HIBERNATE, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("ndv", model.resources().ids().get(0)); + Assertions.assertEquals("ryplwckbasyypn", model.correlationid()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExecuteStartContent model = new ExecuteStartContent() + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) + .withRetryPolicy(new RetryPolicy().withRetryCount(950218840) + .withRetryWindowInMinutes(1780121294) + .withOnFailureAction(ResourceOperationType.HIBERNATE))) + .withResources( + new Resources().withIds(Arrays.asList("ndv", "aozwyiftyhxhu", "okftyxolniwpwcuk", "fkgiawxk"))) + .withCorrelationid("ryplwckbasyypn"); + model = BinaryData.fromObject(model).toObject(ExecuteStartContent.class); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(950218840, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1780121294, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.HIBERNATE, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("ndv", model.resources().ids().get(0)); + Assertions.assertEquals("ryplwckbasyypn", model.correlationid()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteStartRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteStartRequestTests.java deleted file mode 100644 index 38cf2bf6cc7e..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteStartRequestTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest; -import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.Resources; -import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExecuteStartRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExecuteStartRequest model = BinaryData.fromString( - "{\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":2117023774,\"retryWindowInMinutes\":1003107077}},\"resources\":{\"ids\":[\"dhkrwpdappdsbdk\",\"wrwjfeu\"]},\"correlationid\":\"nhutjeltmrldhugj\"}") - .toObject(ExecuteStartRequest.class); - Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(2117023774, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1003107077, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("dhkrwpdappdsbdk", model.resources().ids().get(0)); - Assertions.assertEquals("nhutjeltmrldhugj", model.correlationid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExecuteStartRequest model = new ExecuteStartRequest() - .withExecutionParameters(new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(2117023774).withRetryWindowInMinutes(1003107077))) - .withResources(new Resources().withIds(Arrays.asList("dhkrwpdappdsbdk", "wrwjfeu"))) - .withCorrelationid("nhutjeltmrldhugj"); - model = BinaryData.fromObject(model).toObject(ExecuteStartRequest.class); - Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(2117023774, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1003107077, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("dhkrwpdappdsbdk", model.resources().ids().get(0)); - Assertions.assertEquals("nhutjeltmrldhugj", model.correlationid()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecutionParametersTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecutionParametersTests.java index a92d1d32cc52..c3908051abbd 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecutionParametersTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecutionParametersTests.java @@ -7,6 +7,7 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import org.junit.jupiter.api.Assertions; @@ -14,21 +15,25 @@ public final class ExecutionParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExecutionParameters model = BinaryData.fromString( - "{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":1742906904,\"retryWindowInMinutes\":1574574303}}") + "{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":1753847734,\"retryWindowInMinutes\":768699380,\"onFailureAction\":\"Start\"}}") .toObject(ExecutionParameters.class); Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.optimizationPreference()); - Assertions.assertEquals(1742906904, model.retryPolicy().retryCount()); - Assertions.assertEquals(1574574303, model.retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(1753847734, model.retryPolicy().retryCount()); + Assertions.assertEquals(768699380, model.retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.START, model.retryPolicy().onFailureAction()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExecutionParameters model = new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) - .withRetryPolicy(new RetryPolicy().withRetryCount(1742906904).withRetryWindowInMinutes(1574574303)); + .withRetryPolicy(new RetryPolicy().withRetryCount(1753847734) + .withRetryWindowInMinutes(768699380) + .withOnFailureAction(ResourceOperationType.START)); model = BinaryData.fromObject(model).toObject(ExecutionParameters.class); Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.optimizationPreference()); - Assertions.assertEquals(1742906904, model.retryPolicy().retryCount()); - Assertions.assertEquals(1574574303, model.retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(1753847734, model.retryPolicy().retryCount()); + Assertions.assertEquals(768699380, model.retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.START, model.retryPolicy().onFailureAction()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExtendedLocationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExtendedLocationTests.java new file mode 100644 index 000000000000..26a1bc624d7a --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExtendedLocationTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ExtendedLocation; +import com.azure.resourcemanager.computeschedule.models.ExtendedLocationType; +import org.junit.jupiter.api.Assertions; + +public final class ExtendedLocationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExtendedLocation model = BinaryData.fromString("{\"name\":\"inpvswjdkirsoodq\",\"type\":\"EdgeZone\"}") + .toObject(ExtendedLocation.class); + Assertions.assertEquals("inpvswjdkirsoodq", model.name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExtendedLocation model + = new ExtendedLocation().withName("inpvswjdkirsoodq").withType(ExtendedLocationType.EDGE_ZONE); + model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); + Assertions.assertEquals("inpvswjdkirsoodq", model.name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.type()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/FlexPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/FlexPropertiesTests.java new file mode 100644 index 000000000000..8abe70ac441e --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/FlexPropertiesTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.AllocationStrategy; +import com.azure.resourcemanager.computeschedule.models.DistributionStrategy; +import com.azure.resourcemanager.computeschedule.models.FlexProperties; +import com.azure.resourcemanager.computeschedule.models.OsType; +import com.azure.resourcemanager.computeschedule.models.PriorityProfile; +import com.azure.resourcemanager.computeschedule.models.PriorityType; +import com.azure.resourcemanager.computeschedule.models.VmSizeProfile; +import com.azure.resourcemanager.computeschedule.models.ZoneAllocationPolicy; +import com.azure.resourcemanager.computeschedule.models.ZonePreference; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class FlexPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FlexProperties model = BinaryData.fromString( + "{\"vmSizeProfiles\":[{\"name\":\"bqtkoievseotgqr\",\"rank\":1291535699},{\"name\":\"tmuwlauwzi\",\"rank\":1035303462}],\"osType\":\"Windows\",\"priorityProfile\":{\"type\":\"Spot\",\"allocationStrategy\":\"CapacityOptimized\"},\"zoneAllocationPolicy\":{\"distributionStrategy\":\"BestEffortBalanced\",\"zonePreferences\":[{\"zone\":\"muvp\",\"rank\":2069493119},{\"zone\":\"tdum\",\"rank\":331782024},{\"zone\":\"p\",\"rank\":360418478},{\"zone\":\"ebmnzbtbhjpglk\",\"rank\":1389073231}]}}") + .toObject(FlexProperties.class); + Assertions.assertEquals("bqtkoievseotgqr", model.vmSizeProfiles().get(0).name()); + Assertions.assertEquals(1291535699, model.vmSizeProfiles().get(0).rank()); + Assertions.assertEquals(OsType.WINDOWS, model.osType()); + Assertions.assertEquals(PriorityType.SPOT, model.priorityProfile().type()); + Assertions.assertEquals(AllocationStrategy.CAPACITY_OPTIMIZED, model.priorityProfile().allocationStrategy()); + Assertions.assertEquals(DistributionStrategy.BEST_EFFORT_BALANCED, + model.zoneAllocationPolicy().distributionStrategy()); + Assertions.assertEquals("muvp", model.zoneAllocationPolicy().zonePreferences().get(0).zone()); + Assertions.assertEquals(2069493119, model.zoneAllocationPolicy().zonePreferences().get(0).rank()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FlexProperties model = new FlexProperties() + .withVmSizeProfiles(Arrays.asList(new VmSizeProfile().withName("bqtkoievseotgqr").withRank(1291535699), + new VmSizeProfile().withName("tmuwlauwzi").withRank(1035303462))) + .withOsType(OsType.WINDOWS) + .withPriorityProfile(new PriorityProfile().withType(PriorityType.SPOT) + .withAllocationStrategy(AllocationStrategy.CAPACITY_OPTIMIZED)) + .withZoneAllocationPolicy( + new ZoneAllocationPolicy().withDistributionStrategy(DistributionStrategy.BEST_EFFORT_BALANCED) + .withZonePreferences(Arrays.asList(new ZonePreference().withZone("muvp").withRank(2069493119), + new ZonePreference().withZone("tdum").withRank(331782024), + new ZonePreference().withZone("p").withRank(360418478), + new ZonePreference().withZone("ebmnzbtbhjpglk").withRank(1389073231)))); + model = BinaryData.fromObject(model).toObject(FlexProperties.class); + Assertions.assertEquals("bqtkoievseotgqr", model.vmSizeProfiles().get(0).name()); + Assertions.assertEquals(1291535699, model.vmSizeProfiles().get(0).rank()); + Assertions.assertEquals(OsType.WINDOWS, model.osType()); + Assertions.assertEquals(PriorityType.SPOT, model.priorityProfile().type()); + Assertions.assertEquals(AllocationStrategy.CAPACITY_OPTIMIZED, model.priorityProfile().allocationStrategy()); + Assertions.assertEquals(DistributionStrategy.BEST_EFFORT_BALANCED, + model.zoneAllocationPolicy().distributionStrategy()); + Assertions.assertEquals("muvp", model.zoneAllocationPolicy().zonePreferences().get(0).zone()); + Assertions.assertEquals(2069493119, model.zoneAllocationPolicy().zonePreferences().get(0).rank()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationErrorsRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationErrorsContentTests.java similarity index 50% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationErrorsRequestTests.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationErrorsContentTests.java index 22d51db4bb26..1c769fc9eb4b 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationErrorsRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationErrorsContentTests.java @@ -5,24 +5,24 @@ package com.azure.resourcemanager.computeschedule.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsRequest; +import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsContent; import java.util.Arrays; import org.junit.jupiter.api.Assertions; -public final class GetOperationErrorsRequestTests { +public final class GetOperationErrorsContentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - GetOperationErrorsRequest model - = BinaryData.fromString("{\"operationIds\":[\"nruj\",\"guhmuouqfpr\",\"zw\",\"nguitnwuizgazxu\"]}") - .toObject(GetOperationErrorsRequest.class); - Assertions.assertEquals("nruj", model.operationIds().get(0)); + GetOperationErrorsContent model + = BinaryData.fromString("{\"operationIds\":[\"butauvfb\",\"kuwhh\",\"hykojoxafnndlpic\",\"koymkcd\"]}") + .toObject(GetOperationErrorsContent.class); + Assertions.assertEquals("butauvfb", model.operationIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GetOperationErrorsRequest model = new GetOperationErrorsRequest() - .withOperationIds(Arrays.asList("nruj", "guhmuouqfpr", "zw", "nguitnwuizgazxu")); - model = BinaryData.fromObject(model).toObject(GetOperationErrorsRequest.class); - Assertions.assertEquals("nruj", model.operationIds().get(0)); + GetOperationErrorsContent model = new GetOperationErrorsContent() + .withOperationIds(Arrays.asList("butauvfb", "kuwhh", "hykojoxafnndlpic", "koymkcd")); + model = BinaryData.fromObject(model).toObject(GetOperationErrorsContent.class); + Assertions.assertEquals("butauvfb", model.operationIds().get(0)); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationStatusContentTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationStatusContentTests.java new file mode 100644 index 000000000000..98d8e874cc12 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationStatusContentTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.GetOperationStatusContent; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class GetOperationStatusContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GetOperationStatusContent model = BinaryData + .fromString("{\"operationIds\":[\"brh\",\"sxsdqrhzoymibm\",\"qyib\"],\"correlationid\":\"hwflu\"}") + .toObject(GetOperationStatusContent.class); + Assertions.assertEquals("brh", model.operationIds().get(0)); + Assertions.assertEquals("hwflu", model.correlationid()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GetOperationStatusContent model + = new GetOperationStatusContent().withOperationIds(Arrays.asList("brh", "sxsdqrhzoymibm", "qyib")) + .withCorrelationid("hwflu"); + model = BinaryData.fromObject(model).toObject(GetOperationStatusContent.class); + Assertions.assertEquals("brh", model.operationIds().get(0)); + Assertions.assertEquals("hwflu", model.correlationid()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationStatusRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationStatusRequestTests.java deleted file mode 100644 index 3cc1e0a61fd1..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationStatusRequestTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.GetOperationStatusRequest; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GetOperationStatusRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GetOperationStatusRequest model = BinaryData - .fromString("{\"operationIds\":[\"mbmbexppbh\",\"q\",\"rolfpfp\"],\"correlationid\":\"algbquxigjyjg\"}") - .toObject(GetOperationStatusRequest.class); - Assertions.assertEquals("mbmbexppbh", model.operationIds().get(0)); - Assertions.assertEquals("algbquxigjyjg", model.correlationid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GetOperationStatusRequest model - = new GetOperationStatusRequest().withOperationIds(Arrays.asList("mbmbexppbh", "q", "rolfpfp")) - .withCorrelationid("algbquxigjyjg"); - model = BinaryData.fromObject(model).toObject(GetOperationStatusRequest.class); - Assertions.assertEquals("mbmbexppbh", model.operationIds().get(0)); - Assertions.assertEquals("algbquxigjyjg", model.correlationid()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/HostEndpointSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/HostEndpointSettingsTests.java new file mode 100644 index 000000000000..9f3c5caf987b --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/HostEndpointSettingsTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.HostEndpointSettings; +import com.azure.resourcemanager.computeschedule.models.Modes; +import org.junit.jupiter.api.Assertions; + +public final class HostEndpointSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HostEndpointSettings model + = BinaryData.fromString("{\"mode\":\"Audit\",\"inVMAccessControlProfileReferenceId\":\"jfauvjfdxxi\"}") + .toObject(HostEndpointSettings.class); + Assertions.assertEquals(Modes.AUDIT, model.mode()); + Assertions.assertEquals("jfauvjfdxxi", model.inVMAccessControlProfileReferenceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HostEndpointSettings model + = new HostEndpointSettings().withMode(Modes.AUDIT).withInVMAccessControlProfileReferenceId("jfauvjfdxxi"); + model = BinaryData.fromObject(model).toObject(HostEndpointSettings.class); + Assertions.assertEquals(Modes.AUDIT, model.mode()); + Assertions.assertEquals("jfauvjfdxxi", model.inVMAccessControlProfileReferenceId()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ImageReferenceTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ImageReferenceTests.java new file mode 100644 index 000000000000..27c05ffbb2fb --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ImageReferenceTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ImageReference; +import org.junit.jupiter.api.Assertions; + +public final class ImageReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ImageReference model = BinaryData.fromString( + "{\"publisher\":\"eicxmqciwqvhkhi\",\"offer\":\"igdtopbob\",\"sku\":\"ghmewuam\",\"version\":\"hrzayvvtpgvdf\",\"sharedGalleryImageId\":\"otkftutqxlngx\",\"communityGalleryImageId\":\"fgugnxkrxdqmid\",\"id\":\"hzrvqd\"}") + .toObject(ImageReference.class); + Assertions.assertEquals("hzrvqd", model.id()); + Assertions.assertEquals("eicxmqciwqvhkhi", model.publisher()); + Assertions.assertEquals("igdtopbob", model.offer()); + Assertions.assertEquals("ghmewuam", model.sku()); + Assertions.assertEquals("hrzayvvtpgvdf", model.version()); + Assertions.assertEquals("otkftutqxlngx", model.sharedGalleryImageId()); + Assertions.assertEquals("fgugnxkrxdqmid", model.communityGalleryImageId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ImageReference model = new ImageReference().withId("hzrvqd") + .withPublisher("eicxmqciwqvhkhi") + .withOffer("igdtopbob") + .withSku("ghmewuam") + .withVersion("hrzayvvtpgvdf") + .withSharedGalleryImageId("otkftutqxlngx") + .withCommunityGalleryImageId("fgugnxkrxdqmid"); + model = BinaryData.fromObject(model).toObject(ImageReference.class); + Assertions.assertEquals("hzrvqd", model.id()); + Assertions.assertEquals("eicxmqciwqvhkhi", model.publisher()); + Assertions.assertEquals("igdtopbob", model.offer()); + Assertions.assertEquals("ghmewuam", model.sku()); + Assertions.assertEquals("hrzayvvtpgvdf", model.version()); + Assertions.assertEquals("otkftutqxlngx", model.sharedGalleryImageId()); + Assertions.assertEquals("fgugnxkrxdqmid", model.communityGalleryImageId()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxPatchSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxPatchSettingsTests.java new file mode 100644 index 000000000000..2c3c9c6baeea --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxPatchSettingsTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.LinuxPatchAssessmentMode; +import com.azure.resourcemanager.computeschedule.models.LinuxPatchSettings; +import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting; +import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformSettings; +import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchMode; +import org.junit.jupiter.api.Assertions; + +public final class LinuxPatchSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LinuxPatchSettings model = BinaryData.fromString( + "{\"patchMode\":\"ImageDefault\",\"assessmentMode\":\"ImageDefault\",\"automaticByPlatformSettings\":{\"rebootSetting\":\"Unknown\",\"bypassPlatformSafetyChecksOnUserSchedule\":true}}") + .toObject(LinuxPatchSettings.class); + Assertions.assertEquals(LinuxVMGuestPatchMode.IMAGE_DEFAULT, model.patchMode()); + Assertions.assertEquals(LinuxPatchAssessmentMode.IMAGE_DEFAULT, model.assessmentMode()); + Assertions.assertEquals(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN, + model.automaticByPlatformSettings().rebootSetting()); + Assertions.assertTrue(model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LinuxPatchSettings model = new LinuxPatchSettings().withPatchMode(LinuxVMGuestPatchMode.IMAGE_DEFAULT) + .withAssessmentMode(LinuxPatchAssessmentMode.IMAGE_DEFAULT) + .withAutomaticByPlatformSettings(new LinuxVMGuestPatchAutomaticByPlatformSettings() + .withRebootSetting(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN) + .withBypassPlatformSafetyChecksOnUserSchedule(true)); + model = BinaryData.fromObject(model).toObject(LinuxPatchSettings.class); + Assertions.assertEquals(LinuxVMGuestPatchMode.IMAGE_DEFAULT, model.patchMode()); + Assertions.assertEquals(LinuxPatchAssessmentMode.IMAGE_DEFAULT, model.assessmentMode()); + Assertions.assertEquals(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN, + model.automaticByPlatformSettings().rebootSetting()); + Assertions.assertTrue(model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxVMGuestPatchAutomaticByPlatformSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxVMGuestPatchAutomaticByPlatformSettingsTests.java new file mode 100644 index 000000000000..5affa4968678 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxVMGuestPatchAutomaticByPlatformSettingsTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting; +import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformSettings; +import org.junit.jupiter.api.Assertions; + +public final class LinuxVMGuestPatchAutomaticByPlatformSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LinuxVMGuestPatchAutomaticByPlatformSettings model = BinaryData + .fromString("{\"rebootSetting\":\"IfRequired\",\"bypassPlatformSafetyChecksOnUserSchedule\":false}") + .toObject(LinuxVMGuestPatchAutomaticByPlatformSettings.class); + Assertions.assertEquals(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.IF_REQUIRED, model.rebootSetting()); + Assertions.assertFalse(model.bypassPlatformSafetyChecksOnUserSchedule()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LinuxVMGuestPatchAutomaticByPlatformSettings model = new LinuxVMGuestPatchAutomaticByPlatformSettings() + .withRebootSetting(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.IF_REQUIRED) + .withBypassPlatformSafetyChecksOnUserSchedule(false); + model = BinaryData.fromObject(model).toObject(LinuxVMGuestPatchAutomaticByPlatformSettings.class); + Assertions.assertEquals(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.IF_REQUIRED, model.rebootSetting()); + Assertions.assertFalse(model.bypassPlatformSafetyChecksOnUserSchedule()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ManagedDiskParametersTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ManagedDiskParametersTests.java new file mode 100644 index 000000000000..b721192c7a88 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ManagedDiskParametersTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DiskEncryptionSetParameters; +import com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters; +import com.azure.resourcemanager.computeschedule.models.SecurityEncryptionTypes; +import com.azure.resourcemanager.computeschedule.models.StorageAccountTypes; +import com.azure.resourcemanager.computeschedule.models.VMDiskSecurityProfile; +import org.junit.jupiter.api.Assertions; + +public final class ManagedDiskParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedDiskParameters model = BinaryData.fromString( + "{\"storageAccountType\":\"Premium_LRS\",\"diskEncryptionSet\":{\"id\":\"sxlzevgbmqj\"},\"securityProfile\":{\"securityEncryptionType\":\"NonPersistedTPM\",\"diskEncryptionSet\":{\"id\":\"mivkwlzuvcc\"}},\"id\":\"nfnbacfionlebxe\"}") + .toObject(ManagedDiskParameters.class); + Assertions.assertEquals("nfnbacfionlebxe", model.id()); + Assertions.assertEquals(StorageAccountTypes.PREMIUM_LRS, model.storageAccountType()); + Assertions.assertEquals("sxlzevgbmqj", model.diskEncryptionSet().id()); + Assertions.assertEquals(SecurityEncryptionTypes.NON_PERSISTED_TPM, + model.securityProfile().securityEncryptionType()); + Assertions.assertEquals("mivkwlzuvcc", model.securityProfile().diskEncryptionSet().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedDiskParameters model = new ManagedDiskParameters().withId("nfnbacfionlebxe") + .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("sxlzevgbmqj")) + .withSecurityProfile( + new VMDiskSecurityProfile().withSecurityEncryptionType(SecurityEncryptionTypes.NON_PERSISTED_TPM) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("mivkwlzuvcc"))); + model = BinaryData.fromObject(model).toObject(ManagedDiskParameters.class); + Assertions.assertEquals("nfnbacfionlebxe", model.id()); + Assertions.assertEquals(StorageAccountTypes.PREMIUM_LRS, model.storageAccountType()); + Assertions.assertEquals("sxlzevgbmqj", model.diskEncryptionSet().id()); + Assertions.assertEquals(SecurityEncryptionTypes.NON_PERSISTED_TPM, + model.securityProfile().securityEncryptionType()); + Assertions.assertEquals("mivkwlzuvcc", model.securityProfile().diskEncryptionSet().id()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferencePropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferencePropertiesTests.java new file mode 100644 index 000000000000..6fa9d7e33f5f --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferencePropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; +import org.junit.jupiter.api.Assertions; + +public final class NetworkInterfaceReferencePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkInterfaceReferenceProperties model + = BinaryData.fromString("{\"primary\":false,\"deleteOption\":\"Delete\"}") + .toObject(NetworkInterfaceReferenceProperties.class); + Assertions.assertFalse(model.primary()); + Assertions.assertEquals(DeleteOptions.DELETE, model.deleteOption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkInterfaceReferenceProperties model + = new NetworkInterfaceReferenceProperties().withPrimary(false).withDeleteOption(DeleteOptions.DELETE); + model = BinaryData.fromObject(model).toObject(NetworkInterfaceReferenceProperties.class); + Assertions.assertFalse(model.primary()); + Assertions.assertEquals(DeleteOptions.DELETE, model.deleteOption()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferenceTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferenceTests.java new file mode 100644 index 000000000000..57aec2e430e0 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferenceTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; +import org.junit.jupiter.api.Assertions; + +public final class NetworkInterfaceReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkInterfaceReference model + = BinaryData.fromString("{\"properties\":{\"primary\":true,\"deleteOption\":\"Detach\"},\"id\":\"hl\"}") + .toObject(NetworkInterfaceReference.class); + Assertions.assertEquals("hl", model.id()); + Assertions.assertTrue(model.properties().primary()); + Assertions.assertEquals(DeleteOptions.DETACH, model.properties().deleteOption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkInterfaceReference model = new NetworkInterfaceReference().withId("hl") + .withProperties( + new NetworkInterfaceReferenceProperties().withPrimary(true).withDeleteOption(DeleteOptions.DETACH)); + model = BinaryData.fromObject(model).toObject(NetworkInterfaceReference.class); + Assertions.assertEquals("hl", model.id()); + Assertions.assertTrue(model.properties().primary()); + Assertions.assertEquals(DeleteOptions.DETACH, model.properties().deleteOption()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkProfileTests.java new file mode 100644 index 000000000000..418d65e9b29e --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkProfileTests.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.management.SubResource; +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.NetworkApiVersion; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliaryMode; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliarySku; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; +import com.azure.resourcemanager.computeschedule.models.NetworkProfile; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfigurationProperties; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class NetworkProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkProfile model = BinaryData.fromString( + "{\"networkInterfaces\":[{\"properties\":{\"primary\":false,\"deleteOption\":\"Delete\"},\"id\":\"rm\"},{\"properties\":{\"primary\":false,\"deleteOption\":\"Delete\"},\"id\":\"kpnpulexxbczwtr\"}],\"networkApiVersion\":\"2020-11-01\",\"networkInterfaceConfigurations\":[{\"name\":\"bq\",\"properties\":{\"primary\":false,\"deleteOption\":\"Detach\",\"enableAcceleratedNetworking\":false,\"disableTcpStateTracking\":false,\"enableFpga\":true,\"enableIPForwarding\":false,\"networkSecurityGroup\":{\"id\":\"hzdobpxjmflbvvnc\"},\"dnsSettings\":{\"dnsServers\":[\"ciwwzjuqkhr\"]},\"ipConfigurations\":[{\"name\":\"jiwkuofoskghsau\",\"properties\":{}},{\"name\":\"mjmvxieduugidyjr\",\"properties\":{}}],\"dscpConfiguration\":{\"id\":\"aos\"},\"auxiliaryMode\":\"None\",\"auxiliarySku\":\"A1\"},\"tags\":{\"vleggzfbuhfmvfax\":\"pclhocohslk\"}}]}") + .toObject(NetworkProfile.class); + Assertions.assertEquals("rm", model.networkInterfaces().get(0).id()); + Assertions.assertFalse(model.networkInterfaces().get(0).properties().primary()); + Assertions.assertEquals(DeleteOptions.DELETE, model.networkInterfaces().get(0).properties().deleteOption()); + Assertions.assertEquals(NetworkApiVersion.TWO_ZERO_TWO_ZERO_ONE_ONE_ZERO_ONE, model.networkApiVersion()); + Assertions.assertEquals("bq", model.networkInterfaceConfigurations().get(0).name()); + Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().primary()); + Assertions.assertEquals(DeleteOptions.DETACH, + model.networkInterfaceConfigurations().get(0).properties().deleteOption()); + Assertions + .assertFalse(model.networkInterfaceConfigurations().get(0).properties().enableAcceleratedNetworking()); + Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().disableTcpStateTracking()); + Assertions.assertTrue(model.networkInterfaceConfigurations().get(0).properties().enableFpga()); + Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().enableIPForwarding()); + Assertions.assertEquals("hzdobpxjmflbvvnc", + model.networkInterfaceConfigurations().get(0).properties().networkSecurityGroup().id()); + Assertions.assertEquals("ciwwzjuqkhr", + model.networkInterfaceConfigurations().get(0).properties().dnsSettings().dnsServers().get(0)); + Assertions.assertEquals("jiwkuofoskghsau", + model.networkInterfaceConfigurations().get(0).properties().ipConfigurations().get(0).name()); + Assertions.assertEquals("aos", + model.networkInterfaceConfigurations().get(0).properties().dscpConfiguration().id()); + Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.NONE, + model.networkInterfaceConfigurations().get(0).properties().auxiliaryMode()); + Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A1, + model.networkInterfaceConfigurations().get(0).properties().auxiliarySku()); + Assertions.assertEquals("pclhocohslk", + model.networkInterfaceConfigurations().get(0).tags().get("vleggzfbuhfmvfax")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkProfile model = new NetworkProfile() + .withNetworkInterfaces(Arrays.asList( + new NetworkInterfaceReference().withId("rm") + .withProperties(new NetworkInterfaceReferenceProperties().withPrimary(false) + .withDeleteOption(DeleteOptions.DELETE)), + new NetworkInterfaceReference().withId("kpnpulexxbczwtr") + .withProperties(new NetworkInterfaceReferenceProperties().withPrimary(false) + .withDeleteOption(DeleteOptions.DELETE)))) + .withNetworkApiVersion(NetworkApiVersion.TWO_ZERO_TWO_ZERO_ONE_ONE_ZERO_ONE) + .withNetworkInterfaceConfigurations( + Arrays.asList(new VirtualMachineNetworkInterfaceConfiguration().withName("bq") + .withProperties(new VirtualMachineNetworkInterfaceConfigurationProperties().withPrimary(false) + .withDeleteOption(DeleteOptions.DETACH) + .withEnableAcceleratedNetworking(false) + .withDisableTcpStateTracking(false) + .withEnableFpga(true) + .withEnableIPForwarding(false) + .withNetworkSecurityGroup(new SubResource().withId("hzdobpxjmflbvvnc")) + .withDnsSettings(new VirtualMachineNetworkInterfaceDnsSettingsConfiguration() + .withDnsServers(Arrays.asList("ciwwzjuqkhr"))) + .withIpConfigurations(Arrays.asList( + new VirtualMachineNetworkInterfaceIPConfiguration().withName("jiwkuofoskghsau") + .withProperties(new VirtualMachineNetworkInterfaceIPConfigurationProperties()), + new VirtualMachineNetworkInterfaceIPConfiguration().withName("mjmvxieduugidyjr") + .withProperties(new VirtualMachineNetworkInterfaceIPConfigurationProperties()))) + .withDscpConfiguration(new SubResource().withId("aos")) + .withAuxiliaryMode(NetworkInterfaceAuxiliaryMode.NONE) + .withAuxiliarySku(NetworkInterfaceAuxiliarySku.A1)) + .withTags(mapOf("vleggzfbuhfmvfax", "pclhocohslk")))); + model = BinaryData.fromObject(model).toObject(NetworkProfile.class); + Assertions.assertEquals("rm", model.networkInterfaces().get(0).id()); + Assertions.assertFalse(model.networkInterfaces().get(0).properties().primary()); + Assertions.assertEquals(DeleteOptions.DELETE, model.networkInterfaces().get(0).properties().deleteOption()); + Assertions.assertEquals(NetworkApiVersion.TWO_ZERO_TWO_ZERO_ONE_ONE_ZERO_ONE, model.networkApiVersion()); + Assertions.assertEquals("bq", model.networkInterfaceConfigurations().get(0).name()); + Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().primary()); + Assertions.assertEquals(DeleteOptions.DETACH, + model.networkInterfaceConfigurations().get(0).properties().deleteOption()); + Assertions + .assertFalse(model.networkInterfaceConfigurations().get(0).properties().enableAcceleratedNetworking()); + Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().disableTcpStateTracking()); + Assertions.assertTrue(model.networkInterfaceConfigurations().get(0).properties().enableFpga()); + Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().enableIPForwarding()); + Assertions.assertEquals("hzdobpxjmflbvvnc", + model.networkInterfaceConfigurations().get(0).properties().networkSecurityGroup().id()); + Assertions.assertEquals("ciwwzjuqkhr", + model.networkInterfaceConfigurations().get(0).properties().dnsSettings().dnsServers().get(0)); + Assertions.assertEquals("jiwkuofoskghsau", + model.networkInterfaceConfigurations().get(0).properties().ipConfigurations().get(0).name()); + Assertions.assertEquals("aos", + model.networkInterfaceConfigurations().get(0).properties().dscpConfiguration().id()); + Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.NONE, + model.networkInterfaceConfigurations().get(0).properties().auxiliaryMode()); + Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A1, + model.networkInterfaceConfigurations().get(0).properties().auxiliarySku()); + Assertions.assertEquals("pclhocohslk", + model.networkInterfaceConfigurations().get(0).tags().get("vleggzfbuhfmvfax")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NotificationPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NotificationPropertiesTests.java index 1871bbe7ddf5..f6e3dcac8421 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NotificationPropertiesTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NotificationPropertiesTests.java @@ -14,9 +14,9 @@ public final class NotificationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NotificationProperties model = BinaryData - .fromString("{\"destination\":\"r\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}") + .fromString("{\"destination\":\"ygdvwv\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}") .toObject(NotificationProperties.class); - Assertions.assertEquals("r", model.destination()); + Assertions.assertEquals("ygdvwv", model.destination()); Assertions.assertEquals(NotificationType.EMAIL, model.type()); Assertions.assertEquals(Language.EN_US, model.language()); Assertions.assertTrue(model.disabled()); @@ -24,12 +24,12 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NotificationProperties model = new NotificationProperties().withDestination("r") + NotificationProperties model = new NotificationProperties().withDestination("ygdvwv") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true); model = BinaryData.fromObject(model).toObject(NotificationProperties.class); - Assertions.assertEquals("r", model.destination()); + Assertions.assertEquals("ygdvwv", model.destination()); Assertions.assertEquals(NotificationType.EMAIL, model.type()); Assertions.assertEquals(Language.EN_US, model.language()); Assertions.assertTrue(model.disabled()); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OSImageNotificationProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OSImageNotificationProfileTests.java new file mode 100644 index 000000000000..22733b9a80d8 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OSImageNotificationProfileTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.OSImageNotificationProfile; +import org.junit.jupiter.api.Assertions; + +public final class OSImageNotificationProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OSImageNotificationProfile model = BinaryData.fromString("{\"notBeforeTimeout\":\"birx\",\"enable\":true}") + .toObject(OSImageNotificationProfile.class); + Assertions.assertEquals("birx", model.notBeforeTimeout()); + Assertions.assertTrue(model.enable()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OSImageNotificationProfile model + = new OSImageNotificationProfile().withNotBeforeTimeout("birx").withEnable(true); + model = BinaryData.fromObject(model).toObject(OSImageNotificationProfile.class); + Assertions.assertEquals("birx", model.notBeforeTimeout()); + Assertions.assertTrue(model.enable()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OperationsListMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OperationsListMockTests.java index d4c7b5b2f1d7..bd5cd4eb5b79 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OperationsListMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"uhprwmdyvxqt\",\"isDataAction\":false,\"display\":{\"provider\":\"wroyqbexrmcq\",\"resource\":\"ycnojvknmefqsg\",\"operation\":\"ah\",\"description\":\"jyzhpvgq\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"zlmvfelfktgp\",\"isDataAction\":false,\"display\":{\"provider\":\"jxeznoigbrnjwmw\",\"resource\":\"nbsazejjoqkag\",\"operation\":\"sxtta\",\"description\":\"zxnfaaz\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PatchSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PatchSettingsTests.java new file mode 100644 index 000000000000..fb3ebc17b796 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PatchSettingsTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.PatchSettings; +import com.azure.resourcemanager.computeschedule.models.WindowsPatchAssessmentMode; +import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting; +import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformSettings; +import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchMode; +import org.junit.jupiter.api.Assertions; + +public final class PatchSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PatchSettings model = BinaryData.fromString( + "{\"patchMode\":\"AutomaticByPlatform\",\"enableHotpatching\":false,\"assessmentMode\":\"AutomaticByPlatform\",\"automaticByPlatformSettings\":{\"rebootSetting\":\"Always\",\"bypassPlatformSafetyChecksOnUserSchedule\":true}}") + .toObject(PatchSettings.class); + Assertions.assertEquals(WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM, model.patchMode()); + Assertions.assertFalse(model.enableHotpatching()); + Assertions.assertEquals(WindowsPatchAssessmentMode.AUTOMATIC_BY_PLATFORM, model.assessmentMode()); + Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, + model.automaticByPlatformSettings().rebootSetting()); + Assertions.assertTrue(model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PatchSettings model = new PatchSettings().withPatchMode(WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM) + .withEnableHotpatching(false) + .withAssessmentMode(WindowsPatchAssessmentMode.AUTOMATIC_BY_PLATFORM) + .withAutomaticByPlatformSettings(new WindowsVMGuestPatchAutomaticByPlatformSettings() + .withRebootSetting(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS) + .withBypassPlatformSafetyChecksOnUserSchedule(true)); + model = BinaryData.fromObject(model).toObject(PatchSettings.class); + Assertions.assertEquals(WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM, model.patchMode()); + Assertions.assertFalse(model.enableHotpatching()); + Assertions.assertEquals(WindowsPatchAssessmentMode.AUTOMATIC_BY_PLATFORM, model.assessmentMode()); + Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, + model.automaticByPlatformSettings().rebootSetting()); + Assertions.assertTrue(model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PlacementTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PlacementTests.java new file mode 100644 index 000000000000..36e15e001dc1 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PlacementTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.Placement; +import com.azure.resourcemanager.computeschedule.models.ZonePlacementPolicyType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PlacementTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Placement model = BinaryData.fromString( + "{\"zonePlacementPolicy\":\"Any\",\"includeZones\":[\"ohjtckw\",\"dsoifiyipj\"],\"excludeZones\":[\"wpgrjbzno\",\"cjxvsnbyxqab\",\"mocpc\"]}") + .toObject(Placement.class); + Assertions.assertEquals(ZonePlacementPolicyType.ANY, model.zonePlacementPolicy()); + Assertions.assertEquals("ohjtckw", model.includeZones().get(0)); + Assertions.assertEquals("wpgrjbzno", model.excludeZones().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Placement model = new Placement().withZonePlacementPolicy(ZonePlacementPolicyType.ANY) + .withIncludeZones(Arrays.asList("ohjtckw", "dsoifiyipj")) + .withExcludeZones(Arrays.asList("wpgrjbzno", "cjxvsnbyxqab", "mocpc")); + model = BinaryData.fromObject(model).toObject(Placement.class); + Assertions.assertEquals(ZonePlacementPolicyType.ANY, model.zonePlacementPolicy()); + Assertions.assertEquals("ohjtckw", model.includeZones().get(0)); + Assertions.assertEquals("wpgrjbzno", model.excludeZones().get(0)); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PriorityProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PriorityProfileTests.java new file mode 100644 index 000000000000..4406bc1e8e91 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PriorityProfileTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.AllocationStrategy; +import com.azure.resourcemanager.computeschedule.models.PriorityProfile; +import com.azure.resourcemanager.computeschedule.models.PriorityType; +import org.junit.jupiter.api.Assertions; + +public final class PriorityProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PriorityProfile model = BinaryData.fromString("{\"type\":\"Spot\",\"allocationStrategy\":\"LowestPrice\"}") + .toObject(PriorityProfile.class); + Assertions.assertEquals(PriorityType.SPOT, model.type()); + Assertions.assertEquals(AllocationStrategy.LOWEST_PRICE, model.allocationStrategy()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PriorityProfile model + = new PriorityProfile().withType(PriorityType.SPOT).withAllocationStrategy(AllocationStrategy.LOWEST_PRICE); + model = BinaryData.fromObject(model).toObject(PriorityProfile.class); + Assertions.assertEquals(PriorityType.SPOT, model.type()); + Assertions.assertEquals(AllocationStrategy.LOWEST_PRICE, model.allocationStrategy()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PublicIPAddressSkuTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PublicIPAddressSkuTests.java new file mode 100644 index 000000000000..0edcd67f2550 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PublicIPAddressSkuTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuName; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuTier; +import org.junit.jupiter.api.Assertions; + +public final class PublicIPAddressSkuTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PublicIPAddressSku model + = BinaryData.fromString("{\"name\":\"Basic\",\"tier\":\"Regional\"}").toObject(PublicIPAddressSku.class); + Assertions.assertEquals(PublicIPAddressSkuName.BASIC, model.name()); + Assertions.assertEquals(PublicIPAddressSkuTier.REGIONAL, model.tier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PublicIPAddressSku model + = new PublicIPAddressSku().withName(PublicIPAddressSkuName.BASIC).withTier(PublicIPAddressSkuTier.REGIONAL); + model = BinaryData.fromObject(model).toObject(PublicIPAddressSku.class); + Assertions.assertEquals(PublicIPAddressSkuName.BASIC, model.name()); + Assertions.assertEquals(PublicIPAddressSkuTier.REGIONAL, model.tier()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceAttachRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceAttachRequestTests.java index 9012ee18800a..1ca7f16a25ea 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceAttachRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceAttachRequestTests.java @@ -17,10 +17,10 @@ public final class ResourceAttachRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceAttachRequest model = BinaryData.fromString( - "{\"resources\":[{\"name\":\"deyeamdphagalpbu\",\"id\":\"wgipwhono\",\"type\":\"gshwankixz\",\"resourceId\":\"injep\",\"notificationSettings\":[{\"destination\":\"mryw\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ftiyqzrnkcq\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]},{\"name\":\"hzls\",\"id\":\"cohoq\",\"type\":\"wvl\",\"resourceId\":\"yav\",\"notificationSettings\":[{\"destination\":\"eun\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"yxzk\",\"id\":\"noc\",\"type\":\"oklyaxuconuq\",\"resourceId\":\"zf\",\"notificationSettings\":[{\"destination\":\"ypewrmjmwvvjekt\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}]}") + "{\"resources\":[{\"name\":\"rudsg\",\"id\":\"a\",\"type\":\"kycgrauwj\",\"resourceId\":\"etaebu\",\"notificationSettings\":[{\"destination\":\"dmovsm\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"b\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"kif\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"qujmqlgkf\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"aongbj\",\"id\":\"ntuji\",\"type\":\"jed\",\"resourceId\":\"twwaezkojvdcpzf\",\"notificationSettings\":[{\"destination\":\"uicybxarzgszuf\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"opidoamciodh\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"khnzbonlw\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"okdwb\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]}]}") .toObject(ResourceAttachRequest.class); - Assertions.assertEquals("injep", model.resources().get(0).resourceId()); - Assertions.assertEquals("mryw", model.resources().get(0).notificationSettings().get(0).destination()); + Assertions.assertEquals("etaebu", model.resources().get(0).resourceId()); + Assertions.assertEquals("dmovsm", model.resources().get(0).notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.resources().get(0).notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.resources().get(0).notificationSettings().get(0).language()); Assertions.assertFalse(model.resources().get(0).notificationSettings().get(0).disabled()); @@ -29,29 +29,45 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ResourceAttachRequest model = new ResourceAttachRequest().withResources(Arrays.asList( - new ScheduledActionResourceInner().withResourceId("injep") + new ScheduledActionResourceInner().withResourceId("etaebu") .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("mryw") + new NotificationProperties().withDestination("dmovsm") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(false), - new NotificationProperties().withDestination("ftiyqzrnkcq") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true))), - new ScheduledActionResourceInner().withResourceId("yav") - .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("eun") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false))), - new ScheduledActionResourceInner().withResourceId("zf") - .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("ypewrmjmwvvjekt") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true))))); + new NotificationProperties().withDestination("b") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("kif") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("qujmqlgkf") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false))), + new ScheduledActionResourceInner().withResourceId("twwaezkojvdcpzf") + .withNotificationSettings(Arrays.asList( + new NotificationProperties().withDestination("uicybxarzgszuf") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("opidoamciodh") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true), + new NotificationProperties().withDestination("khnzbonlw") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true), + new NotificationProperties().withDestination("okdwb") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false))))); model = BinaryData.fromObject(model).toObject(ResourceAttachRequest.class); - Assertions.assertEquals("injep", model.resources().get(0).resourceId()); - Assertions.assertEquals("mryw", model.resources().get(0).notificationSettings().get(0).destination()); + Assertions.assertEquals("etaebu", model.resources().get(0).resourceId()); + Assertions.assertEquals("dmovsm", model.resources().get(0).notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.resources().get(0).notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.resources().get(0).notificationSettings().get(0).language()); Assertions.assertFalse(model.resources().get(0).notificationSettings().get(0).disabled()); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceDetachRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceDetachRequestTests.java index 9802a58926dd..0277a8511486 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceDetachRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceDetachRequestTests.java @@ -13,16 +13,16 @@ public final class ResourceDetachRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceDetachRequest model - = BinaryData.fromString("{\"resources\":[\"utttxfvjrbirp\",\"xepcyvahfn\",\"jky\"]}") + = BinaryData.fromString("{\"resources\":[\"m\",\"r\",\"kdsnfdsdoakgtdl\",\"kkze\"]}") .toObject(ResourceDetachRequest.class); - Assertions.assertEquals("utttxfvjrbirp", model.resources().get(0)); + Assertions.assertEquals("m", model.resources().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ResourceDetachRequest model - = new ResourceDetachRequest().withResources(Arrays.asList("utttxfvjrbirp", "xepcyvahfn", "jky")); + = new ResourceDetachRequest().withResources(Arrays.asList("m", "r", "kdsnfdsdoakgtdl", "kkze")); model = BinaryData.fromObject(model).toObject(ResourceDetachRequest.class); - Assertions.assertEquals("utttxfvjrbirp", model.resources().get(0)); + Assertions.assertEquals("m", model.resources().get(0)); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceListResponseTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceListResponseTests.java index ace506e8bdd5..8c831325f4b0 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceListResponseTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceListResponseTests.java @@ -14,13 +14,13 @@ public final class ResourceListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceListResponse model = BinaryData.fromString( - "{\"value\":[{\"name\":\"ktwh\",\"id\":\"dxwzywqsmbsurexi\",\"type\":\"ryocfsfksymdd\",\"resourceId\":\"stkiiuxhqyud\",\"notificationSettings\":[{\"destination\":\"rq\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"zvyifqrvkdvj\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"vvdfwatkpnpul\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"zwtruwiqzbqjvsov\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"cspkwlhzdobpxjmf\",\"id\":\"bvvnchrkcciw\",\"type\":\"juqk\",\"resourceId\":\"rsa\",\"notificationSettings\":[{\"destination\":\"ku\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ghsauuimjmvxied\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"yjr\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"osvexcsonpclhoc\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"ev\",\"id\":\"eggzfb\",\"type\":\"fmvfaxkffeiit\",\"resourceId\":\"lvmezyvshxmzsbbz\",\"notificationSettings\":[{\"destination\":\"igrxwburvjxxjn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}],\"nextLink\":\"koen\"}") + "{\"value\":[{\"name\":\"jkniodko\",\"id\":\"ebwnujhe\",\"type\":\"sbvdkcrodtjinfw\",\"resourceId\":\"lfltka\",\"notificationSettings\":[{\"destination\":\"efkdlf\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"kfpagao\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"qblylsyxkqj\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"vti\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"sz\",\"id\":\"e\",\"type\":\"sbzkf\",\"resourceId\":\"beyvpnqicvinvkjj\",\"notificationSettings\":[{\"destination\":\"rbuukzclewyhmlwp\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ofncckwyfzqwhxxb\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"zfeqztppri\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}],\"nextLink\":\"altol\"}") .toObject(ResourceListResponse.class); - Assertions.assertEquals("stkiiuxhqyud", model.value().get(0).resourceId()); - Assertions.assertEquals("rq", model.value().get(0).notificationSettings().get(0).destination()); + Assertions.assertEquals("lfltka", model.value().get(0).resourceId()); + Assertions.assertEquals("efkdlf", model.value().get(0).notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.value().get(0).notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.value().get(0).notificationSettings().get(0).language()); Assertions.assertFalse(model.value().get(0).notificationSettings().get(0).disabled()); - Assertions.assertEquals("koen", model.nextLink()); + Assertions.assertEquals("altol", model.nextLink()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcePatchRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcePatchRequestTests.java index 7cf810eb1b38..3f187075d8a4 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcePatchRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcePatchRequestTests.java @@ -17,10 +17,11 @@ public final class ResourcePatchRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourcePatchRequest model = BinaryData.fromString( - "{\"resources\":[{\"name\":\"j\",\"id\":\"uujqgidokgjljyo\",\"type\":\"vcltbgsncgh\",\"resourceId\":\"jeszzhbijhtxfv\",\"notificationSettings\":[{\"destination\":\"fsm\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]},{\"name\":\"pvecxgodeb\",\"id\":\"qkkrb\",\"type\":\"ukgri\",\"resourceId\":\"flz\",\"notificationSettings\":[{\"destination\":\"xzpuzycisp\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"mgkbrpyydhibn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ik\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"tqagnbuynh\",\"id\":\"jggmebfsiarbu\",\"type\":\"cvpnazzmhjrunmpx\",\"resourceId\":\"tdbhrbnla\",\"notificationSettings\":[{\"destination\":\"myskpbhenbtkcxy\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"rsyn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"by\",\"id\":\"czfc\",\"type\":\"aaxdbabphlwrq\",\"resourceId\":\"fkts\",\"notificationSettings\":[{\"destination\":\"ucoc\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"zt\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"rq\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"kzywbiex\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]}]}") + "{\"resources\":[{\"name\":\"l\",\"id\":\"ewpusdsttwvogvb\",\"type\":\"jdcngqqm\",\"resourceId\":\"akufgmjz\",\"notificationSettings\":[{\"destination\":\"dgrtwaenuuzkopbm\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"woyuhhziuief\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"msmlmzq\",\"id\":\"oftrmaequia\",\"type\":\"icslfaoq\",\"resourceId\":\"piyylhalnswhccsp\",\"notificationSettings\":[{\"destination\":\"ivwitqscywugg\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"czbwemhairsbr\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"swe\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}]}") .toObject(ResourcePatchRequest.class); - Assertions.assertEquals("jeszzhbijhtxfv", model.resources().get(0).resourceId()); - Assertions.assertEquals("fsm", model.resources().get(0).notificationSettings().get(0).destination()); + Assertions.assertEquals("akufgmjz", model.resources().get(0).resourceId()); + Assertions.assertEquals("dgrtwaenuuzkopbm", + model.resources().get(0).notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.resources().get(0).notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.resources().get(0).notificationSettings().get(0).language()); Assertions.assertTrue(model.resources().get(0).notificationSettings().get(0).disabled()); @@ -29,56 +30,34 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ResourcePatchRequest model = new ResourcePatchRequest().withResources(Arrays.asList( - new ScheduledActionResourceInner().withResourceId("jeszzhbijhtxfv") - .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("fsm") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true))), - new ScheduledActionResourceInner().withResourceId("flz") + new ScheduledActionResourceInner().withResourceId("akufgmjz") .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("xzpuzycisp") + new NotificationProperties().withDestination("dgrtwaenuuzkopbm") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true), - new NotificationProperties().withDestination("mgkbrpyydhibn") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false), - new NotificationProperties().withDestination("ik") + new NotificationProperties().withDestination("woyuhhziuief") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(false))), - new ScheduledActionResourceInner().withResourceId("tdbhrbnla") + new ScheduledActionResourceInner().withResourceId("piyylhalnswhccsp") .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("myskpbhenbtkcxy") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false), - new NotificationProperties().withDestination("rsyn") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false))), - new ScheduledActionResourceInner().withResourceId("fkts") - .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("ucoc") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false), - new NotificationProperties().withDestination("zt") + new NotificationProperties().withDestination("ivwitqscywugg") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(false), - new NotificationProperties().withDestination("rq") + new NotificationProperties().withDestination("czbwemhairsbr") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true), - new NotificationProperties().withDestination("kzywbiex") + new NotificationProperties().withDestination("swe") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) - .withDisabled(false))))); + .withDisabled(true))))); model = BinaryData.fromObject(model).toObject(ResourcePatchRequest.class); - Assertions.assertEquals("jeszzhbijhtxfv", model.resources().get(0).resourceId()); - Assertions.assertEquals("fsm", model.resources().get(0).notificationSettings().get(0).destination()); + Assertions.assertEquals("akufgmjz", model.resources().get(0).resourceId()); + Assertions.assertEquals("dgrtwaenuuzkopbm", + model.resources().get(0).notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.resources().get(0).notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.resources().get(0).notificationSettings().get(0).language()); Assertions.assertTrue(model.resources().get(0).notificationSettings().get(0).disabled()); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceProvisionPayloadTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceProvisionPayloadTests.java deleted file mode 100644 index 7b9c85042644..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceProvisionPayloadTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ResourceProvisionPayload; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProvisionPayloadTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProvisionPayload model = BinaryData.fromString( - "{\"baseProfile\":{},\"resourceOverrides\":[{},{}],\"resourceCount\":1946901948,\"resourcePrefix\":\"iwpwcuk\"}") - .toObject(ResourceProvisionPayload.class); - Assertions.assertEquals(1946901948, model.resourceCount()); - Assertions.assertEquals("iwpwcuk", model.resourcePrefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProvisionPayload model = new ResourceProvisionPayload().withBaseProfile(mapOf()) - .withResourceOverrides(Arrays.asList(mapOf(), mapOf())) - .withResourceCount(1946901948) - .withResourcePrefix("iwpwcuk"); - model = BinaryData.fromObject(model).toObject(ResourceProvisionPayload.class); - Assertions.assertEquals(1946901948, model.resourceCount()); - Assertions.assertEquals("iwpwcuk", model.resourcePrefix()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcesTests.java index ae5a055fa2e0..3cf362212d22 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcesTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcesTests.java @@ -12,14 +12,14 @@ public final class ResourcesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Resources model = BinaryData.fromString("{\"ids\":[\"k\",\"vd\"]}").toObject(Resources.class); - Assertions.assertEquals("k", model.ids().get(0)); + Resources model = BinaryData.fromString("{\"ids\":[\"wvukx\",\"audccsnhs\"]}").toObject(Resources.class); + Assertions.assertEquals("wvukx", model.ids().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Resources model = new Resources().withIds(Arrays.asList("k", "vd")); + Resources model = new Resources().withIds(Arrays.asList("wvukx", "audccsnhs")); model = BinaryData.fromObject(model).toObject(Resources.class); - Assertions.assertEquals("k", model.ids().get(0)); + Assertions.assertEquals("wvukx", model.ids().get(0)); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/RetryPolicyTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/RetryPolicyTests.java index d2f0ab029712..372a627359cc 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/RetryPolicyTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/RetryPolicyTests.java @@ -5,23 +5,29 @@ package com.azure.resourcemanager.computeschedule.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import org.junit.jupiter.api.Assertions; public final class RetryPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RetryPolicy model = BinaryData.fromString("{\"retryCount\":257838249,\"retryWindowInMinutes\":355535904}") + RetryPolicy model = BinaryData + .fromString("{\"retryCount\":832798449,\"retryWindowInMinutes\":1629282531,\"onFailureAction\":\"Delete\"}") .toObject(RetryPolicy.class); - Assertions.assertEquals(257838249, model.retryCount()); - Assertions.assertEquals(355535904, model.retryWindowInMinutes()); + Assertions.assertEquals(832798449, model.retryCount()); + Assertions.assertEquals(1629282531, model.retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.DELETE, model.onFailureAction()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RetryPolicy model = new RetryPolicy().withRetryCount(257838249).withRetryWindowInMinutes(355535904); + RetryPolicy model = new RetryPolicy().withRetryCount(832798449) + .withRetryWindowInMinutes(1629282531) + .withOnFailureAction(ResourceOperationType.DELETE); model = BinaryData.fromObject(model).toObject(RetryPolicy.class); - Assertions.assertEquals(257838249, model.retryCount()); - Assertions.assertEquals(355535904, model.retryWindowInMinutes()); + Assertions.assertEquals(832798449, model.retryCount()); + Assertions.assertEquals(1629282531, model.retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.DELETE, model.onFailureAction()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduleTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduleTests.java index 5f59d8e6e37a..68df883088b6 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduleTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduleTests.java @@ -14,27 +14,27 @@ public final class ScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Schedule model = BinaryData.fromString( - "{\"deadline\":\"2021-11-30T01:16:03Z\",\"deadLine\":\"2021-08-06T18:49:52Z\",\"timezone\":\"czbysc\",\"timeZone\":\"q\",\"deadlineType\":\"Unknown\"}") + "{\"deadline\":\"2021-04-12T08:15:27Z\",\"deadLine\":\"2021-10-21T01:15:22Z\",\"timezone\":\"yscnpqxu\",\"timeZone\":\"vyq\",\"deadlineType\":\"CompleteBy\"}") .toObject(Schedule.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-30T01:16:03Z"), model.deadline()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T18:49:52Z"), model.deadLine()); - Assertions.assertEquals("czbysc", model.timezone()); - Assertions.assertEquals("q", model.timeZone()); - Assertions.assertEquals(DeadlineType.UNKNOWN, model.deadlineType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-12T08:15:27Z"), model.deadline()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-21T01:15:22Z"), model.deadLine()); + Assertions.assertEquals("yscnpqxu", model.timezone()); + Assertions.assertEquals("vyq", model.timeZone()); + Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.deadlineType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Schedule model = new Schedule().withDeadline(OffsetDateTime.parse("2021-11-30T01:16:03Z")) - .withDeadLine(OffsetDateTime.parse("2021-08-06T18:49:52Z")) - .withTimezone("czbysc") - .withTimeZone("q") - .withDeadlineType(DeadlineType.UNKNOWN); + Schedule model = new Schedule().withDeadline(OffsetDateTime.parse("2021-04-12T08:15:27Z")) + .withDeadLine(OffsetDateTime.parse("2021-10-21T01:15:22Z")) + .withTimezone("yscnpqxu") + .withTimeZone("vyq") + .withDeadlineType(DeadlineType.COMPLETE_BY); model = BinaryData.fromObject(model).toObject(Schedule.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-30T01:16:03Z"), model.deadline()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T18:49:52Z"), model.deadLine()); - Assertions.assertEquals("czbysc", model.timezone()); - Assertions.assertEquals("q", model.timeZone()); - Assertions.assertEquals(DeadlineType.UNKNOWN, model.deadlineType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-12T08:15:27Z"), model.deadline()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-21T01:15:22Z"), model.deadLine()); + Assertions.assertEquals("yscnpqxu", model.timezone()); + Assertions.assertEquals("vyq", model.timeZone()); + Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.deadlineType()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionsListByVmsMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionsListByVmsMockTests.java index a714f964a5be..1d2af07d5585 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionsListByVmsMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionsListByVmsMockTests.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.ScheduledActionResources; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; @@ -30,7 +31,7 @@ public final class ScheduledActionExtensionsListByVmsMockTests { @Test public void testListByVms() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-03-09T05:15:25Z\",\"endTime\":\"2021-12-02T07:00Z\",\"schedule\":{\"scheduledTime\":\"tclusiypbsfgy\",\"timeZone\":\"gusl\",\"requestedWeekDays\":[\"Tuesday\",\"Sunday\",\"Monday\",\"Friday\"],\"requestedMonths\":[\"July\"],\"requestedDaysOfTheMonth\":[1056864137,860507177,2023877229],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":435176888,\"retryWindowInMinutes\":2010332970}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"lolp\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"pqvujzraehtwdwrf\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"yrcdlbhshfwprac\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ykhevxccedcpnmdy\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Succeeded\",\"resourceNotificationSettings\":[{\"destination\":\"nhltiugcxn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"qiby\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"wxwlmdjrkvfgb\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]},\"id\":\"odacizs\",\"name\":\"q\",\"type\":\"hkr\"}]}"; + = "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Deallocate\",\"startTime\":\"2021-06-16T11:37:33Z\",\"endTime\":\"2021-03-28T18:59:19Z\",\"schedule\":{\"scheduledTime\":\"kb\",\"timeZone\":\"grjqctojcmi\",\"requestedWeekDays\":[\"All\"],\"requestedMonths\":[\"September\",\"May\"],\"requestedDaysOfTheMonth\":[860547851],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":359045420,\"retryWindowInMinutes\":1283952114,\"onFailureAction\":\"Create\"}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"lcwkhihihlhz\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"bsrgnowc\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Deleting\",\"resourceNotificationSettings\":[{\"destination\":\"xmwoteyowcluqo\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"gqouwifzmpj\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ikf\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]},\"id\":\"sphuagrttikteus\",\"name\":\"c\",\"type\":\"kvyklxubyjaffmm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -40,28 +41,27 @@ public void testListByVms() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.scheduledActionExtensions().listByVms("tlstvlzywem", com.azure.core.util.Context.NONE); + = manager.scheduledActionExtensions().listByVms("uxylfsbtkadpy", com.azure.core.util.Context.NONE); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, - response.iterator().next().properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.HIBERNATE, response.iterator().next().properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-09T05:15:25Z"), + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, response.iterator().next().properties().resourceType()); + Assertions.assertEquals(ScheduledActionType.DEALLOCATE, response.iterator().next().properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-16T11:37:33Z"), response.iterator().next().properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T07:00Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-28T18:59:19Z"), response.iterator().next().properties().endTime()); - Assertions.assertEquals("tclusiypbsfgy", response.iterator().next().properties().schedule().scheduledTime()); - Assertions.assertEquals("gusl", response.iterator().next().properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.TUESDAY, + Assertions.assertEquals("kb", response.iterator().next().properties().schedule().scheduledTime()); + Assertions.assertEquals("grjqctojcmi", response.iterator().next().properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.ALL, response.iterator().next().properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.JULY, + Assertions.assertEquals(Month.SEPTEMBER, response.iterator().next().properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(1056864137, + Assertions.assertEquals(860547851, response.iterator().next().properties().schedule().requestedDaysOfTheMonth().get(0)); Assertions.assertEquals(OptimizationPreference.AVAILABILITY, response.iterator().next().properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(435176888, + Assertions.assertEquals(359045420, response.iterator().next().properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(2010332970, + Assertions.assertEquals(1283952114, response.iterator() .next() .properties() @@ -69,15 +69,17 @@ public void testListByVms() throws Exception { .executionParameters() .retryPolicy() .retryWindowInMinutes()); - Assertions.assertEquals(DeadlineType.UNKNOWN, + Assertions.assertEquals(ResourceOperationType.CREATE, + response.iterator().next().properties().schedule().executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals(DeadlineType.INITIATE_AT, response.iterator().next().properties().schedule().deadlineType()); - Assertions.assertEquals("lolp", + Assertions.assertEquals("lcwkhihihlhz", response.iterator().next().properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, response.iterator().next().properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, response.iterator().next().properties().notificationSettings().get(0).language()); - Assertions.assertFalse(response.iterator().next().properties().notificationSettings().get(0).disabled()); - Assertions.assertTrue(response.iterator().next().properties().disabled()); + Assertions.assertTrue(response.iterator().next().properties().notificationSettings().get(0).disabled()); + Assertions.assertFalse(response.iterator().next().properties().disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionInnerTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionInnerTests.java index e4b9f8e934bf..397be8b7f382 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionInnerTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionInnerTests.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionProperties; @@ -29,92 +30,90 @@ public final class ScheduledActionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionInner model = BinaryData.fromString( - "{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-07-24T04:16:49Z\",\"endTime\":\"2021-06-01T17:59:42Z\",\"schedule\":{\"scheduledTime\":\"fycc\",\"timeZone\":\"newmdwzjeiachbo\",\"requestedWeekDays\":[\"All\",\"Thursday\",\"Friday\"],\"requestedMonths\":[\"May\"],\"requestedDaysOfTheMonth\":[1314309812,1593237527,1917660193],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1181471279,\"retryWindowInMinutes\":732529011}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"rimz\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"wjdk\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"dqxhcrmnohjtckwh\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Deleting\"},\"location\":\"xsqwpgrjbznorc\",\"tags\":{\"xqabnmocpcysh\":\"snb\"},\"id\":\"rzafbljjgpbtoqcj\",\"name\":\"klj\",\"type\":\"vbqid\"}") + "{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-07-01T03:15:16Z\",\"endTime\":\"2021-09-02T21:31:07Z\",\"schedule\":{\"scheduledTime\":\"ohqkvpuvksgpls\",\"timeZone\":\"kn\",\"requestedWeekDays\":[\"Saturday\"],\"requestedMonths\":[\"June\",\"December\",\"January\",\"December\"],\"requestedDaysOfTheMonth\":[1494231655],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":1015065537,\"retryWindowInMinutes\":596393327,\"onFailureAction\":\"Create\"}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"rz\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"sjswsrms\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Canceled\"},\"location\":\"kqqzqioxiysu\",\"tags\":{\"yhwitsmypyynpcdp\":\"ynkedyatrwyhqmib\",\"nsorgjhxbldt\":\"mnzgmwznmabi\"},\"id\":\"wwrlkdmtncv\",\"name\":\"kotl\",\"type\":\"xdy\"}") .toObject(ScheduledActionInner.class); - Assertions.assertEquals("xsqwpgrjbznorc", model.location()); - Assertions.assertEquals("snb", model.tags().get("xqabnmocpcysh")); + Assertions.assertEquals("kqqzqioxiysu", model.location()); + Assertions.assertEquals("ynkedyatrwyhqmib", model.tags().get("yhwitsmypyynpcdp")); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.properties().resourceType()); Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T04:16:49Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T17:59:42Z"), model.properties().endTime()); - Assertions.assertEquals("fycc", model.properties().schedule().scheduledTime()); - Assertions.assertEquals("newmdwzjeiachbo", model.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.ALL, model.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.MAY, model.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(1314309812, model.properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + Assertions.assertEquals(OffsetDateTime.parse("2021-07-01T03:15:16Z"), model.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-02T21:31:07Z"), model.properties().endTime()); + Assertions.assertEquals("ohqkvpuvksgpls", model.properties().schedule().scheduledTime()); + Assertions.assertEquals("kn", model.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.SATURDAY, model.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.JUNE, model.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(1494231655, model.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1181471279, + Assertions.assertEquals(1015065537, model.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(732529011, + Assertions.assertEquals(596393327, model.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.CREATE, + model.properties().schedule().executionParameters().retryPolicy().onFailureAction()); Assertions.assertEquals(DeadlineType.UNKNOWN, model.properties().schedule().deadlineType()); - Assertions.assertEquals("rimz", model.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals("rz", model.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.properties().notificationSettings().get(0).language()); - Assertions.assertTrue(model.properties().notificationSettings().get(0).disabled()); - Assertions.assertFalse(model.properties().disabled()); + Assertions.assertFalse(model.properties().notificationSettings().get(0).disabled()); + Assertions.assertTrue(model.properties().disabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduledActionInner model - = new ScheduledActionInner().withLocation("xsqwpgrjbznorc") - .withTags(mapOf("xqabnmocpcysh", "snb")) - .withProperties( - new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE_SCALE_SET) - .withActionType(ScheduledActionType.HIBERNATE) - .withStartTime(OffsetDateTime.parse("2021-07-24T04:16:49Z")) - .withEndTime(OffsetDateTime.parse("2021-06-01T17:59:42Z")) - .withSchedule( - new ScheduledActionsSchedule().withScheduledTime("fycc") - .withTimeZone("newmdwzjeiachbo") - .withRequestedWeekDays(Arrays.asList(WeekDay.ALL, WeekDay.THURSDAY, WeekDay.FRIDAY)) - .withRequestedMonths(Arrays.asList(Month.MAY)) - .withRequestedDaysOfTheMonth(Arrays.asList(1314309812, 1593237527, 1917660193)) - .withExecutionParameters(new ExecutionParameters() - .withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(1181471279) - .withRetryWindowInMinutes(732529011))) - .withDeadlineType(DeadlineType.UNKNOWN)) - .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("rimz") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true), - new NotificationProperties().withDestination("wjdk") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false), - new NotificationProperties().withDestination("dqxhcrmnohjtckwh") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true))) - .withDisabled(false)); + ScheduledActionInner model = new ScheduledActionInner().withLocation("kqqzqioxiysu") + .withTags(mapOf("yhwitsmypyynpcdp", "ynkedyatrwyhqmib", "nsorgjhxbldt", "mnzgmwznmabi")) + .withProperties(new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE_SCALE_SET) + .withActionType(ScheduledActionType.HIBERNATE) + .withStartTime(OffsetDateTime.parse("2021-07-01T03:15:16Z")) + .withEndTime(OffsetDateTime.parse("2021-09-02T21:31:07Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("ohqkvpuvksgpls") + .withTimeZone("kn") + .withRequestedWeekDays(Arrays.asList(WeekDay.SATURDAY)) + .withRequestedMonths(Arrays.asList(Month.JUNE, Month.DECEMBER, Month.JANUARY, Month.DECEMBER)) + .withRequestedDaysOfTheMonth(Arrays.asList(1494231655)) + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) + .withRetryPolicy(new RetryPolicy().withRetryCount(1015065537) + .withRetryWindowInMinutes(596393327) + .withOnFailureAction(ResourceOperationType.CREATE))) + .withDeadlineType(DeadlineType.UNKNOWN)) + .withNotificationSettings(Arrays.asList( + new NotificationProperties().withDestination("rz") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("sjswsrms") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false))) + .withDisabled(true)); model = BinaryData.fromObject(model).toObject(ScheduledActionInner.class); - Assertions.assertEquals("xsqwpgrjbznorc", model.location()); - Assertions.assertEquals("snb", model.tags().get("xqabnmocpcysh")); + Assertions.assertEquals("kqqzqioxiysu", model.location()); + Assertions.assertEquals("ynkedyatrwyhqmib", model.tags().get("yhwitsmypyynpcdp")); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.properties().resourceType()); Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T04:16:49Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T17:59:42Z"), model.properties().endTime()); - Assertions.assertEquals("fycc", model.properties().schedule().scheduledTime()); - Assertions.assertEquals("newmdwzjeiachbo", model.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.ALL, model.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.MAY, model.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(1314309812, model.properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + Assertions.assertEquals(OffsetDateTime.parse("2021-07-01T03:15:16Z"), model.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-02T21:31:07Z"), model.properties().endTime()); + Assertions.assertEquals("ohqkvpuvksgpls", model.properties().schedule().scheduledTime()); + Assertions.assertEquals("kn", model.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.SATURDAY, model.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.JUNE, model.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(1494231655, model.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1181471279, + Assertions.assertEquals(1015065537, model.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(732529011, + Assertions.assertEquals(596393327, model.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.CREATE, + model.properties().schedule().executionParameters().retryPolicy().onFailureAction()); Assertions.assertEquals(DeadlineType.UNKNOWN, model.properties().schedule().deadlineType()); - Assertions.assertEquals("rimz", model.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals("rz", model.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.properties().notificationSettings().get(0).language()); - Assertions.assertTrue(model.properties().notificationSettings().get(0).disabled()); - Assertions.assertFalse(model.properties().disabled()); + Assertions.assertFalse(model.properties().notificationSettings().get(0).disabled()); + Assertions.assertTrue(model.properties().disabled()); } // Use "Map.of" if available diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionListResultTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionListResultTests.java index 17c4e294795f..a18edbe8615b 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionListResultTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionListResultTests.java @@ -21,34 +21,35 @@ public final class ScheduledActionListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Start\",\"startTime\":\"2021-03-27T22:11:53Z\",\"endTime\":\"2021-09-20T08:20:08Z\",\"schedule\":{\"scheduledTime\":\"phrcgyncoc\",\"timeZone\":\"ecfvmm\",\"requestedWeekDays\":[\"Tuesday\"],\"requestedMonths\":[\"June\",\"June\",\"November\",\"December\"],\"requestedDaysOfTheMonth\":[164546469,1343274314],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"c\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"kwlzuvccfwnfn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Canceled\"},\"location\":\"x\",\"tags\":{\"bqqwxrj\":\"gtzxdpn\"},\"id\":\"eallnwsubisnj\",\"name\":\"mpmngnzscxaqwoo\",\"type\":\"hcbonqvpkvlr\"},{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-04-17T15:50:50Z\",\"endTime\":\"2021-10-21T11:16:02Z\",\"schedule\":{\"scheduledTime\":\"ipheoflokeyyien\",\"timeZone\":\"bdlwtgrhpdjpj\",\"requestedWeekDays\":[\"All\",\"Thursday\",\"Saturday\",\"All\"],\"requestedMonths\":[\"All\"],\"requestedDaysOfTheMonth\":[958851014,1063088657,184362773,973371108],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"hejjz\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"gwdslfhotwm\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"lbjnpgacftadehx\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":true,\"provisioningState\":\"Failed\"},\"location\":\"suesnzw\",\"tags\":{\"xzdmohctb\":\"bavo\",\"ndnvo\":\"vudwx\",\"lazjdyggdtjixhbk\":\"gujjugwdkcglh\"},\"id\":\"ofqweykhmenevfye\",\"name\":\"fwhybcibvy\",\"type\":\"dcsi\"},{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-05-28T22:29:37Z\",\"endTime\":\"2021-01-25T02:11:12Z\",\"schedule\":{\"scheduledTime\":\"dectehfiqsc\",\"timeZone\":\"eypvhezrkg\",\"requestedWeekDays\":[\"Monday\",\"Sunday\",\"All\"],\"requestedMonths\":[\"May\",\"June\"],\"requestedDaysOfTheMonth\":[450468139,34828913,509090660,668805249],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"yqjpkcatt\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Deleting\"},\"location\":\"qpjhvmda\",\"tags\":{\"q\":\"ysou\",\"yhltrpmopjmcm\":\"canoaeupf\"},\"id\":\"tuo\",\"name\":\"thfuiuaodsfcpkvx\",\"type\":\"dpuozmyz\"}],\"nextLink\":\"agfuaxbezyiu\"}") + "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Deallocate\",\"startTime\":\"2021-07-15T10:08:59Z\",\"endTime\":\"2021-10-21T22:30:59Z\",\"schedule\":{\"scheduledTime\":\"jqbjhhy\",\"timeZone\":\"xrwlyc\",\"requestedWeekDays\":[\"Saturday\",\"Monday\"],\"requestedMonths\":[\"March\"],\"requestedDaysOfTheMonth\":[1622537719,1440361385,1546051716,1081662268],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"xqugjhkycubedd\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"wqm\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"rmnjijpx\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Canceled\"},\"location\":\"xbaaabjyv\",\"tags\":{\"nevfdnw\":\"fimrzrtuzqogse\",\"euzsoi\":\"wmewzsyy\",\"thzvaytdwkqbrqu\":\"judpfrxt\",\"xiilivpdtiirqt\":\"paxh\"},\"id\":\"qoaxoruzfgs\",\"name\":\"uyfxrxxleptramxj\",\"type\":\"zwl\"}],\"nextLink\":\"wxuqlcvydypatdoo\"}") .toObject(ScheduledActionListResult.class); - Assertions.assertEquals("x", model.value().get(0).location()); - Assertions.assertEquals("gtzxdpn", model.value().get(0).tags().get("bqqwxrj")); + Assertions.assertEquals("xbaaabjyv", model.value().get(0).location()); + Assertions.assertEquals("fimrzrtuzqogse", model.value().get(0).tags().get("nevfdnw")); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.value().get(0).properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.START, model.value().get(0).properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-27T22:11:53Z"), + Assertions.assertEquals(ScheduledActionType.DEALLOCATE, model.value().get(0).properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-15T10:08:59Z"), model.value().get(0).properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-20T08:20:08Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-10-21T22:30:59Z"), model.value().get(0).properties().endTime()); - Assertions.assertEquals("phrcgyncoc", model.value().get(0).properties().schedule().scheduledTime()); - Assertions.assertEquals("ecfvmm", model.value().get(0).properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.TUESDAY, + Assertions.assertEquals("jqbjhhy", model.value().get(0).properties().schedule().scheduledTime()); + Assertions.assertEquals("xrwlyc", model.value().get(0).properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.SATURDAY, model.value().get(0).properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.JUNE, model.value().get(0).properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(164546469, + Assertions.assertEquals(Month.MARCH, model.value().get(0).properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(1622537719, model.value().get(0).properties().schedule().requestedDaysOfTheMonth().get(0)); Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.value().get(0).properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(DeadlineType.UNKNOWN, model.value().get(0).properties().schedule().deadlineType()); - Assertions.assertEquals("c", model.value().get(0).properties().notificationSettings().get(0).destination()); + Assertions.assertEquals(DeadlineType.INITIATE_AT, model.value().get(0).properties().schedule().deadlineType()); + Assertions.assertEquals("xqugjhkycubedd", + model.value().get(0).properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.value().get(0).properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.value().get(0).properties().notificationSettings().get(0).language()); Assertions.assertTrue(model.value().get(0).properties().notificationSettings().get(0).disabled()); - Assertions.assertTrue(model.value().get(0).properties().disabled()); - Assertions.assertEquals("agfuaxbezyiu", model.nextLink()); + Assertions.assertFalse(model.value().get(0).properties().disabled()); + Assertions.assertEquals("wxuqlcvydypatdoo", model.nextLink()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionPropertiesTests.java index dba1131ae874..7c6d69b5a173 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionPropertiesTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionPropertiesTests.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionProperties; @@ -26,23 +27,26 @@ public final class ScheduledActionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionProperties model = BinaryData.fromString( - "{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-07-23T07:35:18Z\",\"endTime\":\"2021-08-03T08:21:01Z\",\"schedule\":{\"scheduledTime\":\"ulpkudjkrl\",\"timeZone\":\"hbzhfepg\",\"requestedWeekDays\":[\"Tuesday\",\"Monday\",\"Friday\"],\"requestedMonths\":[\"All\"],\"requestedDaysOfTheMonth\":[208705149,1054800376,1323879070,149734817],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":2010275395,\"retryWindowInMinutes\":78216934}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"l\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Deleting\"}") + "{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-07-18T04:54:54Z\",\"endTime\":\"2021-10-24T07:42:50Z\",\"schedule\":{\"scheduledTime\":\"ogjltdtbnnhad\",\"timeZone\":\"ocrkvcikh\",\"requestedWeekDays\":[\"Monday\"],\"requestedMonths\":[\"January\",\"All\",\"April\",\"July\"],\"requestedDaysOfTheMonth\":[1810691305],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1292561525,\"retryWindowInMinutes\":2021225461,\"onFailureAction\":\"Unknown\"}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"la\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Deleting\"}") .toObject(ScheduledActionProperties.class); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.resourceType()); - Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T07:35:18Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T08:21:01Z"), model.endTime()); - Assertions.assertEquals("ulpkudjkrl", model.schedule().scheduledTime()); - Assertions.assertEquals("hbzhfepg", model.schedule().timeZone()); - Assertions.assertEquals(WeekDay.TUESDAY, model.schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.ALL, model.schedule().requestedMonths().get(0)); - Assertions.assertEquals(208705149, model.schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST, + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.resourceType()); + Assertions.assertEquals(ScheduledActionType.START, model.actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-18T04:54:54Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-24T07:42:50Z"), model.endTime()); + Assertions.assertEquals("ogjltdtbnnhad", model.schedule().scheduledTime()); + Assertions.assertEquals("ocrkvcikh", model.schedule().timeZone()); + Assertions.assertEquals(WeekDay.MONDAY, model.schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.JANUARY, model.schedule().requestedMonths().get(0)); + Assertions.assertEquals(1810691305, model.schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(2010275395, model.schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(78216934, model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(1292561525, model.schedule().executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(2021225461, + model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.UNKNOWN, + model.schedule().executionParameters().retryPolicy().onFailureAction()); Assertions.assertEquals(DeadlineType.UNKNOWN, model.schedule().deadlineType()); - Assertions.assertEquals("l", model.notificationSettings().get(0).destination()); + Assertions.assertEquals("la", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); Assertions.assertTrue(model.notificationSettings().get(0).disabled()); @@ -51,41 +55,45 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduledActionProperties model = new ScheduledActionProperties() - .withResourceType(ResourceType.VIRTUAL_MACHINE_SCALE_SET) - .withActionType(ScheduledActionType.HIBERNATE) - .withStartTime(OffsetDateTime.parse("2021-07-23T07:35:18Z")) - .withEndTime(OffsetDateTime.parse("2021-08-03T08:21:01Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("ulpkudjkrl") - .withTimeZone("hbzhfepg") - .withRequestedWeekDays(Arrays.asList(WeekDay.TUESDAY, WeekDay.MONDAY, WeekDay.FRIDAY)) - .withRequestedMonths(Arrays.asList(Month.ALL)) - .withRequestedDaysOfTheMonth(Arrays.asList(208705149, 1054800376, 1323879070, 149734817)) + ScheduledActionProperties model = new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) + .withActionType(ScheduledActionType.START) + .withStartTime(OffsetDateTime.parse("2021-07-18T04:54:54Z")) + .withEndTime(OffsetDateTime.parse("2021-10-24T07:42:50Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("ogjltdtbnnhad") + .withTimeZone("ocrkvcikh") + .withRequestedWeekDays(Arrays.asList(WeekDay.MONDAY)) + .withRequestedMonths(Arrays.asList(Month.JANUARY, Month.ALL, Month.APRIL, Month.JULY)) + .withRequestedDaysOfTheMonth(Arrays.asList(1810691305)) .withExecutionParameters(new ExecutionParameters() - .withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(2010275395).withRetryWindowInMinutes(78216934))) + .withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) + .withRetryPolicy(new RetryPolicy().withRetryCount(1292561525) + .withRetryWindowInMinutes(2021225461) + .withOnFailureAction(ResourceOperationType.UNKNOWN))) .withDeadlineType(DeadlineType.UNKNOWN)) - .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("l") + .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("la") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))) .withDisabled(false); model = BinaryData.fromObject(model).toObject(ScheduledActionProperties.class); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.resourceType()); - Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T07:35:18Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T08:21:01Z"), model.endTime()); - Assertions.assertEquals("ulpkudjkrl", model.schedule().scheduledTime()); - Assertions.assertEquals("hbzhfepg", model.schedule().timeZone()); - Assertions.assertEquals(WeekDay.TUESDAY, model.schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.ALL, model.schedule().requestedMonths().get(0)); - Assertions.assertEquals(208705149, model.schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST, + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.resourceType()); + Assertions.assertEquals(ScheduledActionType.START, model.actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-18T04:54:54Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-24T07:42:50Z"), model.endTime()); + Assertions.assertEquals("ogjltdtbnnhad", model.schedule().scheduledTime()); + Assertions.assertEquals("ocrkvcikh", model.schedule().timeZone()); + Assertions.assertEquals(WeekDay.MONDAY, model.schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.JANUARY, model.schedule().requestedMonths().get(0)); + Assertions.assertEquals(1810691305, model.schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(2010275395, model.schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(78216934, model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(1292561525, model.schedule().executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(2021225461, + model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.UNKNOWN, + model.schedule().executionParameters().retryPolicy().onFailureAction()); Assertions.assertEquals(DeadlineType.UNKNOWN, model.schedule().deadlineType()); - Assertions.assertEquals("l", model.notificationSettings().get(0).destination()); + Assertions.assertEquals("la", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); Assertions.assertTrue(model.notificationSettings().get(0).disabled()); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourceInnerTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourceInnerTests.java index 63c90afc26d4..701f7acd0771 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourceInnerTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourceInnerTests.java @@ -16,10 +16,10 @@ public final class ScheduledActionResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionResourceInner model = BinaryData.fromString( - "{\"name\":\"ou\",\"id\":\"nvudwtiukb\",\"type\":\"ngkpocipazy\",\"resourceId\":\"o\",\"notificationSettings\":[{\"destination\":\"kgjn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ygevqzntypmrbpiz\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"sdpydnfyhxdeoejz\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"sjttgzfbish\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}") + "{\"name\":\"ncwsob\",\"id\":\"wcsdbnwdcfhucq\",\"type\":\"fuvglsbjjca\",\"resourceId\":\"vxb\",\"notificationSettings\":[{\"destination\":\"udutnco\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"qtvcofudflvkgj\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"nnqvsa\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]}") .toObject(ScheduledActionResourceInner.class); - Assertions.assertEquals("o", model.resourceId()); - Assertions.assertEquals("kgjn", model.notificationSettings().get(0).destination()); + Assertions.assertEquals("vxb", model.resourceId()); + Assertions.assertEquals("udutnco", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); Assertions.assertFalse(model.notificationSettings().get(0).disabled()); @@ -27,27 +27,23 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduledActionResourceInner model = new ScheduledActionResourceInner().withResourceId("o") + ScheduledActionResourceInner model = new ScheduledActionResourceInner().withResourceId("vxb") .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("kgjn") + new NotificationProperties().withDestination("udutnco") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(false), - new NotificationProperties().withDestination("ygevqzntypmrbpiz") + new NotificationProperties().withDestination("qtvcofudflvkgj") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) - .withDisabled(false), - new NotificationProperties().withDestination("sdpydnfyhxdeoejz") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false), - new NotificationProperties().withDestination("sjttgzfbish") + .withDisabled(true), + new NotificationProperties().withDestination("nnqvsa") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) - .withDisabled(true))); + .withDisabled(false))); model = BinaryData.fromObject(model).toObject(ScheduledActionResourceInner.class); - Assertions.assertEquals("o", model.resourceId()); - Assertions.assertEquals("kgjn", model.notificationSettings().get(0).destination()); + Assertions.assertEquals("vxb", model.resourceId()); + Assertions.assertEquals("udutnco", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); Assertions.assertFalse(model.notificationSettings().get(0).disabled()); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesInnerTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesInnerTests.java index 543c6b6e85e4..718fc3b4cf5a 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesInnerTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesInnerTests.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; import com.azure.resourcemanager.computeschedule.models.WeekDay; @@ -21,28 +22,30 @@ public final class ScheduledActionResourcesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionResourcesInner model = BinaryData.fromString( - "{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-06-16T02:23:20Z\",\"endTime\":\"2020-12-27T11:26:29Z\",\"schedule\":{\"scheduledTime\":\"bckhsmtxpsi\",\"timeZone\":\"btfhvpesaps\",\"requestedWeekDays\":[\"Tuesday\",\"Friday\",\"Sunday\",\"All\"],\"requestedMonths\":[\"October\",\"October\"],\"requestedDaysOfTheMonth\":[871941711,1056627326],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":1234804558,\"retryWindowInMinutes\":1335454628}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"cwscwsvlx\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"wrupqsxvnmicykvc\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"lo\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"fj\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Succeeded\",\"resourceNotificationSettings\":[{\"destination\":\"bttk\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"nv\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ermclfplphoxuscr\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},\"id\":\"psbjta\",\"name\":\"qugxywpmueefjzwf\",\"type\":\"kqujidsuyono\"}") + "{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Deallocate\",\"startTime\":\"2021-06-19T11:55:03Z\",\"endTime\":\"2021-04-16T15:23:57Z\",\"schedule\":{\"scheduledTime\":\"kakmokzh\",\"timeZone\":\"jk\",\"requestedWeekDays\":[\"Thursday\",\"Sunday\",\"Sunday\"],\"requestedMonths\":[\"February\"],\"requestedDaysOfTheMonth\":[714387513,727969276],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1353078478,\"retryWindowInMinutes\":616299512,\"onFailureAction\":\"Unknown\"}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"kayuhqlbjbs\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"r\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"mfpgv\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"slthaq\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Failed\",\"resourceNotificationSettings\":[{\"destination\":\"srezp\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"uyowqkdwy\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ircgpikpz\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"anlfzxiavrmbz\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},\"id\":\"rjqc\",\"name\":\"rgz\",\"type\":\"frl\"}") .toObject(ScheduledActionResourcesInner.class); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.START, model.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-16T02:23:20Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-27T11:26:29Z"), model.properties().endTime()); - Assertions.assertEquals("bckhsmtxpsi", model.properties().schedule().scheduledTime()); - Assertions.assertEquals("btfhvpesaps", model.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.TUESDAY, model.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.OCTOBER, model.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(871941711, model.properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.properties().resourceType()); + Assertions.assertEquals(ScheduledActionType.DEALLOCATE, model.properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T11:55:03Z"), model.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-16T15:23:57Z"), model.properties().endTime()); + Assertions.assertEquals("kakmokzh", model.properties().schedule().scheduledTime()); + Assertions.assertEquals("jk", model.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.THURSDAY, model.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.FEBRUARY, model.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(714387513, model.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1234804558, + Assertions.assertEquals(1353078478, model.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1335454628, + Assertions.assertEquals(616299512, model.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(DeadlineType.UNKNOWN, model.properties().schedule().deadlineType()); - Assertions.assertEquals("cwscwsvlx", model.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals(ResourceOperationType.UNKNOWN, + model.properties().schedule().executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals(DeadlineType.INITIATE_AT, model.properties().schedule().deadlineType()); + Assertions.assertEquals("kayuhqlbjbs", model.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.properties().notificationSettings().get(0).language()); - Assertions.assertTrue(model.properties().notificationSettings().get(0).disabled()); + Assertions.assertFalse(model.properties().notificationSettings().get(0).disabled()); Assertions.assertFalse(model.properties().disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesListResultTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesListResultTests.java index ed0c1d9c7031..7d593308ec4b 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesListResultTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesListResultTests.java @@ -21,32 +21,33 @@ public final class ScheduledActionResourcesListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionResourcesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Hibernate\",\"startTime\":\"2020-12-28T00:18:51Z\",\"endTime\":\"2021-09-16T11:30:17Z\",\"schedule\":{\"scheduledTime\":\"ytxhp\",\"timeZone\":\"xbzpfzab\",\"requestedWeekDays\":[\"Tuesday\",\"All\",\"Tuesday\",\"All\"],\"requestedMonths\":[\"October\",\"July\"],\"requestedDaysOfTheMonth\":[1557005906],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"vplwzbhv\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"osvmk\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Succeeded\",\"resourceNotificationSettings\":[{\"destination\":\"gmgsxnkjzkde\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},\"id\":\"pwiyig\",\"name\":\"xpkd\",\"type\":\"zb\"}],\"nextLink\":\"uebbaumnyqup\"}") + "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Deallocate\",\"startTime\":\"2021-06-30T03:12:21Z\",\"endTime\":\"2021-11-29T23:06:06Z\",\"schedule\":{\"scheduledTime\":\"htwdwrftswibyrcd\",\"timeZone\":\"bhshfwpracstwity\",\"requestedWeekDays\":[\"Friday\",\"Thursday\"],\"requestedMonths\":[\"November\",\"March\",\"March\",\"May\"],\"requestedDaysOfTheMonth\":[1900639449,783434450,502101574],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"xltjcvnhltiu\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"vvwxqi\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Failed\",\"resourceNotificationSettings\":[{\"destination\":\"mdjrkvfgbvfvp\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"cizsjqlhkrribdei\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"kghv\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"mkrefajpjorwkq\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},\"id\":\"j\",\"name\":\"jivfxzsjabib\",\"type\":\"ystawfsdjpvkvp\"}],\"nextLink\":\"xbkzbzkdvncj\"}") .toObject(ScheduledActionResourcesListResult.class); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.value().get(0).properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.value().get(0).properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-28T00:18:51Z"), + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, + model.value().get(0).properties().resourceType()); + Assertions.assertEquals(ScheduledActionType.DEALLOCATE, model.value().get(0).properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-30T03:12:21Z"), model.value().get(0).properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T11:30:17Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-11-29T23:06:06Z"), model.value().get(0).properties().endTime()); - Assertions.assertEquals("ytxhp", model.value().get(0).properties().schedule().scheduledTime()); - Assertions.assertEquals("xbzpfzab", model.value().get(0).properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.TUESDAY, + Assertions.assertEquals("htwdwrftswibyrcd", model.value().get(0).properties().schedule().scheduledTime()); + Assertions.assertEquals("bhshfwpracstwity", model.value().get(0).properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.FRIDAY, model.value().get(0).properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.OCTOBER, model.value().get(0).properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(1557005906, + Assertions.assertEquals(Month.NOVEMBER, model.value().get(0).properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(1900639449, model.value().get(0).properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST, + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.value().get(0).properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(DeadlineType.UNKNOWN, model.value().get(0).properties().schedule().deadlineType()); - Assertions.assertEquals("vplwzbhv", + Assertions.assertEquals(DeadlineType.INITIATE_AT, model.value().get(0).properties().schedule().deadlineType()); + Assertions.assertEquals("xltjcvnhltiu", model.value().get(0).properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.value().get(0).properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.value().get(0).properties().notificationSettings().get(0).language()); - Assertions.assertTrue(model.value().get(0).properties().notificationSettings().get(0).disabled()); + Assertions.assertFalse(model.value().get(0).properties().notificationSettings().get(0).disabled()); Assertions.assertFalse(model.value().get(0).properties().disabled()); - Assertions.assertEquals("uebbaumnyqup", model.nextLink()); + Assertions.assertEquals("xbkzbzkdvncj", model.nextLink()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdatePropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdatePropertiesTests.java index a54d755fddbe..61047e0d4bab 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdatePropertiesTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdatePropertiesTests.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; @@ -26,71 +27,90 @@ public final class ScheduledActionUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionUpdateProperties model = BinaryData.fromString( - "{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-01-14T00:40:13Z\",\"endTime\":\"2021-01-18T17:02:06Z\",\"schedule\":{\"scheduledTime\":\"dt\",\"timeZone\":\"hzrvqd\",\"requestedWeekDays\":[\"Tuesday\",\"Sunday\"],\"requestedMonths\":[\"October\",\"December\"],\"requestedDaysOfTheMonth\":[1370032032,837766841],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":336183826,\"retryWindowInMinutes\":1522081541}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"ktzlcuiywg\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":true}") + "{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-10-22T16:06Z\",\"endTime\":\"2021-01-23T17:50:30Z\",\"schedule\":{\"scheduledTime\":\"nwabfatkldd\",\"timeZone\":\"bjhwuaan\",\"requestedWeekDays\":[\"Tuesday\",\"Thursday\"],\"requestedMonths\":[\"June\",\"March\",\"August\",\"December\"],\"requestedDaysOfTheMonth\":[113481876,2134334822],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1536946764,\"retryWindowInMinutes\":1986199851,\"onFailureAction\":\"Delete\"}},\"deadlineType\":\"CompleteBy\"},\"notificationSettings\":[{\"destination\":\"sytxitcskfcktqum\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"zzikhlyfjhdg\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"dunyg\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"bqfatpxllrxcyjmo\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false}") .toObject(ScheduledActionUpdateProperties.class); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.resourceType()); - Assertions.assertEquals(ScheduledActionType.START, model.actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-14T00:40:13Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T17:02:06Z"), model.endTime()); - Assertions.assertEquals("dt", model.schedule().scheduledTime()); - Assertions.assertEquals("hzrvqd", model.schedule().timeZone()); + Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T16:06Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-23T17:50:30Z"), model.endTime()); + Assertions.assertEquals("nwabfatkldd", model.schedule().scheduledTime()); + Assertions.assertEquals("bjhwuaan", model.schedule().timeZone()); Assertions.assertEquals(WeekDay.TUESDAY, model.schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.OCTOBER, model.schedule().requestedMonths().get(0)); - Assertions.assertEquals(1370032032, model.schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(Month.JUNE, model.schedule().requestedMonths().get(0)); + Assertions.assertEquals(113481876, model.schedule().requestedDaysOfTheMonth().get(0)); Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(336183826, model.schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1522081541, + Assertions.assertEquals(1536946764, model.schedule().executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1986199851, model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(DeadlineType.UNKNOWN, model.schedule().deadlineType()); - Assertions.assertEquals("ktzlcuiywg", model.notificationSettings().get(0).destination()); + Assertions.assertEquals(ResourceOperationType.DELETE, + model.schedule().executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); + Assertions.assertEquals("sytxitcskfcktqum", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); - Assertions.assertTrue(model.notificationSettings().get(0).disabled()); - Assertions.assertTrue(model.disabled()); + Assertions.assertFalse(model.notificationSettings().get(0).disabled()); + Assertions.assertFalse(model.disabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduledActionUpdateProperties model = new ScheduledActionUpdateProperties() - .withResourceType(ResourceType.VIRTUAL_MACHINE) - .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2021-01-14T00:40:13Z")) - .withEndTime(OffsetDateTime.parse("2021-01-18T17:02:06Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("dt") - .withTimeZone("hzrvqd") - .withRequestedWeekDays(Arrays.asList(WeekDay.TUESDAY, WeekDay.SUNDAY)) - .withRequestedMonths(Arrays.asList(Month.OCTOBER, Month.DECEMBER)) - .withRequestedDaysOfTheMonth(Arrays.asList(1370032032, 837766841)) - .withExecutionParameters(new ExecutionParameters() - .withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(336183826).withRetryWindowInMinutes(1522081541))) - .withDeadlineType(DeadlineType.UNKNOWN)) - .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("ktzlcuiywg") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true))) - .withDisabled(true); + ScheduledActionUpdateProperties model + = new ScheduledActionUpdateProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) + .withActionType(ScheduledActionType.HIBERNATE) + .withStartTime(OffsetDateTime.parse("2021-10-22T16:06Z")) + .withEndTime(OffsetDateTime.parse("2021-01-23T17:50:30Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("nwabfatkldd") + .withTimeZone("bjhwuaan") + .withRequestedWeekDays(Arrays.asList(WeekDay.TUESDAY, WeekDay.THURSDAY)) + .withRequestedMonths(Arrays.asList(Month.JUNE, Month.MARCH, Month.AUGUST, Month.DECEMBER)) + .withRequestedDaysOfTheMonth(Arrays.asList(113481876, 2134334822)) + .withExecutionParameters(new ExecutionParameters() + .withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) + .withRetryPolicy(new RetryPolicy().withRetryCount(1536946764) + .withRetryWindowInMinutes(1986199851) + .withOnFailureAction(ResourceOperationType.DELETE))) + .withDeadlineType(DeadlineType.COMPLETE_BY)) + .withNotificationSettings(Arrays.asList( + new NotificationProperties().withDestination("sytxitcskfcktqum") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("zzikhlyfjhdg") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true), + new NotificationProperties().withDestination("dunyg") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("bqfatpxllrxcyjmo") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true))) + .withDisabled(false); model = BinaryData.fromObject(model).toObject(ScheduledActionUpdateProperties.class); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.resourceType()); - Assertions.assertEquals(ScheduledActionType.START, model.actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-14T00:40:13Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T17:02:06Z"), model.endTime()); - Assertions.assertEquals("dt", model.schedule().scheduledTime()); - Assertions.assertEquals("hzrvqd", model.schedule().timeZone()); + Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T16:06Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-23T17:50:30Z"), model.endTime()); + Assertions.assertEquals("nwabfatkldd", model.schedule().scheduledTime()); + Assertions.assertEquals("bjhwuaan", model.schedule().timeZone()); Assertions.assertEquals(WeekDay.TUESDAY, model.schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.OCTOBER, model.schedule().requestedMonths().get(0)); - Assertions.assertEquals(1370032032, model.schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(Month.JUNE, model.schedule().requestedMonths().get(0)); + Assertions.assertEquals(113481876, model.schedule().requestedDaysOfTheMonth().get(0)); Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(336183826, model.schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1522081541, + Assertions.assertEquals(1536946764, model.schedule().executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1986199851, model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(DeadlineType.UNKNOWN, model.schedule().deadlineType()); - Assertions.assertEquals("ktzlcuiywg", model.notificationSettings().get(0).destination()); + Assertions.assertEquals(ResourceOperationType.DELETE, + model.schedule().executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); + Assertions.assertEquals("sytxitcskfcktqum", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); - Assertions.assertTrue(model.notificationSettings().get(0).disabled()); - Assertions.assertTrue(model.disabled()); + Assertions.assertFalse(model.notificationSettings().get(0).disabled()); + Assertions.assertFalse(model.disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdateTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdateTests.java index a6a24eb49e4d..47c1bb2bfe8e 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdateTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdateTests.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; @@ -29,90 +30,82 @@ public final class ScheduledActionUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionUpdate model = BinaryData.fromString( - "{\"tags\":{\"ctbzaq\":\"lovmclwhijcoe\",\"dkexxppofm\":\"qsycbkbfkgu\",\"vpmouexhdzxib\":\"axcfjpgddtocjjx\",\"wndeicbtwnp\":\"eojnxqbzvddn\"},\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Start\",\"startTime\":\"2021-09-17T10:09:05Z\",\"endTime\":\"2021-02-17T19:22:59Z\",\"schedule\":{\"scheduledTime\":\"fcyddg\",\"timeZone\":\"mjthjqkwp\",\"requestedWeekDays\":[\"Tuesday\",\"Sunday\",\"Wednesday\",\"Tuesday\"],\"requestedMonths\":[\"April\",\"March\",\"September\",\"October\"],\"requestedDaysOfTheMonth\":[804437183,1200172783],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":950690565,\"retryWindowInMinutes\":374026778}},\"deadlineType\":\"CompleteBy\"},\"notificationSettings\":[{\"destination\":\"bjoghmewuamau\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"vvtpgvdfgio\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"tqxln\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":true}}") + "{\"tags\":{\"gyqagvrvmnpkuk\":\"xrtfudxep\"},\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-06-12T22:02:25Z\",\"endTime\":\"2021-03-06T12:44:58Z\",\"schedule\":{\"scheduledTime\":\"mfnjh\",\"timeZone\":\"j\",\"requestedWeekDays\":[\"Thursday\",\"Friday\"],\"requestedMonths\":[\"All\"],\"requestedDaysOfTheMonth\":[597105024,1767053067,2139241028,739435613],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":648968318,\"retryWindowInMinutes\":1648570452,\"onFailureAction\":\"Start\"}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"ivx\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false}}") .toObject(ScheduledActionUpdate.class); - Assertions.assertEquals("lovmclwhijcoe", model.tags().get("ctbzaq")); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.properties().resourceType()); + Assertions.assertEquals("xrtfudxep", model.tags().get("gyqagvrvmnpkuk")); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.properties().resourceType()); Assertions.assertEquals(ScheduledActionType.START, model.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T10:09:05Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T19:22:59Z"), model.properties().endTime()); - Assertions.assertEquals("fcyddg", model.properties().schedule().scheduledTime()); - Assertions.assertEquals("mjthjqkwp", model.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.TUESDAY, model.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.APRIL, model.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(804437183, model.properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals(OffsetDateTime.parse("2021-06-12T22:02:25Z"), model.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-06T12:44:58Z"), model.properties().endTime()); + Assertions.assertEquals("mfnjh", model.properties().schedule().scheduledTime()); + Assertions.assertEquals("j", model.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.THURSDAY, model.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.ALL, model.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(597105024, model.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(950690565, + Assertions.assertEquals(648968318, model.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(374026778, + Assertions.assertEquals(1648570452, model.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.properties().schedule().deadlineType()); - Assertions.assertEquals("bjoghmewuamau", model.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals(ResourceOperationType.START, + model.properties().schedule().executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals(DeadlineType.UNKNOWN, model.properties().schedule().deadlineType()); + Assertions.assertEquals("ivx", model.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.properties().notificationSettings().get(0).language()); Assertions.assertTrue(model.properties().notificationSettings().get(0).disabled()); - Assertions.assertTrue(model.properties().disabled()); + Assertions.assertFalse(model.properties().disabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduledActionUpdate model = new ScheduledActionUpdate() - .withTags(mapOf("ctbzaq", "lovmclwhijcoe", "dkexxppofm", "qsycbkbfkgu", "vpmouexhdzxib", "axcfjpgddtocjjx", - "wndeicbtwnp", "eojnxqbzvddn")) - .withProperties( - new ScheduledActionUpdateProperties().withResourceType(ResourceType.VIRTUAL_MACHINE_SCALE_SET) - .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2021-09-17T10:09:05Z")) - .withEndTime(OffsetDateTime.parse("2021-02-17T19:22:59Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("fcyddg") - .withTimeZone("mjthjqkwp") - .withRequestedWeekDays( - Arrays.asList(WeekDay.TUESDAY, WeekDay.SUNDAY, WeekDay.WEDNESDAY, WeekDay.TUESDAY)) - .withRequestedMonths(Arrays.asList(Month.APRIL, Month.MARCH, Month.SEPTEMBER, Month.OCTOBER)) - .withRequestedDaysOfTheMonth(Arrays.asList(804437183, 1200172783)) - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) - .withRetryPolicy( - new RetryPolicy().withRetryCount(950690565).withRetryWindowInMinutes(374026778))) - .withDeadlineType(DeadlineType.COMPLETE_BY)) - .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("bjoghmewuamau") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true), - new NotificationProperties().withDestination("vvtpgvdfgio") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false), - new NotificationProperties().withDestination("tqxln") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true))) - .withDisabled(true)); + ScheduledActionUpdate model = new ScheduledActionUpdate().withTags(mapOf("gyqagvrvmnpkuk", "xrtfudxep")) + .withProperties(new ScheduledActionUpdateProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) + .withActionType(ScheduledActionType.START) + .withStartTime(OffsetDateTime.parse("2021-06-12T22:02:25Z")) + .withEndTime(OffsetDateTime.parse("2021-03-06T12:44:58Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("mfnjh") + .withTimeZone("j") + .withRequestedWeekDays(Arrays.asList(WeekDay.THURSDAY, WeekDay.FRIDAY)) + .withRequestedMonths(Arrays.asList(Month.ALL)) + .withRequestedDaysOfTheMonth(Arrays.asList(597105024, 1767053067, 2139241028, 739435613)) + .withExecutionParameters(new ExecutionParameters() + .withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) + .withRetryPolicy(new RetryPolicy().withRetryCount(648968318) + .withRetryWindowInMinutes(1648570452) + .withOnFailureAction(ResourceOperationType.START))) + .withDeadlineType(DeadlineType.UNKNOWN)) + .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("ivx") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true))) + .withDisabled(false)); model = BinaryData.fromObject(model).toObject(ScheduledActionUpdate.class); - Assertions.assertEquals("lovmclwhijcoe", model.tags().get("ctbzaq")); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.properties().resourceType()); + Assertions.assertEquals("xrtfudxep", model.tags().get("gyqagvrvmnpkuk")); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.properties().resourceType()); Assertions.assertEquals(ScheduledActionType.START, model.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T10:09:05Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T19:22:59Z"), model.properties().endTime()); - Assertions.assertEquals("fcyddg", model.properties().schedule().scheduledTime()); - Assertions.assertEquals("mjthjqkwp", model.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.TUESDAY, model.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.APRIL, model.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(804437183, model.properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals(OffsetDateTime.parse("2021-06-12T22:02:25Z"), model.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-06T12:44:58Z"), model.properties().endTime()); + Assertions.assertEquals("mfnjh", model.properties().schedule().scheduledTime()); + Assertions.assertEquals("j", model.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.THURSDAY, model.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.ALL, model.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(597105024, model.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(950690565, + Assertions.assertEquals(648968318, model.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(374026778, + Assertions.assertEquals(1648570452, model.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.properties().schedule().deadlineType()); - Assertions.assertEquals("bjoghmewuamau", model.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals(ResourceOperationType.START, + model.properties().schedule().executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals(DeadlineType.UNKNOWN, model.properties().schedule().deadlineType()); + Assertions.assertEquals("ivx", model.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.properties().notificationSettings().get(0).language()); Assertions.assertTrue(model.properties().notificationSettings().get(0).disabled()); - Assertions.assertTrue(model.properties().disabled()); + Assertions.assertFalse(model.properties().disabled()); } // Use "Map.of" if available diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateMockTests.java index 0ab89af671ad..8bad5868073f 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateMockTests.java @@ -17,6 +17,7 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledAction; @@ -37,7 +38,7 @@ public final class ScheduledActionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Deallocate\",\"startTime\":\"2021-09-23T16:40:17Z\",\"endTime\":\"2021-05-16T03:51:54Z\",\"schedule\":{\"scheduledTime\":\"usdsttwv\",\"timeZone\":\"gvbbejdcng\",\"requestedWeekDays\":[\"Monday\"],\"requestedMonths\":[\"February\",\"January\"],\"requestedDaysOfTheMonth\":[840228808,386350287,127978460],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":1964426059,\"retryWindowInMinutes\":632499232}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"enuuzkopbm\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"woyuhhziuief\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Succeeded\"},\"location\":\"zqhof\",\"tags\":{\"u\":\"ae\",\"icslfaoq\":\"ah\",\"kaivwit\":\"piyylhalnswhccsp\",\"bwemhairs\":\"scywuggwoluhc\"},\"id\":\"rgzdwmsweyp\",\"name\":\"w\",\"type\":\"xggicccnxqhuexmk\"}"; + = "{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Deallocate\",\"startTime\":\"2021-10-29T18:48:32Z\",\"endTime\":\"2021-03-27T01:30:57Z\",\"schedule\":{\"scheduledTime\":\"d\",\"timeZone\":\"ffwafq\",\"requestedWeekDays\":[\"Friday\",\"Saturday\",\"Friday\",\"Wednesday\"],\"requestedMonths\":[\"March\",\"January\"],\"requestedDaysOfTheMonth\":[80194981],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":901509130,\"retryWindowInMinutes\":798003259,\"onFailureAction\":\"Create\"}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"cxgkmoyxcdyui\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"nbzydvfvfcj\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"srvhmgorffuki\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":true,\"provisioningState\":\"Succeeded\"},\"location\":\"efaxvxilc\",\"tags\":{\"jfzqlqhycavodgg\":\"nhnzeyqxt\",\"nlrariaawiuagy\":\"dbeesmie\"},\"id\":\"wqfbylyrfgiagt\",\"name\":\"ojocqwogf\",\"type\":\"zjvusfzldmo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -46,67 +47,67 @@ public void testCreateOrUpdate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ScheduledAction response - = manager.scheduledActions() - .define("dmovsm") - .withRegion("oamciodh") - .withExistingResourceGroup("u") - .withTags(mapOf("gokdwbwhks", "zxkhnzbonlwnto", "qgsfraoyzkoow", "zcmrvexztvb", "aldsy", "lmnguxaw", - "znkbykutwpfhpagm", "uximerqfobw")) - .withProperties( - new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) - .withActionType(ScheduledActionType.HIBERNATE) - .withStartTime(OffsetDateTime.parse("2021-04-25T07:43:26Z")) - .withEndTime(OffsetDateTime.parse("2021-07-14T09:12:45Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("q") - .withTimeZone("efkifr") - .withRequestedWeekDays(Arrays.asList(WeekDay.SUNDAY, WeekDay.MONDAY)) - .withRequestedMonths(Arrays.asList(Month.APRIL, Month.AUGUST, Month.OCTOBER)) - .withRequestedDaysOfTheMonth(Arrays.asList(1383309544, 829159187)) - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(1252448159) - .withRetryWindowInMinutes(1601819937))) - .withDeadlineType(DeadlineType.INITIATE_AT)) - .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("bjcntujitc") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true), - new NotificationProperties().withDestination("wwa") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true), - new NotificationProperties().withDestination("v") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true), - new NotificationProperties().withDestination("oqouicybxarzgszu") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true))) - .withDisabled(true)) - .create(); + ScheduledAction response = manager.scheduledActions() + .define("auzzptjazysd") + .withRegion("bbc") + .withExistingResourceGroup("digumbnr") + .withTags(mapOf("ykvgtrdcnifmz", "agtltdhlfkqoj")) + .withProperties(new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) + .withActionType(ScheduledActionType.START) + .withStartTime(OffsetDateTime.parse("2021-10-30T14:44:23Z")) + .withEndTime(OffsetDateTime.parse("2021-07-03T03:06:30Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("aiqyuvvfo") + .withTimeZone("kphhq") + .withRequestedWeekDays(Arrays.asList(WeekDay.FRIDAY, WeekDay.TUESDAY, WeekDay.MONDAY)) + .withRequestedMonths(Arrays.asList(Month.DECEMBER, Month.JANUARY)) + .withRequestedDaysOfTheMonth(Arrays.asList(239621224, 808991328, 2048419194)) + .withExecutionParameters(new ExecutionParameters() + .withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) + .withRetryPolicy(new RetryPolicy().withRetryCount(305978693) + .withRetryWindowInMinutes(1886331134) + .withOnFailureAction(ResourceOperationType.DEALLOCATE))) + .withDeadlineType(DeadlineType.INITIATE_AT)) + .withNotificationSettings(Arrays.asList( + new NotificationProperties().withDestination("vpo") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true), + new NotificationProperties().withDestination("sgbdhuz") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true), + new NotificationProperties().withDestination("gkynscliqh") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("komtkubotppn") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true))) + .withDisabled(true)) + .create(); - Assertions.assertEquals("zqhof", response.location()); - Assertions.assertEquals("ae", response.tags().get("u")); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, response.properties().resourceType()); + Assertions.assertEquals("efaxvxilc", response.location()); + Assertions.assertEquals("nhnzeyqxt", response.tags().get("jfzqlqhycavodgg")); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, response.properties().resourceType()); Assertions.assertEquals(ScheduledActionType.DEALLOCATE, response.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T16:40:17Z"), response.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T03:51:54Z"), response.properties().endTime()); - Assertions.assertEquals("usdsttwv", response.properties().schedule().scheduledTime()); - Assertions.assertEquals("gvbbejdcng", response.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.MONDAY, response.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.FEBRUARY, response.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(840228808, response.properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST, + Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T18:48:32Z"), response.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-27T01:30:57Z"), response.properties().endTime()); + Assertions.assertEquals("d", response.properties().schedule().scheduledTime()); + Assertions.assertEquals("ffwafq", response.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.FRIDAY, response.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.MARCH, response.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(80194981, response.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, response.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1964426059, + Assertions.assertEquals(901509130, response.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(632499232, + Assertions.assertEquals(798003259, response.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.CREATE, + response.properties().schedule().executionParameters().retryPolicy().onFailureAction()); Assertions.assertEquals(DeadlineType.INITIATE_AT, response.properties().schedule().deadlineType()); - Assertions.assertEquals("enuuzkopbm", response.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals("cxgkmoyxcdyui", response.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, response.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, response.properties().notificationSettings().get(0).language()); Assertions.assertTrue(response.properties().notificationSettings().get(0).disabled()); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableWithResponseMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableWithResponseMockTests.java index 35ae9efe9419..5bcb0e95437a 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableWithResponseMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableWithResponseMockTests.java @@ -27,7 +27,7 @@ public void testDisableWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.scheduledActions().disableWithResponse("yq", "xzfe", com.azure.core.util.Context.NONE); + manager.scheduledActions().disableWithResponse("oepry", "t", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableWithResponseMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableWithResponseMockTests.java index 5da394cb3a99..227f95dd6f8e 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableWithResponseMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableWithResponseMockTests.java @@ -27,8 +27,7 @@ public void testEnableWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.scheduledActions() - .enableWithResponse("ztppriolxorjalto", "mncwsobqwcsdb", com.azure.core.util.Context.NONE); + manager.scheduledActions().enableWithResponse("wytpzdmovz", "fvaawzqa", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsExtensionPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsExtensionPropertiesTests.java index e3c22052f60a..4f7f6cb0fd99 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsExtensionPropertiesTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsExtensionPropertiesTests.java @@ -10,6 +10,7 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; import com.azure.resourcemanager.computeschedule.models.ScheduledActionsExtensionProperties; @@ -21,26 +22,29 @@ public final class ScheduledActionsExtensionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionsExtensionProperties model = BinaryData.fromString( - "{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-06-27T00:13:21Z\",\"endTime\":\"2021-08-30T19:29:44Z\",\"schedule\":{\"scheduledTime\":\"qxtccmgyudx\",\"timeZone\":\"tlmoyrx\",\"requestedWeekDays\":[\"Thursday\",\"Monday\",\"Monday\",\"Friday\"],\"requestedMonths\":[\"March\"],\"requestedDaysOfTheMonth\":[1547725583,1508312014,1949820387,1417270726],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":291050041,\"retryWindowInMinutes\":203364386}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"rlhrxs\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Succeeded\",\"resourceNotificationSettings\":[{\"destination\":\"bpzkafkuwbc\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}") + "{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Start\",\"startTime\":\"2021-02-10T11:16:56Z\",\"endTime\":\"2021-07-29T01:36:25Z\",\"schedule\":{\"scheduledTime\":\"woiindf\",\"timeZone\":\"wp\",\"requestedWeekDays\":[\"Thursday\",\"Saturday\",\"Monday\",\"Sunday\"],\"requestedMonths\":[\"December\",\"August\",\"June\",\"December\"],\"requestedDaysOfTheMonth\":[1502730183],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":554003670,\"retryWindowInMinutes\":1868624750,\"onFailureAction\":\"Delete\"}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"ljagrqmqhl\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"iojnalghfkvtv\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Canceled\",\"resourceNotificationSettings\":[{\"destination\":\"hhahhxvrhmzkwpjg\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ghftqsxhqxujxuk\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"grjguufzd\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"fi\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]}") .toObject(ScheduledActionsExtensionProperties.class); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.resourceType()); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.resourceType()); Assertions.assertEquals(ScheduledActionType.START, model.actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-27T00:13:21Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-30T19:29:44Z"), model.endTime()); - Assertions.assertEquals("qxtccmgyudx", model.schedule().scheduledTime()); - Assertions.assertEquals("tlmoyrx", model.schedule().timeZone()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-10T11:16:56Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-29T01:36:25Z"), model.endTime()); + Assertions.assertEquals("woiindf", model.schedule().scheduledTime()); + Assertions.assertEquals("wp", model.schedule().timeZone()); Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.MARCH, model.schedule().requestedMonths().get(0)); - Assertions.assertEquals(1547725583, model.schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST, + Assertions.assertEquals(Month.DECEMBER, model.schedule().requestedMonths().get(0)); + Assertions.assertEquals(1502730183, model.schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(291050041, model.schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(203364386, model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(554003670, model.schedule().executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1868624750, + model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.DELETE, + model.schedule().executionParameters().retryPolicy().onFailureAction()); Assertions.assertEquals(DeadlineType.INITIATE_AT, model.schedule().deadlineType()); - Assertions.assertEquals("rlhrxs", model.notificationSettings().get(0).destination()); + Assertions.assertEquals("ljagrqmqhl", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); - Assertions.assertTrue(model.notificationSettings().get(0).disabled()); - Assertions.assertFalse(model.disabled()); + Assertions.assertFalse(model.notificationSettings().get(0).disabled()); + Assertions.assertTrue(model.disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupWithResponseMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupWithResponseMockTests.java index 65ef8f589003..3db839e99ccf 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupWithResponseMockTests.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.ScheduledAction; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; @@ -29,7 +30,7 @@ public final class ScheduledActionsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Start\",\"startTime\":\"2021-11-18T02:02:33Z\",\"endTime\":\"2021-07-12T20:53:21Z\",\"schedule\":{\"scheduledTime\":\"efyw\",\"timeZone\":\"bpfvm\",\"requestedWeekDays\":[\"Wednesday\",\"Sunday\",\"Wednesday\",\"Friday\"],\"requestedMonths\":[\"August\",\"December\"],\"requestedDaysOfTheMonth\":[892669790,938616277],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":1209208693,\"retryWindowInMinutes\":1777343462}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"nubexk\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ondjmq\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"omgkopkwho\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"qgxy\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Failed\"},\"location\":\"mkcxozapvh\",\"tags\":{\"dd\":\"prglya\",\"rjxgciqib\":\"kcbcue\",\"sdqrhzoymibmrq\":\"hos\"},\"id\":\"ibahwflus\",\"name\":\"dtmhrkwofyyvoqa\",\"type\":\"piexpbtgiw\"}"; + = "{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Start\",\"startTime\":\"2021-08-03T09:19:04Z\",\"endTime\":\"2021-05-27T13:13:34Z\",\"schedule\":{\"scheduledTime\":\"hbuffkmrq\",\"timeZone\":\"mvvhmxtdrjfuta\",\"requestedWeekDays\":[\"Saturday\"],\"requestedMonths\":[\"February\"],\"requestedDaysOfTheMonth\":[650990462,1565918365],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":96469803,\"retryWindowInMinutes\":1754338424,\"onFailureAction\":\"Start\"}},\"deadlineType\":\"CompleteBy\"},\"notificationSettings\":[{\"destination\":\"adraufactkahzo\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"iuxxpshneekulfg\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"kwdlenrdsutujba\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"hminyflnorwmduv\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Canceled\"},\"location\":\"dxpgpqchiszepnnb\",\"tags\":{\"confozauors\":\"xgibbda\",\"epzl\":\"kokwbqplhlvnu\"},\"id\":\"phwzsoldweyuqdu\",\"name\":\"vmnnrw\",\"type\":\"biorktal\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,31 +40,33 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ScheduledAction response = manager.scheduledActions() - .getByResourceGroupWithResponse("yqsluic", "dggkzzlvmbmpa", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("tiewdj", "vbquwr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mkcxozapvh", response.location()); - Assertions.assertEquals("prglya", response.tags().get("dd")); + Assertions.assertEquals("dxpgpqchiszepnnb", response.location()); + Assertions.assertEquals("xgibbda", response.tags().get("confozauors")); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, response.properties().resourceType()); Assertions.assertEquals(ScheduledActionType.START, response.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T02:02:33Z"), response.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-12T20:53:21Z"), response.properties().endTime()); - Assertions.assertEquals("efyw", response.properties().schedule().scheduledTime()); - Assertions.assertEquals("bpfvm", response.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.WEDNESDAY, response.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.AUGUST, response.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(892669790, response.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T09:19:04Z"), response.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T13:13:34Z"), response.properties().endTime()); + Assertions.assertEquals("hbuffkmrq", response.properties().schedule().scheduledTime()); + Assertions.assertEquals("mvvhmxtdrjfuta", response.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.SATURDAY, response.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.FEBRUARY, response.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(650990462, response.properties().schedule().requestedDaysOfTheMonth().get(0)); Assertions.assertEquals(OptimizationPreference.COST, response.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1209208693, + Assertions.assertEquals(96469803, response.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1777343462, + Assertions.assertEquals(1754338424, response.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(DeadlineType.UNKNOWN, response.properties().schedule().deadlineType()); - Assertions.assertEquals("nubexk", response.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals(ResourceOperationType.START, + response.properties().schedule().executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals(DeadlineType.COMPLETE_BY, response.properties().schedule().deadlineType()); + Assertions.assertEquals("adraufactkahzo", response.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, response.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, response.properties().notificationSettings().get(0).language()); - Assertions.assertFalse(response.properties().notificationSettings().get(0).disabled()); + Assertions.assertTrue(response.properties().notificationSettings().get(0).disabled()); Assertions.assertFalse(response.properties().disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupMockTests.java index 18a54fc092e5..f90b20a1e175 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupMockTests.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.ScheduledAction; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; @@ -30,7 +31,7 @@ public final class ScheduledActionsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-08-15T01:33:40Z\",\"endTime\":\"2021-03-28T20:58:03Z\",\"schedule\":{\"scheduledTime\":\"tdtkcn\",\"timeZone\":\"xwbpokulpiuj\",\"requestedWeekDays\":[\"Thursday\",\"Wednesday\"],\"requestedMonths\":[\"September\",\"March\",\"April\",\"September\"],\"requestedDaysOfTheMonth\":[361598801],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":1312962595,\"retryWindowInMinutes\":270206644}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"cciuqgbdbutau\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"uwhhmhykojoxafn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"chkoymkcdyh\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":true,\"provisioningState\":\"Canceled\"},\"location\":\"novvqfovljxy\",\"tags\":{\"yrs\":\"w\",\"ea\":\"dsytgadgvr\",\"arrwlquu\":\"neqn\",\"e\":\"jfqka\"},\"id\":\"iipfpubj\",\"name\":\"bwwift\",\"type\":\"hqkvpuvksgplsak\"}]}"; + = "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-11-09T14:46:05Z\",\"endTime\":\"2021-10-29T21:13:13Z\",\"schedule\":{\"scheduledTime\":\"gdufiqnd\",\"timeZone\":\"euzaof\",\"requestedWeekDays\":[\"Friday\",\"Tuesday\",\"Friday\"],\"requestedMonths\":[\"December\",\"December\",\"December\",\"June\"],\"requestedDaysOfTheMonth\":[963071916,1377717439,2137619748,355548039],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1160749519,\"retryWindowInMinutes\":1334396300,\"onFailureAction\":\"Unknown\"}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"macjekn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"vcimpev\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Failed\"},\"location\":\"ywdxsmic\",\"tags\":{\"nszqujiz\":\"wfscjfn\",\"byowbblgyavutp\":\"voqyt\",\"smsks\":\"hjoxo\",\"lqol\":\"pi\"},\"id\":\"xkcgxxlxsffgcvi\",\"name\":\"qzdwlvwlyoup\",\"type\":\"gfbkjubdyh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -40,29 +41,30 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.scheduledActions().listByResourceGroup("wo", com.azure.core.util.Context.NONE); + = manager.scheduledActions().listByResourceGroup("wjhhgdnhxmsivf", com.azure.core.util.Context.NONE); - Assertions.assertEquals("novvqfovljxy", response.iterator().next().location()); - Assertions.assertEquals("w", response.iterator().next().tags().get("yrs")); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, response.iterator().next().properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.START, response.iterator().next().properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T01:33:40Z"), + Assertions.assertEquals("ywdxsmic", response.iterator().next().location()); + Assertions.assertEquals("wfscjfn", response.iterator().next().tags().get("nszqujiz")); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, + response.iterator().next().properties().resourceType()); + Assertions.assertEquals(ScheduledActionType.HIBERNATE, response.iterator().next().properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-09T14:46:05Z"), response.iterator().next().properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-28T20:58:03Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T21:13:13Z"), response.iterator().next().properties().endTime()); - Assertions.assertEquals("tdtkcn", response.iterator().next().properties().schedule().scheduledTime()); - Assertions.assertEquals("xwbpokulpiuj", response.iterator().next().properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.THURSDAY, + Assertions.assertEquals("gdufiqnd", response.iterator().next().properties().schedule().scheduledTime()); + Assertions.assertEquals("euzaof", response.iterator().next().properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.FRIDAY, response.iterator().next().properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.SEPTEMBER, + Assertions.assertEquals(Month.DECEMBER, response.iterator().next().properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(361598801, + Assertions.assertEquals(963071916, response.iterator().next().properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST, + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, response.iterator().next().properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1312962595, + Assertions.assertEquals(1160749519, response.iterator().next().properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(270206644, + Assertions.assertEquals(1334396300, response.iterator() .next() .properties() @@ -70,15 +72,17 @@ public void testListByResourceGroup() throws Exception { .executionParameters() .retryPolicy() .retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.UNKNOWN, + response.iterator().next().properties().schedule().executionParameters().retryPolicy().onFailureAction()); Assertions.assertEquals(DeadlineType.UNKNOWN, response.iterator().next().properties().schedule().deadlineType()); - Assertions.assertEquals("cciuqgbdbutau", + Assertions.assertEquals("macjekn", response.iterator().next().properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, response.iterator().next().properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, response.iterator().next().properties().notificationSettings().get(0).language()); Assertions.assertFalse(response.iterator().next().properties().notificationSettings().get(0).disabled()); - Assertions.assertTrue(response.iterator().next().properties().disabled()); + Assertions.assertFalse(response.iterator().next().properties().disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListMockTests.java index 51e55177a474..0655f6aa306d 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListMockTests.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.ScheduledAction; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; @@ -30,7 +31,7 @@ public final class ScheduledActionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-01-14T10:56:19Z\",\"endTime\":\"2021-02-18T00:02:44Z\",\"schedule\":{\"scheduledTime\":\"ljphuopxodl\",\"timeZone\":\"iyntorzihle\",\"requestedWeekDays\":[\"Friday\",\"Wednesday\"],\"requestedMonths\":[\"October\"],\"requestedDaysOfTheMonth\":[1899163147,1407927145,2109654936,1609130326],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":215958915,\"retryWindowInMinutes\":1371610491}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"zqioxiysuii\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"dy\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"hqmibzyhwit\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"ynpcdpumnzgmwznm\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":true,\"provisioningState\":\"Succeeded\"},\"location\":\"hxbld\",\"tags\":{\"vokotllxdyh\":\"wrlkdmtn\",\"oocrkvcikhnv\":\"syocogjltdtbnnha\",\"gxk\":\"amqgxqquezikyw\"},\"id\":\"lla\",\"name\":\"melwuipiccjz\",\"type\":\"z\"}]}"; + = "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Deallocate\",\"startTime\":\"2020-12-26T07:05:24Z\",\"endTime\":\"2021-07-25T09:50:13Z\",\"schedule\":{\"scheduledTime\":\"g\",\"timeZone\":\"wzf\",\"requestedWeekDays\":[\"Saturday\",\"Friday\",\"Monday\"],\"requestedMonths\":[\"November\",\"July\"],\"requestedDaysOfTheMonth\":[631157488,1058528007,1941309010,1086150789],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1226803488,\"retryWindowInMinutes\":1623568145,\"onFailureAction\":\"Start\"}},\"deadlineType\":\"CompleteBy\"},\"notificationSettings\":[{\"destination\":\"qtgqqqxhrnxr\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Failed\"},\"location\":\"k\",\"tags\":{\"lkatnwxyiopidkqq\":\"fvazivjlfrqttba\",\"igovi\":\"kuvscxkdm\"},\"id\":\"rxkpmloazuruoc\",\"name\":\"goorbteo\",\"type\":\"bfhjxakvvjgsl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -41,27 +42,28 @@ public void testList() throws Exception { PagedIterable response = manager.scheduledActions().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("hxbld", response.iterator().next().location()); - Assertions.assertEquals("wrlkdmtn", response.iterator().next().tags().get("vokotllxdyh")); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, response.iterator().next().properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.HIBERNATE, response.iterator().next().properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-14T10:56:19Z"), + Assertions.assertEquals("k", response.iterator().next().location()); + Assertions.assertEquals("fvazivjlfrqttba", response.iterator().next().tags().get("lkatnwxyiopidkqq")); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, + response.iterator().next().properties().resourceType()); + Assertions.assertEquals(ScheduledActionType.DEALLOCATE, response.iterator().next().properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-26T07:05:24Z"), response.iterator().next().properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-18T00:02:44Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-07-25T09:50:13Z"), response.iterator().next().properties().endTime()); - Assertions.assertEquals("ljphuopxodl", response.iterator().next().properties().schedule().scheduledTime()); - Assertions.assertEquals("iyntorzihle", response.iterator().next().properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.FRIDAY, + Assertions.assertEquals("g", response.iterator().next().properties().schedule().scheduledTime()); + Assertions.assertEquals("wzf", response.iterator().next().properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.SATURDAY, response.iterator().next().properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.OCTOBER, + Assertions.assertEquals(Month.NOVEMBER, response.iterator().next().properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(1899163147, + Assertions.assertEquals(631157488, response.iterator().next().properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST, + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, response.iterator().next().properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(215958915, + Assertions.assertEquals(1226803488, response.iterator().next().properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1371610491, + Assertions.assertEquals(1623568145, response.iterator() .next() .properties() @@ -69,15 +71,17 @@ public void testList() throws Exception { .executionParameters() .retryPolicy() .retryWindowInMinutes()); - Assertions.assertEquals(DeadlineType.UNKNOWN, + Assertions.assertEquals(ResourceOperationType.START, + response.iterator().next().properties().schedule().executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals(DeadlineType.COMPLETE_BY, response.iterator().next().properties().schedule().deadlineType()); - Assertions.assertEquals("zqioxiysuii", + Assertions.assertEquals("qtgqqqxhrnxr", response.iterator().next().properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, response.iterator().next().properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, response.iterator().next().properties().notificationSettings().get(0).language()); - Assertions.assertTrue(response.iterator().next().properties().notificationSettings().get(0).disabled()); + Assertions.assertFalse(response.iterator().next().properties().notificationSettings().get(0).disabled()); Assertions.assertTrue(response.iterator().next().properties().disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesMockTests.java index 38aecf5b4770..39e182208b8e 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesMockTests.java @@ -24,7 +24,7 @@ public final class ScheduledActionsListResourcesMockTests { @Test public void testListResources() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"yrnxxmueedn\",\"id\":\"rdvstkwqqtch\",\"type\":\"lmfmtdaay\",\"resourceId\":\"dvwvgpio\",\"notificationSettings\":[{\"destination\":\"xrtfudxep\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}]}"; + = "{\"value\":[{\"name\":\"yw\",\"id\":\"t\",\"type\":\"kxn\",\"resourceId\":\"edabgyvudtjue\",\"notificationSettings\":[{\"destination\":\"ihxuuwh\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"cybvpayakkudzpxg\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"agst\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,13 +34,13 @@ public void testListResources() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.scheduledActions().listResources("v", "vvcnayr", com.azure.core.util.Context.NONE); + = manager.scheduledActions().listResources("r", "il", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dvwvgpio", response.iterator().next().resourceId()); - Assertions.assertEquals("xrtfudxep", response.iterator().next().notificationSettings().get(0).destination()); + Assertions.assertEquals("edabgyvudtjue", response.iterator().next().resourceId()); + Assertions.assertEquals("ihxuuwh", response.iterator().next().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, response.iterator().next().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, response.iterator().next().notificationSettings().get(0).language()); - Assertions.assertTrue(response.iterator().next().notificationSettings().get(0).disabled()); + Assertions.assertFalse(response.iterator().next().notificationSettings().get(0).disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsScheduleTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsScheduleTests.java index e57f16499ecb..e80eefa2a5eb 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsScheduleTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsScheduleTests.java @@ -9,6 +9,7 @@ import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionsSchedule; import com.azure.resourcemanager.computeschedule.models.WeekDay; @@ -19,42 +20,47 @@ public final class ScheduledActionsScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionsSchedule model = BinaryData.fromString( - "{\"scheduledTime\":\"dxob\",\"timeZone\":\"bdxkqpxokaj\",\"requestedWeekDays\":[\"Wednesday\",\"All\",\"All\"],\"requestedMonths\":[\"All\",\"May\",\"November\"],\"requestedDaysOfTheMonth\":[1260380641,971264827],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1867037750,\"retryWindowInMinutes\":1107396913}},\"deadlineType\":\"CompleteBy\"}") + "{\"scheduledTime\":\"ccjzkzivgvv\",\"timeZone\":\"nayrhyrnxxmueedn\",\"requestedWeekDays\":[\"Wednesday\",\"Monday\",\"Friday\"],\"requestedMonths\":[\"July\",\"November\",\"October\"],\"requestedDaysOfTheMonth\":[2053203757],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":848929691,\"retryWindowInMinutes\":1261287466,\"onFailureAction\":\"Start\"}},\"deadlineType\":\"CompleteBy\"}") .toObject(ScheduledActionsSchedule.class); - Assertions.assertEquals("dxob", model.scheduledTime()); - Assertions.assertEquals("bdxkqpxokaj", model.timeZone()); + Assertions.assertEquals("ccjzkzivgvv", model.scheduledTime()); + Assertions.assertEquals("nayrhyrnxxmueedn", model.timeZone()); Assertions.assertEquals(WeekDay.WEDNESDAY, model.requestedWeekDays().get(0)); - Assertions.assertEquals(Month.ALL, model.requestedMonths().get(0)); - Assertions.assertEquals(1260380641, model.requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + Assertions.assertEquals(Month.JULY, model.requestedMonths().get(0)); + Assertions.assertEquals(2053203757, model.requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1867037750, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1107396913, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(848929691, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1261287466, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.START, + model.executionParameters().retryPolicy().onFailureAction()); Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.deadlineType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduledActionsSchedule model - = new ScheduledActionsSchedule().withScheduledTime("dxob") - .withTimeZone("bdxkqpxokaj") - .withRequestedWeekDays(Arrays.asList(WeekDay.WEDNESDAY, WeekDay.ALL, WeekDay.ALL)) - .withRequestedMonths(Arrays.asList(Month.ALL, Month.MAY, Month.NOVEMBER)) - .withRequestedDaysOfTheMonth(Arrays.asList(1260380641, 971264827)) - .withExecutionParameters(new ExecutionParameters() - .withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(1867037750).withRetryWindowInMinutes(1107396913))) - .withDeadlineType(DeadlineType.COMPLETE_BY); + ScheduledActionsSchedule model = new ScheduledActionsSchedule().withScheduledTime("ccjzkzivgvv") + .withTimeZone("nayrhyrnxxmueedn") + .withRequestedWeekDays(Arrays.asList(WeekDay.WEDNESDAY, WeekDay.MONDAY, WeekDay.FRIDAY)) + .withRequestedMonths(Arrays.asList(Month.JULY, Month.NOVEMBER, Month.OCTOBER)) + .withRequestedDaysOfTheMonth(Arrays.asList(2053203757)) + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) + .withRetryPolicy(new RetryPolicy().withRetryCount(848929691) + .withRetryWindowInMinutes(1261287466) + .withOnFailureAction(ResourceOperationType.START))) + .withDeadlineType(DeadlineType.COMPLETE_BY); model = BinaryData.fromObject(model).toObject(ScheduledActionsSchedule.class); - Assertions.assertEquals("dxob", model.scheduledTime()); - Assertions.assertEquals("bdxkqpxokaj", model.timeZone()); + Assertions.assertEquals("ccjzkzivgvv", model.scheduledTime()); + Assertions.assertEquals("nayrhyrnxxmueedn", model.timeZone()); Assertions.assertEquals(WeekDay.WEDNESDAY, model.requestedWeekDays().get(0)); - Assertions.assertEquals(Month.ALL, model.requestedMonths().get(0)); - Assertions.assertEquals(1260380641, model.requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + Assertions.assertEquals(Month.JULY, model.requestedMonths().get(0)); + Assertions.assertEquals(2053203757, model.requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1867037750, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1107396913, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(848929691, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1261287466, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.START, + model.executionParameters().retryPolicy().onFailureAction()); Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.deadlineType()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsAdditionalPublishingTargetsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsAdditionalPublishingTargetsTests.java new file mode 100644 index 000000000000..7a2a7963c323 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsAdditionalPublishingTargetsTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.EventGridAndResourceGraph; +import com.azure.resourcemanager.computeschedule.models.ScheduledEventsAdditionalPublishingTargets; +import org.junit.jupiter.api.Assertions; + +public final class ScheduledEventsAdditionalPublishingTargetsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScheduledEventsAdditionalPublishingTargets model = BinaryData + .fromString( + "{\"eventGridAndResourceGraph\":{\"enable\":true,\"scheduledEventsApiVersion\":\"zaqsqsycbkbfk\"}}") + .toObject(ScheduledEventsAdditionalPublishingTargets.class); + Assertions.assertTrue(model.eventGridAndResourceGraph().enable()); + Assertions.assertEquals("zaqsqsycbkbfk", model.eventGridAndResourceGraph().scheduledEventsApiVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScheduledEventsAdditionalPublishingTargets model + = new ScheduledEventsAdditionalPublishingTargets().withEventGridAndResourceGraph( + new EventGridAndResourceGraph().withEnable(true).withScheduledEventsApiVersion("zaqsqsycbkbfk")); + model = BinaryData.fromObject(model).toObject(ScheduledEventsAdditionalPublishingTargets.class); + Assertions.assertTrue(model.eventGridAndResourceGraph().enable()); + Assertions.assertEquals("zaqsqsycbkbfk", model.eventGridAndResourceGraph().scheduledEventsApiVersion()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsPolicyTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsPolicyTests.java new file mode 100644 index 000000000000..f697a2ecd88c --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsPolicyTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.AllInstancesDown; +import com.azure.resourcemanager.computeschedule.models.EventGridAndResourceGraph; +import com.azure.resourcemanager.computeschedule.models.ScheduledEventsAdditionalPublishingTargets; +import com.azure.resourcemanager.computeschedule.models.ScheduledEventsPolicy; +import com.azure.resourcemanager.computeschedule.models.UserInitiatedReboot; +import com.azure.resourcemanager.computeschedule.models.UserInitiatedRedeploy; +import org.junit.jupiter.api.Assertions; + +public final class ScheduledEventsPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScheduledEventsPolicy model = BinaryData.fromString( + "{\"userInitiatedRedeploy\":{\"automaticallyApprove\":false},\"userInitiatedReboot\":{\"automaticallyApprove\":false},\"scheduledEventsAdditionalPublishingTargets\":{\"eventGridAndResourceGraph\":{\"enable\":true,\"scheduledEventsApiVersion\":\"ajrmvdjwzrlovmc\"}},\"allInstancesDown\":{\"automaticallyApprove\":true}}") + .toObject(ScheduledEventsPolicy.class); + Assertions.assertFalse(model.userInitiatedRedeploy().automaticallyApprove()); + Assertions.assertFalse(model.userInitiatedReboot().automaticallyApprove()); + Assertions.assertTrue(model.scheduledEventsAdditionalPublishingTargets().eventGridAndResourceGraph().enable()); + Assertions.assertEquals("ajrmvdjwzrlovmc", + model.scheduledEventsAdditionalPublishingTargets().eventGridAndResourceGraph().scheduledEventsApiVersion()); + Assertions.assertTrue(model.allInstancesDown().automaticallyApprove()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScheduledEventsPolicy model = new ScheduledEventsPolicy() + .withUserInitiatedRedeploy(new UserInitiatedRedeploy().withAutomaticallyApprove(false)) + .withUserInitiatedReboot(new UserInitiatedReboot().withAutomaticallyApprove(false)) + .withScheduledEventsAdditionalPublishingTargets( + new ScheduledEventsAdditionalPublishingTargets().withEventGridAndResourceGraph( + new EventGridAndResourceGraph().withEnable(true).withScheduledEventsApiVersion("ajrmvdjwzrlovmc"))) + .withAllInstancesDown(new AllInstancesDown().withAutomaticallyApprove(true)); + model = BinaryData.fromObject(model).toObject(ScheduledEventsPolicy.class); + Assertions.assertFalse(model.userInitiatedRedeploy().automaticallyApprove()); + Assertions.assertFalse(model.userInitiatedReboot().automaticallyApprove()); + Assertions.assertTrue(model.scheduledEventsAdditionalPublishingTargets().eventGridAndResourceGraph().enable()); + Assertions.assertEquals("ajrmvdjwzrlovmc", + model.scheduledEventsAdditionalPublishingTargets().eventGridAndResourceGraph().scheduledEventsApiVersion()); + Assertions.assertTrue(model.allInstancesDown().automaticallyApprove()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsProfileTests.java new file mode 100644 index 000000000000..4aa6710f6eb8 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsProfileTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.OSImageNotificationProfile; +import com.azure.resourcemanager.computeschedule.models.ScheduledEventsProfile; +import com.azure.resourcemanager.computeschedule.models.TerminateNotificationProfile; +import org.junit.jupiter.api.Assertions; + +public final class ScheduledEventsProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScheduledEventsProfile model = BinaryData.fromString( + "{\"terminateNotificationProfile\":{\"notBeforeTimeout\":\"ytkblmpew\",\"enable\":true},\"osImageNotificationProfile\":{\"notBeforeTimeout\":\"rvrnsvshqjohxc\",\"enable\":true}}") + .toObject(ScheduledEventsProfile.class); + Assertions.assertEquals("ytkblmpew", model.terminateNotificationProfile().notBeforeTimeout()); + Assertions.assertTrue(model.terminateNotificationProfile().enable()); + Assertions.assertEquals("rvrnsvshqjohxc", model.osImageNotificationProfile().notBeforeTimeout()); + Assertions.assertTrue(model.osImageNotificationProfile().enable()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScheduledEventsProfile model = new ScheduledEventsProfile() + .withTerminateNotificationProfile( + new TerminateNotificationProfile().withNotBeforeTimeout("ytkblmpew").withEnable(true)) + .withOsImageNotificationProfile( + new OSImageNotificationProfile().withNotBeforeTimeout("rvrnsvshqjohxc").withEnable(true)); + model = BinaryData.fromObject(model).toObject(ScheduledEventsProfile.class); + Assertions.assertEquals("ytkblmpew", model.terminateNotificationProfile().notBeforeTimeout()); + Assertions.assertTrue(model.terminateNotificationProfile().enable()); + Assertions.assertEquals("rvrnsvshqjohxc", model.osImageNotificationProfile().notBeforeTimeout()); + Assertions.assertTrue(model.osImageNotificationProfile().enable()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitDeallocateRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitDeallocateContentTests.java similarity index 74% rename from sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitDeallocateRequestTests.java rename to sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitDeallocateContentTests.java index 925e6fdc48b4..4e2751336557 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitDeallocateRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitDeallocateContentTests.java @@ -8,20 +8,21 @@ import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; -import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateRequest; +import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateContent; import java.time.OffsetDateTime; import java.util.Arrays; import org.junit.jupiter.api.Assertions; -public final class SubmitDeallocateRequestTests { +public final class SubmitDeallocateContentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SubmitDeallocateRequest model = BinaryData.fromString( - "{\"schedule\":{\"deadline\":\"2021-09-06T02:12:49Z\",\"deadLine\":\"2021-12-03T06:58:55Z\",\"timezone\":\"zvgnwzs\",\"timeZone\":\"glzufc\",\"deadlineType\":\"CompleteBy\"},\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1757371466,\"retryWindowInMinutes\":1730607260}},\"resources\":{\"ids\":[\"nufhf\",\"bj\",\"s\",\"git\"]},\"correlationid\":\"xqhabi\"}") - .toObject(SubmitDeallocateRequest.class); + SubmitDeallocateContent model = BinaryData.fromString( + "{\"schedule\":{\"deadline\":\"2021-09-06T02:12:49Z\",\"deadLine\":\"2021-12-03T06:58:55Z\",\"timezone\":\"zvgnwzs\",\"timeZone\":\"glzufc\",\"deadlineType\":\"CompleteBy\"},\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1757371466,\"retryWindowInMinutes\":1730607260,\"onFailureAction\":\"Create\"}},\"resources\":{\"ids\":[\"fhfcb\",\"y\",\"a\"]},\"correlationid\":\"ithxqhabifpi\"}") + .toObject(SubmitDeallocateContent.class); Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T02:12:49Z"), model.schedule().deadline()); Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T06:58:55Z"), model.schedule().deadLine()); Assertions.assertEquals("zvgnwzs", model.schedule().timezone()); @@ -31,13 +32,15 @@ public void testDeserialize() throws Exception { model.executionParameters().optimizationPreference()); Assertions.assertEquals(1757371466, model.executionParameters().retryPolicy().retryCount()); Assertions.assertEquals(1730607260, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("nufhf", model.resources().ids().get(0)); - Assertions.assertEquals("xqhabi", model.correlationid()); + Assertions.assertEquals(ResourceOperationType.CREATE, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("fhfcb", model.resources().ids().get(0)); + Assertions.assertEquals("ithxqhabifpi", model.correlationid()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubmitDeallocateRequest model = new SubmitDeallocateRequest() + SubmitDeallocateContent model = new SubmitDeallocateContent() .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2021-09-06T02:12:49Z")) .withDeadLine(OffsetDateTime.parse("2021-12-03T06:58:55Z")) .withTimezone("zvgnwzs") @@ -45,10 +48,12 @@ public void testSerialize() throws Exception { .withDeadlineType(DeadlineType.COMPLETE_BY)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(1757371466).withRetryWindowInMinutes(1730607260))) - .withResources(new Resources().withIds(Arrays.asList("nufhf", "bj", "s", "git"))) - .withCorrelationid("xqhabi"); - model = BinaryData.fromObject(model).toObject(SubmitDeallocateRequest.class); + .withRetryPolicy(new RetryPolicy().withRetryCount(1757371466) + .withRetryWindowInMinutes(1730607260) + .withOnFailureAction(ResourceOperationType.CREATE))) + .withResources(new Resources().withIds(Arrays.asList("fhfcb", "y", "a"))) + .withCorrelationid("ithxqhabifpi"); + model = BinaryData.fromObject(model).toObject(SubmitDeallocateContent.class); Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T02:12:49Z"), model.schedule().deadline()); Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T06:58:55Z"), model.schedule().deadLine()); Assertions.assertEquals("zvgnwzs", model.schedule().timezone()); @@ -58,7 +63,9 @@ public void testSerialize() throws Exception { model.executionParameters().optimizationPreference()); Assertions.assertEquals(1757371466, model.executionParameters().retryPolicy().retryCount()); Assertions.assertEquals(1730607260, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("nufhf", model.resources().ids().get(0)); - Assertions.assertEquals("xqhabi", model.correlationid()); + Assertions.assertEquals(ResourceOperationType.CREATE, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("fhfcb", model.resources().ids().get(0)); + Assertions.assertEquals("ithxqhabifpi", model.correlationid()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitHibernateContentTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitHibernateContentTests.java new file mode 100644 index 000000000000..88024264dcd7 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitHibernateContentTests.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DeadlineType; +import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; +import com.azure.resourcemanager.computeschedule.models.Resources; +import com.azure.resourcemanager.computeschedule.models.RetryPolicy; +import com.azure.resourcemanager.computeschedule.models.Schedule; +import com.azure.resourcemanager.computeschedule.models.SubmitHibernateContent; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SubmitHibernateContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SubmitHibernateContent model = BinaryData.fromString( + "{\"schedule\":{\"deadline\":\"2021-02-13T07:50:35Z\",\"deadLine\":\"2021-07-14T10:08:19Z\",\"timezone\":\"osygex\",\"timeZone\":\"ojakhmsbzjhcrze\",\"deadlineType\":\"CompleteBy\"},\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":148902907,\"retryWindowInMinutes\":757345112,\"onFailureAction\":\"Delete\"}},\"resources\":{\"ids\":[\"trg\",\"jbp\",\"zfsinzgvf\",\"jrwzox\"]},\"correlationid\":\"j\"}") + .toObject(SubmitHibernateContent.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T07:50:35Z"), model.schedule().deadline()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-14T10:08:19Z"), model.schedule().deadLine()); + Assertions.assertEquals("osygex", model.schedule().timezone()); + Assertions.assertEquals("ojakhmsbzjhcrze", model.schedule().timeZone()); + Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); + Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); + Assertions.assertEquals(148902907, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(757345112, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.DELETE, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("trg", model.resources().ids().get(0)); + Assertions.assertEquals("j", model.correlationid()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SubmitHibernateContent model = new SubmitHibernateContent() + .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2021-02-13T07:50:35Z")) + .withDeadLine(OffsetDateTime.parse("2021-07-14T10:08:19Z")) + .withTimezone("osygex") + .withTimeZone("ojakhmsbzjhcrze") + .withDeadlineType(DeadlineType.COMPLETE_BY)) + .withExecutionParameters(new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) + .withRetryPolicy(new RetryPolicy().withRetryCount(148902907) + .withRetryWindowInMinutes(757345112) + .withOnFailureAction(ResourceOperationType.DELETE))) + .withResources(new Resources().withIds(Arrays.asList("trg", "jbp", "zfsinzgvf", "jrwzox"))) + .withCorrelationid("j"); + model = BinaryData.fromObject(model).toObject(SubmitHibernateContent.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T07:50:35Z"), model.schedule().deadline()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-14T10:08:19Z"), model.schedule().deadLine()); + Assertions.assertEquals("osygex", model.schedule().timezone()); + Assertions.assertEquals("ojakhmsbzjhcrze", model.schedule().timeZone()); + Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); + Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); + Assertions.assertEquals(148902907, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(757345112, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.DELETE, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("trg", model.resources().ids().get(0)); + Assertions.assertEquals("j", model.correlationid()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitHibernateRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitHibernateRequestTests.java deleted file mode 100644 index 1a8513f1280c..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitHibernateRequestTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DeadlineType; -import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.Resources; -import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import com.azure.resourcemanager.computeschedule.models.Schedule; -import com.azure.resourcemanager.computeschedule.models.SubmitHibernateRequest; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubmitHibernateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubmitHibernateRequest model = BinaryData.fromString( - "{\"schedule\":{\"deadline\":\"2021-01-15T00:39:28Z\",\"deadLine\":\"2021-04-04T07:45:50Z\",\"timezone\":\"dio\",\"timeZone\":\"pslwejdpvw\",\"deadlineType\":\"CompleteBy\"},\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1977100929,\"retryWindowInMinutes\":1527303417}},\"resources\":{\"ids\":[\"tazak\",\"j\",\"ahbc\",\"yffdfdos\"]},\"correlationid\":\"gexpaojakhmsbz\"}") - .toObject(SubmitHibernateRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-15T00:39:28Z"), model.schedule().deadline()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-04T07:45:50Z"), model.schedule().deadLine()); - Assertions.assertEquals("dio", model.schedule().timezone()); - Assertions.assertEquals("pslwejdpvw", model.schedule().timeZone()); - Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, - model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1977100929, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1527303417, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("tazak", model.resources().ids().get(0)); - Assertions.assertEquals("gexpaojakhmsbz", model.correlationid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubmitHibernateRequest model = new SubmitHibernateRequest() - .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2021-01-15T00:39:28Z")) - .withDeadLine(OffsetDateTime.parse("2021-04-04T07:45:50Z")) - .withTimezone("dio") - .withTimeZone("pslwejdpvw") - .withDeadlineType(DeadlineType.COMPLETE_BY)) - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(1977100929).withRetryWindowInMinutes(1527303417))) - .withResources(new Resources().withIds(Arrays.asList("tazak", "j", "ahbc", "yffdfdos"))) - .withCorrelationid("gexpaojakhmsbz"); - model = BinaryData.fromObject(model).toObject(SubmitHibernateRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-15T00:39:28Z"), model.schedule().deadline()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-04T07:45:50Z"), model.schedule().deadLine()); - Assertions.assertEquals("dio", model.schedule().timezone()); - Assertions.assertEquals("pslwejdpvw", model.schedule().timeZone()); - Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, - model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1977100929, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1527303417, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("tazak", model.resources().ids().get(0)); - Assertions.assertEquals("gexpaojakhmsbz", model.correlationid()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitStartContentTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitStartContentTests.java new file mode 100644 index 000000000000..0e7e2a78dee9 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitStartContentTests.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DeadlineType; +import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; +import com.azure.resourcemanager.computeschedule.models.Resources; +import com.azure.resourcemanager.computeschedule.models.RetryPolicy; +import com.azure.resourcemanager.computeschedule.models.Schedule; +import com.azure.resourcemanager.computeschedule.models.SubmitStartContent; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SubmitStartContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SubmitStartContent model = BinaryData.fromString( + "{\"schedule\":{\"deadline\":\"2021-08-23T15:48:59Z\",\"deadLine\":\"2021-11-03T12:14:35Z\",\"timezone\":\"eotusivyevc\",\"timeZone\":\"qi\",\"deadlineType\":\"CompleteBy\"},\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1255006284,\"retryWindowInMinutes\":1282249013,\"onFailureAction\":\"Delete\"}},\"resources\":{\"ids\":[\"fygxgispemvtzfk\",\"fublj\",\"fxqeof\",\"aeqjhqjbasvms\"]},\"correlationid\":\"jqul\"}") + .toObject(SubmitStartContent.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-23T15:48:59Z"), model.schedule().deadline()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T12:14:35Z"), model.schedule().deadLine()); + Assertions.assertEquals("eotusivyevc", model.schedule().timezone()); + Assertions.assertEquals("qi", model.schedule().timeZone()); + Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(1255006284, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1282249013, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.DELETE, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("fygxgispemvtzfk", model.resources().ids().get(0)); + Assertions.assertEquals("jqul", model.correlationid()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SubmitStartContent model = new SubmitStartContent() + .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2021-08-23T15:48:59Z")) + .withDeadLine(OffsetDateTime.parse("2021-11-03T12:14:35Z")) + .withTimezone("eotusivyevc") + .withTimeZone("qi") + .withDeadlineType(DeadlineType.COMPLETE_BY)) + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) + .withRetryPolicy(new RetryPolicy().withRetryCount(1255006284) + .withRetryWindowInMinutes(1282249013) + .withOnFailureAction(ResourceOperationType.DELETE))) + .withResources( + new Resources().withIds(Arrays.asList("fygxgispemvtzfk", "fublj", "fxqeof", "aeqjhqjbasvms"))) + .withCorrelationid("jqul"); + model = BinaryData.fromObject(model).toObject(SubmitStartContent.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-23T15:48:59Z"), model.schedule().deadline()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T12:14:35Z"), model.schedule().deadLine()); + Assertions.assertEquals("eotusivyevc", model.schedule().timezone()); + Assertions.assertEquals("qi", model.schedule().timeZone()); + Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(1255006284, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1282249013, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(ResourceOperationType.DELETE, + model.executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals("fygxgispemvtzfk", model.resources().ids().get(0)); + Assertions.assertEquals("jqul", model.correlationid()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitStartRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitStartRequestTests.java deleted file mode 100644 index 0657427af193..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitStartRequestTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DeadlineType; -import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.Resources; -import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import com.azure.resourcemanager.computeschedule.models.Schedule; -import com.azure.resourcemanager.computeschedule.models.SubmitStartRequest; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubmitStartRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubmitStartRequest model = BinaryData.fromString( - "{\"schedule\":{\"deadline\":\"2021-11-24T18:52:18Z\",\"deadLine\":\"2021-10-29T01:56:29Z\",\"timezone\":\"hpf\",\"timeZone\":\"ypininm\",\"deadlineType\":\"InitiateAt\"},\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1439394091,\"retryWindowInMinutes\":1813280112}},\"resources\":{\"ids\":[\"depoog\",\"nuvamiheogna\",\"xzxtheo\"]},\"correlationid\":\"usivye\"}") - .toObject(SubmitStartRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-24T18:52:18Z"), model.schedule().deadline()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T01:56:29Z"), model.schedule().deadLine()); - Assertions.assertEquals("hpf", model.schedule().timezone()); - Assertions.assertEquals("ypininm", model.schedule().timeZone()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, model.schedule().deadlineType()); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, - model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1439394091, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1813280112, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("depoog", model.resources().ids().get(0)); - Assertions.assertEquals("usivye", model.correlationid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubmitStartRequest model = new SubmitStartRequest() - .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2021-11-24T18:52:18Z")) - .withDeadLine(OffsetDateTime.parse("2021-10-29T01:56:29Z")) - .withTimezone("hpf") - .withTimeZone("ypininm") - .withDeadlineType(DeadlineType.INITIATE_AT)) - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(1439394091).withRetryWindowInMinutes(1813280112))) - .withResources(new Resources().withIds(Arrays.asList("depoog", "nuvamiheogna", "xzxtheo"))) - .withCorrelationid("usivye"); - model = BinaryData.fromObject(model).toObject(SubmitStartRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-24T18:52:18Z"), model.schedule().deadline()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T01:56:29Z"), model.schedule().deadLine()); - Assertions.assertEquals("hpf", model.schedule().timezone()); - Assertions.assertEquals("ypininm", model.schedule().timeZone()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, model.schedule().deadlineType()); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, - model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1439394091, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1813280112, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals("depoog", model.resources().ids().get(0)); - Assertions.assertEquals("usivye", model.correlationid()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/TerminateNotificationProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/TerminateNotificationProfileTests.java new file mode 100644 index 000000000000..d57049692eb1 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/TerminateNotificationProfileTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.TerminateNotificationProfile; +import org.junit.jupiter.api.Assertions; + +public final class TerminateNotificationProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TerminateNotificationProfile model + = BinaryData.fromString("{\"notBeforeTimeout\":\"ovasrruvwbhsqfsu\",\"enable\":false}") + .toObject(TerminateNotificationProfile.class); + Assertions.assertEquals("ovasrruvwbhsqfsu", model.notBeforeTimeout()); + Assertions.assertFalse(model.enable()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TerminateNotificationProfile model + = new TerminateNotificationProfile().withNotBeforeTimeout("ovasrruvwbhsqfsu").withEnable(false); + model = BinaryData.fromObject(model).toObject(TerminateNotificationProfile.class); + Assertions.assertEquals("ovasrruvwbhsqfsu", model.notBeforeTimeout()); + Assertions.assertFalse(model.enable()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UefiSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UefiSettingsTests.java new file mode 100644 index 000000000000..7134e7f50db1 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UefiSettingsTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.UefiSettings; +import org.junit.jupiter.api.Assertions; + +public final class UefiSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UefiSettings model + = BinaryData.fromString("{\"secureBootEnabled\":true,\"vTpmEnabled\":false}").toObject(UefiSettings.class); + Assertions.assertTrue(model.secureBootEnabled()); + Assertions.assertFalse(model.vTpmEnabled()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UefiSettings model = new UefiSettings().withSecureBootEnabled(true).withVTpmEnabled(false); + model = BinaryData.fromObject(model).toObject(UefiSettings.class); + Assertions.assertTrue(model.secureBootEnabled()); + Assertions.assertFalse(model.vTpmEnabled()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserAssignedIdentitiesValueTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserAssignedIdentitiesValueTests.java new file mode 100644 index 000000000000..ff5760e8df97 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserAssignedIdentitiesValueTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.UserAssignedIdentitiesValue; + +public final class UserAssignedIdentitiesValueTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserAssignedIdentitiesValue model + = BinaryData.fromString("{\"principalId\":\"lnrosfqp\",\"clientId\":\"ehzzvypyqrim\"}") + .toObject(UserAssignedIdentitiesValue.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserAssignedIdentitiesValue model = new UserAssignedIdentitiesValue(); + model = BinaryData.fromObject(model).toObject(UserAssignedIdentitiesValue.class); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRebootTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRebootTests.java new file mode 100644 index 000000000000..1f7a1ae7f7c7 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRebootTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.UserInitiatedReboot; +import org.junit.jupiter.api.Assertions; + +public final class UserInitiatedRebootTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserInitiatedReboot model + = BinaryData.fromString("{\"automaticallyApprove\":true}").toObject(UserInitiatedReboot.class); + Assertions.assertTrue(model.automaticallyApprove()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserInitiatedReboot model = new UserInitiatedReboot().withAutomaticallyApprove(true); + model = BinaryData.fromObject(model).toObject(UserInitiatedReboot.class); + Assertions.assertTrue(model.automaticallyApprove()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRedeployTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRedeployTests.java new file mode 100644 index 000000000000..2c515d2f4d22 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRedeployTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.UserInitiatedRedeploy; +import org.junit.jupiter.api.Assertions; + +public final class UserInitiatedRedeployTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserInitiatedRedeploy model + = BinaryData.fromString("{\"automaticallyApprove\":true}").toObject(UserInitiatedRedeploy.class); + Assertions.assertTrue(model.automaticallyApprove()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserInitiatedRedeploy model = new UserInitiatedRedeploy().withAutomaticallyApprove(true); + model = BinaryData.fromObject(model).toObject(UserInitiatedRedeploy.class); + Assertions.assertTrue(model.automaticallyApprove()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMDiskSecurityProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMDiskSecurityProfileTests.java new file mode 100644 index 000000000000..842f9c3f3652 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMDiskSecurityProfileTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DiskEncryptionSetParameters; +import com.azure.resourcemanager.computeschedule.models.SecurityEncryptionTypes; +import com.azure.resourcemanager.computeschedule.models.VMDiskSecurityProfile; +import org.junit.jupiter.api.Assertions; + +public final class VMDiskSecurityProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VMDiskSecurityProfile model = BinaryData + .fromString( + "{\"securityEncryptionType\":\"VMGuestStateOnly\",\"diskEncryptionSet\":{\"id\":\"xrjfeallnwsub\"}}") + .toObject(VMDiskSecurityProfile.class); + Assertions.assertEquals(SecurityEncryptionTypes.VMGUEST_STATE_ONLY, model.securityEncryptionType()); + Assertions.assertEquals("xrjfeallnwsub", model.diskEncryptionSet().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VMDiskSecurityProfile model + = new VMDiskSecurityProfile().withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("xrjfeallnwsub")); + model = BinaryData.fromObject(model).toObject(VMDiskSecurityProfile.class); + Assertions.assertEquals(SecurityEncryptionTypes.VMGUEST_STATE_ONLY, model.securityEncryptionType()); + Assertions.assertEquals("xrjfeallnwsub", model.diskEncryptionSet().id()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMGalleryApplicationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMGalleryApplicationTests.java new file mode 100644 index 000000000000..baaf77eb5f07 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMGalleryApplicationTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.VMGalleryApplication; +import org.junit.jupiter.api.Assertions; + +public final class VMGalleryApplicationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VMGalleryApplication model = BinaryData.fromString( + "{\"tags\":\"qytjrybnwjewgd\",\"order\":948183907,\"packageReferenceId\":\"rvnaenqpeh\",\"configurationReference\":\"doy\",\"treatFailureAsDeploymentFailure\":false,\"enableAutomaticUpgrade\":false}") + .toObject(VMGalleryApplication.class); + Assertions.assertEquals("qytjrybnwjewgd", model.tags()); + Assertions.assertEquals(948183907, model.order()); + Assertions.assertEquals("rvnaenqpeh", model.packageReferenceId()); + Assertions.assertEquals("doy", model.configurationReference()); + Assertions.assertFalse(model.treatFailureAsDeploymentFailure()); + Assertions.assertFalse(model.enableAutomaticUpgrade()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VMGalleryApplication model = new VMGalleryApplication().withTags("qytjrybnwjewgd") + .withOrder(948183907) + .withPackageReferenceId("rvnaenqpeh") + .withConfigurationReference("doy") + .withTreatFailureAsDeploymentFailure(false) + .withEnableAutomaticUpgrade(false); + model = BinaryData.fromObject(model).toObject(VMGalleryApplication.class); + Assertions.assertEquals("qytjrybnwjewgd", model.tags()); + Assertions.assertEquals(948183907, model.order()); + Assertions.assertEquals("rvnaenqpeh", model.packageReferenceId()); + Assertions.assertEquals("doy", model.configurationReference()); + Assertions.assertFalse(model.treatFailureAsDeploymentFailure()); + Assertions.assertFalse(model.enableAutomaticUpgrade()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultCertificateTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultCertificateTests.java new file mode 100644 index 000000000000..81b6d1f85886 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultCertificateTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.VaultCertificate; +import org.junit.jupiter.api.Assertions; + +public final class VaultCertificateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VaultCertificate model + = BinaryData.fromString("{\"certificateUrl\":\"xhqyudxorrqnb\",\"certificateStore\":\"czvyifq\"}") + .toObject(VaultCertificate.class); + Assertions.assertEquals("xhqyudxorrqnb", model.certificateUrl()); + Assertions.assertEquals("czvyifq", model.certificateStore()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VaultCertificate model + = new VaultCertificate().withCertificateUrl("xhqyudxorrqnb").withCertificateStore("czvyifq"); + model = BinaryData.fromObject(model).toObject(VaultCertificate.class); + Assertions.assertEquals("xhqyudxorrqnb", model.certificateUrl()); + Assertions.assertEquals("czvyifq", model.certificateStore()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultSecretGroupTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultSecretGroupTests.java new file mode 100644 index 000000000000..5c94bde7a30f --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultSecretGroupTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.management.SubResource; +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.VaultCertificate; +import com.azure.resourcemanager.computeschedule.models.VaultSecretGroup; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VaultSecretGroupTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VaultSecretGroup model = BinaryData.fromString( + "{\"sourceVault\":{\"id\":\"pjmcmatuokthfuiu\"},\"vaultCertificates\":[{\"certificateUrl\":\"fcp\",\"certificateStore\":\"xodpuozmyzydagfu\"},{\"certificateUrl\":\"bezy\",\"certificateStore\":\"okktwhrdxw\"},{\"certificateUrl\":\"wqsmbsur\",\"certificateStore\":\"imoryocfsfksym\"},{\"certificateUrl\":\"ys\",\"certificateStore\":\"i\"}]}") + .toObject(VaultSecretGroup.class); + Assertions.assertEquals("pjmcmatuokthfuiu", model.sourceVault().id()); + Assertions.assertEquals("fcp", model.vaultCertificates().get(0).certificateUrl()); + Assertions.assertEquals("xodpuozmyzydagfu", model.vaultCertificates().get(0).certificateStore()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VaultSecretGroup model + = new VaultSecretGroup().withSourceVault(new SubResource().withId("pjmcmatuokthfuiu")) + .withVaultCertificates(Arrays.asList( + new VaultCertificate().withCertificateUrl("fcp").withCertificateStore("xodpuozmyzydagfu"), + new VaultCertificate().withCertificateUrl("bezy").withCertificateStore("okktwhrdxw"), + new VaultCertificate().withCertificateUrl("wqsmbsur").withCertificateStore("imoryocfsfksym"), + new VaultCertificate().withCertificateUrl("ys").withCertificateStore("i"))); + model = BinaryData.fromObject(model).toObject(VaultSecretGroup.class); + Assertions.assertEquals("pjmcmatuokthfuiu", model.sourceVault().id()); + Assertions.assertEquals("fcp", model.vaultCertificates().get(0).certificateUrl()); + Assertions.assertEquals("xodpuozmyzydagfu", model.vaultCertificates().get(0).certificateStore()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualHardDiskTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualHardDiskTests.java new file mode 100644 index 000000000000..c06fe4f541bc --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualHardDiskTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.VirtualHardDisk; +import org.junit.jupiter.api.Assertions; + +public final class VirtualHardDiskTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualHardDisk model = BinaryData.fromString("{\"uri\":\"hzgpphrcgyncocpe\"}").toObject(VirtualHardDisk.class); + Assertions.assertEquals("hzgpphrcgyncocpe", model.uri()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualHardDisk model = new VirtualHardDisk().withUri("hzgpphrcgyncocpe"); + model = BinaryData.fromObject(model).toObject(VirtualHardDisk.class); + Assertions.assertEquals("hzgpphrcgyncocpe", model.uri()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIdentityTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIdentityTests.java new file mode 100644 index 000000000000..f55729b166f2 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIdentityTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ResourceIdentityType; +import com.azure.resourcemanager.computeschedule.models.UserAssignedIdentitiesValue; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VirtualMachineIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualMachineIdentity model = BinaryData.fromString( + "{\"principalId\":\"prbnwbxgjvtbv\",\"tenantId\":\"sszdnru\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"itnwuizgazxufi\":{\"principalId\":\"uouq\",\"clientId\":\"rwzwbng\"},\"zwdzuh\":{\"principalId\":\"ckyfih\",\"clientId\":\"idf\"},\"ufufsrp\":{\"principalId\":\"mwisdkfthwxmnt\",\"clientId\":\"waopvkmijcmmxd\"},\"mdwzjeiachboo\":{\"principalId\":\"zidnsezcxtbzsgfy\",\"clientId\":\"sne\"}}}") + .toObject(VirtualMachineIdentity.class); + Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualMachineIdentity model + = new VirtualMachineIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("itnwuizgazxufi", new UserAssignedIdentitiesValue(), "zwdzuh", + new UserAssignedIdentitiesValue(), "ufufsrp", new UserAssignedIdentitiesValue(), "mdwzjeiachboo", + new UserAssignedIdentitiesValue())); + model = BinaryData.fromObject(model).toObject(VirtualMachineIdentity.class); + Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIpTagTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIpTagTests.java new file mode 100644 index 000000000000..59b86ddb51dc --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIpTagTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag; +import org.junit.jupiter.api.Assertions; + +public final class VirtualMachineIpTagTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualMachineIpTag model = BinaryData.fromString("{\"ipTagType\":\"zxctobgb\",\"tag\":\"moizpos\"}") + .toObject(VirtualMachineIpTag.class); + Assertions.assertEquals("zxctobgb", model.ipTagType()); + Assertions.assertEquals("moizpos", model.tag()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualMachineIpTag model = new VirtualMachineIpTag().withIpTagType("zxctobgb").withTag("moizpos"); + model = BinaryData.fromObject(model).toObject(VirtualMachineIpTag.class); + Assertions.assertEquals("zxctobgb", model.ipTagType()); + Assertions.assertEquals("moizpos", model.tag()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationPropertiesTests.java new file mode 100644 index 000000000000..19f619fc8b58 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationPropertiesTests.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.management.SubResource; +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.IPVersions; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliaryMode; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliarySku; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuName; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuTier; +import com.azure.resourcemanager.computeschedule.models.PublicIPAllocationMethod; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfigurationProperties; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VirtualMachineNetworkInterfaceConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualMachineNetworkInterfaceConfigurationProperties model = BinaryData.fromString( + "{\"primary\":true,\"deleteOption\":\"Detach\",\"enableAcceleratedNetworking\":true,\"disableTcpStateTracking\":true,\"enableFpga\":true,\"enableIPForwarding\":true,\"networkSecurityGroup\":{\"id\":\"spnqzahmgkb\"},\"dnsSettings\":{\"dnsServers\":[\"dhibnuq\"]},\"ipConfigurations\":[{\"name\":\"pikad\",\"properties\":{\"subnet\":{\"id\":\"qagnbuyn\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"gmebfsiarbutrcv\",\"properties\":{\"idleTimeoutInMinutes\":1487439384,\"deleteOption\":\"Detach\",\"dnsSettings\":{\"domainNameLabel\":\"jrunmpxtt\"},\"ipTags\":[{},{},{},{}],\"publicIPPrefix\":{},\"publicIPAddressVersion\":\"IPv6\",\"publicIPAllocationMethod\":\"Static\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Regional\"},\"tags\":{\"nbtkcxywnytnr\":\"pbh\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationSecurityGroups\":[{\"id\":\"dybyxczfclhaa\"},{\"id\":\"babphlwrqlfk\"}],\"applicationGatewayBackendAddressPools\":[{\"id\":\"sucocmnyyazttbtw\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"uedck\"},{\"id\":\"wbiexzfey\"},{\"id\":\"axibxujw\"},{\"id\":\"qwalmuzyoxaepd\"}]}},{\"name\":\"zjancuxr\",\"properties\":{\"subnet\":{\"id\":\"avxbniwdjswztsdb\"},\"primary\":false,\"publicIPAddressConfiguration\":{\"name\":\"ytxhp\",\"properties\":{\"idleTimeoutInMinutes\":258578871,\"deleteOption\":\"Delete\",\"dnsSettings\":{\"domainNameLabel\":\"abgl\"},\"ipTags\":[{}],\"publicIPPrefix\":{},\"publicIPAddressVersion\":\"IPv4\",\"publicIPAllocationMethod\":\"Dynamic\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Regional\"},\"tags\":{\"bhvgy\":\"ovplw\",\"svmkfssxquk\":\"gu\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationSecurityGroups\":[{\"id\":\"gsxnkjzkdeslpv\"},{\"id\":\"pwiyig\"},{\"id\":\"pkdwzbai\"}],\"applicationGatewayBackendAddressPools\":[{\"id\":\"a\"},{\"id\":\"nyqupedeojnabck\"},{\"id\":\"mtxpsiebtfh\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"apskrdqm\"}]}},{\"name\":\"jjdhtld\",\"properties\":{\"subnet\":{\"id\":\"xuutkncwscwsv\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"ogtwrupqsxvnmi\",\"properties\":{\"idleTimeoutInMinutes\":560100496,\"deleteOption\":\"Detach\",\"dnsSettings\":{\"domainNameLabel\":\"vei\"},\"ipTags\":[{},{},{}],\"publicIPPrefix\":{},\"publicIPAddressVersion\":\"IPv6\",\"publicIPAllocationMethod\":\"Dynamic\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Global\"},\"tags\":{\"dhbt\":\"cn\"}},\"privateIPAddressVersion\":\"IPv4\",\"applicationSecurityGroups\":[{\"id\":\"pnvjtoqnermclf\"},{\"id\":\"phoxus\"}],\"applicationGatewayBackendAddressPools\":[{\"id\":\"bgyepsbj\"},{\"id\":\"zq\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"wpmueefj\"},{\"id\":\"fqkquj\"},{\"id\":\"suyonobglaocq\"},{\"id\":\"ccm\"}]}}],\"dscpConfiguration\":{\"id\":\"dxyt\"},\"auxiliaryMode\":\"Floating\",\"auxiliarySku\":\"A4\"}") + .toObject(VirtualMachineNetworkInterfaceConfigurationProperties.class); + Assertions.assertTrue(model.primary()); + Assertions.assertEquals(DeleteOptions.DETACH, model.deleteOption()); + Assertions.assertTrue(model.enableAcceleratedNetworking()); + Assertions.assertTrue(model.disableTcpStateTracking()); + Assertions.assertTrue(model.enableFpga()); + Assertions.assertTrue(model.enableIPForwarding()); + Assertions.assertEquals("spnqzahmgkb", model.networkSecurityGroup().id()); + Assertions.assertEquals("dhibnuq", model.dnsSettings().dnsServers().get(0)); + Assertions.assertEquals("pikad", model.ipConfigurations().get(0).name()); + Assertions.assertEquals("qagnbuyn", model.ipConfigurations().get(0).properties().subnet().id()); + Assertions.assertTrue(model.ipConfigurations().get(0).properties().primary()); + Assertions.assertEquals("gmebfsiarbutrcv", + model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().name()); + Assertions.assertEquals(1487439384, + model.ipConfigurations() + .get(0) + .properties() + .publicIPAddressConfiguration() + .properties() + .idleTimeoutInMinutes()); + Assertions.assertEquals(DeleteOptions.DETACH, + model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().properties().deleteOption()); + Assertions.assertEquals("jrunmpxtt", + model.ipConfigurations() + .get(0) + .properties() + .publicIPAddressConfiguration() + .properties() + .dnsSettings() + .domainNameLabel()); + Assertions.assertEquals(IPVersions.IPV6, + model.ipConfigurations() + .get(0) + .properties() + .publicIPAddressConfiguration() + .properties() + .publicIPAddressVersion()); + Assertions.assertEquals(PublicIPAllocationMethod.STATIC, + model.ipConfigurations() + .get(0) + .properties() + .publicIPAddressConfiguration() + .properties() + .publicIPAllocationMethod()); + Assertions.assertEquals(PublicIPAddressSkuName.BASIC, + model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().sku().name()); + Assertions.assertEquals(PublicIPAddressSkuTier.REGIONAL, + model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().sku().tier()); + Assertions.assertEquals("pbh", + model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().tags().get("nbtkcxywnytnr")); + Assertions.assertEquals(IPVersions.IPV6, + model.ipConfigurations().get(0).properties().privateIPAddressVersion()); + Assertions.assertEquals("dybyxczfclhaa", + model.ipConfigurations().get(0).properties().applicationSecurityGroups().get(0).id()); + Assertions.assertEquals("sucocmnyyazttbtw", + model.ipConfigurations().get(0).properties().applicationGatewayBackendAddressPools().get(0).id()); + Assertions.assertEquals("uedck", + model.ipConfigurations().get(0).properties().loadBalancerBackendAddressPools().get(0).id()); + Assertions.assertEquals("dxyt", model.dscpConfiguration().id()); + Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.FLOATING, model.auxiliaryMode()); + Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A4, model.auxiliarySku()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualMachineNetworkInterfaceConfigurationProperties model + = new VirtualMachineNetworkInterfaceConfigurationProperties().withPrimary(true) + .withDeleteOption(DeleteOptions.DETACH) + .withEnableAcceleratedNetworking(true) + .withDisableTcpStateTracking(true) + .withEnableFpga(true) + .withEnableIPForwarding(true) + .withNetworkSecurityGroup(new SubResource().withId("spnqzahmgkb")) + .withDnsSettings(new VirtualMachineNetworkInterfaceDnsSettingsConfiguration() + .withDnsServers(Arrays.asList("dhibnuq"))) + .withIpConfigurations( + Arrays.asList( + new VirtualMachineNetworkInterfaceIPConfiguration().withName("pikad") + .withProperties(new VirtualMachineNetworkInterfaceIPConfigurationProperties() + .withSubnet(new SubResource().withId("qagnbuyn")) + .withPrimary(true) + .withPublicIPAddressConfiguration(new VirtualMachinePublicIPAddressConfiguration() + .withName("gmebfsiarbutrcv") + .withProperties(new VirtualMachinePublicIPAddressConfigurationProperties() + .withIdleTimeoutInMinutes(1487439384) + .withDeleteOption(DeleteOptions.DETACH) + .withDnsSettings(new VirtualMachinePublicIPAddressDnsSettingsConfiguration() + .withDomainNameLabel("jrunmpxtt")) + .withIpTags(Arrays.asList(new VirtualMachineIpTag(), new VirtualMachineIpTag(), + new VirtualMachineIpTag(), new VirtualMachineIpTag())) + .withPublicIPPrefix(new SubResource()) + .withPublicIPAddressVersion(IPVersions.IPV6) + .withPublicIPAllocationMethod(PublicIPAllocationMethod.STATIC)) + .withSku(new PublicIPAddressSku().withName(PublicIPAddressSkuName.BASIC) + .withTier(PublicIPAddressSkuTier.REGIONAL)) + .withTags(mapOf("nbtkcxywnytnr", "pbh"))) + .withPrivateIPAddressVersion(IPVersions.IPV6) + .withApplicationSecurityGroups(Arrays.asList(new SubResource().withId("dybyxczfclhaa"), + new SubResource().withId("babphlwrqlfk"))) + .withApplicationGatewayBackendAddressPools( + Arrays.asList(new SubResource().withId("sucocmnyyazttbtw"))) + .withLoadBalancerBackendAddressPools(Arrays.asList( + new SubResource().withId("uedck"), new SubResource().withId("wbiexzfey"), + new SubResource().withId("axibxujw"), new SubResource().withId("qwalmuzyoxaepd")))), + new VirtualMachineNetworkInterfaceIPConfiguration().withName("zjancuxr") + .withProperties(new VirtualMachineNetworkInterfaceIPConfigurationProperties() + .withSubnet(new SubResource().withId("avxbniwdjswztsdb")) + .withPrimary(false) + .withPublicIPAddressConfiguration( + new VirtualMachinePublicIPAddressConfiguration().withName("ytxhp") + .withProperties(new VirtualMachinePublicIPAddressConfigurationProperties() + .withIdleTimeoutInMinutes(258578871) + .withDeleteOption(DeleteOptions.DELETE) + .withDnsSettings(new VirtualMachinePublicIPAddressDnsSettingsConfiguration() + .withDomainNameLabel("abgl")) + .withIpTags(Arrays.asList(new VirtualMachineIpTag())) + .withPublicIPPrefix(new SubResource()) + .withPublicIPAddressVersion(IPVersions.IPV4) + .withPublicIPAllocationMethod(PublicIPAllocationMethod.DYNAMIC)) + .withSku(new PublicIPAddressSku().withName(PublicIPAddressSkuName.STANDARD) + .withTier(PublicIPAddressSkuTier.REGIONAL)) + .withTags(mapOf("bhvgy", "ovplw", "svmkfssxquk", "gu"))) + .withPrivateIPAddressVersion(IPVersions.IPV6) + .withApplicationSecurityGroups(Arrays.asList(new SubResource().withId("gsxnkjzkdeslpv"), + new SubResource().withId("pwiyig"), new SubResource().withId("pkdwzbai"))) + .withApplicationGatewayBackendAddressPools(Arrays.asList( + new SubResource().withId("a"), new SubResource().withId("nyqupedeojnabck"), + new SubResource().withId("mtxpsiebtfh"))) + .withLoadBalancerBackendAddressPools( + Arrays.asList(new SubResource().withId("apskrdqm")))), + new VirtualMachineNetworkInterfaceIPConfiguration().withName("jjdhtld") + .withProperties( + new VirtualMachineNetworkInterfaceIPConfigurationProperties() + .withSubnet(new SubResource().withId("xuutkncwscwsv")) + .withPrimary(true) + .withPublicIPAddressConfiguration(new VirtualMachinePublicIPAddressConfiguration() + .withName("ogtwrupqsxvnmi") + .withProperties(new VirtualMachinePublicIPAddressConfigurationProperties() + .withIdleTimeoutInMinutes(560100496) + .withDeleteOption(DeleteOptions.DETACH) + .withDnsSettings(new VirtualMachinePublicIPAddressDnsSettingsConfiguration() + .withDomainNameLabel("vei")) + .withIpTags(Arrays.asList(new VirtualMachineIpTag(), + new VirtualMachineIpTag(), new VirtualMachineIpTag())) + .withPublicIPPrefix(new SubResource()) + .withPublicIPAddressVersion(IPVersions.IPV6) + .withPublicIPAllocationMethod(PublicIPAllocationMethod.DYNAMIC)) + .withSku(new PublicIPAddressSku().withName(PublicIPAddressSkuName.STANDARD) + .withTier(PublicIPAddressSkuTier.GLOBAL)) + .withTags(mapOf("dhbt", "cn"))) + .withPrivateIPAddressVersion(IPVersions.IPV4) + .withApplicationSecurityGroups(Arrays.asList( + new SubResource().withId("pnvjtoqnermclf"), new SubResource().withId("phoxus"))) + .withApplicationGatewayBackendAddressPools(Arrays + .asList(new SubResource().withId("bgyepsbj"), new SubResource().withId("zq"))) + .withLoadBalancerBackendAddressPools(Arrays.asList( + new SubResource().withId("wpmueefj"), new SubResource().withId("fqkquj"), + new SubResource().withId("suyonobglaocq"), new SubResource().withId("ccm")))))) + .withDscpConfiguration(new SubResource().withId("dxyt")) + .withAuxiliaryMode(NetworkInterfaceAuxiliaryMode.FLOATING) + .withAuxiliarySku(NetworkInterfaceAuxiliarySku.A4); + model = BinaryData.fromObject(model).toObject(VirtualMachineNetworkInterfaceConfigurationProperties.class); + Assertions.assertTrue(model.primary()); + Assertions.assertEquals(DeleteOptions.DETACH, model.deleteOption()); + Assertions.assertTrue(model.enableAcceleratedNetworking()); + Assertions.assertTrue(model.disableTcpStateTracking()); + Assertions.assertTrue(model.enableFpga()); + Assertions.assertTrue(model.enableIPForwarding()); + Assertions.assertEquals("spnqzahmgkb", model.networkSecurityGroup().id()); + Assertions.assertEquals("dhibnuq", model.dnsSettings().dnsServers().get(0)); + Assertions.assertEquals("pikad", model.ipConfigurations().get(0).name()); + Assertions.assertEquals("qagnbuyn", model.ipConfigurations().get(0).properties().subnet().id()); + Assertions.assertTrue(model.ipConfigurations().get(0).properties().primary()); + Assertions.assertEquals("gmebfsiarbutrcv", + model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().name()); + Assertions.assertEquals(1487439384, + model.ipConfigurations() + .get(0) + .properties() + .publicIPAddressConfiguration() + .properties() + .idleTimeoutInMinutes()); + Assertions.assertEquals(DeleteOptions.DETACH, + model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().properties().deleteOption()); + Assertions.assertEquals("jrunmpxtt", + model.ipConfigurations() + .get(0) + .properties() + .publicIPAddressConfiguration() + .properties() + .dnsSettings() + .domainNameLabel()); + Assertions.assertEquals(IPVersions.IPV6, + model.ipConfigurations() + .get(0) + .properties() + .publicIPAddressConfiguration() + .properties() + .publicIPAddressVersion()); + Assertions.assertEquals(PublicIPAllocationMethod.STATIC, + model.ipConfigurations() + .get(0) + .properties() + .publicIPAddressConfiguration() + .properties() + .publicIPAllocationMethod()); + Assertions.assertEquals(PublicIPAddressSkuName.BASIC, + model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().sku().name()); + Assertions.assertEquals(PublicIPAddressSkuTier.REGIONAL, + model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().sku().tier()); + Assertions.assertEquals("pbh", + model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().tags().get("nbtkcxywnytnr")); + Assertions.assertEquals(IPVersions.IPV6, + model.ipConfigurations().get(0).properties().privateIPAddressVersion()); + Assertions.assertEquals("dybyxczfclhaa", + model.ipConfigurations().get(0).properties().applicationSecurityGroups().get(0).id()); + Assertions.assertEquals("sucocmnyyazttbtw", + model.ipConfigurations().get(0).properties().applicationGatewayBackendAddressPools().get(0).id()); + Assertions.assertEquals("uedck", + model.ipConfigurations().get(0).properties().loadBalancerBackendAddressPools().get(0).id()); + Assertions.assertEquals("dxyt", model.dscpConfiguration().id()); + Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.FLOATING, model.auxiliaryMode()); + Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A4, model.auxiliarySku()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationTests.java new file mode 100644 index 000000000000..9e750bbe8c21 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationTests.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.management.SubResource; +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.IPVersions; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliaryMode; +import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliarySku; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfigurationProperties; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VirtualMachineNetworkInterfaceConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualMachineNetworkInterfaceConfiguration model = BinaryData.fromString( + "{\"name\":\"v\",\"properties\":{\"primary\":false,\"deleteOption\":\"Delete\",\"enableAcceleratedNetworking\":true,\"disableTcpStateTracking\":true,\"enableFpga\":false,\"enableIPForwarding\":false,\"networkSecurityGroup\":{\"id\":\"wburvjxxjnspydpt\"},\"dnsSettings\":{\"dnsServers\":[\"kouknvudwtiu\",\"bldngkpoc\"]},\"ipConfigurations\":[{\"name\":\"azyxoegukg\",\"properties\":{\"subnet\":{\"id\":\"ucgygevqz\"},\"primary\":false,\"publicIPAddressConfiguration\":{\"name\":\"mrbpizcdrqj\",\"properties\":{},\"sku\":{},\"tags\":{\"eoejzic\":\"nfyhx\",\"hajdeyeamdpha\":\"ifsjttgzfbishcb\",\"wkgshwa\":\"alpbuxwgipwhon\",\"bin\":\"kix\"}},\"privateIPAddressVersion\":\"IPv4\",\"applicationSecurityGroups\":[{},{},{}],\"applicationGatewayBackendAddressPools\":[{}],\"loadBalancerBackendAddressPools\":[{},{}]}},{\"name\":\"wnuzoqftiyqzrnkc\",\"properties\":{\"subnet\":{\"id\":\"lwh\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"cohoq\",\"properties\":{},\"sku\":{},\"tags\":{\"yxzk\":\"ryavwhheunmmqh\",\"koklya\":\"noc\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationSecurityGroups\":[{},{},{}],\"applicationGatewayBackendAddressPools\":[{}],\"loadBalancerBackendAddressPools\":[{}]}},{\"name\":\"fkbey\",\"properties\":{\"subnet\":{\"id\":\"mjmwvvjektcx\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"wlrsffrzpwv\",\"properties\":{},\"sku\":{},\"tags\":{\"kt\":\"biqylihkaet\",\"ctq\":\"fcivfsnkym\",\"ebrjcxe\":\"jf\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationSecurityGroups\":[{},{},{},{}],\"applicationGatewayBackendAddressPools\":[{},{}],\"loadBalancerBackendAddressPools\":[{},{},{}]}}],\"dscpConfiguration\":{\"id\":\"jrbirphxepcyv\"},\"auxiliaryMode\":\"Floating\",\"auxiliarySku\":\"A2\"},\"tags\":{\"j\":\"yq\",\"gvcl\":\"uujqgidokgjljyo\",\"jhtxfvgxbfsmxne\":\"bgsncghkjeszzhb\",\"rbmpukgri\":\"mpvecxgodebfqk\"}}") + .toObject(VirtualMachineNetworkInterfaceConfiguration.class); + Assertions.assertEquals("v", model.name()); + Assertions.assertFalse(model.properties().primary()); + Assertions.assertEquals(DeleteOptions.DELETE, model.properties().deleteOption()); + Assertions.assertTrue(model.properties().enableAcceleratedNetworking()); + Assertions.assertTrue(model.properties().disableTcpStateTracking()); + Assertions.assertFalse(model.properties().enableFpga()); + Assertions.assertFalse(model.properties().enableIPForwarding()); + Assertions.assertEquals("wburvjxxjnspydpt", model.properties().networkSecurityGroup().id()); + Assertions.assertEquals("kouknvudwtiu", model.properties().dnsSettings().dnsServers().get(0)); + Assertions.assertEquals("azyxoegukg", model.properties().ipConfigurations().get(0).name()); + Assertions.assertEquals("ucgygevqz", model.properties().ipConfigurations().get(0).properties().subnet().id()); + Assertions.assertFalse(model.properties().ipConfigurations().get(0).properties().primary()); + Assertions.assertEquals("mrbpizcdrqj", + model.properties().ipConfigurations().get(0).properties().publicIPAddressConfiguration().name()); + Assertions.assertEquals("nfyhx", + model.properties() + .ipConfigurations() + .get(0) + .properties() + .publicIPAddressConfiguration() + .tags() + .get("eoejzic")); + Assertions.assertEquals(IPVersions.IPV4, + model.properties().ipConfigurations().get(0).properties().privateIPAddressVersion()); + Assertions.assertEquals("jrbirphxepcyv", model.properties().dscpConfiguration().id()); + Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.FLOATING, model.properties().auxiliaryMode()); + Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A2, model.properties().auxiliarySku()); + Assertions.assertEquals("yq", model.tags().get("j")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualMachineNetworkInterfaceConfiguration model + = new VirtualMachineNetworkInterfaceConfiguration().withName("v") + .withProperties( + new VirtualMachineNetworkInterfaceConfigurationProperties().withPrimary(false) + .withDeleteOption(DeleteOptions.DELETE) + .withEnableAcceleratedNetworking(true) + .withDisableTcpStateTracking(true) + .withEnableFpga(false) + .withEnableIPForwarding(false) + .withNetworkSecurityGroup(new SubResource().withId("wburvjxxjnspydpt")) + .withDnsSettings(new VirtualMachineNetworkInterfaceDnsSettingsConfiguration() + .withDnsServers(Arrays.asList("kouknvudwtiu", "bldngkpoc"))) + .withIpConfigurations( + Arrays.asList( + new VirtualMachineNetworkInterfaceIPConfiguration().withName("azyxoegukg") + .withProperties(new VirtualMachineNetworkInterfaceIPConfigurationProperties() + .withSubnet(new SubResource().withId("ucgygevqz")) + .withPrimary(false) + .withPublicIPAddressConfiguration( + new VirtualMachinePublicIPAddressConfiguration().withName("mrbpizcdrqj") + .withProperties( + new VirtualMachinePublicIPAddressConfigurationProperties()) + .withSku(new PublicIPAddressSku()) + .withTags(mapOf("eoejzic", "nfyhx", "hajdeyeamdpha", "ifsjttgzfbishcb", + "wkgshwa", "alpbuxwgipwhon", "bin", "kix"))) + .withPrivateIPAddressVersion(IPVersions.IPV4) + .withApplicationSecurityGroups( + Arrays.asList(new SubResource(), new SubResource(), new SubResource())) + .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource())) + .withLoadBalancerBackendAddressPools( + Arrays.asList(new SubResource(), new SubResource()))), + new VirtualMachineNetworkInterfaceIPConfiguration().withName("wnuzoqftiyqzrnkc") + .withProperties(new VirtualMachineNetworkInterfaceIPConfigurationProperties() + .withSubnet(new SubResource().withId("lwh")) + .withPrimary(true) + .withPublicIPAddressConfiguration( + new VirtualMachinePublicIPAddressConfiguration().withName("cohoq") + .withProperties( + new VirtualMachinePublicIPAddressConfigurationProperties()) + .withSku(new PublicIPAddressSku()) + .withTags(mapOf("yxzk", "ryavwhheunmmqh", "koklya", "noc"))) + .withPrivateIPAddressVersion(IPVersions.IPV6) + .withApplicationSecurityGroups( + Arrays.asList(new SubResource(), new SubResource(), new SubResource())) + .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource())) + .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource()))), + new VirtualMachineNetworkInterfaceIPConfiguration().withName("fkbey") + .withProperties( + new VirtualMachineNetworkInterfaceIPConfigurationProperties() + .withSubnet(new SubResource().withId("mjmwvvjektcx")) + .withPrimary(true) + .withPublicIPAddressConfiguration( + new VirtualMachinePublicIPAddressConfiguration().withName("wlrsffrzpwv") + .withProperties( + new VirtualMachinePublicIPAddressConfigurationProperties()) + .withSku(new PublicIPAddressSku()) + .withTags(mapOf("kt", "biqylihkaet", "ctq", "fcivfsnkym", "ebrjcxe", + "jf"))) + .withPrivateIPAddressVersion(IPVersions.IPV6) + .withApplicationSecurityGroups(Arrays.asList(new SubResource(), + new SubResource(), new SubResource(), new SubResource())) + .withApplicationGatewayBackendAddressPools( + Arrays.asList(new SubResource(), new SubResource())) + .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource(), + new SubResource(), new SubResource()))))) + .withDscpConfiguration(new SubResource().withId("jrbirphxepcyv")) + .withAuxiliaryMode(NetworkInterfaceAuxiliaryMode.FLOATING) + .withAuxiliarySku(NetworkInterfaceAuxiliarySku.A2)) + .withTags(mapOf("j", "yq", "gvcl", "uujqgidokgjljyo", "jhtxfvgxbfsmxne", "bgsncghkjeszzhb", "rbmpukgri", + "mpvecxgodebfqk")); + model = BinaryData.fromObject(model).toObject(VirtualMachineNetworkInterfaceConfiguration.class); + Assertions.assertEquals("v", model.name()); + Assertions.assertFalse(model.properties().primary()); + Assertions.assertEquals(DeleteOptions.DELETE, model.properties().deleteOption()); + Assertions.assertTrue(model.properties().enableAcceleratedNetworking()); + Assertions.assertTrue(model.properties().disableTcpStateTracking()); + Assertions.assertFalse(model.properties().enableFpga()); + Assertions.assertFalse(model.properties().enableIPForwarding()); + Assertions.assertEquals("wburvjxxjnspydpt", model.properties().networkSecurityGroup().id()); + Assertions.assertEquals("kouknvudwtiu", model.properties().dnsSettings().dnsServers().get(0)); + Assertions.assertEquals("azyxoegukg", model.properties().ipConfigurations().get(0).name()); + Assertions.assertEquals("ucgygevqz", model.properties().ipConfigurations().get(0).properties().subnet().id()); + Assertions.assertFalse(model.properties().ipConfigurations().get(0).properties().primary()); + Assertions.assertEquals("mrbpizcdrqj", + model.properties().ipConfigurations().get(0).properties().publicIPAddressConfiguration().name()); + Assertions.assertEquals("nfyhx", + model.properties() + .ipConfigurations() + .get(0) + .properties() + .publicIPAddressConfiguration() + .tags() + .get("eoejzic")); + Assertions.assertEquals(IPVersions.IPV4, + model.properties().ipConfigurations().get(0).properties().privateIPAddressVersion()); + Assertions.assertEquals("jrbirphxepcyv", model.properties().dscpConfiguration().id()); + Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.FLOATING, model.properties().auxiliaryMode()); + Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A2, model.properties().auxiliarySku()); + Assertions.assertEquals("yq", model.tags().get("j")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceDnsSettingsConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceDnsSettingsConfigurationTests.java new file mode 100644 index 000000000000..242bbdeaf087 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceDnsSettingsConfigurationTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VirtualMachineNetworkInterfaceDnsSettingsConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualMachineNetworkInterfaceDnsSettingsConfiguration model + = BinaryData.fromString("{\"dnsServers\":[\"wfudwpzntxhdzhl\",\"qj\",\"hckfrlhrx\",\"bkyvp\"]}") + .toObject(VirtualMachineNetworkInterfaceDnsSettingsConfiguration.class); + Assertions.assertEquals("wfudwpzntxhdzhl", model.dnsServers().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualMachineNetworkInterfaceDnsSettingsConfiguration model + = new VirtualMachineNetworkInterfaceDnsSettingsConfiguration() + .withDnsServers(Arrays.asList("wfudwpzntxhdzhl", "qj", "hckfrlhrx", "bkyvp")); + model = BinaryData.fromObject(model).toObject(VirtualMachineNetworkInterfaceDnsSettingsConfiguration.class); + Assertions.assertEquals("wfudwpzntxhdzhl", model.dnsServers().get(0)); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationPropertiesTests.java new file mode 100644 index 000000000000..451275e2f10f --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationPropertiesTests.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.management.SubResource; +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.DomainNameLabelScopeTypes; +import com.azure.resourcemanager.computeschedule.models.IPVersions; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuName; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuTier; +import com.azure.resourcemanager.computeschedule.models.PublicIPAllocationMethod; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VirtualMachineNetworkInterfaceIPConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualMachineNetworkInterfaceIPConfigurationProperties model = BinaryData.fromString( + "{\"subnet\":{\"id\":\"auwhvylwzbtdhx\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"bm\",\"properties\":{\"idleTimeoutInMinutes\":1809911525,\"deleteOption\":\"Delete\",\"dnsSettings\":{\"domainNameLabel\":\"zqlveualupjmkhf\",\"domainNameLabelScope\":\"ResourceGroupReuse\"},\"ipTags\":[{\"ipTagType\":\"wsrtjriplrbpbe\",\"tag\":\"ghfg\"},{\"ipTagType\":\"c\",\"tag\":\"xzvlvqhjkbegib\"},{\"ipTagType\":\"mxiebw\",\"tag\":\"loayqcgw\"}],\"publicIPPrefix\":{\"id\":\"j\"},\"publicIPAddressVersion\":\"IPv4\",\"publicIPAllocationMethod\":\"Dynamic\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Global\"},\"tags\":{\"nftguvriuhpr\":\"gmtsavjcbpwxqpsr\",\"ro\":\"mdyvxqtayriw\",\"mcqibycnojv\":\"qbex\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationSecurityGroups\":[{\"id\":\"sgzvahapjyzhpv\"},{\"id\":\"zcjrvxdjzlmwlx\"},{\"id\":\"ug\"}],\"applicationGatewayBackendAddressPools\":[{\"id\":\"vawjvzunlu\"},{\"id\":\"nnprn\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"ilpjzuaejxdult\"},{\"id\":\"zbbtdzumveek\"},{\"id\":\"wozuhkf\"},{\"id\":\"sjyofdx\"}]}") + .toObject(VirtualMachineNetworkInterfaceIPConfigurationProperties.class); + Assertions.assertEquals("auwhvylwzbtdhx", model.subnet().id()); + Assertions.assertTrue(model.primary()); + Assertions.assertEquals("bm", model.publicIPAddressConfiguration().name()); + Assertions.assertEquals(1809911525, model.publicIPAddressConfiguration().properties().idleTimeoutInMinutes()); + Assertions.assertEquals(DeleteOptions.DELETE, model.publicIPAddressConfiguration().properties().deleteOption()); + Assertions.assertEquals("zqlveualupjmkhf", + model.publicIPAddressConfiguration().properties().dnsSettings().domainNameLabel()); + Assertions.assertEquals(DomainNameLabelScopeTypes.RESOURCE_GROUP_REUSE, + model.publicIPAddressConfiguration().properties().dnsSettings().domainNameLabelScope()); + Assertions.assertEquals("wsrtjriplrbpbe", + model.publicIPAddressConfiguration().properties().ipTags().get(0).ipTagType()); + Assertions.assertEquals("ghfg", model.publicIPAddressConfiguration().properties().ipTags().get(0).tag()); + Assertions.assertEquals("j", model.publicIPAddressConfiguration().properties().publicIPPrefix().id()); + Assertions.assertEquals(IPVersions.IPV4, + model.publicIPAddressConfiguration().properties().publicIPAddressVersion()); + Assertions.assertEquals(PublicIPAllocationMethod.DYNAMIC, + model.publicIPAddressConfiguration().properties().publicIPAllocationMethod()); + Assertions.assertEquals(PublicIPAddressSkuName.STANDARD, model.publicIPAddressConfiguration().sku().name()); + Assertions.assertEquals(PublicIPAddressSkuTier.GLOBAL, model.publicIPAddressConfiguration().sku().tier()); + Assertions.assertEquals("gmtsavjcbpwxqpsr", model.publicIPAddressConfiguration().tags().get("nftguvriuhpr")); + Assertions.assertEquals(IPVersions.IPV6, model.privateIPAddressVersion()); + Assertions.assertEquals("sgzvahapjyzhpv", model.applicationSecurityGroups().get(0).id()); + Assertions.assertEquals("vawjvzunlu", model.applicationGatewayBackendAddressPools().get(0).id()); + Assertions.assertEquals("ilpjzuaejxdult", model.loadBalancerBackendAddressPools().get(0).id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualMachineNetworkInterfaceIPConfigurationProperties model + = new VirtualMachineNetworkInterfaceIPConfigurationProperties() + .withSubnet(new SubResource().withId("auwhvylwzbtdhx")) + .withPrimary(true) + .withPublicIPAddressConfiguration( + new VirtualMachinePublicIPAddressConfiguration().withName("bm") + .withProperties(new VirtualMachinePublicIPAddressConfigurationProperties() + .withIdleTimeoutInMinutes(1809911525) + .withDeleteOption(DeleteOptions.DELETE) + .withDnsSettings(new VirtualMachinePublicIPAddressDnsSettingsConfiguration() + .withDomainNameLabel("zqlveualupjmkhf") + .withDomainNameLabelScope(DomainNameLabelScopeTypes.RESOURCE_GROUP_REUSE)) + .withIpTags( + Arrays.asList(new VirtualMachineIpTag().withIpTagType("wsrtjriplrbpbe").withTag("ghfg"), + new VirtualMachineIpTag().withIpTagType("c").withTag("xzvlvqhjkbegib"), + new VirtualMachineIpTag().withIpTagType("mxiebw").withTag("loayqcgw"))) + .withPublicIPPrefix(new SubResource().withId("j")) + .withPublicIPAddressVersion(IPVersions.IPV4) + .withPublicIPAllocationMethod(PublicIPAllocationMethod.DYNAMIC)) + .withSku(new PublicIPAddressSku().withName(PublicIPAddressSkuName.STANDARD) + .withTier(PublicIPAddressSkuTier.GLOBAL)) + .withTags( + mapOf("nftguvriuhpr", "gmtsavjcbpwxqpsr", "ro", "mdyvxqtayriw", "mcqibycnojv", "qbex"))) + .withPrivateIPAddressVersion(IPVersions.IPV6) + .withApplicationSecurityGroups(Arrays.asList(new SubResource().withId("sgzvahapjyzhpv"), + new SubResource().withId("zcjrvxdjzlmwlx"), new SubResource().withId("ug"))) + .withApplicationGatewayBackendAddressPools( + Arrays.asList(new SubResource().withId("vawjvzunlu"), new SubResource().withId("nnprn"))) + .withLoadBalancerBackendAddressPools( + Arrays.asList(new SubResource().withId("ilpjzuaejxdult"), new SubResource().withId("zbbtdzumveek"), + new SubResource().withId("wozuhkf"), new SubResource().withId("sjyofdx"))); + model = BinaryData.fromObject(model).toObject(VirtualMachineNetworkInterfaceIPConfigurationProperties.class); + Assertions.assertEquals("auwhvylwzbtdhx", model.subnet().id()); + Assertions.assertTrue(model.primary()); + Assertions.assertEquals("bm", model.publicIPAddressConfiguration().name()); + Assertions.assertEquals(1809911525, model.publicIPAddressConfiguration().properties().idleTimeoutInMinutes()); + Assertions.assertEquals(DeleteOptions.DELETE, model.publicIPAddressConfiguration().properties().deleteOption()); + Assertions.assertEquals("zqlveualupjmkhf", + model.publicIPAddressConfiguration().properties().dnsSettings().domainNameLabel()); + Assertions.assertEquals(DomainNameLabelScopeTypes.RESOURCE_GROUP_REUSE, + model.publicIPAddressConfiguration().properties().dnsSettings().domainNameLabelScope()); + Assertions.assertEquals("wsrtjriplrbpbe", + model.publicIPAddressConfiguration().properties().ipTags().get(0).ipTagType()); + Assertions.assertEquals("ghfg", model.publicIPAddressConfiguration().properties().ipTags().get(0).tag()); + Assertions.assertEquals("j", model.publicIPAddressConfiguration().properties().publicIPPrefix().id()); + Assertions.assertEquals(IPVersions.IPV4, + model.publicIPAddressConfiguration().properties().publicIPAddressVersion()); + Assertions.assertEquals(PublicIPAllocationMethod.DYNAMIC, + model.publicIPAddressConfiguration().properties().publicIPAllocationMethod()); + Assertions.assertEquals(PublicIPAddressSkuName.STANDARD, model.publicIPAddressConfiguration().sku().name()); + Assertions.assertEquals(PublicIPAddressSkuTier.GLOBAL, model.publicIPAddressConfiguration().sku().tier()); + Assertions.assertEquals("gmtsavjcbpwxqpsr", model.publicIPAddressConfiguration().tags().get("nftguvriuhpr")); + Assertions.assertEquals(IPVersions.IPV6, model.privateIPAddressVersion()); + Assertions.assertEquals("sgzvahapjyzhpv", model.applicationSecurityGroups().get(0).id()); + Assertions.assertEquals("vawjvzunlu", model.applicationGatewayBackendAddressPools().get(0).id()); + Assertions.assertEquals("ilpjzuaejxdult", model.loadBalancerBackendAddressPools().get(0).id()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationTests.java new file mode 100644 index 000000000000..90b1978e28b9 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationTests.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.management.SubResource; +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.DomainNameLabelScopeTypes; +import com.azure.resourcemanager.computeschedule.models.IPVersions; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuName; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuTier; +import com.azure.resourcemanager.computeschedule.models.PublicIPAllocationMethod; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VirtualMachineNetworkInterfaceIPConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualMachineNetworkInterfaceIPConfiguration model = BinaryData.fromString( + "{\"name\":\"ca\",\"properties\":{\"subnet\":{\"id\":\"p\"},\"primary\":false,\"publicIPAddressConfiguration\":{\"name\":\"kuwbcrnwb\",\"properties\":{\"idleTimeoutInMinutes\":1688496747,\"deleteOption\":\"Detach\",\"dnsSettings\":{\"domainNameLabel\":\"v\",\"domainNameLabelScope\":\"NoReuse\"},\"ipTags\":[{\"ipTagType\":\"lhspkdee\",\"tag\":\"ofmxagkvtmelmqkr\"},{\"ipTagType\":\"hvljuahaquh\",\"tag\":\"hmdua\"},{\"ipTagType\":\"exq\",\"tag\":\"fadmws\"}],\"publicIPPrefix\":{\"id\":\"gvxp\"},\"publicIPAddressVersion\":\"IPv4\",\"publicIPAllocationMethod\":\"Static\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Global\"},\"tags\":{\"ali\":\"bnbbeldawkz\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationSecurityGroups\":[{\"id\":\"kauhashsfwxo\"},{\"id\":\"w\"},{\"id\":\"cugicjoox\"}],\"applicationGatewayBackendAddressPools\":[{\"id\":\"wpucwwfvovbv\"},{\"id\":\"uecivyhz\"},{\"id\":\"uojgj\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"eiotwmcdytdx\"},{\"id\":\"txnrjaw\"},{\"id\":\"wgxhn\"},{\"id\":\"kxfbkpycgklwndn\"}]}}") + .toObject(VirtualMachineNetworkInterfaceIPConfiguration.class); + Assertions.assertEquals("ca", model.name()); + Assertions.assertEquals("p", model.properties().subnet().id()); + Assertions.assertFalse(model.properties().primary()); + Assertions.assertEquals("kuwbcrnwb", model.properties().publicIPAddressConfiguration().name()); + Assertions.assertEquals(1688496747, + model.properties().publicIPAddressConfiguration().properties().idleTimeoutInMinutes()); + Assertions.assertEquals(DeleteOptions.DETACH, + model.properties().publicIPAddressConfiguration().properties().deleteOption()); + Assertions.assertEquals("v", + model.properties().publicIPAddressConfiguration().properties().dnsSettings().domainNameLabel()); + Assertions.assertEquals(DomainNameLabelScopeTypes.NO_REUSE, + model.properties().publicIPAddressConfiguration().properties().dnsSettings().domainNameLabelScope()); + Assertions.assertEquals("lhspkdee", + model.properties().publicIPAddressConfiguration().properties().ipTags().get(0).ipTagType()); + Assertions.assertEquals("ofmxagkvtmelmqkr", + model.properties().publicIPAddressConfiguration().properties().ipTags().get(0).tag()); + Assertions.assertEquals("gvxp", + model.properties().publicIPAddressConfiguration().properties().publicIPPrefix().id()); + Assertions.assertEquals(IPVersions.IPV4, + model.properties().publicIPAddressConfiguration().properties().publicIPAddressVersion()); + Assertions.assertEquals(PublicIPAllocationMethod.STATIC, + model.properties().publicIPAddressConfiguration().properties().publicIPAllocationMethod()); + Assertions.assertEquals(PublicIPAddressSkuName.BASIC, + model.properties().publicIPAddressConfiguration().sku().name()); + Assertions.assertEquals(PublicIPAddressSkuTier.GLOBAL, + model.properties().publicIPAddressConfiguration().sku().tier()); + Assertions.assertEquals("bnbbeldawkz", model.properties().publicIPAddressConfiguration().tags().get("ali")); + Assertions.assertEquals(IPVersions.IPV6, model.properties().privateIPAddressVersion()); + Assertions.assertEquals("kauhashsfwxo", model.properties().applicationSecurityGroups().get(0).id()); + Assertions.assertEquals("wpucwwfvovbv", model.properties().applicationGatewayBackendAddressPools().get(0).id()); + Assertions.assertEquals("eiotwmcdytdx", model.properties().loadBalancerBackendAddressPools().get(0).id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualMachineNetworkInterfaceIPConfiguration model + = new VirtualMachineNetworkInterfaceIPConfiguration().withName("ca") + .withProperties( + new VirtualMachineNetworkInterfaceIPConfigurationProperties() + .withSubnet(new SubResource().withId("p")) + .withPrimary(false) + .withPublicIPAddressConfiguration( + new VirtualMachinePublicIPAddressConfiguration().withName("kuwbcrnwb") + .withProperties(new VirtualMachinePublicIPAddressConfigurationProperties() + .withIdleTimeoutInMinutes(1688496747) + .withDeleteOption(DeleteOptions.DETACH) + .withDnsSettings(new VirtualMachinePublicIPAddressDnsSettingsConfiguration() + .withDomainNameLabel("v") + .withDomainNameLabelScope(DomainNameLabelScopeTypes.NO_REUSE)) + .withIpTags(Arrays.asList( + new VirtualMachineIpTag().withIpTagType("lhspkdee").withTag("ofmxagkvtmelmqkr"), + new VirtualMachineIpTag().withIpTagType("hvljuahaquh").withTag("hmdua"), + new VirtualMachineIpTag().withIpTagType("exq").withTag("fadmws"))) + .withPublicIPPrefix(new SubResource().withId("gvxp")) + .withPublicIPAddressVersion(IPVersions.IPV4) + .withPublicIPAllocationMethod(PublicIPAllocationMethod.STATIC)) + .withSku(new PublicIPAddressSku().withName(PublicIPAddressSkuName.BASIC) + .withTier(PublicIPAddressSkuTier.GLOBAL)) + .withTags(mapOf("ali", "bnbbeldawkz"))) + .withPrivateIPAddressVersion(IPVersions.IPV6) + .withApplicationSecurityGroups(Arrays.asList(new SubResource().withId("kauhashsfwxo"), + new SubResource().withId("w"), new SubResource().withId("cugicjoox"))) + .withApplicationGatewayBackendAddressPools( + Arrays.asList(new SubResource().withId("wpucwwfvovbv"), + new SubResource().withId("uecivyhz"), new SubResource().withId("uojgj"))) + .withLoadBalancerBackendAddressPools( + Arrays.asList(new SubResource().withId("eiotwmcdytdx"), new SubResource().withId("txnrjaw"), + new SubResource().withId("wgxhn"), new SubResource().withId("kxfbkpycgklwndn")))); + model = BinaryData.fromObject(model).toObject(VirtualMachineNetworkInterfaceIPConfiguration.class); + Assertions.assertEquals("ca", model.name()); + Assertions.assertEquals("p", model.properties().subnet().id()); + Assertions.assertFalse(model.properties().primary()); + Assertions.assertEquals("kuwbcrnwb", model.properties().publicIPAddressConfiguration().name()); + Assertions.assertEquals(1688496747, + model.properties().publicIPAddressConfiguration().properties().idleTimeoutInMinutes()); + Assertions.assertEquals(DeleteOptions.DETACH, + model.properties().publicIPAddressConfiguration().properties().deleteOption()); + Assertions.assertEquals("v", + model.properties().publicIPAddressConfiguration().properties().dnsSettings().domainNameLabel()); + Assertions.assertEquals(DomainNameLabelScopeTypes.NO_REUSE, + model.properties().publicIPAddressConfiguration().properties().dnsSettings().domainNameLabelScope()); + Assertions.assertEquals("lhspkdee", + model.properties().publicIPAddressConfiguration().properties().ipTags().get(0).ipTagType()); + Assertions.assertEquals("ofmxagkvtmelmqkr", + model.properties().publicIPAddressConfiguration().properties().ipTags().get(0).tag()); + Assertions.assertEquals("gvxp", + model.properties().publicIPAddressConfiguration().properties().publicIPPrefix().id()); + Assertions.assertEquals(IPVersions.IPV4, + model.properties().publicIPAddressConfiguration().properties().publicIPAddressVersion()); + Assertions.assertEquals(PublicIPAllocationMethod.STATIC, + model.properties().publicIPAddressConfiguration().properties().publicIPAllocationMethod()); + Assertions.assertEquals(PublicIPAddressSkuName.BASIC, + model.properties().publicIPAddressConfiguration().sku().name()); + Assertions.assertEquals(PublicIPAddressSkuTier.GLOBAL, + model.properties().publicIPAddressConfiguration().sku().tier()); + Assertions.assertEquals("bnbbeldawkz", model.properties().publicIPAddressConfiguration().tags().get("ali")); + Assertions.assertEquals(IPVersions.IPV6, model.properties().privateIPAddressVersion()); + Assertions.assertEquals("kauhashsfwxo", model.properties().applicationSecurityGroups().get(0).id()); + Assertions.assertEquals("wpucwwfvovbv", model.properties().applicationGatewayBackendAddressPools().get(0).id()); + Assertions.assertEquals("eiotwmcdytdx", model.properties().loadBalancerBackendAddressPools().get(0).id()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationPropertiesTests.java new file mode 100644 index 000000000000..34adff9f66b5 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationPropertiesTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.management.SubResource; +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.DomainNameLabelScopeTypes; +import com.azure.resourcemanager.computeschedule.models.IPVersions; +import com.azure.resourcemanager.computeschedule.models.PublicIPAllocationMethod; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VirtualMachinePublicIPAddressConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualMachinePublicIPAddressConfigurationProperties model = BinaryData.fromString( + "{\"idleTimeoutInMinutes\":1201064167,\"deleteOption\":\"Detach\",\"dnsSettings\":{\"domainNameLabel\":\"nalaulppg\",\"domainNameLabelScope\":\"NoReuse\"},\"ipTags\":[{\"ipTagType\":\"pnyiropuhp\",\"tag\":\"vpgylgqgitxmed\"},{\"ipTagType\":\"c\",\"tag\":\"ynqwwncwzzhxgk\"},{\"ipTagType\":\"mgucna\",\"tag\":\"t\"},{\"ipTagType\":\"ellwptfdy\",\"tag\":\"fqbuaceopzf\"}],\"publicIPPrefix\":{\"id\":\"huaoppp\"},\"publicIPAddressVersion\":\"IPv4\",\"publicIPAllocationMethod\":\"Static\"}") + .toObject(VirtualMachinePublicIPAddressConfigurationProperties.class); + Assertions.assertEquals(1201064167, model.idleTimeoutInMinutes()); + Assertions.assertEquals(DeleteOptions.DETACH, model.deleteOption()); + Assertions.assertEquals("nalaulppg", model.dnsSettings().domainNameLabel()); + Assertions.assertEquals(DomainNameLabelScopeTypes.NO_REUSE, model.dnsSettings().domainNameLabelScope()); + Assertions.assertEquals("pnyiropuhp", model.ipTags().get(0).ipTagType()); + Assertions.assertEquals("vpgylgqgitxmed", model.ipTags().get(0).tag()); + Assertions.assertEquals("huaoppp", model.publicIPPrefix().id()); + Assertions.assertEquals(IPVersions.IPV4, model.publicIPAddressVersion()); + Assertions.assertEquals(PublicIPAllocationMethod.STATIC, model.publicIPAllocationMethod()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualMachinePublicIPAddressConfigurationProperties model + = new VirtualMachinePublicIPAddressConfigurationProperties().withIdleTimeoutInMinutes(1201064167) + .withDeleteOption(DeleteOptions.DETACH) + .withDnsSettings( + new VirtualMachinePublicIPAddressDnsSettingsConfiguration().withDomainNameLabel("nalaulppg") + .withDomainNameLabelScope(DomainNameLabelScopeTypes.NO_REUSE)) + .withIpTags( + Arrays.asList(new VirtualMachineIpTag().withIpTagType("pnyiropuhp").withTag("vpgylgqgitxmed"), + new VirtualMachineIpTag().withIpTagType("c").withTag("ynqwwncwzzhxgk"), + new VirtualMachineIpTag().withIpTagType("mgucna").withTag("t"), + new VirtualMachineIpTag().withIpTagType("ellwptfdy").withTag("fqbuaceopzf"))) + .withPublicIPPrefix(new SubResource().withId("huaoppp")) + .withPublicIPAddressVersion(IPVersions.IPV4) + .withPublicIPAllocationMethod(PublicIPAllocationMethod.STATIC); + model = BinaryData.fromObject(model).toObject(VirtualMachinePublicIPAddressConfigurationProperties.class); + Assertions.assertEquals(1201064167, model.idleTimeoutInMinutes()); + Assertions.assertEquals(DeleteOptions.DETACH, model.deleteOption()); + Assertions.assertEquals("nalaulppg", model.dnsSettings().domainNameLabel()); + Assertions.assertEquals(DomainNameLabelScopeTypes.NO_REUSE, model.dnsSettings().domainNameLabelScope()); + Assertions.assertEquals("pnyiropuhp", model.ipTags().get(0).ipTagType()); + Assertions.assertEquals("vpgylgqgitxmed", model.ipTags().get(0).tag()); + Assertions.assertEquals("huaoppp", model.publicIPPrefix().id()); + Assertions.assertEquals(IPVersions.IPV4, model.publicIPAddressVersion()); + Assertions.assertEquals(PublicIPAllocationMethod.STATIC, model.publicIPAllocationMethod()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationTests.java new file mode 100644 index 000000000000..70e33693a9a9 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationTests.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.management.SubResource; +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DeleteOptions; +import com.azure.resourcemanager.computeschedule.models.DomainNameLabelScopeTypes; +import com.azure.resourcemanager.computeschedule.models.IPVersions; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuName; +import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuTier; +import com.azure.resourcemanager.computeschedule.models.PublicIPAllocationMethod; +import com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfiguration; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VirtualMachinePublicIPAddressConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualMachinePublicIPAddressConfiguration model = BinaryData.fromString( + "{\"name\":\"uusdttouwa\",\"properties\":{\"idleTimeoutInMinutes\":2116291824,\"deleteOption\":\"Delete\",\"dnsSettings\":{\"domainNameLabel\":\"elnsmvbxw\",\"domainNameLabelScope\":\"SubscriptionReuse\"},\"ipTags\":[{\"ipTagType\":\"hcaalnjix\",\"tag\":\"xyawj\"}],\"publicIPPrefix\":{\"id\":\"qcslyjpkiid\"},\"publicIPAddressVersion\":\"IPv6\",\"publicIPAllocationMethod\":\"Static\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Global\"},\"tags\":{\"o\":\"rzt\"}}") + .toObject(VirtualMachinePublicIPAddressConfiguration.class); + Assertions.assertEquals("uusdttouwa", model.name()); + Assertions.assertEquals(2116291824, model.properties().idleTimeoutInMinutes()); + Assertions.assertEquals(DeleteOptions.DELETE, model.properties().deleteOption()); + Assertions.assertEquals("elnsmvbxw", model.properties().dnsSettings().domainNameLabel()); + Assertions.assertEquals(DomainNameLabelScopeTypes.SUBSCRIPTION_REUSE, + model.properties().dnsSettings().domainNameLabelScope()); + Assertions.assertEquals("hcaalnjix", model.properties().ipTags().get(0).ipTagType()); + Assertions.assertEquals("xyawj", model.properties().ipTags().get(0).tag()); + Assertions.assertEquals("qcslyjpkiid", model.properties().publicIPPrefix().id()); + Assertions.assertEquals(IPVersions.IPV6, model.properties().publicIPAddressVersion()); + Assertions.assertEquals(PublicIPAllocationMethod.STATIC, model.properties().publicIPAllocationMethod()); + Assertions.assertEquals(PublicIPAddressSkuName.STANDARD, model.sku().name()); + Assertions.assertEquals(PublicIPAddressSkuTier.GLOBAL, model.sku().tier()); + Assertions.assertEquals("rzt", model.tags().get("o")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualMachinePublicIPAddressConfiguration model + = new VirtualMachinePublicIPAddressConfiguration().withName("uusdttouwa") + .withProperties(new VirtualMachinePublicIPAddressConfigurationProperties() + .withIdleTimeoutInMinutes(2116291824) + .withDeleteOption(DeleteOptions.DELETE) + .withDnsSettings( + new VirtualMachinePublicIPAddressDnsSettingsConfiguration().withDomainNameLabel("elnsmvbxw") + .withDomainNameLabelScope(DomainNameLabelScopeTypes.SUBSCRIPTION_REUSE)) + .withIpTags(Arrays.asList(new VirtualMachineIpTag().withIpTagType("hcaalnjix").withTag("xyawj"))) + .withPublicIPPrefix(new SubResource().withId("qcslyjpkiid")) + .withPublicIPAddressVersion(IPVersions.IPV6) + .withPublicIPAllocationMethod(PublicIPAllocationMethod.STATIC)) + .withSku(new PublicIPAddressSku().withName(PublicIPAddressSkuName.STANDARD) + .withTier(PublicIPAddressSkuTier.GLOBAL)) + .withTags(mapOf("o", "rzt")); + model = BinaryData.fromObject(model).toObject(VirtualMachinePublicIPAddressConfiguration.class); + Assertions.assertEquals("uusdttouwa", model.name()); + Assertions.assertEquals(2116291824, model.properties().idleTimeoutInMinutes()); + Assertions.assertEquals(DeleteOptions.DELETE, model.properties().deleteOption()); + Assertions.assertEquals("elnsmvbxw", model.properties().dnsSettings().domainNameLabel()); + Assertions.assertEquals(DomainNameLabelScopeTypes.SUBSCRIPTION_REUSE, + model.properties().dnsSettings().domainNameLabelScope()); + Assertions.assertEquals("hcaalnjix", model.properties().ipTags().get(0).ipTagType()); + Assertions.assertEquals("xyawj", model.properties().ipTags().get(0).tag()); + Assertions.assertEquals("qcslyjpkiid", model.properties().publicIPPrefix().id()); + Assertions.assertEquals(IPVersions.IPV6, model.properties().publicIPAddressVersion()); + Assertions.assertEquals(PublicIPAllocationMethod.STATIC, model.properties().publicIPAllocationMethod()); + Assertions.assertEquals(PublicIPAddressSkuName.STANDARD, model.sku().name()); + Assertions.assertEquals(PublicIPAddressSkuTier.GLOBAL, model.sku().tier()); + Assertions.assertEquals("rzt", model.tags().get("o")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressDnsSettingsConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressDnsSettingsConfigurationTests.java new file mode 100644 index 000000000000..f596709bc222 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressDnsSettingsConfigurationTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DomainNameLabelScopeTypes; +import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class VirtualMachinePublicIPAddressDnsSettingsConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualMachinePublicIPAddressDnsSettingsConfiguration model + = BinaryData.fromString("{\"domainNameLabel\":\"ol\",\"domainNameLabelScope\":\"ResourceGroupReuse\"}") + .toObject(VirtualMachinePublicIPAddressDnsSettingsConfiguration.class); + Assertions.assertEquals("ol", model.domainNameLabel()); + Assertions.assertEquals(DomainNameLabelScopeTypes.RESOURCE_GROUP_REUSE, model.domainNameLabelScope()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualMachinePublicIPAddressDnsSettingsConfiguration model + = new VirtualMachinePublicIPAddressDnsSettingsConfiguration().withDomainNameLabel("ol") + .withDomainNameLabelScope(DomainNameLabelScopeTypes.RESOURCE_GROUP_REUSE); + model = BinaryData.fromObject(model).toObject(VirtualMachinePublicIPAddressDnsSettingsConfiguration.class); + Assertions.assertEquals("ol", model.domainNameLabel()); + Assertions.assertEquals(DomainNameLabelScopeTypes.RESOURCE_GROUP_REUSE, model.domainNameLabelScope()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VmSizeProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VmSizeProfileTests.java new file mode 100644 index 000000000000..58537fcd5dfd --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VmSizeProfileTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.VmSizeProfile; +import org.junit.jupiter.api.Assertions; + +public final class VmSizeProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VmSizeProfile model + = BinaryData.fromString("{\"name\":\"ohdneuel\",\"rank\":1976701075}").toObject(VmSizeProfile.class); + Assertions.assertEquals("ohdneuel", model.name()); + Assertions.assertEquals(1976701075, model.rank()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VmSizeProfile model = new VmSizeProfile().withName("ohdneuel").withRank(1976701075); + model = BinaryData.fromObject(model).toObject(VmSizeProfile.class); + Assertions.assertEquals("ohdneuel", model.name()); + Assertions.assertEquals(1976701075, model.rank()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMConfigurationTests.java new file mode 100644 index 000000000000..d2bbf3ced479 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMConfigurationTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ProtocolTypes; +import com.azure.resourcemanager.computeschedule.models.WinRMConfiguration; +import com.azure.resourcemanager.computeschedule.models.WinRMListener; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class WinRMConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WinRMConfiguration model + = BinaryData.fromString("{\"listeners\":[{\"protocol\":\"Https\",\"certificateUrl\":\"vhezrkgqhcj\"}]}") + .toObject(WinRMConfiguration.class); + Assertions.assertEquals(ProtocolTypes.HTTPS, model.listeners().get(0).protocol()); + Assertions.assertEquals("vhezrkgqhcj", model.listeners().get(0).certificateUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WinRMConfiguration model = new WinRMConfiguration().withListeners( + Arrays.asList(new WinRMListener().withProtocol(ProtocolTypes.HTTPS).withCertificateUrl("vhezrkgqhcj"))); + model = BinaryData.fromObject(model).toObject(WinRMConfiguration.class); + Assertions.assertEquals(ProtocolTypes.HTTPS, model.listeners().get(0).protocol()); + Assertions.assertEquals("vhezrkgqhcj", model.listeners().get(0).certificateUrl()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMListenerTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMListenerTests.java new file mode 100644 index 000000000000..ee07e1f5fd00 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMListenerTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ProtocolTypes; +import com.azure.resourcemanager.computeschedule.models.WinRMListener; +import org.junit.jupiter.api.Assertions; + +public final class WinRMListenerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WinRMListener model = BinaryData.fromString("{\"protocol\":\"Https\",\"certificateUrl\":\"vgmkqsleyyvxyqjp\"}") + .toObject(WinRMListener.class); + Assertions.assertEquals(ProtocolTypes.HTTPS, model.protocol()); + Assertions.assertEquals("vgmkqsleyyvxyqjp", model.certificateUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WinRMListener model + = new WinRMListener().withProtocol(ProtocolTypes.HTTPS).withCertificateUrl("vgmkqsleyyvxyqjp"); + model = BinaryData.fromObject(model).toObject(WinRMListener.class); + Assertions.assertEquals(ProtocolTypes.HTTPS, model.protocol()); + Assertions.assertEquals("vgmkqsleyyvxyqjp", model.certificateUrl()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsConfigurationTests.java new file mode 100644 index 000000000000..eef3d6a77852 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsConfigurationTests.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContent; +import com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContentComponentName; +import com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContentPassName; +import com.azure.resourcemanager.computeschedule.models.PatchSettings; +import com.azure.resourcemanager.computeschedule.models.ProtocolTypes; +import com.azure.resourcemanager.computeschedule.models.SettingNames; +import com.azure.resourcemanager.computeschedule.models.WinRMConfiguration; +import com.azure.resourcemanager.computeschedule.models.WinRMListener; +import com.azure.resourcemanager.computeschedule.models.WindowsConfiguration; +import com.azure.resourcemanager.computeschedule.models.WindowsPatchAssessmentMode; +import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting; +import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformSettings; +import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchMode; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class WindowsConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WindowsConfiguration model = BinaryData.fromString( + "{\"provisionVMAgent\":true,\"enableAutomaticUpdates\":true,\"timeZone\":\"zdmohctbqvu\",\"additionalUnattendContent\":[{\"passName\":\"OobeSystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"gujjugwdkcglh\"}],\"patchSettings\":{\"patchMode\":\"AutomaticByPlatform\",\"enableHotpatching\":true,\"assessmentMode\":\"ImageDefault\",\"automaticByPlatformSettings\":{\"rebootSetting\":\"Always\",\"bypassPlatformSafetyChecksOnUserSchedule\":true}},\"winRM\":{\"listeners\":[{\"protocol\":\"Http\",\"certificateUrl\":\"fqweykhmene\"}]}}") + .toObject(WindowsConfiguration.class); + Assertions.assertTrue(model.provisionVMAgent()); + Assertions.assertTrue(model.enableAutomaticUpdates()); + Assertions.assertEquals("zdmohctbqvu", model.timeZone()); + Assertions.assertEquals(AdditionalUnattendContentPassName.OOBE_SYSTEM, + model.additionalUnattendContent().get(0).passName()); + Assertions.assertEquals(AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP, + model.additionalUnattendContent().get(0).componentName()); + Assertions.assertEquals(SettingNames.FIRST_LOGON_COMMANDS, + model.additionalUnattendContent().get(0).settingName()); + Assertions.assertEquals("gujjugwdkcglh", model.additionalUnattendContent().get(0).content()); + Assertions.assertEquals(WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM, model.patchSettings().patchMode()); + Assertions.assertTrue(model.patchSettings().enableHotpatching()); + Assertions.assertEquals(WindowsPatchAssessmentMode.IMAGE_DEFAULT, model.patchSettings().assessmentMode()); + Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, + model.patchSettings().automaticByPlatformSettings().rebootSetting()); + Assertions + .assertTrue(model.patchSettings().automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); + Assertions.assertEquals(ProtocolTypes.HTTP, model.winRM().listeners().get(0).protocol()); + Assertions.assertEquals("fqweykhmene", model.winRM().listeners().get(0).certificateUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WindowsConfiguration model = new WindowsConfiguration().withProvisionVMAgent(true) + .withEnableAutomaticUpdates(true) + .withTimeZone("zdmohctbqvu") + .withAdditionalUnattendContent(Arrays + .asList(new AdditionalUnattendContent().withPassName(AdditionalUnattendContentPassName.OOBE_SYSTEM) + .withComponentName(AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP) + .withSettingName(SettingNames.FIRST_LOGON_COMMANDS) + .withContent("gujjugwdkcglh"))) + .withPatchSettings(new PatchSettings().withPatchMode(WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM) + .withEnableHotpatching(true) + .withAssessmentMode(WindowsPatchAssessmentMode.IMAGE_DEFAULT) + .withAutomaticByPlatformSettings(new WindowsVMGuestPatchAutomaticByPlatformSettings() + .withRebootSetting(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS) + .withBypassPlatformSafetyChecksOnUserSchedule(true))) + .withWinRM(new WinRMConfiguration().withListeners( + Arrays.asList(new WinRMListener().withProtocol(ProtocolTypes.HTTP).withCertificateUrl("fqweykhmene")))); + model = BinaryData.fromObject(model).toObject(WindowsConfiguration.class); + Assertions.assertTrue(model.provisionVMAgent()); + Assertions.assertTrue(model.enableAutomaticUpdates()); + Assertions.assertEquals("zdmohctbqvu", model.timeZone()); + Assertions.assertEquals(AdditionalUnattendContentPassName.OOBE_SYSTEM, + model.additionalUnattendContent().get(0).passName()); + Assertions.assertEquals(AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP, + model.additionalUnattendContent().get(0).componentName()); + Assertions.assertEquals(SettingNames.FIRST_LOGON_COMMANDS, + model.additionalUnattendContent().get(0).settingName()); + Assertions.assertEquals("gujjugwdkcglh", model.additionalUnattendContent().get(0).content()); + Assertions.assertEquals(WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM, model.patchSettings().patchMode()); + Assertions.assertTrue(model.patchSettings().enableHotpatching()); + Assertions.assertEquals(WindowsPatchAssessmentMode.IMAGE_DEFAULT, model.patchSettings().assessmentMode()); + Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, + model.patchSettings().automaticByPlatformSettings().rebootSetting()); + Assertions + .assertTrue(model.patchSettings().automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); + Assertions.assertEquals(ProtocolTypes.HTTP, model.winRM().listeners().get(0).protocol()); + Assertions.assertEquals("fqweykhmene", model.winRM().listeners().get(0).certificateUrl()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsVMGuestPatchAutomaticByPlatformSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsVMGuestPatchAutomaticByPlatformSettingsTests.java new file mode 100644 index 000000000000..a5402d8dc6ff --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsVMGuestPatchAutomaticByPlatformSettingsTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting; +import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformSettings; +import org.junit.jupiter.api.Assertions; + +public final class WindowsVMGuestPatchAutomaticByPlatformSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WindowsVMGuestPatchAutomaticByPlatformSettings model + = BinaryData.fromString("{\"rebootSetting\":\"Never\",\"bypassPlatformSafetyChecksOnUserSchedule\":false}") + .toObject(WindowsVMGuestPatchAutomaticByPlatformSettings.class); + Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.NEVER, model.rebootSetting()); + Assertions.assertFalse(model.bypassPlatformSafetyChecksOnUserSchedule()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WindowsVMGuestPatchAutomaticByPlatformSettings model = new WindowsVMGuestPatchAutomaticByPlatformSettings() + .withRebootSetting(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.NEVER) + .withBypassPlatformSafetyChecksOnUserSchedule(false); + model = BinaryData.fromObject(model).toObject(WindowsVMGuestPatchAutomaticByPlatformSettings.class); + Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.NEVER, model.rebootSetting()); + Assertions.assertFalse(model.bypassPlatformSafetyChecksOnUserSchedule()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZoneAllocationPolicyTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZoneAllocationPolicyTests.java new file mode 100644 index 000000000000..3149adc0adb4 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZoneAllocationPolicyTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.DistributionStrategy; +import com.azure.resourcemanager.computeschedule.models.ZoneAllocationPolicy; +import com.azure.resourcemanager.computeschedule.models.ZonePreference; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ZoneAllocationPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ZoneAllocationPolicy model = BinaryData.fromString( + "{\"distributionStrategy\":\"BestEffortSingleZone\",\"zonePreferences\":[{\"zone\":\"fikdowwqu\",\"rank\":180318621},{\"zone\":\"xzxcl\",\"rank\":2116821034}]}") + .toObject(ZoneAllocationPolicy.class); + Assertions.assertEquals(DistributionStrategy.BEST_EFFORT_SINGLE_ZONE, model.distributionStrategy()); + Assertions.assertEquals("fikdowwqu", model.zonePreferences().get(0).zone()); + Assertions.assertEquals(180318621, model.zonePreferences().get(0).rank()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ZoneAllocationPolicy model + = new ZoneAllocationPolicy().withDistributionStrategy(DistributionStrategy.BEST_EFFORT_SINGLE_ZONE) + .withZonePreferences(Arrays.asList(new ZonePreference().withZone("fikdowwqu").withRank(180318621), + new ZonePreference().withZone("xzxcl").withRank(2116821034))); + model = BinaryData.fromObject(model).toObject(ZoneAllocationPolicy.class); + Assertions.assertEquals(DistributionStrategy.BEST_EFFORT_SINGLE_ZONE, model.distributionStrategy()); + Assertions.assertEquals("fikdowwqu", model.zonePreferences().get(0).zone()); + Assertions.assertEquals(180318621, model.zonePreferences().get(0).rank()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZonePreferenceTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZonePreferenceTests.java new file mode 100644 index 000000000000..98d430c613dd --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZonePreferenceTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ZonePreference; +import org.junit.jupiter.api.Assertions; + +public final class ZonePreferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ZonePreference model + = BinaryData.fromString("{\"zone\":\"thhqzonosggbh\",\"rank\":1373872192}").toObject(ZonePreference.class); + Assertions.assertEquals("thhqzonosggbh", model.zone()); + Assertions.assertEquals(1373872192, model.rank()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ZonePreference model = new ZonePreference().withZone("thhqzonosggbh").withRank(1373872192); + model = BinaryData.fromObject(model).toObject(ZonePreference.class); + Assertions.assertEquals("thhqzonosggbh", model.zone()); + Assertions.assertEquals(1373872192, model.rank()); + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/tsp-location.yaml b/sdk/computeschedule/azure-resourcemanager-computeschedule/tsp-location.yaml index c2e4bdd3431c..c8781bf96ec4 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/tsp-location.yaml +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/computeschedule/ComputeSchedule.Management -commit: 6267b64842af3d744c5b092a3f3beef49729ad6d +commit: 679c30c9ef3043eca2cd8b3322bba5ef7f6a4fbc repo: Azure/azure-rest-api-specs additionalDirectories: